-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Discv5.1 - the latest spec updates (#76)
* Require sending record when enr-seq == 0 ethereum/devp2p@92bbbd2 * Add destination ID into id-sig-input ethereum/devp2p@d19fbe7 * Put version into protocol-id ethereum/devp2p@5b59e88 * Rename 'iv' to 'maskingIV' according to spec changes Part of ethereum/devp2p@60d9107 * Check min packet size * TALKRESP protocol is Bytes not the String by the spec. * Add FindNodeHandler unit test * Rename create() to a more appropriate decode() * Remove confusing DiscoveryV5Message wrapper and add DiscoveryMessageDecoder instead. Add an abstract Message class (aka for all discovery versions) * Do not wrap DecryptException into DecodeException * Initial refactor to reflect the latest Discv5.1 spec changes: - packet header fields reorg - maskingIV mixed up to message encryption associated data - the whole WhoAreYou message is mixed for id-signature - WhoAreYou has no more 'src-node-id' thus we need to find session via original-nonce * Adjust tests to the new reality * More type safety for Envelope * Add Discovery test server * Gradle: no need for 'application' plugin * Get rid of 'import' which is highlighted by IDEA as ERROR * Create DiscoveryServer outside of DiscoveryManagerImpl * Add Field names for better debugging and logging * Calling a discovery method with NodeRecord should work even this node is not in a Table yet * Add DiscoveryManager tests and test helpers to simulate and control network interchange * If another ordinary message received after WhoAreYou packet was sent, we should again send another WhoAreYou packet * If a session was dropped on remote host we are sending packets instead of putting them into await queue. So when the WhoAreYou packet is received 'unexpectedly' we should take a SENT packet for resending * Add missing field to StaticHeader.toString() * Handshake ephemeral public key should be in compressed form Co-authored-by: mbaxter <meredith.baxter@consensys.net>
- Loading branch information
1 parent
3f46afa
commit 82b1630
Showing
62 changed files
with
1,612 additions
and
972 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.