package
0.0.0-20210126205931-b4cfd715f5ee
Repository: https://github.com/tao-network/tao2.git
Documentation: pkg.go.dev
# Packages
Provides support for dealing with EVM assembly instructions (e.g., disassembling them).
Package bloombits implements bloom filtering on batches of data.
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
No description provided by the author
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.
CalcGasLimit computes the gas limit of the next block after parent.
FIXME: please use copyState for this function CallContractWithState executes a contract call at the given state.
CanTransfer checks wether there are enough funds in the address' account to make a transfer.
No description provided by the author
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.
DeleteTd removes all block total difficulty data associated with a hash.
DeleteTxLookupEntry removes all transaction data associated with a hash.
DeveloperGenesisBlock returns the 'geth --dev' genesis block.
No description provided by the author
No description provided by the author
No description provided by the author
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.
GetBloomBits retrieves the compressed bloom bit vector belonging to the given section and bit index from the.
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.
GetReceipt retrieves a specific transaction receipt from the database, along with its added positional metadata.
GetTd retrieves a block's total difficulty corresponding to the hash, nil if none found.
GetTokenAbi return token abi.
GetTransaction retrieves a specific transaction from the database, along with its added positional metadata.
GetTrieSyncProgress retrieves the number of tries nodes fast synced to allow reportinc correct numbers across restarts.
GetTxLookupEntry retrieves the positional metadata associated with a transaction hash to allow retrieving the transaction or receipt by hash.
No description provided by the author
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.
NewBlockChainEx extend old blockchain, add order state db.
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.
NewEVMContext creates a new context for use in the EVM.
NewHeaderChain creates a new HeaderChain structure.
NewLendingPool creates a new transaction pool to gather, sort and filter inbound transactions from the network.
NewOrderPool creates a new transaction pool to gather, sort and filter inbound transactions from the network.
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 transactions from the network.
PreimageTable returns a Database instance with the key prefix for preimage entries.
RunContract run smart contract.
No description provided by the author
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.
No description provided by the author
No description provided by the author
make sure that balance of token is at slot 0.
make sure that balance of token is at slot 0 make sure that minFee of token is at slot 1.
No description provided by the author
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.
WriteBloomBits writes the compressed bloom bits vector belonging to the given section and bit index.
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.
WritePreimages writes the provided set of preimages to the database.
WriteTd serializes the total difficulty of a block into the database.
WriteTrieSyncProgress stores the fast sync trie process counter to support retrieving it across restarts.
WriteTxLookupEntries stores a positional metadata for every transaction from a block, enabling hash based transaction and receipt lookups.
# 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
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
BadHashes represent a set of manually tracked bad hashes (usually hard forks).
BloomBitsIndexPrefix is the data table of a chain indexer to track its progress.
No description provided by the author
DefaultLendingPoolConfig contains the default configurations for the transaction pool.
DefaultOrderPoolConfig contains the default configurations for the transaction pool.
DefaultTxPoolConfig contains the default configurations for the transaction pool.
ErrBlacklistedHash is returned if a block to import is on the blacklist.
general config not found error.
No description provided by the author
ErrGasLimit is returned if a transaction's requested gas limit exceeds the maximum allowance of the current block.
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.
ErrIntrinsicGas is returned if the transaction is specified to use less gas than required to start the invocation.
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
ErrInvalidOrderFormat is returned if the order transaction contains an invalid field.
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
ErrInvalidSender is returned if the transaction contains an invalid signature.
ErrKnownBlock is returned when a block to import is already known locally.
No description provided by the author
ErrNegativeValue is a sanity error to ensure noone is able to specify a transaction with a negative value.
No description provided by the author
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
ErrOversizedData is returned if the input data of a transaction is greater than some meaningful limit a user might use.
No description provided by the author
No description provided by the author
ErrReplaceUnderpriced is returned if a transaction is attempted to be replaced with a different one without the required price bump.
No description provided by the author
No description provided by the author
ErrUnderpriced is returned if a transaction's gas price is below the minimum configured for the transaction pool.
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
# 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.
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
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
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.
LendingPool contains all currently known transactions.
LendingPoolConfig are the configuration parameters of the order transaction pool.
LendingTxPreEvent is posted when a order transaction enters the order transaction pool.
NewMinedBlockEvent is posted when a block has been imported.
OrderPool contains all currently known transactions.
OrderPoolConfig are the configuration parameters of the order transaction pool.
OrderTxPreEvent is posted when a order transaction enters the order transaction pool.
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.
No description provided by the author
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.
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.
TxPoolConfig are the configuration parameters of the transaction pool.
TxPreEvent is posted when a transaction enters the transaction pool.
# Interfaces
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.
DatabaseDeleter wraps the Delete method of a backing data store.
DatabaseReader wraps the Get method of a backing data store.
Message represents a message sent to a contract.
Processor is an interface for processing blocks using a given initial state.
No description provided by the author
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.
TxStatus is the current status of a transaction as seen by the pool.
WhCallback is a callback function for inserting individual headers.
WriteStatus status of write.