Skip to content

Implement ZIP-0227 global issued-assets state in Zebra#106

Closed
dmidem wants to merge 106 commits intozsa1from
zsa-integration-state-refactor-2
Closed

Implement ZIP-0227 global issued-assets state in Zebra#106
dmidem wants to merge 106 commits intozsa1from
zsa-integration-state-refactor-2

Conversation

@dmidem
Copy link
Collaborator

@dmidem dmidem commented Feb 8, 2026

This PR adds global issued-asset state tracking for ZSA issuance per ZIP-0227.

Key changes:

  • Introduces AssetState / IssuedAssetChanges and integrates Orchard’s ZSA validation APIs to compute per-block issued-asset deltas.
  • During consensus checks, it uses Orchard’s validate_bundle_burn and verify_issue_bundle to validate burns and issuances while building the global issued_assets state. This relies on the Orchard refactoring in Refactor issue/burn validation for Zebra asset state integration orchard#199, which exposes/reworks these validation helpers for direct integration from Zebra.
  • Threads Orchard transaction sighashes through contextual block/tx verification so verify_issue_bundle can check issuance authorization signatures (issueAuthSig).
  • For checkpoint-verified blocks, it uses verify_trusted_issue_bundle instead of verify_issue_bundle because the current Zebra checkpoint-verification path does not provide transaction sighashes. This is intentional: checkpoint-verified blocks are treated as already verified and are only replayed through the global-state logic to (re)build issued_assets during node startup, so signature checking is not required there.
  • Persists issued-asset state in Zebra’s finalized DB, applies updates in non-finalized and finalized states with rollback support, and exposes a read path.
  • Adds an RPC method to query current asset state by AssetBase, plus tests/snapshots and workflow vectors.

Notes:

  • Issued-note rho derivation follows ZIP-0227 by passing nf_{0,0} (the first Orchard Action nullifier) into issuance verification.

arya2 and others added 30 commits November 12, 2024 01:07
…callyVerifiedBlock types, updates `IssuedAssetsChange::from_transactions()` method return type
…f BE for amount, read amount after asset base)
…ror in the function of the crate (this may not be a fully correct fix). Add a couple of FIXME comments explaining the problem.
…64 to prevent serialization errors and enable defining BurnItem in orchard, facilitating its reuse along with related functions
…tead of amount (with_asset is used to process orchard burn) - this allows avoiding the use of try_into for burn in binding_verification_key function
alexeykoren and others added 22 commits November 25, 2025 10:19
…h-a7e5' into upgrade-orchard-2083-librustzcash-a7e5
…rallel and add a FIXME comment with an explanation
@dmidem dmidem changed the title ZSA asset state support Implement ZIP-0227 global issued-assets state in Zebra Feb 15, 2026
@dmidem dmidem requested a review from PaulLaux February 15, 2026 19:22
@dmidem dmidem marked this pull request as ready for review February 15, 2026 19:24
@dmidem
Copy link
Collaborator Author

dmidem commented Feb 20, 2026

Closed in favor of #111

@dmidem dmidem closed this Feb 20, 2026
@dmidem dmidem deleted the zsa-integration-state-refactor-2 branch February 20, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants