Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Kad eachbin fix #1052

Closed
wants to merge 8 commits into from
Closed

Kad eachbin fix #1052

wants to merge 8 commits into from

Conversation

holisticode
Copy link
Contributor

PR to fix a flaw in kademlia.EachBin

WIP

Copy link
Member

@zelig zelig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct suhbscriptions need the correct kademlia depth function (Louis PR), so its better to have this pending merge of #1051

Once again, the spec for pull syncing is:

  • REPLICATION: peers in nearest neighborhood should get all chunks that fall within the nearest neighbourhood; i.e.. subscribe to bins from depth upto MaxProxDisplay;
  • ROUTING: peers outside your nearest neighborhood should only get chunks that are CLOSER to them than to us; i.e., subscribe to the bin they belong.

To build up kademlia, no need to use either Register or SuggestPeer, you just need to call On
with the peer contructed with the desired address

swarm/network/kademlia_test.go Outdated Show resolved Hide resolved
swarm/network/kademlia_test.go Outdated Show resolved Hide resolved
swarm/network/kademlia_test.go Outdated Show resolved Hide resolved
swarm/network/kademlia_test.go Show resolved Hide resolved
swarm/network/kademlia.go Outdated Show resolved Hide resolved
swarm/network/kademlia_test.go Outdated Show resolved Hide resolved
swarm/network/kademlia_test.go Outdated Show resolved Hide resolved
swarm/network/kademlia_test.go Show resolved Hide resolved
swarm/network/kademlia_test.go Outdated Show resolved Hide resolved
@zelig zelig added this to the 2018 Christmas Edition milestone Dec 18, 2018
@@ -31,6 +32,10 @@ import (
"github.com/ethereum/go-ethereum/swarm/pot"
)

var (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we need this at all, this is what loglevels are for. Please use that

@holisticode
Copy link
Contributor Author

Re-opened upstream as ethereum/go-ethereum#18338

@frncmx frncmx deleted the kad-eachbin-fix branch January 22, 2019 09:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants