Skip to main content

Module execute

Module execute 

Source
Expand description

BAL executor.

Read execute_block as two execution paths over the same parent state.

Worker states run transactions speculatively. Each worker gets one fresh cache-filling database from make_db(true), installs the received BAL, sets the transaction BAL index for each streamed transaction, and returns uncommitted transaction results.

The canonical state owns block effects. It runs the normal pre/post block hooks, commits worker results in transaction order, tracks block gas admission, and builds the BAL that this execution actually produced.

The rebuilt BAL is returned to the outer payload validator for consensus post-execution validation. This module only logs the first divergence between the received BAL and the BAL rebuilt from canonical execution.

Functions§

execute_block
Executes one block on the BAL path using the runtime’s persistent BAL worker pool.