zebra/zebra-chain/src/transparent
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
..
address.rs Fix scriptCode serialization and sighash test vectors (#2198) 2021-05-27 10:04:10 -03:00
arbitrary.rs Generate test chains that pass basic chain consistency tests (#2221) 2021-05-28 09:48:27 -03:00
keys.rs chain: create a transparent module. 2020-08-17 11:46:34 -07:00
prop.rs Add property test strategies for V5 transactions (#2347) 2021-06-18 14:40:08 -03:00
script.rs Fix scriptCode serialization and sighash test vectors (#2198) 2021-05-27 10:04:10 -03:00
serialize.rs Add memory DoS prevention comments 2021-03-22 11:54:31 -04:00
utxo.rs Validate spends of transparent coinbase outputs (#2525) 2021-07-29 14:23:50 +10:00