-
Notifications
You must be signed in to change notification settings - Fork 226
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
Record validation issue with multiple naming systems #50
Comments
Let's change how a peer id works and give more than one id per peer. A peer would have one id per validation scheme it supports. The peer id would contain the id of the validation scheme associated with it such as two peers ids with the same validation scheme are considered closest than two id belonging to the same node. This would have the effect of partitioning the hash table into slice of peers that understand the same schemes. When looking for peers that supports a specific validation scheme, the id of the record should also include the validation scheme. GetClosestPeers would then find peers that share the same validation scheme as those are the closest to the data requiring the validation scheme. Note that the validation scheme id used in the peer ids can match more than one validation scheme. For instance, you could have id=1 referring to the schemes defined by the IPFS organization at some point in time. id=2 could mean a second revision of the validation schemes and id=3 could implement a different naming system. Note that schemes ids must not necessarily be allocated this way. It could be a hash of the list of supported scheme names. |
Another way would be to implement records completely differently with an extra level of indirection. A peer providing a record, instead of putting the record value in the DHT, ii would tell the DHT that it provides the given record. Basically, it replaces a A peer that wants to resolve the record would then ask the DHT where it can be found instead of asking its value directly. It replaces To implement that, the DHT object must expose a new method:
Also, it would be nice that a peer that notices that the record of another peer is out of date could notify it that it should update the record. It could be possible by exposing:
edit:
|
Assigning myself so I read it. @whyrusleeping pinging you so it is higher on your list. |
This is going to need a lot of design/spec work. There has been some recent work, but keeping this open isn't really going to help. |
I have been looking at record validation and saw that a record in the DHT had to be valid on the peer that stores it. If we want to allow different naming schemes, this is going to be a problem because a naming scheme has specific validation routines.
So, either we only define in a central place a list of all naming schemes with their validation functions that all peers must implement, or we change how we do validation or how we store our records.
Assuming we want to be flexible about the validation functions, we have two choices:
If the DHT implementation is somewhere near what the Kadmelia DHT does, the second option should be possible to implement, by essentially creating sub-networks for each supported validation scheme a peer has.
The text was updated successfully, but these errors were encountered: