Skip to main content

Module bal

Module bal 

Source
Expand description

Validates and caches BAL post-state, and prepares transaction forks’ parent-block BALs.

Re-exportsΒ§

use super::Fork; πŸ”’
use crate::opts::ForkContext; πŸ”’
use alloy_chains::Chain; πŸ”’
use alloy_chains::NamedChain; πŸ”’
use alloy_consensus::BlockHeader; πŸ”’
use alloy_eips::BlockId; πŸ”’
use alloy_eips::eip7928::BlockAccessList; πŸ”’
use alloy_eips::eip7928::compute_block_access_list_hash; πŸ”’
use alloy_eips::eip7928::validate_block_access_list; πŸ”’
use alloy_hardforks::EthereumHardfork; πŸ”’
use alloy_network::AnyNetwork; πŸ”’
use alloy_network::AnyRpcBlock; πŸ”’
use alloy_primitives::B256; πŸ”’
use alloy_primitives::U256; πŸ”’
use alloy_primitives::map::U256Map; πŸ”’
use alloy_provider::Provider; πŸ”’
use eyre::Result; πŸ”’
use eyre::WrapErr; πŸ”’
use foundry_common::provider::is_rpc_method_not_found; πŸ”’
use foundry_evm_networks::NetworkConfigs; πŸ”’
use foundry_fork_db::cache::MemDb; πŸ”’
use revm::state::AccountInfo; πŸ”’
use revm::state::Bytecode; πŸ”’
use std::time::Duration; πŸ”’

FunctionsΒ§

cache_bal
Inserts a validated BAL’s post-state into its selected remote cache, retaining existing values.
cache_bal_accounts πŸ”’
Inserts complete account post-states, retaining existing accounts, and returns the added count.
cache_bal_storage πŸ”’
Inserts final slot writes, retaining cached values and leaving read-only slots unknown.
eligible_source πŸ”’
immutable_source πŸ”’
prepare πŸ”’
Fetches and validates a parent BAL without mutating a database or propagating BAL failures.
validate_bal
Validates the entire BAL before any values can enter the cache.