package
2.0.3-rc1+incompatible
Repository: https://github.com/0xsoniclabs/sonic.git
Documentation: pkg.go.dev

# Functions

ApplyTransactionWithEVM attempts to apply a transaction to the given state database and uses the input parameters for its environment similar to ApplyTransaction.
CanTransfer checks whether there are enough funds in the address' account to make a transfer.
ConvertFromEthHeader converts ETH-formatted header to Lachesis EVM header.
FakeKey gets n-th fake private key.
GetHashFn returns a GetHashFunc which retrieves header hashes by number.
IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
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.
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.
No description provided by the author

# 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

DefaultTxPoolConfig contains the default configurations for the transaction pool.
ErrAlreadyKnown is returned if the transactions is already contained within the pool.
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.
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.
ErrSenderNoEOA is returned if the sender of a transaction is a contract.
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 accept 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.
No description provided by the author

# Structs

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
EvmHeaderJson is simplified version of types.Header, but allowing setting custom hash.
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.
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.
Prefetcher is an interface for pre-caching transaction signatures and state.
Processor is an interface for processing blocks using a given initial state.
StateReader provides the state of blockchain and current gas limit to do some pre checks in tx pool and event subscribers.
No description provided by the author
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.