Scaling up the certifications pools with a DHT
As we can see, since it takes a long time for one to become a member, the data pools are filled up and it is stucking the entrance of new members.
Here, I'm suggesting an evolution to be able to scale up the pools. We already discussed it on the chat some time ago, but I wanted to trace the idea.
The certifications are blocked because, for one new member, you need 5 certifications. The nodes can locally only have locally the MS+IDTY documents and a partial view of the certifications. Thus, we only need to distribute the certifications on the DHT.
The overall idea is :
- The nodes have the identities and memberships in their pools. They don't necessary have all the identities or all the memberships.
- The nodes are distributing throught a DHT the certifications documents
- The nodes use the DHT to discover which identity can become a member when forging new blocks
The DHT
I suggest to use Kademlia DHT, for example using KAD framework for node js : https://github.com/kadtools/kad.
The format of the keys could be :
CERT:[PUBKEY_TO]
- [PUBKEY_TO] corresponds to the pubkey being certified
The format of the values would be the raw certification documents valid and writable for the given timestamp target.
The forging of blocks
- During the computation of block "N", the node would check which identity could become a member in block "N+1".
- For all Identities+Membership in the pool, if they don't have enough certifications locally, they would ask the network for valid certifications about this identity and membership.
- When block "N" is computed, the node would start computing block "N+1" with the data received by the network during the computation of block "N" .
Duniter plugins required for Kad
- A middleware using pubkey of peers to protect the network against classic sybil attacks
- A middleware to append data to keys when receiving documents throught BMA