package
1.15.2
Repository: https://github.com/ethereum/go-ethereum.git
Documentation: pkg.go.dev

# Packages

Package asm provides support for dealing with EVM assembly instructions (e.g., disassembling them).
Package bloombits implements bloom filtering on batches of data.
Package forkid implements EIP-2124 (https://eips.ethereum.org/EIPS/eip-2124).
Package rawdb contains a collection of low level database accessors.
Package state provides a caching layer atop the Ethereum state trie.
Package tracing defines hooks for 'live tracing' of block processing and transaction execution.
Package types contains data types related to Ethereum consensus.
Package vm implements the Ethereum Virtual Machine.

# Functions

ApplyMessage computes the new state by applying the given message against the old state within the environment.
ApplyTransaction attempts to apply a transaction to the given state database and uses the input parameters for its environment.
ApplyTransactionWithEVM attempts to apply a transaction to the given state database and uses the input parameters for its environment similar to ApplyTransaction.
CalcGasLimit computes the gas limit of the next block after parent.
CanTransfer checks whether there are enough funds in the address' account to make a transfer.
DefaultCacheConfigWithScheme returns a deep copied default cache config with a provided trie node scheme.
DefaultGenesisBlock returns the Ethereum main net genesis block.
DefaultHoleskyGenesisBlock returns the Holesky network genesis block.
DefaultSepoliaGenesisBlock returns the Sepolia network genesis block.
DeveloperGenesisBlock returns the 'geth --dev' genesis block.
EnableVerkleAtGenesis indicates whether the verkle fork should be activated at genesis.
ExecuteStateless runs a stateless execution based on a witness, verifies everything it can locally and returns the state root and receipt root, that need the other side to explicitly check.
FloorDataGas computes the minimum gas required for a transaction based on its data tokens (EIP-7623).
GenerateChain creates a chain of n blocks.
GenerateChainWithGenesis is a wrapper of GenerateChain which will initialize genesis block to database first according to the provided genesis specification then generate chain on top.
GetHashFn returns a GetHashFunc which retrieves header hashes by number.
IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
LoadChainConfig loads the stored chain config if it is already present in database, otherwise, return the config in the provided genesis specification.
MakeReceipt generates the receipt object for a transaction given its execution result.
NewBlockChain returns a fully initialised block chain using information available in the database.
NewBlockValidator returns a new block validator which is safe for re-use.
NewBloomIndexer returns a chain indexer that generates bloom bits data for the canonical chain for fast logs filtering.
NewChainIndexer creates a new chain indexer to do background processing on chain segments of a given size after certain number of confirmations passed.
NewEVMBlockContext creates a new context for use in the EVM.
NewEVMTxContext creates a new transaction context for a single transaction.
NewHeaderChain creates a new HeaderChain structure.
NewStateProcessor initialises a new StateProcessor.
ParseDepositLogs extracts the EIP-6110 deposit values from logs emitted by BeaconDepositContract.
ProcessBeaconBlockRoot applies the EIP-4788 system call to the beacon block root contract.
ProcessConsolidationQueue calls the EIP-7251 consolidation queue contract.
ProcessParentBlockHash stores the parent block hash in the history storage contract as per EIP-2935/7709.
ProcessWithdrawalQueue calls the EIP-7002 withdrawal queue contract.
SenderCacher returns the singleton instance of SenderCacher, initializing it if called for the first time.
SetupGenesisBlock writes or updates the genesis block in db.
TransactionToMessage converts a transaction into a Message.
Transfer subtracts amount from sender and adds amount to recipient using the given Db.

# Constants

BlockChainVersion ensures that an incompatible database forces a resync from scratch.

# Variables

EIP-7702 state transition errors.
EIP-7702 state transition errors.
EIP-7702 state transition errors.
EIP-7702 state transition errors.
EIP-7702 state transition errors.
ErrBlobFeeCapTooLow is returned if the transaction fee cap is less than the blob gas fee of the block.
ErrBlobTxCreate is returned if a blob transaction has no explicit to field.
Message validation errors:.
ErrFeeCapTooLow is returned if the transaction fee cap is less than the base fee of the block.
ErrFeeCapVeryHigh is a sanity error to avoid extremely big numbers specified in the fee cap field.
ErrFloorDataGas is returned if the transaction is specified to use less gas than required for the data floor cost.
ErrGasLimitReached is returned by the gas pool if the amount of gas required by a transaction is higher than what's left in the block.
ErrGasUintOverflow is returned when calculating gas usage.
ErrInsufficientBalanceWitness is returned if the transaction sender has enough funds to cover the transfer, but not enough to pay for witness access/modification costs for the transaction.
ErrInsufficientFunds is returned if the total cost of executing a transaction is higher than the balance of the user's account.
ErrInsufficientFundsForTransfer is returned if the transaction sender doesn't have enough funds for transfer(topmost call only).
ErrIntrinsicGas is returned if the transaction is specified to use less gas than required to start the invocation.
ErrKnownBlock is returned when a block to import is already known locally.
ErrMaxInitCodeSizeExceeded is returned if creation transaction provides the init code bigger than init code size limit.
ErrMissingBlobHashes is returned if a blob transaction has no blob hashes.
ErrNoGenesis is returned when there is no Genesis Block.
ErrNonceMax is returned if the nonce of a transaction sender account has maximum allowed value and would become invalid if incremented.
ErrNonceTooHigh is returned if the nonce of a transaction is higher than the next one expected based on the local chain.
ErrNonceTooLow is returned if the nonce of a transaction is lower than the one present in the local chain.
ErrSenderNoEOA is returned if the sender of a transaction is a contract.
List of evm-call-message pre-checking errors.
ErrTipAboveFeeCap is a sanity error to ensure no one is able to specify a transaction with a tip higher than the total fee cap.
ErrTipVeryHigh is a sanity error to avoid extremely big numbers specified in the tip field.
ErrTxTypeNotSupported is returned if a transaction is not supported in the current network configuration.

# Structs

BlockChain represents the canonical chain given a database with a genesis block.
BlockGen creates blocks for testing.
BlockValidator is responsible for validating block headers, uncles and processed state.
BloomIndexer implements a core.ChainIndexer, building up a rotated bloom bits index for the Ethereum header bloom filters, permitting blazing fast filtering.
CacheConfig contains the configuration values for the trie database and state snapshot these are resident in a blockchain.
ChainIndexer does a post-processing job for equally sized sections of the canonical chain (like BlooomBits and CHT structures).
ChainOverrides contains the changes to chain config.
ExecutionResult includes all output after executing given evm message no matter the execution itself is successful or not.
Genesis specifies the header fields, state of a genesis block.
GenesisMismatchError is raised when trying to overwrite an existing genesis block with an incompatible one.
HeaderChain implements the basic block header chain logic.
A Message contains the data derived from a single transaction that is relevant to state processing.
NewTxsEvent is posted when a batch of transactions enter the transaction pool.
ProcessResult contains the values computed by Process.
RemovedLogsEvent is posted when a reorg happens.
StateProcessor is a basic Processor, which takes care of transitioning state from one point to another.
TxIndexProgress is the struct describing the progress for transaction indexing.

# Interfaces

ChainContext supports retrieving headers and consensus parameters from the current blockchain to be used during transaction processing.
ChainIndexerBackend defines the methods needed to process chain segments in the background and write the segment results into the database.
ChainIndexerChain interface is used for connecting the indexer to a blockchain.
Prefetcher is an interface for pre-caching transaction signatures and state.
Processor is an interface for processing blocks using a given initial state.
Validator is an interface which defines the standard for block validation.

# Type aliases

GasPool tracks the amount of gas available during execution of the transactions in a block.
Deprecated: use types.Account instead.
Deprecated: use types.GenesisAlloc instead.
WriteStatus status of write.