-
Notifications
You must be signed in to change notification settings - Fork 28
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
[Tracking] Implement discv4
to connect to p2p peers
#17
Labels
network
Issues related to network communication
Milestone
Comments
Merged
MegaRedHand
changed the title
Implement
[Tracking] Implement Jun 27, 2024
discv4
to connect to p2p peersdiscv4
to connect to p2p peers
MegaRedHand
added a commit
that referenced
this issue
Jul 3, 2024
**Motivation** According to the spec: > Implementations should ignore any additional elements in the `packet-data` list as well as any extra data after the list. We're currently failing if any of that happens. **Description** This PR introduces `Decoder::finish_unchecked`, which ignores any trailing bytes instead of failing, and uses that to allow for additional elements inside the packet-data. Also, it replaces some usage of `RLPDecode::decode` with `RLPDecode::decode_unfinished` to allow for extra data after the message. As an extra, it refactors out the big `match` inside of both `Message` encode and decode functions, since it's expected those will change often in the next PRs. Related to #17
mpaulucci
pushed a commit
to mpaulucci/lambda_ethereum_rust
that referenced
this issue
Oct 16, 2024
mpaulucci
pushed a commit
to mpaulucci/lambda_ethereum_rust
that referenced
this issue
Oct 16, 2024
**Motivation** According to the spec: > Implementations should ignore any additional elements in the `packet-data` list as well as any extra data after the list. We're currently failing if any of that happens. **Description** This PR introduces `Decoder::finish_unchecked`, which ignores any trailing bytes instead of failing, and uses that to allow for additional elements inside the packet-data. Also, it replaces some usage of `RLPDecode::decode` with `RLPDecode::decode_unfinished` to allow for extra data after the message. As an extra, it refactors out the big `match` inside of both `Message` encode and decode functions, since it's expected those will change often in the next PRs. Related to lambdaclass#17
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need this protocol to be able to connect to peers.
See: https://github.com/ethereum/devp2p/blob/master/discv4.md
Here's a reference implementation: https://github.com/akula-bft/akula/tree/master/src/sentry/devp2p/disc/v4
Related issues:
Ping
message encoding #74Ping
message decoding #79Pong
message encoding #80Pong
message decoding #81FindNode
message encoding #82FindNode
message decoding #83Neighbors
message encoding #84Neighbors
message decoding #85ENRRequest
message encoding #88ENRRequest
message decoding #89ENRResponse
message encoding #90ENRResponse
message decoding #91The text was updated successfully, but these errors were encountered: