Implement ZIP-0227 global issued-assets state in Zebra#111
Open
Implement ZIP-0227 global issued-assets state in Zebra#111
Conversation
…n-finalized chain.
…callyVerifiedBlock types, updates `IssuedAssetsChange::from_transactions()` method return type
…heckpointVerifiedBlock
…f BE for amount, read amount after asset base)
…state, add a couple of FIXMEs
…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
…instead of try_from')
…instead of try_from') (2)
…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
…ation-state-refactor-1
This PR updates Zebra to use the current `orchard` and `librustzcash` crate versions that contain the upstream Orchard PR zcash/orchard#471 review-related changes. Other than updating the `orchard` and `librustzcash` references in `Cargo.toml` it also includes the follow-up changes needed to keep Zebra building against the updated `orchard`/`librustzcash` APIs: * Adjust `NoteValue` → `ValueSum` conversions (including updating `orchard_zsa/burn.rs`, and switching `zebra-chain` to `ValueSum::from_raw` where needed). This is a placeholder change and the code does not compile yet — see the `FIXME` comments and the note below. * Fix test vectors so they compile when `zcash_unstable="nu7"` is enabled but `tx_v6` is not. * Rename the `orchard_flavor` module to `flavor`. * Update Orchard's `Bundle::build` usage in `zebra-consensus` tests. * Upgrade Rust to 1.85.1 (to align with `librustzcash`) and downgrade the `blake2b_simd` dependency to `1.0.1` to align with `orchard`. * Remove `halo2_gadgets` patch in Cargo.toml
…rallel and add a FIXME comment with an explanation
…into zcash_pr471_review
…ssueBundle - Bump librustzcash to the fixed revision (removes the extra expiry_height check). - Rewrite zebra-chain test reference-note generation to derive notes with rho via IssueBundle (replaces the removed Orchard create_test_reference_note helper).
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.
This PR adds global issued-asset state tracking for ZSA issuance per ZIP-0227.
Key changes:
AssetState/IssuedAssetChangesand integrates Orchard’s ZSA validation APIs to compute per-block issued-asset deltas.validate_bundle_burnandverify_issue_bundleto validate burns and issuances while building the globalissued_assetsstate. 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.verify_issue_bundlecan check issuance authorization signatures (issueAuthSig).verify_trusted_issue_bundleinstead ofverify_issue_bundlebecause 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)buildissued_assetsduring node startup, so signature checking is not required there.AssetBase, plus tests/snapshots and workflow vectors.Notes:
nf_{0,0}(the first Orchard Action nullifier) into issuance verification.