Run NodesReferencevmsEvm

lp176

LP176 implements the fee logic specified here: https://github.com/luxfi/lps/blob/main/LPs/176-dynamic-evm-gas-limit-and-price-discovery-updates/README.md

import "github.com/luxfi/node/vms/evm/lp176"

LP176 implements the fee logic specified here: https://github.com/luxfi/lps/blob/main/LPs/176-dynamic-evm-gas-limit-and-price-discovery-updates/README.md

Functions

DesiredTargetExcess

func DesiredTargetExcess(desiredTarget gas.Gas) gas.Gas

DesiredTargetExcess calculates the optimal desiredTargetExcess given the desired target.

Types

State

State represents the current state of the gas pricing and constraints.

func ParseState(bytes []byte) (State, error)
func (s *State) AdvanceTime(seconds uint64)
func (s *State) Bytes() []byte
func (s *State) ConsumeGas(
	gasUsed uint64,
	extraGasUsed *big.Int,
) error
func (s *State) GasPrice() gas.Price
func (s *State) MaxCapacity() gas.Gas
func (s *State) Target() gas.Gas
func (s *State) UpdateTargetExcess(desiredTargetExcess gas.Gas)