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 added in v1.5.0

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 added in v1.13.3

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

Types

type ConductorClient added in v1.5.0

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

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

func (*ConductorClient) Close added in v1.5.0

func (c *ConductorClient) Close()

func (*ConductorClient) CommitUnsafePayload added in v1.5.0

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

CommitUnsafePayload commits an unsafe payload to the conductor log.

func (*ConductorClient) Enabled added in v1.9.4

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 added in v1.5.0

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

Leader returns true if this node is the leader sequencer.

func (*ConductorClient) OverrideLeader added in v1.8.0

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 added in v1.13.2

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

func (*OpNode) InteropRPC added in v1.11.0

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

func (*OpNode) InteropRPCPort added in v1.13.2

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

func (*OpNode) P2P

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

func (*OpNode) PublishBlock added in v1.13.3

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 added in v1.1.6

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

func (*OpNode) SignAndPublishL2Payload added in v1.13.3

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 added in v1.2.0

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 added in v1.2.0

func (n *OpNode) Stopped() bool

type SafeDBReader added in v1.7.2

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