Skip to main content

Module fork

Module fork 

Source

Re-exportsΒ§

use super::opts::EvmOpts; πŸ”’
use super::opts::ForkContext; πŸ”’
use alloy_consensus::BlockHeader; πŸ”’
use alloy_eips::BlockId; πŸ”’
use alloy_eips::BlockNumHash; πŸ”’
use alloy_network::AnyNetwork; πŸ”’
use alloy_network::AnyRpcBlock; πŸ”’
use alloy_network::Network; πŸ”’
use alloy_primitives::B256; πŸ”’
use alloy_primitives::BlockNumber; πŸ”’
use alloy_primitives::keccak256; πŸ”’
use alloy_provider::Provider; πŸ”’
use alloy_provider::RootProvider; πŸ”’
use alloy_rpc_client::RpcClient; πŸ”’
use eyre::OptionExt; πŸ”’
use std::fmt; πŸ”’
use std::hash::Hash; πŸ”’
use std::hash::Hash; πŸ”’
use std::hash::Hasher; πŸ”’
use std::sync::Arc; πŸ”’

ModulesΒ§

bal πŸ”’
Validates and caches BAL post-state, and prepares transaction forks’ parent-block BALs.
database
A revm database that forks off a remote client
multi πŸ”’
Support for running multiple fork backends.
prefetch πŸ”’
Prefetches a new fork block’s remote cache from the keys of an older cached block.

StructsΒ§

CreateFork
Represents a fork of a remote chain whose data is available only via the url endpoint.
Fork
A prepared remote fork. The RPC client and block are shared by preflight and execution.
ForkId
The unique identifier for a specific fork, this could be the name of the network a custom descriptive name.
ForkResult
Backend, environment, and identity returned after creating or rolling a fork.
MultiFork
The Sender half of multi fork pair. Can send requests to the MultiForkHandler to create forks.
MultiForkHandler
The type that manages connections in the background.

FunctionsΒ§

cache_bal
Inserts a validated BAL’s post-state into its selected remote cache, retaining existing values.
encode_source_part πŸ”’
source_id πŸ”’
validate_bal
Validates the entire BAL before any values can enter the cache.