Constant zebra_chain::block::arbitrary::PREVOUTS_CHAIN_HEIGHT
source ยท pub const PREVOUTS_CHAIN_HEIGHT: usize = 4;
Expand description
The chain length for most zebra-chain proptests.
Most generated chains will contain transparent spends at or before this height.
This height was chosen a tradeoff between chains with no spends, and chains which spend outputs created by previous spends.
The raw probability of having no spends during a test run is:
shielded_input = shielded_pool_count / pool_count
expected_transactions = expected_inputs = MAX_ARBITRARY_ITEMS/2
shielded_input^(expected_transactions * expected_inputs * (PREVOUTS_CHAIN_HEIGHT - 1))
This probability is approximately 3%. However, proptest generation and minimisation strategies can create additional chains with no transparent spends.
To increase the proportion of test runs with proptest spends, increase PREVOUTS_CHAIN_HEIGHT
.