Skip to content

chore: nodes accept peer with same or higher protocol version - #1778

Merged
kevindeforth merged 3 commits into
mainfrom
kd/1777-prepare-network-protocol-for-upgrades
Jan 16, 2026
Merged

kevindeforth merged 3 commits into
mainfrom
kd/1777-prepare-network-protocol-for-upgrades

Conversation

@kevindeforth

@kevindeforth kevindeforth commented Jan 16, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #1777, in preparation of further network updates.


for context: #1778 (comment)

For future reference, we plan to keep track of the agreed protocol version in a future release so newer nodes will know which version of the protocol they need to "speak". However, in this case the old nodes are simply "trusting" newer nodes to decide if they want to accept the connection and not, and the responsibility is on the newer nodes to communicate in a backwards compatible way.

SimonRastikian
SimonRastikian previously approved these changes Jan 16, 2026

@SimonRastikian SimonRastikian left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Things look good to me aside from some clippy issues

gilcu3
gilcu3 previously approved these changes Jan 16, 2026

@gilcu3 gilcu3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you!

Comment thread crates/node/src/network/handshake.rs Outdated

@netrome netrome left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for doing this, looking forward to having a more upgradable network layer!


let other_protocol_version = u32::from_be_bytes(other_handshake[1..].try_into().unwrap());
if other_protocol_version != MPC_PROTOCOL_VERSION {
if other_protocol_version < MPC_PROTOCOL_VERSION {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For future reference, we plan to keep track of the agreed protocol version in a future release so newer nodes will know which version of the protocol they need to "speak". However, in this case the old nodes are simply "trusting" newer nodes to decide if they want to accept the connection and not, and the responsibility is on the newer nodes to communicate in a backwards compatible way.

@kevindeforth
kevindeforth added this pull request to the merge queue Jan 16, 2026
Merged via the queue into main with commit 781d072 Jan 16, 2026
17 checks passed
@kevindeforth
kevindeforth deleted the kd/1777-prepare-network-protocol-for-upgrades branch January 16, 2026 10:02
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.

prepare network prototocol for updates

4 participants