Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bumped capability ID of the push_batch_votes rpc #176

Merged
merged 4 commits into from
Aug 5, 2024
Merged

Conversation

pompon0
Copy link
Collaborator

@pompon0 pompon0 commented Aug 5, 2024

We added an extra field to the Batch message, without considering the fact that an extra field won't be recognized by old binaries and they will fail to verify signatures on Batch messages. They will consider sending such invalid signatures malicious and will disconnect from the peer. To avoid this we create a new RPC instead (by just bumping the capability id on push_batch_votes RPC) which will not be interpreted by the old binaries at all.

Copy link
Contributor

@aakoshh aakoshh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a chance to accidentally duplicate the capability IDs?

@pompon0
Copy link
Collaborator Author

pompon0 commented Aug 5, 2024

we have a test for this, but you can always forget to add the ID to the test

@pompon0 pompon0 merged commit dd41158 into main Aug 5, 2024
5 checks passed
@pompon0 pompon0 deleted the gprusak-bump-rpc branch August 5, 2024 10:46
@@ -48,7 +48,7 @@ const MAX_PAYLOAD_LEN: usize = MAX_TRANSPORT_MSG_LEN - AUTHDATA_LEN;
/// <frame len:u16> ++ <frame data:[u8;len]>.
///
/// Length of the frame len field.
const LENGTH_FIELD_LEN: usize = std::mem::size_of::<u16>();
Copy link
Contributor

@aakoshh aakoshh Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like zksync-era doesn't like this: https://github.com/matter-labs/zksync-era/actions/runs/10249428261/job/28352782628?pr=2583

Not sure I should be bumping the rust-toolchain in my PR.

@aakoshh aakoshh mentioned this pull request Aug 5, 2024
pompon0 pushed a commit that referenced this pull request Aug 5, 2024
## What ❔

Created a `rust-toolchain` file pinning it to the stable version when
1.79 was released.
Reverted the change to `stream.rs` brought about by 1.80 in
#176
Bumps the version to `0.1.0-rc.8`

## Why ❔

Because the `zksync-era` build [doesn't
work](https://github.com/matter-labs/zksync-era/actions/runs/10249428261/job/28352782628?pr=2583)
with `size_of` without qualification like `core::mem::` or `std::mem::`.

`zksync-era` is pinned at `nightly-2024-05-07` at the moment. I tried to
update it to the last nightly where it was still Rust 1.80, which was
`nightly-2024-06-08` but it cannot compile `boojum`, nor does it compile
with a later nightly I tried where it's already Rust 1.82.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants