Documentation ¶
Index ¶
- Variables
- func ApplyDAOHardFork(statedb *state.StateDB)
- func CalcBaseFee(config *params.ChainConfig, parent *types.Header) *big.Int
- func CalcBlobFee(excessDataGas uint64) *big.Int
- func CalcExcessDataGas(parentExcessDataGas uint64, parentDataGasUsed uint64) uint64
- func VerifyDAOHeaderExtraData(config *params.ChainConfig, header *types.Header) error
- func VerifyEIP1559Header(config *params.ChainConfig, parent, header *types.Header) error
- func VerifyEIP4844Header(parent, header *types.Header) error
- func VerifyGaslimit(parentGasLimit, headerGasLimit uint64) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrBadProDAOExtra is returned if a header doesn't support the DAO fork on a // pro-fork client. ErrBadProDAOExtra = errors.New("bad DAO pro-fork extra-data") // ErrBadNoDAOExtra is returned if a header does support the DAO fork on a no- // fork client. ErrBadNoDAOExtra = errors.New("bad DAO no-fork extra-data") )
Functions ¶
func ApplyDAOHardFork ¶
ApplyDAOHardFork modifies the state database according to the DAO hard-fork rules, transferring all balances of a set of DAO accounts to a single refund contract.
func CalcBaseFee ¶
CalcBaseFee calculates the basefee of the header.
func CalcBlobFee ¶
CalcBlobFee calculates the blobfee from the header's excess data gas field.
func CalcExcessDataGas ¶
CalcExcessDataGas calculates the excess data gas after applying the set of blobs on top of the excess data gas.
func VerifyDAOHeaderExtraData ¶
func VerifyDAOHeaderExtraData(config *params.ChainConfig, header *types.Header) error
VerifyDAOHeaderExtraData validates the extra-data field of a block header to ensure it conforms to DAO hard-fork rules.
DAO hard-fork extension to the header validity:
- if the node is no-fork, do not accept blocks in the [fork, fork+10) range with the fork specific extra-data set.
- if the node is pro-fork, require blocks in the specific range to have the unique extra-data set.
func VerifyEIP1559Header ¶
func VerifyEIP1559Header(config *params.ChainConfig, parent, header *types.Header) error
VerifyEIP1559Header verifies some header attributes which were changed in EIP-1559, - gas limit check - basefee check
func VerifyEIP4844Header ¶
VerifyEIP4844Header verifies the presence of the excessDataGas field and that if the current block contains no transactions, the excessDataGas is updated accordingly.
func VerifyGaslimit ¶
VerifyGaslimit verifies the header gas limit according increase/decrease in relation to the parent gas limit.
Types ¶
This section is empty.