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

EIP-778: Ethereum Node Records #778

Merged
merged 8 commits into from
Mar 23, 2018
Merged

EIP-778: Ethereum Node Records #778

merged 8 commits into from
Mar 23, 2018

Conversation

fjl
Copy link
Contributor

@fjl fjl commented Nov 23, 2017

This pull request proposes Ethereum Node Records, a new format for p2p connectivity information.

EIPS/eip-778.md Outdated
encoded as the concatenation of `r` and `s`.
- To verify a record, check that the signature was made by the public key in the
"secp256k1" key/value pair.
- To derive a node address, take the keccak256 hash of the public key.
Copy link
Member

Choose a reason for hiding this comment

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

What's the definition of a node address?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's the byte sequence used for Kademlia distance calculations.

Copy link
Member

@FrankSzendzielarz FrankSzendzielarz Dec 4, 2017

Choose a reason for hiding this comment

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

An interesting consequence of using hash(node id) for XOR distance calculations is that it becomes very difficult to implement the Kademlia bucket refresh part of the Kademlia system. The Maymounkov and Mazieres paper explains that after the idle k-bucket timeout (1 hour in the v4 rlpx.md), the k-bucket should refresh itself by calling FindNeighbours on a random node id within the k-bucket range. I don't see how that can be implemented if the k-bucket range is hash(node id) and FindNeighbours accepts (node id). I see the go implementation avoids the issue by just picking a random id irrespective of the bucket. For 'distant' buckets, the contents could get stale quickly (1 hour).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In v5, FindNode will contain hash instead of the public key. See ethereum/devp2p#25


| Key | Value |
|:-------------|:-------------------------------------------------|
| `id` | name of identity scheme, e.g. "secp256k1-keccak" |
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps use IDs here specified in a table? secp256k1-keccak is about 5% of the maximum allowed record size on its own.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree the name is a bit long.

EIPS/eip-778.md Outdated
- The remainder of the record consists of arbitrary key/value pairs, which must be sorted
by key.

A record's signature is made and validated according to an *identy scheme*. The identity
Copy link
Member

Choose a reason for hiding this comment

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

small typo - should be "identity scheme"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

fjl pushed a commit to ethereum/go-ethereum that referenced this pull request Dec 29, 2017
Initial implementation of ENR according to ethereum/EIPs#778
@fulldecent
Copy link
Contributor

@Arachnid You nominated this as an "EIPs that should be merged". Can you please share your notes on that here?

@Arachnid
Copy link
Contributor

This EIP is referenced by #868, which has already been merged. As such, it needs to either be finalised and merged, or the dependency in the existing EIP needs to be removed.

@Arachnid Arachnid merged commit 872cec4 into ethereum:master Mar 23, 2018
mariameda pushed a commit to NiluPlatform/go-nilu that referenced this pull request Aug 23, 2018
hatricker pushed a commit to thundercore/thundercore-localchain that referenced this pull request Oct 8, 2018
Initial implementation of ENR according to ethereum/EIPs#778
protolambda pushed a commit to protolambda/go-enr that referenced this pull request Jul 10, 2021
Initial implementation of ENR according to ethereum/EIPs#778
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.

7 participants