zebra/zebra-chain/src/block
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
..
tests Validate spends of transparent coinbase outputs (#2525) 2021-07-29 14:23:50 +10:00
arbitrary.rs Validate spends of transparent coinbase outputs (#2525) 2021-07-29 14:23:50 +10:00
commitment.rs Revert "ZIP-221: Validate chain history commitments in the non-finalized state (#2301)" (#2464) 2021-07-08 09:25:49 -03:00
error.rs Move network_upgrade check into zebra-chain (#2354) 2021-06-22 12:06:52 +10:00
hash.rs Reverse displayed endianness of transaction and block hashes (#1171) 2020-10-22 07:54:02 +10:00
header.rs Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00
height.rs Call `zebra_test::init` where needed. (#1227) 2020-11-10 10:29:25 +10:00
merkle.rs Show transaction hashes on merkle failure 2020-12-01 10:14:44 +10:00
serialize.rs Security: Avoid silently corrupting invalid times during serialization (#2149) 2021-05-17 16:53:10 -04:00
tests.rs Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00