# Packages

Package assets is generated by github.com/omeid/go-resources.
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

AccumulateRewards credits the coinbase of the given block with the mining reward.
ApplyMessage computes the new state by applying the given message against the old state within the environment.
No description provided by the author
ApplyTransaction attempts to apply a transaction to the given state database and uses the input parameters for its environment.
No description provided by the author
CalcDifficulty is the difficulty adjustment algorithm.
CalcGasLimit computes the gas limit of the next block after parent.
Call executes the contract associated with the addr with the given input as parameters.
CallCode executes the given address' code as the given contract address.
Create creates a new contract with the given code.
DelegateCall is equivalent to CallCode except that sender and value propagates from parent scope to child scope.
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.
No description provided by the author
GenerateChain creates a chain of n blocks.
GetAddrTxs gets the indexed transactions for a given account address.
GetBlock retrieves an entire block corresponding to the hash, assembling it back from the stored header and body.
[deprecated by the header/block split, remove eventually] GetBlockByHashOld returns the old combined block corresponding to the hash or nil if not found.
GetBlockChainVersion reads the version number from db.
GetBlockEra gets which "Era" a given block is within, given an era length (100,000 blocks) Returns a zero-index era number, so "Era 1": 0, "Era 2": 1, "Era 3": 2 ...
GetBlockReceipts retrieves the receipts generated by the transactions included in a block given by its hash.
GetBlockUncleRewardByEra gets called _for each uncle miner_ associated with a winner block's uncles.
GetRewardByEra gets a block reward at disinflation rate.
GetBlockWinnerRewardForUnclesByEra gets called _per winner_, and accumulates rewards for each included uncle.
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.
No description provided by the author
No description provided by the author
GetCanonicalHash retrieves a hash assigned to a canonical block number.
GetHashFn returns a function for which the VM env can query block hashes through up to the limit defined by the Yellow Paper and uses the given block chain to query for information.
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.
No description provided by the author
IsBlockNonceErr returns true for invalid block nonce errors.
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
No description provided by the author
IsValidateError eturns whether err is a validation error.
No description provided by the author
MakeChainConfig returns a new ChainConfig with the ethereum default chain settings.
MakeGenesisDump makes a genesis dump.
No description provided by the author
NewBlockChain returns a fully initialised block chain using information available in the database.
No description provided by the author
NewBlockValidator returns a new block validator which is safe for re-use.
No description provided by the author
NewHeaderChain creates a new HeaderChain structure.
NewStateProcessor initialises a new StateProcessor.
NewStateTransition initialises and returns a new state transition object.
No description provided by the author
No description provided by the author
No description provided by the author
ParseBootstrapNodeStrings is a helper function to parse stringified bs nodes, ie []"enode://e809c4a2fec7daed400e5e28564e23693b23b2cc5a019b612505631bbe7b9ccf709c1796d2a3d29ef2b045f210caf51e3c4f5b6d3587d43ad5d6397526fa6179@174.112.32.157:30303",..
PreimageTable returns a Database instance with the key prefix for preimage entries.
ReadExternalChainConfigFromFile reads a flagged external json file for blockchain configuration.
RmAddrTx removes all atxi indexes for a given tx in case of a transaction removal, eg.
No description provided by the author
No description provided by the author
StaticCall executes within the given contract and throws exception if state is attempted to be changed.
generic transfer method.
No description provided by the author
Validates a header.
No description provided by the author
WriteBlock serializes a block into the database, header and body separately.
WriteBlockAddTxIndexes writes atx-indexes for a given block.
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.
WriteCanonicalHash stores the canonical hash for the given block number.
WriteGenesisBlock writes the genesis block to the database as block number 0.
No description provided by the author
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.
WriteMapmapBloom writes each address included in the receipts' logs to the MIP bloom bin.
WritePreimages writes the provided set of preimages to 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.
WriteTxLookupEntries stores a positional metadata for every transaction from a block, enabling hash based transaction and receipt lookups.

# Constants

must be bumped when consensus algorithm is changed, this forces the upgradedb command to be run (forces the blocks to be imported again using the new algorithm).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Chain identities.
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
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
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
Transaction Pool Errors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The bound divisor of the gas limit, used in update calculations.
Minimum the gas limit may ever be.
No description provided by the author
The artificial target.
Per byte of data attached to a transaction that is not equal to zero.
Per byte of data attached to a transaction that equals zero.
Per transaction not creating a contract.
Per transaction that creates a contract.
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
BlockChain represents the canonical chain given a database with a genesis block.
BlockGen creates blocks for testing.
BlockNonceErr indicates that a block's nonce is invalid.
BlockValidator is responsible for validating block headers, uncles and processed state.
ChainConfig is stored in the database on a per block basis.
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
ChainSplit is posted when a new head is detected.
TODO: no usages found in project files.
Difficulty allows passing configurable options to a given difficulty algorithm.
FakePow is a non-validating proof of work implementation.
No description provided by the author
ForkFeatures are designed to decouple the implementation feature upgrades from Forks themselves.
No description provided by the author
No description provided by the author
No description provided by the author
GenesisDump is the geth JSON format.
GenesisDumpAlloc is a GenesisDump.Alloc entry.
HeaderChain implements the basic block header chain logic that is shared by core.BlockChain and light.LightChain.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewBlockEvent is posted when a block has been imported.
NewMinedBlockEvent is posted when a block has been imported.
No description provided by the author
Parent error.
TODO: no usages found in project files.
PendingLogsEvent is posted pre mining and notifies of pending logs.
PendingStateEvent is posted pre mining and notifies of pending state changes.
No description provided by the author
No description provided by the author
RemovedLogEvent is posted when a reorg happens.
RemovedTransactionEvent is posted when a reorg happens.
Mining operation events.
StateConfig hold variable data for statedb.
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
SufficientChainConfig holds necessary data for externalizing a given blockchain configuration.
No description provided by the author
TxLookupEntry is a positional metadata to help looking up the data content of a transaction or receipt given only its hash.
TxPool contains all currently known transactions.
TxPostEvent is posted when a transaction has been processed.
TxPreEvent is posted when a transaction enters the transaction pool.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

Backend is an interface defining the basic functionality for an operable node with all the functionality to be a functional, valid Ethereum operator.
HeaderValidator is an interface for validating headers only ValidateHeader validates the given header and parent and returns an error if it failed to do so.
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

These are the raw key-value configuration options made available by an external JSON file.
DeleteCallback is a callback function that is called by SetHead before each header is deleted.
Forks implements sort interface, sorting by block number.
GasPool tracks the amount of gas available during execution of the transactions in a block.
WhCallback is a callback function for inserting individual headers.
No description provided by the author