execute_state_transition

Function execute_state_transition 

Source
pub async fn execute_state_transition<S: Spawner + Storage + Clock + Metrics, T: Translator>(
    state: &mut Adb<S, T>,
    events: &mut Keyless<S, Output, Sha256>,
    identity: Identity,
    height: u64,
    seed: Seed,
    transactions: Vec<Transaction>,
) -> StateTransitionResult
Expand description

Execute state transition for a block

This function processes all transactions in a block, updating both state and events databases. It handles transaction nonce validation, execution, and persistence. Only processes the block if it’s the next expected height.

Returns the resulting state and events roots along with their operation counts, plus a map of processed public keys to their next expected nonces.