-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement transaction::check for Transaction Version 5 and Orchard #1980
Comments
PR #2229 only implemented part of this ticket. |
Oh, I didn't realise github was going to close it when #2229 merged, I was just adding the related PRs |
Yeah it's weird, sometimes it closes them, sometimes it just leaves them alone. I think maybe one is GitHub and the other is ZenHub? Anyway, no big deal, we have to double-check things anyway :-) |
All 4 PRs for this ticket are merged, or set to auto-merge after minor fixes. |
Is your feature request related to a problem? Please describe.
After we parse Sapling in #1829 and Orchard in #1979, we need to implement and test the transaction checks for transaction version 5.
Describe the solution you'd like
These checks depend on some of the Orchard action functions in #2185, we're splitting them out into a separate PR:
https://github.com/ZcashFoundation/zebra/pull/2185/files#r638307833
has_inputs_and_outputs
orchard_actions
method toTransaction
, structured likesapling_nullifiers
, but usingAction
s fromorchard_shielded_data.actions()
has_inputs_and_outputs
shielded_balances_match
value_balance
field insapling::ShieldedData
is only present when there is at least one spend or outputV4
sapling deserialization, return an error ifShieldedData
isNone
, and the value balance is non-zeroV4
sapling serialization, write a zero value balance if there is noShieldedData
shielded_balances_match
functionvalue_balance
, but no spends or outputscoinbase_tx_no_joinsplit_or_spend
CoinbaseHasEnableSpendsOrchard
orchard_shielded_data
, andorchard_shielded_data.flags
hasENABLE_SPENDS
, return the errororchard_shielded_data
ororchard_shielded_data_flags
method onTransaction
Each function should have tests similar to #1979:
zcashd
(or test vectors that we create and share withzcashd
)Arbitrary
transaction v5We could create fake v5 transactions from our test vectors, but they are a lower priority, because they won't improve test coverage very much. (We want to focus on Orchard.)
We will verify the Orchard binding signature in a separate ticket:
#2103
Describe alternatives you've considered
These consensus rules are required for NU5.
The text was updated successfully, but these errors were encountered: