-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Conversation
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. |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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" | |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Initial implementation of ENR according to ethereum/EIPs#778
@Arachnid You nominated this as an "EIPs that should be merged". Can you please share your notes on that here? |
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. |
Initial implementation of ENR according to ethereum/EIPs#778
Initial implementation of ENR according to ethereum/EIPs#778
Initial implementation of ENR according to ethereum/EIPs#778
This pull request proposes Ethereum Node Records, a new format for p2p connectivity information.