Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyTransaction(config *params.ChainConfig, blockHashFunc func(n uint64) types.Hash, ...) (*block.Receipt, []byte, error)
- func BorTransfer(db evmtypes.IntraBlockState, sender, recipient types.Address, ...)
- func CanTransfer(db evmtypes.IntraBlockState, addr types.Address, amount *uint256.Int) bool
- func CheckEip1559TxGasFeeCap(from types.Address, gasFeeCap, tip, baseFee *uint256.Int, isFree bool) error
- func DeriveSha(list DerivableList) (h types.Hash)
- func FinalizeBlockExecution(engine consensus.Engine, header *block.Header, txs transaction.Transactions, ...) (newBlock block.IBlock, newTxs transaction.Transactions, ...)
- func GenesisByChainName(chain string) *conf.Genesis
- func GetHashFn(ref *block.Header, ...) func(n uint64) types.Hash
- func IntrinsicGas(data []byte, accessList transaction.AccessList, isContractCreation bool, ...) (uint64, error)
- func NewBlockChain(ctx context.Context, genesisBlock block2.IBlock, engine consensus.Engine, ...) (common.IBlockChain, error)
- func NewEVMBlockContext(header *block.Header, blockHashFunc func(n uint64) types.Hash, ...) evmtypes.BlockContext
- func NewEVMTxContext(msg Message) evmtypes.TxContext
- func NewStateReaderWriter(batch ethdb.Database, tx kv.RwTx, blockNumber uint64, writeChangeSets bool) (state.StateReader, state.WriterWithChangeSets, error)
- func SysCallContract(contract types.Address, data []byte, chainConfig params.ChainConfig, ...) (result []byte, err error)
- func Transfer(db evmtypes.IntraBlockState, sender, recipient types.Address, ...)
- type BlockChain
- func (bc *BlockChain) AddFutureBlock(block block2.IBlock) error
- func (bc *BlockChain) AddPeer(hash string, remoteBlock uint64, peerID peer.ID) error
- func (bc *BlockChain) Blocks() []block2.IBlock
- func (bc *BlockChain) Close() error
- func (bc *BlockChain) Config() *params.ChainConfig
- func (bc *BlockChain) CurrentBlock() block2.IBlock
- func (bc *BlockChain) DB() kv.RwDB
- func (bc *BlockChain) Engine() consensus.Engine
- func (bc *BlockChain) GenesisBlock() block2.IBlock
- func (bc *BlockChain) GetAccountRewardUnpaid(account types.Address) (*uint256.Int, error)
- func (bc *BlockChain) GetBlock(hash types.Hash, number uint64) block2.IBlock
- func (bc *BlockChain) GetBlockByHash(h types.Hash) (block2.IBlock, error)
- func (bc *BlockChain) GetBlockByNumber(number *uint256.Int) (block2.IBlock, error)
- func (bc *BlockChain) GetBlockNumber(hash types.Hash) *uint64
- func (bc *BlockChain) GetBlocksFromHash(hash types.Hash, n int) (blocks []block2.IBlock)
- func (bc *BlockChain) GetCanonicalHash(number *uint256.Int) types.Hash
- func (bc *BlockChain) GetDepositInfo(address types.Address) (*uint256.Int, *uint256.Int)
- func (bc *BlockChain) GetHeader(h types.Hash, number *uint256.Int) block2.IHeader
- func (bc *BlockChain) GetHeaderByHash(h types.Hash) (block2.IHeader, error)
- func (bc *BlockChain) GetHeaderByNumber(number *uint256.Int) block2.IHeader
- func (bc *BlockChain) GetLogs(blockHash types.Hash) ([][]*block2.Log, error)
- func (bc *BlockChain) GetReceipts(blockHash types.Hash) (block2.Receipts, error)
- func (bc *BlockChain) GetTd(hash types.Hash, number *uint256.Int) *uint256.Int
- func (bc *BlockChain) HasBlock(hash types.Hash, number uint64) bool
- func (bc *BlockChain) HasBlockAndState(hash types.Hash, number uint64) bool
- func (bc *BlockChain) HasState(hash types.Hash) bool
- func (bc *BlockChain) InsertBlock(blocks []block2.IBlock, isSync bool) (int, error)
- func (bc *BlockChain) InsertChain(chain []block2.IBlock) (int, error)
- func (bc *BlockChain) InsertHeader(headers []block2.IHeader) (int, error)
- func (bc *BlockChain) LatestBlockCh() (block2.IBlock, error)
- func (bc *BlockChain) NewBlockHandler(payload []byte, peer peer.ID) error
- func (bc *BlockChain) Quit() <-chan struct{}
- func (bc *BlockChain) ReorgNeeded(current block2.IBlock, header block2.IBlock) bool
- func (bc *BlockChain) SealedBlock(b block2.IBlock) error
- func (bc *BlockChain) SetEngine(engine consensus.Engine)
- func (bc *BlockChain) SetHead(head uint64) error
- func (bc *BlockChain) Start() error
- func (bc *BlockChain) StateAt(tx kv.Tx, blockNr uint64) *state.IntraBlockState
- func (bc *BlockChain) StopInsert()
- func (bc *BlockChain) WriteBlockWithState(block block2.IBlock, receipts []*block2.Receipt, ibs *state.IntraBlockState, ...) error
- func (bc *BlockChain) WriteBlockWithoutState(block block2.IBlock) (err error)
- type BlockValidator
- type ChainContext
- type ChainReader
- type DerivableList
- type EphemeralExecResult
- type ExecutionResult
- type ForkChoice
- type GenesisBlock
- type Message
- type Processor
- type RejectedTx
- type RejectedTxs
- type StateProcessor
- type StateTransition
- type SyncMode
- type Validator
- type WriteStatus
Constants ¶
const (
TriesInMemory = 128
)
Variables ¶
var ( ErrKnownBlock = errors.New("block already known") ErrUnknownAncestor = errors.New("unknown ancestor") ErrPrunedAncestor = errors.New("pruned ancestor") ErrFutureBlock = errors.New("block in the future") ErrInvalidNumber = errors.New("invalid block number") ErrInvalidTerminalBlock = errors.New("insertion is interrupted") )
var ( ErrInvalidBlock = fmt.Errorf("invalid block") ErrInvalidPubSub = fmt.Errorf("PubSub is nil") )
var ( // ErrBannedHash is returned if a block to import is on the banned list. ErrBannedHash = errors.New("banned hash") // ErrNoGenesis is returned when there is no Genesis Block. ErrNoGenesis = errors.New("genesis not found in chain") )
var ( // ErrNonceTooLow is returned if the nonce of a transaction is lower than the // one present in the local chain. ErrNonceTooLow = errors.New("nonce too low") // ErrNonceTooHigh is returned if the nonce of a transaction is higher than the // next one expected based on the local chain. ErrNonceTooHigh = errors.New("nonce too high") // ErrNonceMax is returned if the nonce of a transaction sender account has // maximum allowed value and would become invalid if incremented. ErrNonceMax = errors.New("nonce has max value") // 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. ErrGasLimitReached = errors.New("gas limit reached") // ErrInsufficientFundsForTransfer is returned if the transaction sender doesn't // have enough funds for transfer(topmost call only). ErrInsufficientFundsForTransfer = errors.New("insufficient funds for transfer") // ErrInsufficientFunds is returned if the total cost of executing a transaction // is higher than the balance of the user's account. ErrInsufficientFunds = errors.New("insufficient funds for gas * price + value") // ErrGasUintOverflow is returned when calculating gas usage. ErrGasUintOverflow = errors.New("gas uint64 overflow") // ErrIntrinsicGas is returned if the transaction is specified to use less gas // than required to start the invocation. ErrIntrinsicGas = errors.New("intrinsic gas too low") // ErrTxTypeNotSupported is returned if a transaction is not supported in the // current network configuration. ErrTxTypeNotSupported = errors.New("transaction type not supported") // ErrTipAboveFeeCap is a sanity error to ensure no one is able to specify a // transaction with a tip higher than the total fee cap. ErrTipAboveFeeCap = errors.New("max priority fee per gas higher than max fee per gas") // ErrTipVeryHigh is a sanity error to avoid extremely big numbers specified // in the tip field. ErrTipVeryHigh = errors.New("max priority fee per gas higher than 2^256-1") // ErrFeeCapVeryHigh is a sanity error to avoid extremely big numbers specified // in the fee cap field. ErrFeeCapVeryHigh = errors.New("max fee per gas higher than 2^256-1") // ErrFeeCapTooLow is returned if the transaction fee cap is less than the // the base fee of the block. ErrFeeCapTooLow = errors.New("max fee per gas less than block base fee") // ErrSenderNoEOA is returned if the sender of a transaction is a contract. ErrSenderNoEOA = errors.New("sender not an eoa") // ErrAlreadyDeposited already deposited ErrAlreadyDeposited = errors.New("already deposited") )
List of evm-call-message pre-checking errors. All state transition messages will be pre-checked before execution. If any invalidation detected, the corresponding error should be returned which is defined here.
- If the pre-checking happens in the miner, then the transaction won't be packed. - If the pre-checking happens in the block processing procedure, then a "BAD BLOCk" error should be emitted.
var ErrGenesisNoConfig = errors.New("genesis has no chain configuration")
Functions ¶
func ApplyTransaction ¶
func ApplyTransaction(config *params.ChainConfig, blockHashFunc func(n uint64) types.Hash, engine consensus.Engine, author *types.Address, gp *common.GasPool, ibs *state.IntraBlockState, stateWriter state.StateWriter, header *block.Header, tx *transaction.Transaction, usedGas *uint64, cfg vm2.Config) (*block.Receipt, []byte, error)
ApplyTransaction attempts to apply a transaction to the given state database and uses the input parameters for its environment. It returns the receipt for the transaction, gas used and an error if the transaction failed, indicating the block was invalid.
func BorTransfer ¶
func BorTransfer(db evmtypes.IntraBlockState, sender, recipient types.Address, amount *uint256.Int, bailout bool)
BorTransfer transfer in Bor
func CanTransfer ¶
CanTransfer checks whether there are enough funds in the address' account to make a transfer. This does not take the necessary gas in to account to make the transfer valid.
func CheckEip1559TxGasFeeCap ¶
func DeriveSha ¶
func DeriveSha(list DerivableList) (h types.Hash)
DeriveSha creates the tree hashes of transactions and receipts in a block header.
func FinalizeBlockExecution ¶
func FinalizeBlockExecution(engine consensus.Engine, header *block.Header, txs transaction.Transactions, stateWriter state.WriterWithChangeSets, cc *params.ChainConfig, ibs *state.IntraBlockState, receipts block.Receipts, headerReader consensus.ChainHeaderReader, isMining bool) (newBlock block.IBlock, newTxs transaction.Transactions, newReceipt block.Receipts, err error)
func GenesisByChainName ¶
func GetHashFn ¶
func GetHashFn(ref *block.Header, getHeader func(hash types.Hash, number uint64) *block.Header) func(n uint64) types.Hash
GetHashFn returns a GetHashFunc which retrieves header hashes by number
func IntrinsicGas ¶
func IntrinsicGas(data []byte, accessList transaction.AccessList, isContractCreation bool, isHomestead, isEIP2028 bool, isEIP3860 bool) (uint64, error)
IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
func NewBlockChain ¶
func NewEVMBlockContext ¶
func NewEVMBlockContext(header *block.Header, blockHashFunc func(n uint64) types.Hash, engine consensus.Engine, author *types.Address) evmtypes.BlockContext
NewEVMBlockContext creates a new context for use in the EVM.
func NewEVMTxContext ¶
NewEVMTxContext creates a new transaction context for a single transaction.
func NewStateReaderWriter ¶
func SysCallContract ¶
Types ¶
type BlockChain ¶
type BlockChain struct { //state *statedb.StateDB ChainDB kv.RwDB // contains filtered or unexported fields }
func (*BlockChain) AddFutureBlock ¶
func (bc *BlockChain) AddFutureBlock(block block2.IBlock) error
AddFutureBlock checks if the block is within the max allowed window to get accepted for future processing, and returns an error if the block is too far ahead and was not added.
TODO after the transition, the future block shouldn't be kept. Because it's not checked in the Geth side anymore.
func (*BlockChain) Blocks ¶
func (bc *BlockChain) Blocks() []block2.IBlock
func (*BlockChain) Close ¶
func (bc *BlockChain) Close() error
func (*BlockChain) Config ¶
func (bc *BlockChain) Config() *params.ChainConfig
func (*BlockChain) CurrentBlock ¶
func (bc *BlockChain) CurrentBlock() block2.IBlock
func (*BlockChain) DB ¶
func (bc *BlockChain) DB() kv.RwDB
func (*BlockChain) Engine ¶
func (bc *BlockChain) Engine() consensus.Engine
func (*BlockChain) GenesisBlock ¶
func (bc *BlockChain) GenesisBlock() block2.IBlock
func (*BlockChain) GetAccountRewardUnpaid ¶
func (*BlockChain) GetBlockByHash ¶
func (*BlockChain) GetBlockByNumber ¶
func (*BlockChain) GetBlockNumber ¶
func (bc *BlockChain) GetBlockNumber(hash types.Hash) *uint64
GetBlockNumber retrieves the block number belonging to the given hash from the cache or database
func (*BlockChain) GetBlocksFromHash ¶
func (*BlockChain) GetCanonicalHash ¶
func (bc *BlockChain) GetCanonicalHash(number *uint256.Int) types.Hash
GetCanonicalHash returns the canonical hash for a given block number
func (*BlockChain) GetDepositInfo ¶
func (*BlockChain) GetHeaderByHash ¶
func (*BlockChain) GetHeaderByNumber ¶
func (bc *BlockChain) GetHeaderByNumber(number *uint256.Int) block2.IHeader
func (*BlockChain) GetReceipts ¶
func (*BlockChain) HasBlockAndState ¶
func (bc *BlockChain) HasBlockAndState(hash types.Hash, number uint64) bool
HasBlockAndState
func (*BlockChain) InsertBlock ¶
InsertBlock Deprecated:
func (*BlockChain) InsertChain ¶
func (bc *BlockChain) InsertChain(chain []block2.IBlock) (int, error)
InsertChain
func (*BlockChain) InsertHeader ¶
func (bc *BlockChain) InsertHeader(headers []block2.IHeader) (int, error)
func (*BlockChain) LatestBlockCh ¶
func (bc *BlockChain) LatestBlockCh() (block2.IBlock, error)
func (*BlockChain) NewBlockHandler ¶
func (bc *BlockChain) NewBlockHandler(payload []byte, peer peer.ID) error
func (*BlockChain) Quit ¶
func (bc *BlockChain) Quit() <-chan struct{}
func (*BlockChain) ReorgNeeded ¶
ReorgNeeded
func (*BlockChain) SealedBlock ¶
func (bc *BlockChain) SealedBlock(b block2.IBlock) error
func (*BlockChain) SetEngine ¶
func (bc *BlockChain) SetEngine(engine consensus.Engine)
func (*BlockChain) Start ¶
func (bc *BlockChain) Start() error
func (*BlockChain) StateAt ¶
func (bc *BlockChain) StateAt(tx kv.Tx, blockNr uint64) *state.IntraBlockState
func (*BlockChain) WriteBlockWithState ¶
func (*BlockChain) WriteBlockWithoutState ¶
func (bc *BlockChain) WriteBlockWithoutState(block block2.IBlock) (err error)
WriteBlockWithoutState without state
type BlockValidator ¶
type BlockValidator struct {
// contains filtered or unexported fields
}
BlockValidator is responsible for validating block headers, uncles and processed state.
BlockValidator implements Validator.
func NewBlockValidator ¶
func NewBlockValidator(config *params.ChainConfig, blockchain *BlockChain, engine consensus.Engine) *BlockValidator
NewBlockValidator returns a new block validator which is safe for re-use
func (*BlockValidator) ValidateBody ¶
func (v *BlockValidator) ValidateBody(b block.IBlock) error
ValidateBody validates the given block's uncles and verifies the block header's transaction and uncle roots. The headers are assumed to be already validated at this point.
func (*BlockValidator) ValidateState ¶
func (v *BlockValidator) ValidateState(iBlock block.IBlock, statedb *state.IntraBlockState, receipts block.Receipts, usedGas uint64) error
ValidateState validates the various changes that happen after a state transition, such as amount of used gas, the receipt roots and the state root itself. ValidateState returns a database batch if the validation was a success otherwise nil and an error is returned.
type ChainContext ¶
type ChainContext interface { // Engine retrieves the chain's consensus engine. Engine() consensus.Engine // GetHeader returns the header corresponding to the hash/number argument pair. GetHeader(types.Hash, uint64) *block.Header }
ChainContext supports retrieving headers and consensus parameters from the current blockchain to be used during transaction processing.
type ChainReader ¶
type ChainReader interface { // GetTd returns the total difficulty of a local block. GetTd(types.Hash, *uint256.Int) *uint256.Int }
ChainReader defines a small collection of methods needed to access the local blockchain during header verification. It's implemented by both blockchain and lightchain.
type DerivableList ¶
DerivableList is the input to DeriveSha. It is implemented by the 'Transactions' and 'Receipts' types. This is internal, do not use these methods.
type EphemeralExecResult ¶
type EphemeralExecResult struct { StateRoot types.Hash `json:"stateRoot"` TxRoot types.Hash `json:"txRoot"` ReceiptRoot types.Hash `json:"receiptsRoot"` LogsHash types.Hash `json:"logsHash"` Bloom types.Bloom `json:"logsBloom" gencodec:"required"` Receipts block.Receipts `json:"receipts"` Rejected RejectedTxs `json:"rejected,omitempty"` Difficulty *math.HexOrDecimal256 `json:"currentDifficulty" gencodec:"required"` GasUsed math.HexOrDecimal64 `json:"gasUsed"` StateSyncReceipt *block.Receipt `json:"-"` }
type ExecutionResult ¶
type ExecutionResult struct { UsedGas uint64 // Total used gas but include the refunded gas Err error // Any error encountered during the execution(listed in core/vm/errors.go) ReturnData []byte // Returned data from evm(function result or data supplied with revert opcode) }
ExecutionResult includes all output after executing given evm message no matter the execution itself is successful or not.
func ApplyMessage ¶
func ApplyMessage(evm vm2.VMInterface, msg Message, gp *common.GasPool, refunds bool, gasBailout bool) (*ExecutionResult, error)
ApplyMessage computes the new state by applying the given message against the old state within the environment.
ApplyMessage returns the bytes returned by any EVM execution (if it took place), the gas used (which includes gas refunds) and an error if it failed. An error always indicates a core error meaning that the message would always fail for that particular state and would never be accepted within a block. `refunds` is false when it is not required to apply gas refunds `gasBailout` is true when it is not required to fail transaction if the balance is not enough to pay gas. for trace_call to replicate OE/Pariry behaviour
func (*ExecutionResult) Failed ¶
func (result *ExecutionResult) Failed() bool
Failed returns the indicator whether the execution is successful or not
func (*ExecutionResult) Return ¶
func (result *ExecutionResult) Return() []byte
Return is a helper function to help caller distinguish between revert reason and function return. Return returns the data after execution if no error occurs.
func (*ExecutionResult) Revert ¶
func (result *ExecutionResult) Revert() []byte
Revert returns the concrete revert reason if the execution is aborted by `REVERT` opcode. Note the reason can be nil if no data supplied with revert opcode.
func (*ExecutionResult) Unwrap ¶
func (result *ExecutionResult) Unwrap() error
Unwrap returns the internal evm error which allows us for further analysis outside.
type ForkChoice ¶
type ForkChoice struct {
// contains filtered or unexported fields
}
ForkChoice is the fork chooser based on the highest total difficulty of the chain(the fork choice used in the eth1) and the external fork choice (the fork choice used in the eth2). This main goal of this ForkChoice is not only for offering fork choice during the eth1/2 merge phase, but also keep the compatibility for all other proof-of-work networks.
func NewForkChoice ¶
func NewForkChoice(chainReader ChainReader, preserve func(header block2.IHeader) bool) *ForkChoice
func (*ForkChoice) ReorgNeeded ¶
ReorgNeeded returns whether the reorg should be applied based on the given external header and local canonical chain. In the td mode, the new head is chosen if the corresponding total difficulty is higher. In the extern mode, the trusted header is always selected as the head.
type GenesisBlock ¶
func (*GenesisBlock) ToBlock ¶
func (g *GenesisBlock) ToBlock() (*block2.Block, *state.IntraBlockState, error)
func (*GenesisBlock) Write ¶
func (g *GenesisBlock) Write(tx kv.RwTx) (*block2.Block, *state.IntraBlockState, error)
func (*GenesisBlock) WriteGenesisState ¶
func (g *GenesisBlock) WriteGenesisState(tx kv.RwTx) (*block2.Block, *state.IntraBlockState, error)
type Message ¶
type Message interface { From() types.Address To() *types.Address GasPrice() *uint256.Int FeeCap() *uint256.Int Tip() *uint256.Int Gas() uint64 Value() *uint256.Int Nonce() uint64 CheckNonce() bool Data() []byte AccessList() transaction.AccessList IsFree() bool }
Message represents a message sent to a contract.
type Processor ¶
type Processor interface { // Process processes the state changes according to the Ethereum rules by running // the transaction messages using the statedb and applying any rewards to both // the processor (coinbase) and any included uncles. Process(b *block.Block, ibs *state.IntraBlockState, stateReader state.StateReader, stateWriter state.WriterWithChangeSets, blockHashFunc func(n uint64) types.Hash) (block.Receipts, map[types.Address]*uint256.Int, []*block.Log, uint64, error) }
Processor is an interface for processing blocks using a given initial state.
type RejectedTx ¶
type RejectedTxs ¶
type RejectedTxs []*RejectedTx
type StateProcessor ¶
type StateProcessor struct {
// contains filtered or unexported fields
}
StateProcessor is a basic Processor, which takes care of transitioning state from one point to another.
StateProcessor implements Processor.
func NewStateProcessor ¶
func NewStateProcessor(config *params.ChainConfig, bc *BlockChain, engine consensus.Engine) *StateProcessor
NewStateProcessor initialises a new StateProcessor.
func (*StateProcessor) Process ¶
func (p *StateProcessor) Process(b *block.Block, ibs *state.IntraBlockState, stateReader state.StateReader, stateWriter state.WriterWithChangeSets, blockHashFunc func(n uint64) types.Hash) (block.Receipts, map[types.Address]*uint256.Int, []*block.Log, uint64, error)
Process processes the state changes according to the Ethereum rules by running the transaction messages using the statedb and applying any rewards to both the processor (coinbase) and any included uncles.
Process returns the receipts and logs accumulated during the process and returns the amount of gas that was used in the process. If any of the transactions failed to execute due to insufficient gas it will return an error.
type StateTransition ¶
type StateTransition struct {
// contains filtered or unexported fields
}
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.
1) Nonce handling 2) Pre pay gas 3) Create a new state object if the recipient is \0*32 4) Value transfer == If contract creation ==
4a) Attempt to run transaction data 4b) If valid, use result as code for the new state object
== end == 5) Run Script section 6) Derive new state root
func NewStateTransition ¶
func NewStateTransition(evm vm2.VMInterface, msg Message, gp *common.GasPool) *StateTransition
NewStateTransition initialises and returns a new state transition object.
func (*StateTransition) TransitionDb ¶
func (st *StateTransition) TransitionDb(refunds bool, gasBailout bool) (*ExecutionResult, error)
TransitionDb will transition the state by applying the current message and returning the evm execution result with following fields.
- used gas: total gas used (including gas being refunded)
- returndata: the returned data from evm
- concrete execution error: various **EVM** error which aborts the execution, e.g. ErrOutOfGas, ErrExecutionReverted
However if any consensus issue encountered, return the error directly with nil evm execution result.
type Validator ¶
type Validator interface { // ValidateBody validates the given block's content. ValidateBody(block block.IBlock) error // ValidateState validates the given statedb and optionally the receipts and // gas used. ValidateState(block block.IBlock, state *state.IntraBlockState, receipts block.Receipts, usedGas uint64) error }
Validator is an interface which defines the standard for block validation. It is only responsible for validating block contents, as the header validation is done by the specific consensus engines.
type WriteStatus ¶
type WriteStatus byte
const ( NonStatTy WriteStatus = iota // CanonStatTy // SideStatTy // )
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
common
Package common contains various helper functions.
|
Package common contains various helper functions. |
common/bitutil
Package bitutil implements fast bitwise operations.
|
Package bitutil implements fast bitwise operations. |
common/compiler
Package compiler wraps the Solidity and Vyper compiler executables (solc; vyper).
|
Package compiler wraps the Solidity and Vyper compiler executables (solc; vyper). |
common/mclock
Package mclock is a wrapper for a monotonic clock source
|
Package mclock is a wrapper for a monotonic clock source |
common/prque
Package prque implements a priority queue data structure supporting arbitrary value types and int64 priorities.
|
Package prque implements a priority queue data structure supporting arbitrary value types and int64 priorities. |
prometheus
Package prometheus exposes go-metrics into a Prometheus format.
|
Package prometheus exposes go-metrics into a Prometheus format. |
Package p2p defines the network protocol implementation for ast consensus used by ast, including peer discovery using discv5, gossip-sub using libp2p, and handing peer lifecycles + handshakes.
|
Package p2p defines the network protocol implementation for ast consensus used by ast, including peer discovery using discv5, gossip-sub using libp2p, and handing peer lifecycles + handshakes. |
discover
Package discover implements the Node Discovery Protocol.
|
Package discover implements the Node Discovery Protocol. |
discover/v4wire
Package v4wire implements the Discovery v4 Wire Protocol.
|
Package v4wire implements the Discovery v4 Wire Protocol. |
enr
Package enr implements Ethereum Node Records as defined in EIP-778.
|
Package enr implements Ethereum Node Records as defined in EIP-778. |
leaky-bucket
Package leakybucket implements a scalable leaky bucket algorithm.
|
Package leakybucket implements a scalable leaky bucket algorithm. |
netutil
Package netutil contains extensions to the net package.
|
Package netutil contains extensions to the net package. |
peers
Package peers provides information about peers at the Ethereum consensus protocol level.
|
Package peers provides information about peers at the Ethereum consensus protocol level. |
types
Package types contains all the respective p2p types that are required for sync but cannot be represented as a protobuf schema.
|
Package types contains all the respective p2p types that are required for sync but cannot be represented as a protobuf schema. |
Package messagehandler contains useful helpers for recovering from panic conditions at runtime and logging their trace.
|
Package messagehandler contains useful helpers for recovering from panic conditions at runtime and logging their trace. |
initial-sync
Package initialsync includes all initial block download and processing logic for the node, using a round robin strategy and a finite-state-machine to handle edge-cases in a beacon node's sync status.
|
Package initialsync includes all initial block download and processing logic for the node, using a round robin strategy and a finite-state-machine to handle edge-cases in a beacon node's sync status. |
js/internal/tracers
Package tracers contains the actual JavaScript tracer assets.
|
Package tracers contains the actual JavaScript tracer assets. |