pub fn block_commitments<T: NodeType>(
payload: &PayloadWithMetadata<T>,
pooled_hashes: &[Commitment<T::Transaction>],
stake_table: &[PeerConfig<T>],
version: Version,
) -> Result<BlockCommitments<T>, BlockError>Expand description
The leader’s commitment work for a built block, on the proposal’s critical path. The
block_build bench in espresso-types calls this; its spans time each step.
pooled_hashes are the pool’s hashes of the transactions the payload was built from, and
stake_table the nodes of the block’s epoch. The payload commitment is folded from the
block’s dispersal, so the leader encodes the payload once for both. The new protocol runs
from NEW_PROTOCOL_VERSION, whose VID scheme is always AvidmGf2, so an earlier version is
refused.