Add signer-only PCZT parse path#24
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb5eed0f5a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
0d80864 to
55354e1
Compare
A PCZT producer may omit an Orchard action's derived fields (cv_net, nullifier, rk, cmx, ephemeral_key, enc_ciphertext) to shrink the serialized size, leaving the receiver to recompute them from the note components it already holds. The pczt crate cannot do this itself because Rho::from_nf_old (the output rho derivation) is pub(crate) here. Expose orchard::pczt::recompute with byte-level helpers that share the exact derivations the existing verify_* methods use, plus a ParseError::Recompute variant for the fill path. The verify_* methods are unchanged. Ciphertext recompute selects OrchardNoteEncryption (V2) or IronwoodNoteEncryption (V3) by note version, assuming the migration empty [0u8; 512] memo with ovk = None.
55354e1 to
d05e3b4
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The soundness note on Spend::parse_for_signing described the required prior verification in one consumer's UI terms; state the caller obligation instead.
Summary
Adds signer-only PCZT parse entry points for
Bundle,Action, andSpend. The new path skipsFullViewingKeyderivation for low-level signing, while the full parse remains the default for verifier, prover, and updater roles.This is scoped to the signing path. It does not make PCZT fields optional or add recomputation helpers.
Testing
cargo test --all-features lean_parse_signs_identically_to_full_parse