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

# Packages

Provides support for dealing with EVM assembly instructions (e.g., disassembling them).
Package state provides a caching layer atop the Ethereum state trie.
Package types contains data types related to Ethereum consensus.
Package vm implements the Ethereum Virtual Machine.

# Functions

ApplyDAOHardFork modifies the state database according to the DAO hard-fork rules, transferring all balances of a set of DAO accounts to a single refund contract.
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.
CalcGasLimit computes the gas limit of the next block after parent.
CanTransfer checks wether there are enough funds in the address' account to make a transfer.
DefaultGenesisBlock returns the Ethereum main net genesis block.
DefaultRinkebyGenesisBlock returns the Rinkeby network genesis block.
DefaultTestnetGenesisBlock returns the Ropsten network genesis block.
DeleteBlock removes all block data associated with a hash.
DeleteBlockReceipts removes all receipt data associated with a block hash.
DeleteBody removes all block body data associated with a hash.
DeleteCanonicalHash removes the number to hash canonical mapping.
DeleteHeader removes all block header data associated with a hash.
DeleteReceipt removes all receipt data associated with a transaction hash.
DeleteTd removes all block total difficulty data associated with a hash.
DeleteTransaction removes all transaction data associated with a hash.
DevGenesisBlock returns the 'geth --dev' genesis block.
FindCommonAncestor returns the last common ancestor of two block headers.
GenerateChain creates a chain of n blocks.
GenesisBlockForTesting creates and writes a block in which addr has the given wei balance.
GetBlock retrieves an entire block corresponding to the hash, assembling it back from the stored header and body.
GetBlockChainVersion reads the version number from db.
GetBlockNumber returns the block number assigned to a block hash if the corresponding header is present in the database.
GetBlockReceipts retrieves the receipts generated by the transactions included in a block given by its hash.
GetBody retrieves the block body (transactons, uncles) corresponding to the hash, nil if none found.
GetBodyRLP retrieves the block body (transactions and uncles) in RLP encoding.
GetCanonicalHash retrieves a hash assigned to a canonical block number.
GetChainConfig will fetch the network settings based on the given hash.
GetHashFn returns a GetHashFunc which retrieves header hashes by number.
GetHeadBlockHash retrieves the hash of the current canonical head block.
GetHeader retrieves the block header corresponding to the hash, nil if none found.
GetHeaderRLP retrieves a block header in its raw RLP database encoding, or nil if the header's not found.
GetHeadFastBlockHash retrieves the hash of the current canonical head block during fast synchronization.
GetHeadHeaderHash retrieves the hash of the current canonical head block's header.
GetMipmapBloom returns a bloom filter using the number and level as input parameters.
GetReceipt returns a receipt by hash.
GetTd retrieves a block's total difficulty corresponding to the hash, nil if none found.
GetTransaction retrieves a specific transaction from the database, along with its added positional metadata.
IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
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.
NewEVMContext creates a new context for use in the EVM.
NewHeaderChain creates a new HeaderChain structure.
NewStateProcessor initialises a new StateProcessor.
NewStateTransition initialises and returns a new state transition object.
NewTxPool creates a new transaction pool to gather, sort and filter inbound trnsactions from the network.
PreimageTable returns a Database instance with the key prefix for preimage entries.
SetReceiptsData computes all the non-consensus fields of the receipts.
SetupGenesisBlock writes or updates the genesis block in db.
Transfer subtracts amount from sender and adds amount to recipient using the given Db.
ValidateDAOHeaderExtraData validates the extra-data field of a block header to ensure it conforms to DAO hard-fork rules.
WriteBlock serializes a block into the database, header and body separately.
WriteBlockChainVersion writes vsn as the version number to db.
WriteBlockReceipts stores all the transaction receipts belonging to a block as a single receipt slice.
WriteBody serializes the body of a block into the database.
WriteBodyRLP writes a serialized body of a block into the database.
WriteCanonicalHash stores the canonical hash for the given block number.
WriteChainConfig writes the chain config settings to the database.
WriteHeadBlockHash stores the head block's hash.
WriteHeader serializes a block header into the database.
WriteHeadFastBlockHash stores the fast head block's hash.
WriteHeadHeaderHash stores the head header's hash.
WriteMipmapBloom writes each address included in the receipts' logs to the MIP bloom bin.
WritePreimages writes the provided set of preimages to the database.
WriteReceipt stores a single transaction receipt into the database.
WriteReceipts stores a batch of transaction receipts into the database.
WriteTd serializes the total difficulty of a block into the database.
WriteTransactions stores the transactions associated with a specific block into the given database.

# Constants

BlockChainVersion ensures that an incompatible database forces a resync from scratch.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

BadHashes represent a set of manually tracked bad hashes (usually hard forks).
No description provided by the author
No description provided by the author
DefaultTxPoolConfig contains the default configurations for the transaction pool.
No description provided by the author
ErrBlacklistedHash is returned if a block to import is on the blacklist.
general config not found error.
No description provided by the author
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.
No description provided by the author
No description provided by the author
Transaction Pool Errors.
ErrKnownBlock is returned when a block to import is already known locally.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

BadBlockArgs represents the entries in the list returned when bad blocks are queried.
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.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Genesis specifies the header fields, state of a genesis block.
GenesisAccount is an account in the state of the 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 that is shared by core.BlockChain and light.LightChain.
NewMinedBlockEvent is posted when a block has been imported.
No description provided by the author
PendingLogsEvent is posted pre mining and notifies of pending logs.
PendingStateEvent is posted pre mining and notifies of pending state changes.
RemovedLogsEvent is posted when a reorg happens.
RemovedTransactionEvent is posted when a reorg happens.
Mining operation events.
StateProcessor is a basic Processor, which takes care of transitioning state from one point to another.
The State Transitioning Model A state transition is a change made when a transaction is applied to the current world state The state transitioning model does all all the necessary work to work out a valid new state root.
No description provided by the author
TxPool contains all currently known transactions.
TxPoolConfig are the configuration parameters of the transaction pool.
TxPostEvent is posted when a transaction has been processed.
TxPreEvent is posted when a transaction enters the transaction pool.

# Interfaces

ChainContext supports retrieving headers and consensus parameters from the current blockchain to be used during transaction processing.
Message represents a message sent to a contract.
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

DeleteCallback is a callback function that is called by SetHead before each header is deleted.
GasPool tracks the amount of gas available during execution of the transactions in a block.
GenesisAlloc specifies the initial state that is part of the genesis block.
WhCallback is a callback function for inserting individual headers.
WriteStatus status of write.