fix(pepper-sync): retain ZIP 318 anchor checkpoints - #2750
Open
dorianvp wants to merge 2 commits into
Open
Conversation
Oscar-Pepper
requested changes
Aug 28, 2026
Oscar-Pepper
left a comment
Contributor
There was a problem hiding this comment.
we also need to check spend migrations only use boundary anchors as only these are retained. im not sure what happens in the chain tip i.e. top 100 blocks etc.
| Ok(()) | ||
| }) | ||
| .expect("Infallible"); | ||
| if checkpoints.len() > MAX_REORG_ALLOWANCE as usize { |
Contributor
There was a problem hiding this comment.
this is good logic it just needs to use MAX_SHARDTREE_CHECKPOINTS instead
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
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.
Sends of exactly 1, 2, 5 × 10^n ZEC failed with
AnchorNotFound: the canonical-crossing path anchors to a ZIP 318 grid boundary 147–290 blocks behind the tip, but pepper-sync retained only the newest 100 checkpoints, and theanchor_computableguard only checked scan completeness, so the doomed attempt was not rejected until after proposal acceptance.anchor_is_computablenow also requires a checkpoint at the anchor height, so a canonical attempt at a pruned boundary degrades to the ordinary send path.ANCHOR_AGE_CAP + 2intervals from the Ironwood activation), re-derive the pins at sync start, exempt pinned checkpoints from the newest-100 serialization cap, and iterate the full checkpoint count when truncating to the next checkpoint.Wallets with already-pruned boundaries send via the ordinary path immediately; canonical crossings resume once sync passes the next grid boundary.
🤖 Generated with Claude Code