Open 4meta5 opened 5 years ago
One concern is that the strong signature for a Node
requires using the sign_msg
method on the NodeId
element. This doesn't seem too clean, but I need the Node
's other fields for the WeakSignature
trait. I have an idea for how I want to structure this as traits implemented by Node
by default. The default implementation of Node
probably will use multihash::encode(hash: diso::DiscoHash, public_key: &[u8])
to calculate the id
from the a public_key
.
I changed NodeId
from a trait and just made it a wrapper around DiscoHash
. I'm fine with this, but now I think I will PR DiscoHash
to add into_bytes
and as_bytes
and similar methods that will be necessary for smooth conversion. This is necessary in the context of verifying signed messages one level higher.
DHTs store a key-value store with keys as
NodeId
s. There is a lot of associated data at each layer of the record store that is used for incentivizing the network and managing the data stored therein.Types of Data
Libp2p-kad supports two types of data:
NodeId
of the peer with a key which can supposedly provide the associated value. These records are pointers to the data which can be followed by connecting providers to obtain the value. This follows a "pull model" (polling) -- distributed to the closest nodes to the keyResearched Paths/Strategies for Data Flow
red-blue consistency demonstrates how it is possible to partition the network based on the unique properties desired by different types of data. Some things to think about:
<=
symmetricity of XOR)