Skip to content

Add IssueBundle::note_commitments to expose extracted note commitments#245

Merged
dmidem merged 8 commits intozsa1from
issue-bundle-note-commitments
Mar 30, 2026
Merged

Add IssueBundle::note_commitments to expose extracted note commitments#245
dmidem merged 8 commits intozsa1from
issue-bundle-note-commitments

Conversation

@dmidem
Copy link
Copy Markdown

@dmidem dmidem commented Mar 26, 2026

This adds IssueBundle::note_commitments() to expose extracted note commitments directly as pallas::Base values.

This is useful in Zebra to recompute issuance-related commitments without the current to_bytes/from_bytes workaround:

https://github.com/QED-it/zebra/blob/2634fd662a4eaca6df901c82b1bc05d2982636d7/zebra-chain/src/orchard_zsa/issuance.rs#L43

See also the related Zebra PR review comment:

QED-it/zebra#111 (comment)

Copy link
Copy Markdown
Collaborator

@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.

Looks good, but a possitive+negative(empty bundle) test is required to finilize. For possitive test, you can add it to the big "happy flow" test if possible.

@dmidem
Copy link
Copy Markdown
Author

dmidem commented Mar 29, 2026

Looks good, but a possitive+negative(empty bundle) test is required to finilize. For possitive test, you can add it to the big "happy flow" test if possible.

Done. I added a positive test for note_commitments() to the existing issue_bundle_verify_with_issued_assets test - it ensures note_commitments returns a correct number of non-zero, unique pallas::Base values. And I also added a negative test issue_bundle_note_commitments_empty_bundle that ensures note_commitments() returns no items for an empty bundle.

@dmidem dmidem merged commit 77d3274 into zsa1 Mar 30, 2026
30 checks passed
@dmidem dmidem deleted the issue-bundle-note-commitments branch March 30, 2026 09:39
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.

2 participants