Documentation
¶
Index ¶
Constants ¶
View Source
const VIRTUAL_NODE_CHAIN_ID_LABEL = "virtual_node_chain_id"
VIRTUAL_NODE_CHAIN_ID_LABEL is the name of the label used to differentiate metrics registered by virtual nodes.
Variables ¶
View Source
var ( ErrVirtualNodeConfigNil = errors.New("virtual node config is nil") ErrVirtualNodeAlreadyRunning = errors.New("virtual node already running") ErrVirtualNodeNotRunning = errors.New("virtual node not running") ErrVirtualNodeCantStart = errors.New("virtual node cannot be started in this state") )
View Source
var ErrL1AtSafeHeadNotFound = errors.New("l1 at safe head not found")
ErrL1AtSafeHeadNotFound: transient — SafeDB hasn't observed the answer yet (target ahead of latest, or DB empty at startup). Retry.
ErrL1AtSafeHeadUnavailable: permanent on this node — the crossing happened before SafeDB started recording (snap/CL-sync bootstrap), or the walkback reached the genesis bound. Retrying won't help; operator must intervene.
Functions ¶
func NewVirtualNode ¶
func NewVirtualNode(cfg *opnodecfg.Config, log gethlog.Logger, initOverload *rollupNode.InitializationOverrides, appVersion string) *simpleVirtualNode
Types ¶
type VirtualNode ¶
type VirtualNode interface {
Start(ctx context.Context) error
Stop(ctx context.Context) error
SafeHeadAtL1(ctx context.Context, l1BlockNum uint64) (eth.BlockID, eth.BlockID, error)
// L1AtSafeHead returns the earliest L1 block at which the given L2 block became safe.
L1AtSafeHead(ctx context.Context, target eth.BlockID) (eth.BlockID, error)
SyncStatus(ctx context.Context) (*eth.SyncStatus, error)
}
Click to show internal directories.
Click to hide internal directories.