-
Notifications
You must be signed in to change notification settings - Fork 964
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
Kademlia Records #1144
Kademlia Records #1144
Conversation
A few remarks:
However I think it is fine as a first draft and this can be merged before doing these. @montekki Did you try if it works? |
About works: There are some tests and there is also a more complicated test (not pushed yet) based off the chain topology in I would argue for at least
before merging this |
But that is already happening, as far as I can tell. What you implemented is the standard iterative
I think it would be fine to just stop on the first result for now, which is the "standard" Kademlia. The quorum scheme with the
What would you want to do to validate the records? Validation seems to be something that is just offered as an API to user code, i.e. such that user code can do whatever validation it likes. Do you mean you would already want to provide an interface for validation? |
Co-Authored-By: Roman Borschel <[email protected]>
The |
Not any longer, as far as I know. See the latest protobuf |
I just realized the "stupidity" of that remark. In the regular Kademlia protocol, the key of a record is its hash, which eliminates the question of knowing whether a record is valid. In the situation of Polkadot, a record would be valid if it contains a signature using the key of the record as a public key. In order to solve this question, I think that we can simply introduce a trait that checks the validity in a self-contained way (ie. a pure function). |
Co-Authored-By: Roman Borschel <[email protected]>
This reverts commit 579ce74.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some correctness issues with get_value
that need to be addressed.
Co-Authored-By: Roman Borschel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! A couple minor nits that should be quick to fix.
} | ||
|
||
/// Trait for a record store. | ||
pub trait RecordStore { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned, I think the methods here should be asynchronous. We should open an issue about that when the PR gets merged.
Co-Authored-By: Pierre Krieger <[email protected]>
When this is merged, it would be great to avoid including whole history of 120+ commits into the squashed commit btw |
Co-Authored-By: Pierre Krieger <[email protected]>
No description provided.