pub fn shielded_action_limits_are_valid(
block: &Block,
network: &Network,
height: Height,
hash: Hash,
) -> Result<(), BlockError>Expand description
Checks the ZIP 218 per-pool and global shielded action limits for block.
§Consensus
For each block at height
heightwhereIsNU7Activated(height), the following limits MUST be satisfied:
- The total number of Orchard actions across all transactions in the block MUST NOT exceed
OrchardProtocolBlockActionLimit.- The total number of Ironwood actions across all transactions in the block MUST NOT exceed
OrchardProtocolBlockActionLimit.- The total number of Sapling inputs and outputs across all transactions in the block MUST NOT exceed
SaplingBlockIOLimit.- The total number of Sprout JoinSplits across all transactions in the block MUST NOT exceed
SproutBlockJoinSplitLimit.In addition to the per-pool limits, the total shielded cost across all pools in a block MUST NOT exceed
GlobalShieldedBudget.
The global shielded cost counts each Sprout JoinSplit twice, because each JoinSplit produces two shielded outputs.
These limits bound the worst-case block verification time and the worst-case compact sync bandwidth that lightweight wallets must download, so they are checked before the block’s proofs are queued for verification.