Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parity-kademlia #942

Closed
wants to merge 4 commits into from
Closed

Add parity-kademlia #942

wants to merge 4 commits into from

Conversation

tomaka
Copy link
Member

@tomaka tomaka commented Feb 14, 2019

Adds a new alternative Kademlia implementation for Substrate/Polkadot.

The difference with libp2p's Kademlia are:

  • The protocol is more simple, as we have less messages.
  • Each node belongs to a specific namespace. When we connect, we ask the remote what its namespace is. There is no support for multiple namespaces at the moment. While the concept of a namespace can be applied to several use cases, in Substrate/Polkadot we would have one namespace per chain.
  • PeerIds are prefixed with the namespace they belong to before being inserted in the k-buckets. The "find peer" query requires passing a namespace in addition to the PeerId, and we will obtain results that belong to the same namespace or to a nearby namespace.
  • One can also perform a query to find a list of providers for a specific Ristretto public key.
  • Each node that owns a Ristretto key can insert its identity in the DHT at the key corresponding to the Ristretto public key. The identity of the node includes a Schnorr signature so that records cannot be spoofed.

@ghost ghost assigned tomaka Feb 14, 2019
@ghost ghost added the in progress label Feb 14, 2019
@tomaka tomaka changed the title Split pl Add parity-kademlia Feb 14, 2019
@tomaka
Copy link
Member Author

tomaka commented Feb 15, 2019

Integrates #943 and #944

@tomaka tomaka force-pushed the split-pl branch 12 times, most recently from 27c21da to b19e405 Compare February 21, 2019 16:10
@dvc94ch
Copy link
Contributor

dvc94ch commented Feb 24, 2019

@tomaka: why don't u use ipfs as the substrate blockchain backing storage? I think in a couple of weeks, the rust ipfs node should work well enough that I could start prototyping this...

Just in case there is a technical or political reason, so that I don't waste my time... :)

@tomaka
Copy link
Member Author

tomaka commented Feb 24, 2019

IPFS is not adapted to blockchains.
I'm not sure what you have in mind, but providing blocks as if they were IPFS hashes means that every single node would have to broadcast through the entire network that it has a certain block. It would also prevent retrieving only partial information about a block.

@dvc94ch
Copy link
Contributor

dvc94ch commented Feb 24, 2019

Interesting, I've not looked into how substrate handles this, but I thought that IPFS intends to scale to the scale of the current Internet.

@tomaka
Copy link
Member Author

tomaka commented Jun 5, 2019

Closing as stale and too many conflicts anyway.

@tomaka tomaka closed this Jun 5, 2019
@tomaka tomaka deleted the split-pl branch June 5, 2019 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants