Closed
Conversation
…l Orchard support only, without supporting and enabling ZSA features.
This commit introduces basic support for Transaction version 6 (Tx V6). This initial implementation treats Tx V6 as a simple copy of Tx V5, without yet integrating ZSA-specific features or the new transaction structure. - Added a new V6 variant to the Transaction enum in the zebra-chain crate. - Updated relevant code to handle the new V6 variant. Note: Tests and additional adjustments are still pending, and will be addressed in subsequent commits.
…py V5 behaviour for now)
…(without unit tests fixing for now). - Refactored `ShieldedData` and `Action` structures to be generics parameterized by Orchard flavor (`OrchardVanilla` or `OrchardZSA`), enabling support for both Orchard protocols in Tx V6. - Introduced a `burn` field in `ShieldedData` to support ZSA, with unit type for Tx V5 and a vector of burn items for Tx V6. - Modified `Transaction` enum methods (orchard_...) to handle generics properly, ensuring compatibility with both Orchard flavors. - Implemented serialization and deserialization for Tx V6 while avoiding code redundancy with Tx V5 wherever possible.
… with the upstream halo2/librustcash/orchard/sapling versions
1. Introduced new type `Burn` that wraps `Vec<BurnItem>`, implemented serialization/deserialization for it - put it into `orchard_zsa/burn.rs`, also moved `NoBurn` there from `orchard_flavor_ext.rs` for better code structuring. 2. Renamed the `EncryptedNoteTest` trait to `TestArbitrary` in `orchard_flavor_ext.rs` and used it to constrain `BurnType` as well. 3. Renamed `serialize.rs` to `common.rs` in the `orchard_zsa` folder. 4. Refactored transaction generation strategies for V5 and V6 in `transaction/arbitrary.rs` and `orchard_zsa/arbitrary.rs` to incorporate the new burn handling and proper issuance handling.
…t_desc to convert slice to vec, as slices require implementation of the serialization from scratch
…y.rs as it causes several tests to fail
…saction::arbitrary_with function in zebra-chain/src/transaction/arbitrary.rs
… zebra-chain/src/transaction/arbitrary.rs
… the same as in librustzcash
…c/orchard_zsa tests.rs module)
…ew variant gated by the tx-v6 feature flag. Use ValueSum from the orchard crate as the value type to support both Amount (value balance) and NoteValue (burn). Add TODO comments for future orchard crate enhancements to simplify type conversions by reusing existing APIs.
…a-test (for vanilla - restore the original names, i.e. remove vanilla suffix, for zsa - move zsa suffix to the end)
…re no such tests for Vanilla Orchard, tests from zebra-chain/src/transaction/tests/vectors.rs used instead - so we need to add ZSA related tests there)
…by converting them into verify_v5_and_v6_transaction generic. The ame for verify_v6_transaction_network_upgrade function
…s_zsa.rs and add a doc comment there
… make this flag non-default in Cargo.toml files and enable it by default in .cargo/config.toml
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.
Motivation
Specifications & References
Solution
Tests
Follow-up Work
PR Author's Checklist
PR Reviewer's Checklist