Skip to content

p2p/discover: cache raw bytes of whoareyou packet #31543

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

Merged
merged 7 commits into from
Apr 2, 2025

Conversation

thinkAfCod
Copy link
Contributor

@thinkAfCod thinkAfCod commented Apr 2, 2025

When resending the whoareyou packet data, a new nonce and random IV will not be generated.

fjl
fjl previously approved these changes Apr 2, 2025
@fjl fjl merged commit 3e4fbce into ethereum:master Apr 2, 2025
3 of 4 checks passed
@fjl fjl added this to the 1.15.8 milestone Apr 2, 2025
@fjl
Copy link
Contributor

fjl commented Apr 2, 2025

I actually realized after merging this PR, that v5wire.Whoareyou already contains the necessary encoding data in the ChallengeData field. This field contains the all the data which is used for ID nonce verification. We can just use it instead of Encoded and it will work almost the same, just need to apply the masking function on it.

@fjl
Copy link
Contributor

fjl commented Apr 2, 2025

Just opened #31547 to address this.

sivaratrisrinivas pushed a commit to sivaratrisrinivas/go-ethereum that referenced this pull request Apr 21, 2025
…thereum#31543)

When resending the WHOAREYOU packet, a new nonce and random IV should not
be generated. The sent packet needs to match the previously-sent one exactly
in order to make the handshake retry work.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
Rampex1 pushed a commit to streamingfast/go-ethereum that referenced this pull request May 15, 2025
…thereum#31543)

When resending the WHOAREYOU packet, a new nonce and random IV should not
be generated. The sent packet needs to match the previously-sent one exactly
in order to make the handshake retry work.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
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