package
2.0.0+incompatible
Repository: https://github.com/quarkchain/goquarkchain.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
ApplyMessage computes the new state by applying the given message against the old state within the environment.
ApplyTransaction apply tx.
CanTransfer checks whether there are enough funds in the address' account to make a transfer.
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
filterLogs creates a slice of logs matching the given criteria.
GenerateMinorChain creates a chain of n blocks.
GenerateRootBlockChain creates a chain of n blocks.
GetHashFn returns a GetHashFunc which retrieves header hashes by number.
No description provided by the author
IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
NewBlockValidator returns a new block validator which is safe for re-use.
No description provided by the author
No description provided by the author
NewHeaderChain creates a new RootHeaderChain structure.
NewMinorBlockChain returns a fully initialised block chain using information available in the database.
NewMinorHeaderChain creates a new HeaderChain structure.
NewRangeFilter creates a new filter which uses a bloom filter on blocks to figure out whether a particular block is interesting or not.
NewBlockChain returns a fully initialized block chain using information available in the database.
NewRootBlockValidator returns a new root block validator which is safe for re-use.
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.
# Cursor definitions (root_block_height, mblock_index, deposit_index)
# (x, 0, 0): EOF
# (x, 0, z), z > 0: Root-block coinbase tx (always exist)
# (x, y, z), y > 0: Minor-block x-shard tx (may not exist if not neighbor or no xshard)
#
# Note that: the cursor must be
# - EOF
# - A valid x-shard transaction deposit
*/.
SetReceiptsData computes all the non-consensus fields of the receipts.
No description provided by the author
SetupGenesisBlock writes or updates the genesis block in db.
Transfer subtracts amount from sender and adds amount to recipient using the given Db.
ValidateTransaction validateTx before applyTx.
No description provided by the author
# Constants
No description provided by the author
*solidity src missing
*/.
No description provided by the author
contract EventContract {
event Hi(address indexed);
constructor() public {
emit Hi(msg.sender);
}
function f() public {
emit Hi(msg.sender);
}
}
*/.
pragma solidity ^0.5.1;
contract Storage {
uint pos0;
mapping(address => uint) pos1;
function Save() public {
pos1[msg.sender] = 5678;
}
}
*/.
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.
ErrBlacklistedHash is returned if a block to import is on the blacklist.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrFutureBlock is returned when a block's timestamp is in the future according to the current node.
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.
No description provided by the author
No description provided by the author
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
ErrInvalidNumber is returned if a block's number doesn't equal it's parent's plus one.
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
No description provided by the author
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
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
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
ErrPrevBlockMissing is returned if a block's previous block is not exist in DB.
ErrPrunedAncestor is returned when validating a block requires an ancestor that is known, but the state of which is not available.
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
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.
ErrUnknownAncestor is returned when validating a block requires an ancestor that is unknown.
No description provided by the author
No description provided by the author
# Structs
CacheConfig contains the configuration values for the trie caching/pruning that's resident in a blockchain.
Filter can be used to retrieve and filter logs.
No description provided by the author
GenesisAccount is an account in the state of the genesis block.
No description provided by the author
HeaderChain implements the basic block header chain logic that is shared by core.MinorBlockChain and light.LightChain.
No description provided by the author
MinorBlockChain represents the canonical chain given a database with a genesis block.
MinorBlockGen creates blocks for testing.
MinorBlockValidator 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
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.
RootBlockChain represents the canonical chain given a database with a genesis block.
RootBlockGen creates blocks for testing.
RootBlockValidator implements Validator.
No description provided by the author
No description provided by the author
No description provided by the author
RootHeaderChain implements the basic block header chain logic that is shared by core.RootBlockChain and light.LightChain.
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
# Interfaces
No description provided by the author
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.
No description provided by the author
MinorWhCallback is a callback function for inserting individual Headers.
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.