package
0.0.0-20250119000602-809120120630
Repository: https://github.com/n42blockchain/n42.git
Documentation: pkg.go.dev
# Packages
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
No description provided by the author
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.
No description provided by the author
Package sync includes all chain-synchronization logic for the N42 node, including gossip-sub blocks, txs, and other p2p messages, as well as ability to process and respond to block requests by peers.
No description provided by the author
No description provided by the author
Copyright 2023 The N42 Authors This file is part of the N42 library.
# 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.
BorTransfer transfer in Bor.
CanTransfer checks whether there are enough funds in the address' account to make a transfer.
No description provided by the author
DeriveSha creates the tree hashes of transactions and receipts in a block header.
No description provided by the author
No description provided by the author
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.
NewEVMBlockContext creates a new context for use in the EVM.
NewEVMTxContext creates a new transaction context for a single transaction.
No description provided by the author
NewStateProcessor initialises a new StateProcessor.
No description provided by the author
NewStateTransition initialises and returns a new state transition object.
No description provided by the author
Transfer subtracts amount from sender and adds amount to recipient using the given Db.
# Variables
ErrAlreadyDeposited already deposited.
ErrBannedHash is returned if a block to import is on the banned list.
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.
No description provided by the author
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.
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.
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.
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
ErrNoGenesis is returned when there is no Genesis Block.
ErrNonceMax is returned if the nonce of a transaction sender account has maximum allowed value and would become invalid if incremented.
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
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.
ErrTxTypeNotSupported is returned if a transaction is not supported in the current network configuration.
No description provided by the author
# Structs
No description provided by the author
BlockValidator is responsible for validating block headers, uncles and processed state.
No description provided by the author
ExecutionResult includes all output after executing given evm message no matter the execution itself is successful or not.
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).
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.
# Interfaces
ChainContext supports retrieving headers and consensus parameters from the current blockchain to be used during transaction processing.
ChainReader defines a small collection of methods needed to access the local blockchain during header verification.
DerivableList is the input to DeriveSha.
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
No description provided by the author
No description provided by the author
No description provided by the author