Skip to content

Discovery v5 #189

Merged
mkalinin merged 80 commits intodevelopfrom
feature/discv5-client
Nov 27, 2019
Merged

Discovery v5 #189
mkalinin merged 80 commits intodevelopfrom
feature/discv5-client

Conversation

@zilm13
Copy link
Copy Markdown
Member

@zilm13 zilm13 commented Sep 16, 2019

Implementation of this:
https://github.com/ethereum/devp2p/blob/master/discv5/discv5.md

Still in work, need to finish some things, add network, plus refactoring especially around messageHandler <-> Context, the system is raw.

@zilm13
Copy link
Copy Markdown
Member Author

zilm13 commented Sep 17, 2019

Network using Netty added.

TODO:

  • make it work w/o network (network looks not an issue)
  • polish

@mkalinin mkalinin mentioned this pull request Sep 23, 2019
11 tasks
@zilm13
Copy link
Copy Markdown
Member Author

zilm13 commented Sep 24, 2019

TODO: Buckets according to spec
TODO: handshake crypto

Comment thread discovery/src/main/java/org/ethereum/beacon/discovery/enr/NodeRecord.java Outdated
Comment thread discovery/src/main/java/org/ethereum/beacon/discovery/enr/NodeRecord.java Outdated
Comment thread discovery/src/main/java/org/ethereum/beacon/discovery/enr/NodeRecord.java Outdated
Comment thread discovery/src/main/java/org/ethereum/beacon/discovery/enr/NodeRecord.java Outdated
Comment thread discovery/src/main/java/org/ethereum/beacon/discovery/enr/NodeRecord.java Outdated
Comment thread discovery/src/main/java/org/ethereum/beacon/discovery/enr/NodeRecord.java Outdated
@zilm13 zilm13 requested a review from mkalinin November 22, 2019 14:08
@zilm13
Copy link
Copy Markdown
Member Author

zilm13 commented Nov 22, 2019

@mkalinin Finished it. Please, review.

@shahankhatch
Copy link
Copy Markdown
Contributor

lgtm. I have a minor request to review/accept #210 which renames two methods.

Refactor method name to distinguish by parameter name
System.out.println(String.format("Node %s started", nodePair1.getValue1().getNodeId()));
NodeRecord nodeRecord1 = nodePair1.getValue1();
NodeRecord nodeRecord2 =
NODE_RECORD_FACTORY_NO_VERIFICATION.fromBase64(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be convenient if one may change parameters of this node like IP address. I had to replace this base64 line to make test run on Mac OS as it handles docker in a docker-machine instance with its own network interface and addresses.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, did this, plus refactored a bit NodeRecord creation

Copy link
Copy Markdown
Contributor

@mkalinin mkalinin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am in favor of merging this PR and making further refactor/updates via separate requests. I have a suggestion to rename discovery module to discv5 for clarity.
@shahankhatch @zilm13 WDYT?

P.S. interop test looks fantastic! There is a little fix that could increase its usability.

@zilm13
Copy link
Copy Markdown
Member Author

zilm13 commented Nov 26, 2019

@mkalinin I don't like discv5 as a lot of code could be reused in, say, discv6

@shahankhatch
Copy link
Copy Markdown
Contributor

@mkalinin I don't like discv5 as a lot of code could be reused in, say, discv6

I agree with this reasoning.

@mkalinin
Copy link
Copy Markdown
Contributor

This particular implementation is discv5. I don't think it's gonna be re-used for discvX in the future. Anyway, it doesn't matter much :)

@mkalinin mkalinin changed the title WIP: discovery v5 Discovery v5 Nov 27, 2019
@mkalinin mkalinin merged commit b2ab7fe into develop Nov 27, 2019
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.

3 participants