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

Fix handshake network mismatch #145

Merged
merged 6 commits into from
Feb 18, 2025
Merged

Conversation

diegomrsantos
Copy link

@diegomrsantos diegomrsantos commented Feb 18, 2025

Issue Addressed

The go implementation sends and expects a "0x" prefix in the networ_id in NodeInfo - this is the same as the DomainType.

The current handshake fails with

2025-02-18T14:31:09.753455Z DEBUG network::network: Handshake failed peer_id=16Uiu2HAmHFCLdpkJVbJsRjNzLRsDjRvyDY3mdndmDjduCQjfykSh error=NetworkMismatch { ours: "00000502", theirs: "0x00000502" }

Proposed Changes

Add and remove the "0x" prefix during NodeInfo marshal and unmarshal respectively.

@diegomrsantos diegomrsantos changed the title Add and remove "0x" prefix during marshal and unmarshal respectively Fix handshake network mismatch Feb 18, 2025
dknopik
dknopik previously approved these changes Feb 18, 2025
Copy link
Member

@dknopik dknopik left a comment

Choose a reason for hiding this comment

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

Nice find! LGTM thanks!

(right after fixed test - was a bit to quick here :D)

@dknopik dknopik self-requested a review February 18, 2025 14:40
@dknopik dknopik merged commit cca7076 into sigp:unstable Feb 18, 2025
10 checks passed
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