# Functions
ApplyGenesis writes or updates the genesis block in db.
ApplyMessage computes the new state by applying the given message against the old state within the environment.
CanTransfer checks whether there are enough funds in the address' account to make a transfer.
ConvertFromEthHeader converts ETH-formatted header to Sirius EVM header.
GenerateChain creates a chain of n blocks.
GetHashFn returns a GetHashFunc which retrieves header hashes by number.
IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
MustApplyGenesis writes the genesis block and state to db, panicking on error.
NewEvmBlock constructor.
NewEVMBlockContext creates a new context for use in the EVM.
NewEVMTxContext creates a new transaction context for a single transaction.
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.
ToEvmHeader converts inter.Block to EvmHeader.
Transfer subtracts amount from sender and adds amount to recipient using the given Db.
# Constants
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).
DefaultTxPoolConfig contains the default configurations for the transaction pool.
ErrAlreadyKnown is returned if the transactions is already contained within the pool.
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.
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.
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.
ErrReplaceUnderpriced is returned if a transaction is attempted to be replaced with a different one without the required price bump.
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.
# Structs
BlockGen creates blocks for testing.
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
ExecutionResult includes all output after executing given evm message no matter the execution itself is successful or not.
NewMinedBlockNotify is posted when a block has been imported.
NewTxsNotify is posted when a batch of transactions enter the transaction pool.
PendingLogsNotify is posted pre mining and notifies of pending logs.
RemovedLogsNotify is posted when a reorg happens.
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.
No description provided by the author
TxPool contains all currently known transactions.
TxPoolConfig are the configuration parameters of the transaction pool.
# Interfaces
DummyChain supports retrieving headers and consensus parameters from the current blockchain to be used during transaction processing.
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.