node

package
v1.13.5 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: MIT, MIT Imports: 49 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyClosed = errors.New("node is already closed")

Functions

func NewAdminAPI

func NewAdminAPI(dr driverClient, log log.Logger) *adminAPI

func NewConductorClient

func NewConductorClient(cfg *config.Config, log log.Logger, metrics *metrics.Metrics) conductor.SequencerConductor

NewConductorClient returns a new conductor client for the op-conductor RPC service.

func NewNodeAPI

func NewNodeAPI(config *rollup.Config, depSet depset.DependencySet, l2Client l2EthClient, dr driverClient, safeDB SafeDBReader, log log.Logger) *nodeAPI

func NewOpstackAPI

func NewOpstackAPI(eng engine.RollupAPI, publisher apis.PublishAPI) *opstackAPI

Types

type ConductorClient

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

ConductorClient is a client for the op-conductor RPC service.

func (*ConductorClient) Close

func (c *ConductorClient) Close()

func (*ConductorClient) CommitUnsafePayload

func (c *ConductorClient) CommitUnsafePayload(ctx context.Context, payload *eth.ExecutionPayloadEnvelope) error

CommitUnsafePayload commits an unsafe payload to the conductor log.

func (*ConductorClient) Enabled

func (c *ConductorClient) Enabled(ctx context.Context) bool

Enabled returns true if the conductor is enabled, and since the conductor client is initialized, the conductor is always enabled.

func (*ConductorClient) Leader

func (c *ConductorClient) Leader(ctx context.Context) (bool, error)

Leader returns true if this node is the leader sequencer.

func (*ConductorClient) OverrideLeader

func (c *ConductorClient) OverrideLeader(ctx context.Context) error

OverrideLeader implements conductor.SequencerConductor.

type OpNode

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

func New

func New(ctx context.Context, cfg *config.Config, log log.Logger, appVersion string, m *metrics.Metrics) (*OpNode, error)

New creates a new OpNode instance. The provided ctx argument is for the span of initialization only; the node will immediately Stop(ctx) before finishing initialization if the context is canceled during initialization.

func (*OpNode) HTTPEndpoint

func (n *OpNode) HTTPEndpoint() string

func (*OpNode) HTTPPort

func (n *OpNode) HTTPPort() (int, error)

func (*OpNode) InteropRPC

func (n *OpNode) InteropRPC() (rpcEndpoint string, jwtSecret eth.Bytes32)

func (*OpNode) InteropRPCPort

func (n *OpNode) InteropRPCPort() (int, error)

func (*OpNode) P2P

func (n *OpNode) P2P() p2p.Node

func (*OpNode) PublishBlock

func (n *OpNode) PublishBlock(ctx context.Context, signedEnvelope *opsigner.SignedExecutionPayloadEnvelope) error

func (*OpNode) RequestL2Range

func (n *OpNode) RequestL2Range(ctx context.Context, start, end eth.L2BlockRef) error

func (*OpNode) RuntimeConfig

func (n *OpNode) RuntimeConfig() runcfg.ReadonlyRuntimeConfig

func (*OpNode) SignAndPublishL2Payload

func (n *OpNode) SignAndPublishL2Payload(ctx context.Context, envelope *eth.ExecutionPayloadEnvelope) error

func (*OpNode) Start

func (n *OpNode) Start(ctx context.Context) error

func (*OpNode) Stop

func (n *OpNode) Stop(ctx context.Context) error

Stop stops the node and closes all resources. If the provided ctx is expired, the node will accelerate the stop where possible, but still fully close.

func (*OpNode) Stopped

func (n *OpNode) Stopped() bool

type SafeDBReader

type SafeDBReader interface {
	SafeHeadAtL1(ctx context.Context, l1BlockNum uint64) (l1 eth.BlockID, l2 eth.BlockID, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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