# Packages
Provides support for dealing with CVM assembly instructions (e.g., disassembling them).
Package bloombits implements bloom filtering on batches of data.
Package forkid implements EIP-2124 (https://eips.cortex.org/EIPS/eip-2124).
Package rawdb contains a collection of low level database accessors.
Package state provides a caching layer atop the Cortex state trie.
No description provided by the author
No description provided by the author
Package types contains data types related to Cortex consensus.
Package vm implements the Cortex 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.
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.
DefaultTestnetGenesisBlock returns the Ropsten network genesis block.
DefaultTestnetGenesisBlock returns the Ropsten network genesis block.
No description provided by the author
DefaultGenesisBlock returns the Cortex main net genesis block.
GenerateChain creates a chain of n blocks.
GenesisBlockForTesting creates and writes a block in which addr has the given wei balance.
GetHashFn returns a GetHashFunc which retrieves header hashes by number.
IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
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.
NewChainIndexer creates a new chain indexer to do background processing on chain segments of a given size after certain number of confirmations passed.
NewCVMContext creates a new context for use in the CVM.
NewCVMTxContext creates a new transaction context for a single transaction.
NewHeaderChain creates a new HeaderChain structure.
No description provided by the author
NewStateProcessor initialises a new StateProcessor.
NewStateTransition initialises and returns a new state transition object.
SetupGenesisBlock writes or updates the genesis block in db.
XXX Rename message to something less arbitrary? 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.
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).
ErrBannedHash is returned if a block to import is on the banned list.
ErrBlacklistedHash is returned if a block to import is on the blacklist.
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.
ErrInsufficientFunds is returned if the total cost of executing a transaction is higher than the balance of the user's account.
ErrMetaInfoNotMature = errors.New("cvm: errMetaInfoNotMature").
ErrIntrinsicGas is returned if the transaction is specified to use less gas than required to start the invocation.
ErrInvalidSender is returned if the transaction contains an invalid signature.
ErrKnownBlock is returned when a block to import is already known locally.
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.
No description provided by the author
No description provided by the author
No description provided by the author
senderCacher is a concurrent transaction sender recoverer anc cacher.
# 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.
CacheConfig contains the configuration values for the trie caching/pruning that's resident in a blockchain.
No description provided by the author
No description provided by the author
ChainIndexer does a post-processing job for equally sized sections of the canonical chain (like BlooomBits and CHT structures).
No description provided by the author
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.
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.
No description provided by the author
NewMinedBlockEvent is posted when a block has been imported.
NewTxsEvent is posted when a batch of transactions enter the transaction pool.
PendingLogsEvent is posted pre mining and notifies of pending logs.
RemovedLogsEvent is posted when a reorg happens.
StateProcessor is a basic Processor, which takes care of transitioning state from one point to another.
StateTransition is the state of current tx in vm.
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
No description provided by the author
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.
QuotaPool tracks the amount of gas available during execution of the transactions in a block.
No description provided by the author
WriteStatus status of write.