Zebra/zebra-consensus/src
teor 3d792f7195
Validate spends of transparent coinbase outputs (#2525)
* Validate transparent coinbase output maturity and shielding

- Add a CoinbaseSpendRestriction enum and Transaction method
- Validate transparent coinbase spends in non-finalized chains

* Don't use genesis created UTXOs for spends in generated block chains

* Refactor out a new_transaction_ordered_outputs function

* Add Transaction::outputs_mut for tests

* Generate valid transparent spends in arbitrary block chains

* When generating blocks, fixup the block contents, then the block hash

* Test that generated chains contain at least one transparent spend

* Make generated chains long enough for reliable tests

* Add transparent and shielded input and output methods to Transaction

* Split chain generation into 3 functions

* Test that unshielded and immature transparent coinbase spends fail

* Comment punctuation

* Clarify a comment

* Clarify probability calculation

* Test that shielded mature coinbase output spends succeed
2021-07-29 14:23:50 +10:00
..
block Add `zebra_state::init_test` helper function for tests (#2539) 2021-07-28 20:55:01 -03:00
chain Add `zebra_state::init_test` helper function for tests (#2539) 2021-07-28 20:55:01 -03:00
checkpoint Add `zebra_state::init_test` helper function for tests (#2539) 2021-07-28 20:55:01 -03:00
parameters Replace smart quotes with ascii quotes 2021-03-15 03:18:10 -04:00
primitives Merge pull request #2318 from ZcashFoundation/redpallas-verifier 2021-07-02 02:50:23 -04:00
transaction Validate spends of transparent coinbase outputs (#2525) 2021-07-29 14:23:50 +10:00
block.rs Add an OrderedUtxo type for transparent spend validation (#2502) 2021-07-19 10:52:32 -03:00
chain.rs Document required request timeouts due to data dependencies (#2337) 2021-06-18 14:43:05 -03:00
checkpoint.rs Clippy: remove needless borrows 2021-06-07 18:33:58 -04:00
config.rs Make sure the mandatory checkpoint includes Canopy activation (#2235) 2021-06-03 10:24:08 +10:00
error.rs Merge pull request #2318 from ZcashFoundation/redpallas-verifier 2021-07-02 02:50:23 -04:00
lib.rs Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00
parameters.rs move genesis parameters to zebra-chain (#1151) 2020-10-12 14:08:23 -07:00
primitives.rs Merge pull request #2318 from ZcashFoundation/redpallas-verifier 2021-07-02 02:50:23 -04:00
script.rs Add an OrderedUtxo type for transparent spend validation (#2502) 2021-07-19 10:52:32 -03:00
transaction.rs Add an OrderedUtxo type for transparent spend validation (#2502) 2021-07-19 10:52:32 -03:00