-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(consensus): Verify consensus branch ID in SIGHASH precomputation (#…
…9139) * Add `has_foo` fns to `Transaction` * Add V5 SIGHASH test based on consensus branch ID * Guard `skip_checks` by test features * Enable `proptest-impl` for `zebrad` in tests * Simplify conditional compilation * Enable `proptest-impl` in scanner's dev deps * Fix conditional compilation in `zebra-chain` tests * Add error types for `zebra-chain` * `impl TryFrom<u32> for NetworkUpgrade` * `impl TryFrom<ConsensusBranchId> for BranchId` * Rm `fn from_branch_id() -> Option<NetworkUpgrade>` * Check consensus branch ID in SIGHASH computation * Simplify tx deserialization * Rm `impl TryFrom<&Trans> for zp_tx::Trans` * Update tests * Update tests * Add docs for `to_librustzcash` * Update docs for `PrecomputedTxData::new` * Document the SIGHASH consensus rules we missed * Update docs for script validation * Fix script verification tests In a previous commit, I erroneously edited the tests so that they'd expect `Ok`s instead of `Err`s. This commit fixes that. * Fix spelling * Impl `NetworkUpgrade::iter()` * Refactor `Network_upgrade::next_upgrade` * Impl `NetworkUpgrade::previous_upgrade` * Impl `Transaction::hash_shielded_data` * Don't make `NETWORK_UPGRADES_IN_ORDER` `pub` * Test `Transaction::sighash` with cons branch ids * Extend the `consensus_branch_id` test * Derive `Debug` for `SigHasher` * Remove the beautiful test for tx verifier * Remove the "skip check" functionality * Revert the compilation adjustments * Apply suggestions from code review Co-authored-by: Arya <[email protected]> * Fix docs * Clarify panic conditions in docs * remove duplicated verification Co-authored-by: Arya <[email protected]> --------- Co-authored-by: Arya <[email protected]> Co-authored-by: Alfredo Garcia <[email protected]>
- Loading branch information
1 parent
09538d4
commit fcf5565
Showing
30 changed files
with
354 additions
and
301 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
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
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
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
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.