• Felix Lange's avatar
    p2p/discover: new distance metric based on sha3(id) · 2adcc31b
    Felix Lange authored
    The previous metric was pubkey1^pubkey2, as specified in the Kademlia
    paper. We missed that EC public keys are not uniformly distributed.
    Using the hash of the public keys addresses that. It also makes it
    a bit harder to generate node IDs that are close to a particular node.
    2adcc31b
node.go 7.64 KB