-
Notifications
You must be signed in to change notification settings - Fork 22
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
Discvv5.1 - the latest spec updates #76
Discvv5.1 - the latest spec updates #76
Conversation
…ldn't be decrypted - send WHOAREYOU in this case
This is passing almost all of my tests except for In this test, the node receives PING and should respond with WHOAREYOU. We added this to the spec a couple days ago. Would be nice if you could fix it before merging.
|
@fjl thanks for testing! Results look surprisingly good 👍 |
… is not in a Table yet
…etwork interchange
… we should again send another WhoAreYou packet
…d of putting them into await queue. So when the WhoAreYou packet is received 'unexpectedly' we should take a SENT packet for resending
@fjl fixed the issue with latest commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@fjl turned out that ephemeral public key was in uncompressed form. Curious why your tests don't catch this |
PR Description
Adopted the latest changes to Discv5.1 spec PR: ethereum/devp2p#157 starting from commit d19fbe7b
maskingIV
as a part of AES/GCM AD. That's why we need now to pullRawMessage.maskingIV
till message decryption. This is done via additional Envelope fieldMASKING_IV
WhoAreYou
message is now mixed toid-signature
input. We need to remember thechallenge
of outboundWhoAreYouPacket
in theNodeSession
to validate the next inboundHandshakePacket
WhoAreYou
has no moresrc-node-id
thus we need to find session via original-nonce (as it was in v5.0 withauthTag
)Envelope
class