Documentation
¶
Index ¶
- Constants
- Variables
- type BlobScheduleEntry
- type Block
- func (block *Block) AwaitBlock(ctx context.Context, timeout time.Duration) *types.Block
- func (block *Block) EnsureBlock(loadBlock func() (*types.Block, error)) (bool, error)
- func (block *Block) GetBlock() *types.Block
- func (block *Block) GetParentHash() *common.Hash
- func (block *Block) GetSeenBy() []*Client
- func (block *Block) SetSeenBy(client *Client)
- type ChainState
- func (cache *ChainState) CalcBaseFeePerBlobGas(excessBlobGas uint64, updateFraction uint64) *big.Int
- func (cache *ChainState) CalculateEIP7918BlobBaseFee(baseFeePerGas uint64, blobBaseFee uint64) uint64
- func (cache *ChainState) GetBlobScheduleForTimestamp(timestamp time.Time) *rpc.EthConfigBlobSchedule
- func (cache *ChainState) GetChainID() *big.Int
- func (cache *ChainState) GetClientConfig() *rpc.EthConfig
- func (cache *ChainState) GetFullBlobSchedule() []BlobScheduleEntry
- func (cache *ChainState) GetGenesisConfig() *core.Genesis
- func (cache *ChainState) GetSpecs() *rpc.ChainSpec
- func (cache *ChainState) GetSystemContractAddress(systemContract string) common.Address
- func (cache *ChainState) SetClientConfig(config *rpc.EthConfig) ([]error, error)
- func (cache *ChainState) SetClientSpecs(specs *rpc.ChainSpec) error
- func (cache *ChainState) SetGenesisConfig(genesis *core.Genesis)
- type Client
- func (client *Client) DidFetchPeers() bool
- func (client *Client) ForceUpdatePeerData(ctx context.Context) error
- func (client *Client) GetClientType() ClientType
- func (client *Client) GetConfigWarnings() []string
- func (client *Client) GetEndpointConfig() *ClientConfig
- func (client *Client) GetEthConfig() *rpc.EthConfig
- func (client *Client) GetIndex() uint16
- func (client *Client) GetLastClientError() error
- func (client *Client) GetLastEventTime() time.Time
- func (client *Client) GetLastHead() (uint64, common.Hash)
- func (client *Client) GetName() string
- func (client *Client) GetNodeInfo() *p2p.NodeInfo
- func (client *Client) GetNodePeers() []*p2p.PeerInfo
- func (client *Client) GetRPCClient() *rpc.ExecutionClient
- func (client *Client) GetStatus() ClientStatus
- func (client *Client) GetVersion() string
- type ClientConfig
- type ClientStatus
- type ClientType
- type Pool
- func (pool *Pool) AddEndpoint(endpoint *ClientConfig) (*Client, error)
- func (pool *Pool) AwaitReadyEndpoint(ctx context.Context, clientType ClientType) *Client
- func (pool *Pool) GetAllEndpoints() []*Client
- func (pool *Pool) GetChainState() *ChainState
- func (pool *Pool) GetReadyEndpoint(clientType ClientType) *Client
- func (pool *Pool) GetReadyEndpoints(clientType ClientType) []*Client
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 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) ForceUpdatePeerData ¶ added in v1.17.0
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) GetEndpointConfig ¶
func (client *Client) GetEndpointConfig() *ClientConfig
func (*Client) GetEthConfig ¶ added in v1.19.0
func (*Client) GetLastClientError ¶
func (*Client) GetLastEventTime ¶
func (*Client) GetNodeInfo ¶
func (*Client) GetNodePeers ¶
func (*Client) GetRPCClient ¶
func (client *Client) GetRPCClient() *rpc.ExecutionClient
func (*Client) GetStatus ¶
func (client *Client) GetStatus() ClientStatus
func (*Client) GetVersion ¶
type ClientConfig ¶
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 (*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) 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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.