EIP-778: Ethereum Node Records #778
Conversation
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. |
karalabe
Nov 23, 2017
Member
What's the definition of a node address
?
What's the definition of a node address
?
fjl
Nov 23, 2017
Author
Contributor
It's the byte sequence used for Kademlia distance calculations.
It's the byte sequence used for Kademlia distance calculations.
FrankSzendzielarz
Dec 4, 2017
•
Member
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).
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).
fjl
Dec 4, 2017
Author
Contributor
In v5, FindNode will contain hash instead of the public key. See ethereum/devp2p#25
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" | |
Arachnid
Nov 23, 2017
Collaborator
Perhaps use IDs here specified in a table? secp256k1-keccak
is about 5% of the maximum allowed record size on its own.
Perhaps use IDs here specified in a table? secp256k1-keccak
is about 5% of the maximum allowed record size on its own.
fjl
Nov 23, 2017
Author
Contributor
I agree the name is a bit long.
I agree the name is a bit long.
- 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 |
ligi
Dec 9, 2017
Member
small typo - should be "identity scheme"
small typo - should be "identity scheme"
fjl
Dec 9, 2017
Author
Contributor
fixed
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. |
* p2p/enr: initial implementation (#15585) Initial implementation of ENR according to ethereum/EIPs#778 * accounts/abi: handle named ouputs prefixed with underscores (#15766) * accounts/abi: handle named ouputs prefixed with underscores * accounts/abi: handle collinding outputs for struct unpacks * accounts: handle purely underscore output names * consensus/ethash: fix overdue link (#15786) * crypto: ensure private keys are < N (#15745) Fixes #15744 * whisper/whisper2: fix Go 1.10 vet issues on type mismatches (#15783) * containers/docker: change docker images to go1.9 (#15789) * build: fix version comparison for go1.10 and beyond (#15781) * eth/downloader: avoid hidden reference to finished statesync request (#15545) * build: set CC through a command-line flag (#15784) This avoids setting CC for the go run invocation, which fails on go1.10. * vendor: update github.com/rjeczalik/notify for go1.10 (#15785) * cmd/geth: remove trailing newline in license command (#15782) * eth: enable preimage recording when tracing (#15787) * core, p2p/discv5: use time.NewTicker instead of time.Tick (#15747) * console: remove comment about 'invalid' input (#15735) All inputs are saved into history, including 'invalid' inputs. * eth: uncaptialize tracer preimage error message (#15792) * eth: uncaptialize tracer preimage error message * eth: improve very important error message * eth: revert tracer preimage recording (#15800) This reverts commits 85a1eda (#15792) and c495bca (#15787) because they introduce database writes during tracing. * various: remove redundant parentheses (#15793) * all: switch gas limits from big.Int to uint64 * vendor: update github.com/rjeczalik/notify (#15801) * lint: go fmt * lint * Merge pull request #16115 from nonsense/update_rjeczalik_notify vendor: update rjeczalik/notify so that it compiles on go1.10
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.