BIP141: coinbase wtxid is 0, so appending the OP_RETURN does not change the witness root.
Empty stacks when nested is None (legacy). Prefer
append_witness_commitment_from_nested when mempool witnesses are known.
Compute merkle root and CVE-2012-2459 mutation flag without aborting on mutation.
Computes merkle root from leaves with optional mutation detection — always returns a root.
Callers decide policy: CheckBlock rejects mutated blocks; ConnectBlock may skip
the check for already-accepted blocks.
Stage 3b slice 1: miner-declared mempool subset.
Resolves declared_txids, builds the Stage 3a template, and errors if the
selected non-coinbase txids are not exactly that list (no silent skip).
Empty declared_txids is coinbase-only. Spec-locked builders are unchanged.
Overweight uses Bitcoin MAX_BLOCK_WEIGHT (not a pool-invented cap).
Multi-output coinbase. Callers set values (subsidy + fees). Empty list is an error.
Witness commitment is appended by create_block_template_with_outputs / Stratum.