pczt: Preserve absent shielded anchors across roles#2546
Merged
nullcopy merged 3 commits intoJul 12, 2026
Conversation
ce055d8 to
a83c8c2
Compare
Collaborator
|
Hey @gustavovalverde, just flagging that we are also working on some form of anchor optionality here: |
dannywillems
previously requested changes
Jul 8, 2026
dannywillems
left a comment
Contributor
There was a problem hiding this comment.
Blocking until #2539 is merged
a83c8c2 to
86f7f11
Compare
Contributor
Author
|
@dannywillems this is now rebased and conflicts fixed |
Collaborator
|
We should have relevant changes all merged in, going to ask AI to replicate these tests |
Contributor
Author
|
@ValarDragon if you're able, you can intervene the PR |
86f7f11 to
305b3aa
Compare
Contributor
Author
|
This has been updated (with a reduced scope, as other changes already landed on main) |
84bb9f2 to
121d4d4
Compare
Contributor
Author
|
@czarcas7ic can you have a look at the changes here, considering one of your PRs already got merged and I updated the code, title and PR body here to reflect the additive changes? |
czarcas7ic
reviewed
Jul 10, 2026
czarcas7ic
reviewed
Jul 10, 2026
Keep placeholder anchors internal to role parsing so v6 PCZTs whose Sapling, Orchard, or Ironwood anchors are absent can still be IO-finalized, signed, updated, and verified without writing that placeholder back out. Derive the parse requirement from the transaction version so v5 pre-authorization paths still require anchors for Sapling spends and Orchard-protocol actions. Proving and transaction extraction require real anchors only when bundle items consume them, and proving now rejects non-zero-valued spends whose witnesses do not root to the selected anchor. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Treat output-only Sapling bundles as non-empty when a role requires a concrete anchor, while preserving absent anchors for empty and pre-authorization paths. Mark the new parse and anchor-consistency error enums non-exhaustive so the public API can add variants compatibly. Co-Authored-By: OpenAI Codex <noreply@openai.com>
6c63f0c to
5e90820
Compare
nuttycom
approved these changes
Jul 12, 2026
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.
V6 PCZTs can omit shielded anchors during pre-authorization; Sapling bundles without spends do not consume an anchor at any stage.
This keeps placeholder anchors internal to roles that do not read the anchor. IO finalization, signing, updating, and verification can parse such PCZTs without serializing a placeholder back out. V5 signing paths and operations that consume anchors still require them for Sapling spends and Orchard-protocol actions.
Proving now rejects non-zero-valued spends whose witnesses do not root to the bundle anchor before creating Sapling, Orchard, or Ironwood proofs. The changelog records the role behavior and public parse/consistency error names.