Add v5 transaction stubs #1822
Labels
A-consensus
Area: Consensus rule updates
A-rust
Area: Updates to Rust code
C-enhancement
Category: This is an improvement
NU-5
Network Upgrade: NU5 specific tasks
Milestone
Is your feature request related to a problem? Please describe
Network Upgrade 5 introduces a new transaction version. Zebra needs to support that transaction version.
The draft ZIP isn't available yet:
But there is a draft spec for the transaction format at: https://raw.githubusercontent.com/daira/zips/orchard-circuit/protocol/orchard.pdf
So for now we just want to create a placeholder enum variant.
Describe the solution you'd like
Transaction variant
V5 { bytes: Vec<u8>; }
variant to theTransaction
enum: https://github.com/ZcashFoundation/zebra/blob/main/zebra-chain/src/transaction.rs#L47Serialization
V5
transactions tobytes
: https://github.com/ZcashFoundation/zebra/blob/main/zebra-chain/src/transaction/serialize.rs#L71v5_strategy
to test serialization/deserialization: https://github.com/ZcashFoundation/zebra/blob/main/zebra-chain/src/transaction/arbitrary.rs#L75Suggestion - just do something simple like:
We'll rewrite it properly later.
Validation
V5
transactions during transaction validation: https://github.com/ZcashFoundation/zebra/blob/main/zebra-consensus/src/transaction.rs#L135Placeholders
V5
transaction is used anywhere else, panic usingunimplemented!("v5 transaction")
Describe alternatives you've considered
We could try to implement the whole v5 transaction format in the same PR, but that's a lot of work.
Additional context
This is just a stub that lets us start work on v5 transactions.
Follow Up
Once #1797 merges:
V5
transactions during transaction validation if the network upgrade isCanopy
or earlierNU5
or later, panic usingunimplemented!("v5 transaction")
NU5
, and panics afterNU5
(using#[should_panic]
)Suggestion: add an
allows_v5_transactions() -> bool
method onNetworkUpgrade
Implement the v5 transaction format based on the draft spec: https://raw.githubusercontent.com/daira/zips/orchard-circuit/protocol/orchard.pdf
The text was updated successfully, but these errors were encountered: