-
Notifications
You must be signed in to change notification settings - Fork 17
fix: self-anchoring proof storage and validation fixes #756
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…the external flow
979e75f to
e881c0a
Compare
6a70a12 to
9e31257
Compare
9e31257 to
35d68a7
Compare
Collaborator
|
@m0ar is this PR still relevant or is it superseded by the other ones you've opened? |
Collaborator
Author
This has been tidied up and split into 3 others PRs 👌 Can close. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP
Re-implement RPC proof discovery
#755 prematurely removed some fallback logic required for nodes to self-heal after failing to persist self-anchoring inclusion proofs. The relevant changes in
discover_chain_proofare reverted here.Fallback validation to account for incorrect codec slice in anchor root
Single event anchor batch roots didn't initially get a
dag-pbtree node wrapper, instead thedag-josehash was written to the chain. However, it assumed it should slice off the first 4 bytes from the cid to strip it down to a hash, butdag-josehas a longer codec sequence. This resulted in the root hash keeping the0x20(digest length 32) in the front, causing the last digest byte to be dropped.The fix is falling back to a partial 31-byte comparison for gnosis (clay) anchors, for anchors in a specific time window, and only if the prefix is
0x20.Self-anchoring proof persistence
The self-anchoring process didn't store the inclusion proofs in the DB, causing pipeline errors for self-anchored events. This is now implemented so the node immediately can validate the events that it created and anchored.
Approach: