Fix: fallback validation of shifted proof hashes on clay #759
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.
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.Note: based on
fix/revert-proof-autodiscovery-removal/ 54a2122