Documentation ¶
Index ¶
- func CalcBaseFee(config *params.ChainConfig, feeConfig commontype.FeeConfig, ...) ([]byte, *big.Int, error)
- func EstimateNextBaseFee(config *params.ChainConfig, feeConfig commontype.FeeConfig, ...) ([]byte, *big.Int, error)
- func MinRequiredTip(config *params.ChainConfig, header *types.Header) (*big.Int, error)
- type DummyEngine
- func (self *DummyEngine) Author(header *types.Header) (common.Address, error)
- func (self *DummyEngine) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int
- func (self *DummyEngine) Close() error
- func (self *DummyEngine) Finalize(chain consensus.ChainHeaderReader, block *types.Block, parent *types.Header, ...) error
- func (self *DummyEngine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, parent *types.Header, ...) (*types.Block, error)
- func (self *DummyEngine) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error
- func (self *DummyEngine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error
- func (self *DummyEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error
- type Mode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcBaseFee ¶
func CalcBaseFee(config *params.ChainConfig, feeConfig commontype.FeeConfig, parent *types.Header, timestamp uint64) ([]byte, *big.Int, error)
CalcBaseFee takes the previous header and the timestamp of its child block and calculates the expected base fee as well as the encoding of the past pricing information for the child block.
func EstimateNextBaseFee ¶ added in v0.1.1
func EstimateNextBaseFee(config *params.ChainConfig, feeConfig commontype.FeeConfig, parent *types.Header, timestamp uint64) ([]byte, *big.Int, error)
EstimateNextBaseFee attempts to estimate the next base fee based on a block with [parent] being built at [timestamp]. If [timestamp] is less than the timestamp of [parent], then it uses the same timestamp as parent. Warning: This function should only be used in estimation and should not be used when calculating the canonical base fee for a subsequent block.
func MinRequiredTip ¶
MinRequiredTip is the estimated minimum tip a transaction would have needed to pay to be included in a given block (assuming it paid a tip proportional to its gas usage). In reality, there is no minimum tip that is enforced by the consensus engine and high tip paying transactions can subsidize the inclusion of low tip paying transactions. The only correctness check performed is that the sum of all tips is >= the required block fee.
This function will return nil for all return values prior to Subnet EVM.
Types ¶
type DummyEngine ¶
type DummyEngine struct {
// contains filtered or unexported fields
}
func NewCoinbaseFaker ¶ added in v0.4.6
func NewCoinbaseFaker() *DummyEngine
func NewETHFaker ¶
func NewETHFaker() *DummyEngine
func NewFaker ¶ added in v0.1.1
func NewFaker() *DummyEngine
func NewFakerWithClock ¶ added in v0.2.8
func NewFakerWithClock(clock *mockable.Clock) *DummyEngine
func NewFakerWithMode ¶ added in v0.4.6
func NewFakerWithMode(mode Mode) *DummyEngine
func NewFullFaker ¶ added in v0.1.1
func NewFullFaker() *DummyEngine
func (*DummyEngine) CalcDifficulty ¶
func (self *DummyEngine) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int
func (*DummyEngine) Close ¶
func (self *DummyEngine) Close() error
func (*DummyEngine) FinalizeAndAssemble ¶
func (*DummyEngine) Prepare ¶
func (self *DummyEngine) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error
func (*DummyEngine) VerifyHeader ¶
func (self *DummyEngine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error
func (*DummyEngine) VerifyUncles ¶
func (self *DummyEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error