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

discv5: protocol version v5.2 #226

Open
3 of 12 tasks
fjl opened this issue Mar 31, 2023 · 6 comments
Open
3 of 12 tasks

discv5: protocol version v5.2 #226

fjl opened this issue Mar 31, 2023 · 6 comments

Comments

@fjl
Copy link
Collaborator

fjl commented Mar 31, 2023

This is a tracking issue for the next discv5 protocol version.

Development of Discovery v5.2 will happen in the discv5-v5.2 branch. To contribute, please send PRs to that branch instead of the main branch.

Spec changes

Here is the list of spec changes expected for the new protocol version:

  • Update the protocol version number.
  • Remove description of topic index and related messages. These will be brought back later (likely in v5.3), but should be removed for now, since they are not part of the actively-used protocol.
  • Add spec text to define handling of protocol version upgrades.
    • It's not yet clear how the upgrade will work. The protocol version will increase, and some implementations might reject packets with a mismatching version even though the spec doesn't say they should.
    • We could add spec text to the effect that protocol versions higher than the local version should be dealt with by responding with the local version (unless the packet can't be decoded).
    • Might be best to handle this upgrade with an ENR key. I claim dibs on key d5.
  • Add the NAT hole punching protocol messages. discv5: NAT hole punching wire protocol #225 discv5: NAT traversal via Rendezvous protocol [WIP] #207
  • Define/explain the packet types (message packet, handshake packet, whoareyou packet etc.) better.
    • Specifically, for the NAT hole punching scheme, there is a need to introduce a new packet type that does not trigger a handshake in case the packet cannot be decrypted. The new type can also be used for response messages like NODES, TALKRESP, etc.
  • Add more text around attack countermeasures discv5: attacks mitigation proposal #161
    • The plan is to add this as an informational section, as a recommendation for implementers.
  • Change id-nonce handling in handshake packets. discv5: include plain id-nonce into HANDSHAKE packet #164
  • Find a way to integrate Portal Network's use of the discv5 wire protocol in the spec. discv5: support multi-packet talk. #192 discv5: sub-protocol data transmission #229
    • There might not be any spec changes resulting from this, I just want to make sure Portal Network can work with v5.2 as-is without depending on spec/implementation mods.
  • Add a Changelog section to discv5.md.

Implementations

collect information about v5.2 implementation status here

Interop testing

  • enable discv5 tests in hive devp2p simulator
  • add tests for protocol version upgrade
  • add tests for NAT hole punching messages
@fjl fjl added this to the Discovery v5.2 milestone Mar 31, 2023
@fjl
Copy link
Collaborator Author

fjl commented Mar 31, 2023

If implementers feel like it, we could also explore adding support for ed25519 node identities in v5.2. It'd be great to have an alternative identity system just to test the pipeline of shipping new ones, in case it has to be done quickly someday.

@ppopth
Copy link
Member

ppopth commented Mar 31, 2023

Why not v5.1? Is the version number 5.1 used?

@fjl
Copy link
Collaborator Author

fjl commented Mar 31, 2023

Yes, v5.1 is the current protocol version.

@uink45
Copy link

uink45 commented May 23, 2023

Hey @fjl, we are currently in the process of implementing Discv5 (v5.1) in C# and wanted to know if the components (advertisement, and message types) related to topics should be left out for now.

@fjl
Copy link
Collaborator Author

fjl commented May 23, 2023

Yes, they should be left out. The topic advertisement mechanism is not ready yet and I have removed it in v5.2

@divagant-martian
Copy link

@fjl #231 should probably included in the task list

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

No branches or pull requests

4 participants