openethereum/util/network-devp2p/src
Jim Posen 485d4aa8f3 Fix XOR distance calculation in discovery Kademlia impl (#8589)
* network-devp2p: Test for discovery bucket insertion.

All test values are randomly generated and the assertions are checked manually.
Test fails because distance metric is implemented incorrectly.

* network-devp2p: Fix discovery distance function.

The Kademlia distance function (XOR) was implemented incorrectly as a population count.

* network-devp2p: Refactor nearest_node_entries to be on instance.

Optimizations are possible with more access to the discovery state.

* network-devp2p: Fix loss of precision in nearest_node_entries.

* network-devp2p: More efficient nearest node search.

The discovery algorithm to identify the nearest k nodes does not need to scan
all entries in all buckets.
2018-06-01 09:42:45 +02:00
..
connection.rs Consolidate crypto functionality in ethcore-crypto. (#8432) 2018-05-05 11:02:33 +02:00
discovery.rs Fix XOR distance calculation in discovery Kademlia impl (#8589) 2018-06-01 09:42:45 +02:00
handshake.rs Fix some nits using clippy (#8731) 2018-05-31 13:38:46 +02:00
host.rs Fix some nits using clippy (#8731) 2018-05-31 13:38:46 +02:00
ip_utils.rs Fix some nits using clippy (#8731) 2018-05-31 13:38:46 +02:00
lib.rs Move connection_filter to the network crate (#8674) 2018-05-22 12:34:01 +08:00
node_table.rs Fix some nits using clippy (#8731) 2018-05-31 13:38:46 +02:00
service.rs Fix some nits using clippy (#8731) 2018-05-31 13:38:46 +02:00
session.rs Fix some nits using clippy (#8731) 2018-05-31 13:38:46 +02:00