-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
Syncing to and from a single head hash #774
Comments
Note that this can almost be done in |
Check out this commit which adds support for syncing to from a single head hash. I suppose something similar can be added to orbit-db-store. |
Looks pretty cool! |
Closing as commit is probably out-of-date. Feel free to submit a new PR if still applicable to version 1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context: Currently orbit-db has no mechanism to represent the current state in a single hash. The closest thing to this is comparing a list of head hashes, and trans-versing the dag of each head in the head list. This can be seen in orbit-db-store sync(), which is the current logic used for syncing the database across nodes. There is no way for application developers wanting to export their current state hash and publish that same state hash to other nodes. Then verify that all nodes across the database are synced to exactly the same point. There is no easily verifiable certainty that every node hosting a database is viewing the same state.
A possible solution would be adding two new methods.
toHeadHash()
would export a single hash representing the current head hashes in a dag cbor object.SyncFromHeadHash()
would iterate through the represented dag cbor object. Syncing each head in the process and guaranteeing the database is properly synced. The method will queue all read write operations until the syncing has been completed.This is an on going discussion. Feedback is welcomed.
The text was updated successfully, but these errors were encountered: