execution

package
v1.19.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MinBaseFeePerBlobGas = 1 // wei, per EIP-4844

Variables

View Source
var DefaultSystemContractAddresses = map[string]common.Address{
	rpc.ConsolidationRequestContract: common.HexToAddress("0x0000BBdDc7CE488642fb579F8B00f3a590007251"),
	rpc.WithdrawalRequestContract:    common.HexToAddress("0x00000961Ef480Eb55e80D19ad83579A64c007002"),
}

Functions

This section is empty.

Types

type BlobScheduleEntry added in v1.19.0

type BlobScheduleEntry struct {
	Timestamp time.Time
	Schedule  rpc.EthConfigBlobSchedule
	IsBpo     bool
}

type Block

type Block struct {
	Hash   common.Hash
	Number uint64
	// contains filtered or unexported fields
}

func (*Block) AwaitBlock

func (block *Block) AwaitBlock(ctx context.Context, timeout time.Duration) *types.Block

func (*Block) EnsureBlock

func (block *Block) EnsureBlock(loadBlock func() (*types.Block, error)) (bool, error)

func (*Block) GetBlock

func (block *Block) GetBlock() *types.Block

func (*Block) GetParentHash

func (block *Block) GetParentHash() *common.Hash

func (*Block) GetSeenBy

func (block *Block) GetSeenBy() []*Client

func (*Block) SetSeenBy

func (block *Block) SetSeenBy(client *Client)

type ChainState

type ChainState struct {
	// contains filtered or unexported fields
}

func (*ChainState) CalcBaseFeePerBlobGas added in v1.19.0

func (cache *ChainState) CalcBaseFeePerBlobGas(excessBlobGas uint64, updateFraction uint64) *big.Int

CalcBaseFeePerBlobGas computes base_fee_per_blob_gas from excess_blob_gas and updateFraction according to EIP-4844 fake_exponential(MIN_BASE_FEE_PER_BLOB_GAS, excess_blob_gas, updateFraction). Returns base_fee_per_blob_gas as *big.Int (>= MIN_BASE_FEE_PER_BLOB_GAS; 0 if updateFraction==0).

func (*ChainState) CalculateEIP7918BlobBaseFee added in v1.19.4

func (cache *ChainState) CalculateEIP7918BlobBaseFee(baseFeePerGas uint64, blobBaseFee uint64) uint64

calculateEIP7918BlobBaseFee implements the EIP-7918 reserve price mechanism It ensures blob base fee doesn't fall below a threshold based on execution costs

func (*ChainState) GetBlobScheduleForTimestamp added in v1.19.0

func (cache *ChainState) GetBlobScheduleForTimestamp(timestamp time.Time) *rpc.EthConfigBlobSchedule

func (*ChainState) GetChainID

func (cache *ChainState) GetChainID() *big.Int

func (*ChainState) GetClientConfig added in v1.19.2

func (cache *ChainState) GetClientConfig() *rpc.EthConfig

func (*ChainState) GetFullBlobSchedule added in v1.19.0

func (cache *ChainState) GetFullBlobSchedule() []BlobScheduleEntry

func (*ChainState) GetGenesisConfig added in v1.19.0

func (cache *ChainState) GetGenesisConfig() *core.Genesis

func (*ChainState) GetSpecs

func (cache *ChainState) GetSpecs() *rpc.ChainSpec

func (*ChainState) GetSystemContractAddress added in v1.19.0

func (cache *ChainState) GetSystemContractAddress(systemContract string) common.Address

func (*ChainState) SetClientConfig added in v1.19.0

func (cache *ChainState) SetClientConfig(config *rpc.EthConfig) ([]error, error)

func (*ChainState) SetClientSpecs

func (cache *ChainState) SetClientSpecs(specs *rpc.ChainSpec) error

func (*ChainState) SetGenesisConfig added in v1.19.0

func (cache *ChainState) SetGenesisConfig(genesis *core.Genesis)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) DidFetchPeers

func (client *Client) DidFetchPeers() bool

func (*Client) ForceUpdatePeerData added in v1.17.0

func (client *Client) ForceUpdatePeerData(ctx context.Context) error

ForceUpdatePeerData forces an immediate update of peer data from this client

func (*Client) GetClientType

func (client *Client) GetClientType() ClientType

func (*Client) GetConfigWarnings added in v1.19.0

func (client *Client) GetConfigWarnings() []string

func (*Client) GetEndpointConfig

func (client *Client) GetEndpointConfig() *ClientConfig

func (*Client) GetEthConfig added in v1.19.0

func (client *Client) GetEthConfig() *rpc.EthConfig

func (*Client) GetIndex

func (client *Client) GetIndex() uint16

func (*Client) GetLastClientError

func (client *Client) GetLastClientError() error

func (*Client) GetLastEventTime

func (client *Client) GetLastEventTime() time.Time

func (*Client) GetLastHead

func (client *Client) GetLastHead() (uint64, common.Hash)

func (*Client) GetName

func (client *Client) GetName() string

func (*Client) GetNodeInfo

func (client *Client) GetNodeInfo() *p2p.NodeInfo

func (*Client) GetNodePeers

func (client *Client) GetNodePeers() []*p2p.PeerInfo

func (*Client) GetRPCClient

func (client *Client) GetRPCClient() *rpc.ExecutionClient

func (*Client) GetStatus

func (client *Client) GetStatus() ClientStatus

func (*Client) GetVersion

func (client *Client) GetVersion() string

type ClientConfig

type ClientConfig struct {
	URL       string
	Name      string
	Headers   map[string]string
	SshConfig *sshtunnel.SshConfig
}

type ClientStatus

type ClientStatus uint8
var (
	ClientStatusOnline        ClientStatus = 1
	ClientStatusOffline       ClientStatus = 2
	ClientStatusSynchronizing ClientStatus = 3
)

func (ClientStatus) String

func (s ClientStatus) String() string

type ClientType

type ClientType int8
var (
	AnyClient        ClientType
	UnknownClient    ClientType = -1
	BesuClient       ClientType = 1
	ErigonClient     ClientType = 2
	EthjsClient      ClientType = 3
	GethClient       ClientType = 4
	NethermindClient ClientType = 5
	RethClient       ClientType = 6
	NimbusELClient   ClientType = 7
)

func ParseClientType

func ParseClientType(name string) ClientType

func (ClientType) String

func (clientType ClientType) String() string

func (ClientType) Uint8 added in v1.17.0

func (t ClientType) Uint8() uint8

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

func NewPool

func NewPool(ctx context.Context, logger logrus.FieldLogger) *Pool

func (*Pool) AddEndpoint

func (pool *Pool) AddEndpoint(endpoint *ClientConfig) (*Client, error)

func (*Pool) AwaitReadyEndpoint

func (pool *Pool) AwaitReadyEndpoint(ctx context.Context, clientType ClientType) *Client

func (*Pool) GetAllEndpoints

func (pool *Pool) GetAllEndpoints() []*Client

func (*Pool) GetChainState

func (pool *Pool) GetChainState() *ChainState

func (*Pool) GetReadyEndpoint

func (pool *Pool) GetReadyEndpoint(clientType ClientType) *Client

func (*Pool) GetReadyEndpoints

func (pool *Pool) GetReadyEndpoints(clientType ClientType) []*Client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL