zebra/zebra-chain
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
..
benches assert that all redpallas signatures verify when we benchmark them 2021-06-30 16:26:08 -04:00
proptest-regressions Split out parsing & validation of test VerificationKey from checking of the signature (#2228) 2021-06-01 15:59:34 +10:00
src Validate spends of transparent coinbase outputs (#2525) 2021-07-29 14:23:50 +10:00
Cargo.toml Test consensus-critical `Amount` deserialization (#2487) 2021-07-15 21:34:22 +00:00