Skip to main content

execute_block

Function execute_block 

Source
pub fn execute_block<'a, Evm, Tx, Err, DB, MakeDb>(
    runtime: &Runtime,
    evm_config: &'a Evm,
    make_db: &'a MakeDb,
    input_bal: Arc<DecodedBal>,
    evm_env: EvmEnvFor<Evm>,
    ctx: ExecutionCtxFor<'a, Evm>,
    transaction_count: usize,
    txs: Receiver<(usize, Result<Tx, Err>)>,
    receipt_tx: Sender<IndexedReceipt<ReceiptTy<Evm::Primitives>>>,
) -> Result<(BlockExecutionOutput<ReceiptTy<Evm::Primitives>>, Vec<Address>, BlockAccessList, Arc<Bal>), BalExecutionError>
where Evm: ConfigureEvm + 'static, Tx: ExecutableTxFor<Evm> + Send + 'a, Err: Error + Send + Sync + 'static, DB: Database + Send + 'a, MakeDb: Fn(bool) -> Result<DB, BalExecutionError> + Sync + 'a, ReceiptTy<Evm::Primitives>: Clone,
Expand description

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

The ordered commit loop applies Ethereum block-level gas admission. Executors with different admission rules, such as segment-scoped gas budgets, must align those checks before using it.

Returns the execution output, the recovered senders, the BAL rebuilt from this execution, and the received BAL in the revm representation the workers consumed.