package
0.1.2
Repository: https://github.com/qwslane/go-quai.git
Documentation: pkg.go.dev

# Packages

Package bloombits implements bloom filtering on batches of data.
No description provided by the author
Package rawdb contains a collection of low level database accessors.
Package state provides a caching layer atop the Quai state trie.
Package types contains data types related to Quai consensus.
Package vm implements the Quai 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.
No description provided by the author
CalculateTokenChoicesSet reads the block token choices set and adds in the choices generated in the current block.
CanTransfer checks whether there are enough funds in the address' account to make a transfer.
Go through all denominations largest to smallest, check if the input exists as the output, if not, convert it to the respective number of bills for the next smallest denomination, then repeat the check.
DefaultColosseumGenesisBlock returns the Quai Colosseum testnet genesis block.
DefaultGardenGenesisBlock returns the Garden testnet genesis block.
DefaultGenesisBlock returns the Latest default Genesis block.
DefaultLighthouseGenesisBlock returns the Lighthouse testnet genesis block.
DefaultLocalGenesisBlock returns the Local testnet genesis block.
DefaultOrchardGenesisBlock returns the Orchard testnet genesis block.
DeveloperGenesisBlock returns the 'quai --dev' genesis block.
No description provided by the author
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.
No description provided by the author
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.
No description provided by the author
NewChainIndexer creates a new chain indexer to do background processing on chain segments of a given size after certain number of confirmations passed.
No description provided by the author
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.
No description provided by the author
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.
No description provided by the author
No description provided by the author
RedeemLockedQuai redeems any locked Quai for coinbase addresses at specific block depths.
No description provided by the author
SetupGenesisBlock writes or updates the genesis block in db.
No description provided by the author
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

# 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
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
DefaultTxPoolConfig contains the default configurations for the transaction pool.
ErrAlreadyKnown is returned if the transactions is already contained within the pool.
ErrBadBlockHash is returned when block being appended is in the badBlockHashes list.
ErrBadInterlink is returned when a block's interlink does not match the interlink hash.
ErrBadSubManifest is returned when a block's subordinate manifest does not match the subordinate manifest hash.
ErrBannedHash is returned if a block to import is on the banned list.
ErrBloomAlreadyKnown is returned if received bloom is already in the cache/db.
ErrBloomNotFound is returned when bloom cannot be found for a hash.
ErrBodyNotFound is returned when body data for a given header hash cannot be found.
ErrDomClientNotUp is returned when block is trying to be appended when domClient is not up.
ErrEtxGasLimitReached is returned when the gas limit of an ETX is greater than the maximum allowed.
ErrEtxLimitReached is returned when the ETXs emitted by a transaction would violate the block's ETX limits.
ErrFeeCapTooLow is returned if the transaction fee cap is less than the the base fee of the block.
ErrFeeCapVeryHigh is a sanity error to avoid extremely big numbers specified in the fee cap field.
ErrGasUintOverflow is returned when calculating gas usage.
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.
ErrInvalidSender is returned if the transaction contains an invalid signature.
ErrKnownBlock is returned when a block to import is already known locally.
ErrNegativeValue is a sanity error to ensure no one is able to specify a transaction with a negative value.
ErrNoGenesis is returned when there is no Genesis Block.
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.
ErrOversizedData is returned if the input data of a transaction is greater than some meaningful limit a user might use.
ErrPendingBlock indicates the block couldn't yet be processed.
ErrPendingEtxAlreadyKnown is returned received pending etx already in the cache/db.
ErrPendingEtxNotFound is returned when pendingEtxs cannot be found for a hash given in the submanifest.
ErrPendingEtxNotValid is returned when pendingEtxs is not valid.
ErrPendingEtxRollupNotFound is returned when pendingEtxsRollup cannot be found for a hash given in the submanifest.
ErrPendingEtxRollupNotValid is returned when pendingEtxsRollup is not valid.
ErrPendingHeaderNotInCache is returned when a coord gives an update but the slice has not yet created the referenced ph.
ErrReplaceUnderpriced is returned if a transaction is attempted to be replaced with a different one without the required price bump.
ErrSenderInoperable is returned if the sender of a transaction is outside of context.
ErrSenderNoEOA is returned if the sender of a transaction is a contract.
ErrSubNotSyncedToDom is returned when the subordinate cannot find the parent of the block which is being appended by the dom.
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.
ErrTxPoolOverflow is returned if the transaction pool is full and can't accpet another remote transaction.
ErrTxTypeNotSupported is returned if a transaction is not supported in the current network configuration.
ErrUnderpriced is returned if a transaction's gas price is below the minimum configured for the transaction pool.
Number of blocks behind in which we begin pruning old block data.

# Structs

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 Quai header bloom filters, permitting blazing fast filtering.
No description provided by the author
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
Config is the configuration parameters of mining.
No description provided by the author
ExecutionResult includes all output after executing given evm message no matter the execution itself is successful or not.
No description provided by the author
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.
No description provided by the author
No description provided by the author
No description provided by the author
Miner creates blocks and searches for proof-of-work values.
NewMinedBlockEvent is posted when a block has been imported.
NewTxsEvent is posted when a batch of transactions enter the transaction pool.
RemovedLogsEvent is posted when a reorg happens.
No description provided by the author
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 the necessary work to work out a valid new state root.
TxPool contains all currently known transactions.
TxPoolConfig are the configuration parameters of the transaction pool.
No description provided by the author
No description provided by the author

# 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.
Core will implement the following interface to enable dom-sub communication.
Message represents a message sent to a contract.
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

TxStatus is the current status of a transaction as seen by the pool.