-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add V5 transparent and sapling to transaction::check, add missing coi…
…nbase PrevOut check (#2070) * validate sapling v5 tx * Make itertools dependency optional We only need itertools when the `proptest-impl` feature is enabled. * Check if V4 and V5 coinbase transactions contain PrevOut transparent inputs This is a bugfix on V4 transaction validation. The PrevOut consensus rule was not explicitly stated in the Zcash spec until April 2021. (But it was implied by Bitcoin, and partially implemented by Zebra.) Also do the shielded sapling input check for V5 transactions. * Add spec and orchard TODOs to has_inputs_and_outputs Also make the variable names match the spec. * Sort transaction functions to match v5 data order * Simplify transaction input and output checks Move counts or iterators into `Transaction` methods, so we can remove duplicate code, and make the consensus rule logic clearer. * Update sapling_balances_match for Transaction v5 - Quote from the spec - Explain why the function is redunant for v5 - Rename the function so it's clear that it is sapling-specific Co-authored-by: teor <[email protected]>
- Loading branch information
1 parent
5558051
commit 75d29ac
Showing
11 changed files
with
442 additions
and
273 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.