Skip to content

Updates to digests and transaction format corresponding to recent changes to ZIPs#36

Merged
ConstanceBeguier merged 8 commits into
zsa1from
changes_to_zips_in_pr_1086
Sep 23, 2025
Merged

Updates to digests and transaction format corresponding to recent changes to ZIPs#36
ConstanceBeguier merged 8 commits into
zsa1from
changes_to_zips_in_pr_1086

Conversation

@vivek-arte
Copy link
Copy Markdown

There was a rearranging of the transaction format and the digests that took place in zcash/zips#1086 and zcash/zips#1088.

This PR makes the changes to the test vectors to match them back to the spec.

vivek-arte and others added 5 commits September 11, 2025 14:48
Add compact size of the encoded signature in the digest
Update orchard_actions_compact_digest and
orchard_actions_noncompact_digest personalizations
@vivek-arte vivek-arte marked this pull request as draft September 13, 2025 06:38
Copy link
Copy Markdown

@PaulLaux PaulLaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for orchard_zsa_digest(tx): I think we need 64-bit signed little-endian
digest.update(struct.pack('<q', tx.valueBalanceOrchard)) (small <q)

Also for orchard_zsa_action_groups_auth_digest(tx): I think we need the size.

           digest.update(write_compact_size(len(ag.proofsOrchard)))

           digest.update(bytes(ag.proofsOrchard))

Please verify.

@ConstanceBeguier
Copy link
Copy Markdown

About orchard_zsa_action_groups_auth_digest, I think proof compact size is not included into the digest according to ZIP 246 and ZIP 230.
According to ZIP 246, we have to add proofsOrchard into the digest.
According to ZIP 230, proofsOrchard contains only the proof and not the compact size.

@ConstanceBeguier
Copy link
Copy Markdown

About valueBalanceOrchard, I replaced Q by q in transaction encoding and digest evaluation.

@ConstanceBeguier
Copy link
Copy Markdown

About orchard_zsa_action_groups_auth_digest, I think proof compact size is not included into the digest according to ZIP 246 and ZIP 230. According to ZIP 246, we have to add proofsOrchard into the digest. According to ZIP 230, proofsOrchard contains only the proof and not the compact size.

I asked the ECC team for some clarifications about the evaluation of orchard_auth_digest.
If we need to update this digest,

  1. we will also need to update it in Orchard repo
  2. the modification in zcash-test-vectors must be done in a separate PRs to keep the same PR order across all repos

@ConstanceBeguier ConstanceBeguier merged commit faa2419 into zsa1 Sep 23, 2025
3 checks passed
ConstanceBeguier added a commit to QED-it/librustzcash that referenced this pull request Sep 23, 2025
This PR performs the change from zcash/zips#987
to remove the asset base from the issue note description. It also makes
the follow-on reorderings suggested in
zcash/zips#1086 and
zcash/zips#1088.

The test vectors are updated in
QED-it/zcash-test-vectors#36 and copied in from
there.

---------

Co-authored-by: Constance Beguier <constance@qed-it.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants