Documentation ¶
Index ¶
- Variables
- func Auto(ctx context.Context, metrics Metricer, client *sources.EngineAPIClient, ...) error
- func BuildBlock(ctx context.Context, client *sources.EngineAPIClient, status *StatusData, ...) (*eth.ExecutionPayloadEnvelope, error)
- func Copy(ctx context.Context, copyFrom client.RPC, copyTo *sources.EngineAPIClient) error
- func CopyPayload(ctx context.Context, number uint64, copyFrom client.RPC, ...) error
- func GetChainConfig(ctx context.Context, open client.RPC) (cfg *params.ChainConfig, err error)
- func RawJSONInteraction(ctx context.Context, client client.RPC, method string, args []string, ...) error
- func Rewind(ctx context.Context, lgr log.Logger, client *sources.EngineAPIClient, ...) error
- func SetForkchoice(ctx context.Context, client *sources.EngineAPIClient, ...) error
- func SetForkchoiceByHash(ctx context.Context, client *sources.EngineAPIClient, ...) error
- type BlockBuildingSettings
- type Metricer
- type Metrics
- type RPCBlock
- type StaticVersionProvider
- type StatusData
Constants ¶
This section is empty.
Variables ¶
View Source
var Namespace = "op_node"
Functions ¶
func Auto ¶
func Auto(ctx context.Context, metrics Metricer, client *sources.EngineAPIClient, log log.Logger, shutdown <-chan struct{}, settings *BlockBuildingSettings) error
func BuildBlock ¶
func BuildBlock(ctx context.Context, client *sources.EngineAPIClient, status *StatusData, settings *BlockBuildingSettings) (*eth.ExecutionPayloadEnvelope, error)
func Copy ¶
Copy takes the forkchoice state of copyFrom, and applies it to copyTo, and inserts the head-block. The destination engine should then start syncing to this new chain if it has peers to do so.
func CopyPayload ¶ added in v1.7.0
func CopyPayload(ctx context.Context, number uint64, copyFrom client.RPC, copyTo *sources.EngineAPIClient) error
CopyPayload takes the execution payload at number & applies it via NewPayload to copyTo
func GetChainConfig ¶ added in v1.7.2
func RawJSONInteraction ¶ added in v1.1.6
func SetForkchoice ¶ added in v1.1.6
func SetForkchoiceByHash ¶ added in v1.7.0
Types ¶
type BlockBuildingSettings ¶
type Metrics ¶
type Metrics struct { BlockFails prometheus.Counter BlockHash prometheus.Gauge BlockNum prometheus.Gauge BlockTime prometheus.Gauge BlockTxs prometheus.Gauge BlockGas prometheus.Gauge BlockBaseFee prometheus.Gauge }
func NewMetrics ¶
func NewMetrics(procName string, registry *prometheus.Registry) *Metrics
func (*Metrics) RecordBlockFail ¶
func (r *Metrics) RecordBlockFail()
type RPCBlock ¶
type RPCBlock struct { types.Header Transactions []*types.Transaction `json:"transactions"` }
type StaticVersionProvider ¶ added in v1.7.2
type StaticVersionProvider int
func (StaticVersionProvider) ForkchoiceUpdatedVersion ¶ added in v1.7.2
func (v StaticVersionProvider) ForkchoiceUpdatedVersion(*eth.PayloadAttributes) eth.EngineAPIMethod
func (StaticVersionProvider) GetPayloadVersion ¶ added in v1.7.2
func (v StaticVersionProvider) GetPayloadVersion(uint64) eth.EngineAPIMethod
func (StaticVersionProvider) NewPayloadVersion ¶ added in v1.7.2
func (v StaticVersionProvider) NewPayloadVersion(uint64) eth.EngineAPIMethod
type StatusData ¶
type StatusData struct { Head eth.L1BlockRef `json:"head"` Safe eth.L1BlockRef `json:"safe"` Finalized eth.L1BlockRef `json:"finalized"` Txs uint64 `json:"txs"` Gas uint64 `json:"gas"` StateRoot common.Hash `json:"stateRoot"` BaseFee *big.Int `json:"baseFee"` }
Click to show internal directories.
Click to hide internal directories.