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

devp2p: discv4 & discv5 #22

Closed
3 tasks done
decanus opened this issue Mar 16, 2020 · 4 comments
Closed
3 tasks done

devp2p: discv4 & discv5 #22

decanus opened this issue Mar 16, 2020 · 4 comments
Labels

Comments

@decanus
Copy link
Owner

decanus commented Mar 16, 2020

This issue is mainly here as the work process for the "Research: Discv5 feasibility" issue. There are several goals that should be achieved through it to reach the final study. This includes exploration and further understanding of the topic & technologies relevant.

Discv4 & Discv5

Firstly, the technical details of discv4 & discv5 should be analyzed. How doe each of them function, what guarantees do they provide and where do they fall short? Then additionally the difference between the 2 should be highlighted.

Next, Felix Lange's pull request ethereum/go-ethereum#20750 should be analyzed to see how and if it differs from the current spec.

Finally, we analyze the difference between the current, ethereum/go-ethereum implementation and that within nim-eth. Where do they differ, what needs to be added etc.

All together this will provide enough knowledge on the subject.

It may make sense to later look at discv5 and investigate the changes that are still to come and think about changes we could still get into the protocol that would help improve the overall functionality.

Literature

  • Node Discovery Protocol - post
  • Node Discovery Protocol v5 - post (discv5 unlike v4 is made up of various documents)
  • Discovery v5 MVP - issue
@decanus
Copy link
Owner Author

decanus commented Mar 16, 2020

discv4

discv4 is a Kademlia like DHT, this structure was chosen as it provides an efficient way to organise nodes has a topology of a low diameter.

secp256k1 keys are used as Node IDs the distance is calculated using the XOR of the hashed public key.

Nodes are expected to maintain up to date ENRs, they can be requested by other nodes using the ENRRequest packet.

@decanus decanus pinned this issue Mar 16, 2020
@decanus decanus unpinned this issue Mar 16, 2020
@decanus
Copy link
Owner Author

decanus commented Mar 19, 2020

IMPORTANT: discv5 is currently still in DRAFT and could make breaking changes at any point.

@decanus
Copy link
Owner Author

decanus commented Mar 19, 2020

Weird thing in discv5 is that you need to call REGTOPIC even though topics could be included in the ENR, see issue here: ethereum/devp2p#144

@decanus
Copy link
Owner Author

decanus commented Apr 9, 2020

A full summary of the research compiled during this issue can be found on vac

@decanus decanus closed this as completed Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant