Documentation
¶
Index ¶
- type Config
- type Executor
- type Metrics
- type MockBackend
- func (m *MockBackend) AddL2RPC(ctx context.Context, rpc string, jwtSecret eth.Bytes32) error
- func (m *MockBackend) AllSafeDerivedAt(ctx context.Context, source eth.BlockID) (derived map[eth.ChainID]eth.BlockID, err error)
- func (m *MockBackend) CheckAccessList(ctx context.Context, inboxEntries []common.Hash, minSafety types.SafetyLevel, ...) error
- func (m *MockBackend) Close() error
- func (m *MockBackend) CrossDerivedToSource(ctx context.Context, chainID eth.ChainID, derived eth.BlockID) (source eth.BlockRef, err error)
- func (m *MockBackend) CrossSafe(ctx context.Context, chainID eth.ChainID) (types.DerivedIDPair, error)
- func (m *MockBackend) Finalized(ctx context.Context, chainID eth.ChainID) (eth.BlockID, error)
- func (m *MockBackend) FinalizedL1(ctx context.Context) (eth.BlockRef, error)
- func (m *MockBackend) LocalUnsafe(ctx context.Context, chainID eth.ChainID) (eth.BlockID, error)
- func (m *MockBackend) Start(ctx context.Context) error
- func (m *MockBackend) Stop(ctx context.Context) error
- func (m *MockBackend) SuperRootAtTimestamp(ctx context.Context, timestamp hexutil.Uint64) (eth.SuperRootResponse, error)
- func (m *MockBackend) SyncStatus(ctx context.Context) (eth.SupervisorSyncStatus, error)
- type SupervisorBackend
- func (su *SupervisorBackend) AddL2RPC(ctx context.Context, rpc string, jwtSecret eth.Bytes32) error
- func (su *SupervisorBackend) AllSafeDerivedAt(ctx context.Context, source eth.BlockID) (map[eth.ChainID]eth.BlockID, error)
- func (su *SupervisorBackend) AttachEmitter(em event.Emitter)
- func (su *SupervisorBackend) AttachL1Source(source l1access.L1Source)
- func (su *SupervisorBackend) AttachProcessorSource(chainID eth.ChainID, src processors.Source) error
- func (su *SupervisorBackend) AttachSyncNode(ctx context.Context, src syncnode.SyncNode, noSubscribe bool) (syncnode.Node, error)
- func (su *SupervisorBackend) AttachSyncSource(chainID eth.ChainID, src syncnode.SyncSource) error
- func (su *SupervisorBackend) CheckAccessList(ctx context.Context, inboxEntries []common.Hash, minSafety types.SafetyLevel, ...) error
- func (su *SupervisorBackend) CrossDerivedToSource(ctx context.Context, chainID eth.ChainID, derived eth.BlockID) (source eth.BlockRef, err error)
- func (su *SupervisorBackend) CrossSafe(ctx context.Context, chainID eth.ChainID) (types.DerivedIDPair, error)
- func (su *SupervisorBackend) CrossUnsafe(ctx context.Context, chainID eth.ChainID) (eth.BlockID, error)
- func (su *SupervisorBackend) DependencySet() depset.DependencySet
- func (su *SupervisorBackend) Finalized(ctx context.Context, chainID eth.ChainID) (eth.BlockID, error)
- func (su *SupervisorBackend) FinalizedL1(ctx context.Context) (eth.BlockRef, error)
- func (su *SupervisorBackend) FindSealedBlock(ctx context.Context, chainID eth.ChainID, number uint64) (eth.BlockID, error)
- func (su *SupervisorBackend) IsCrossSafe(ctx context.Context, chainID eth.ChainID, block eth.BlockID) error
- func (su *SupervisorBackend) IsLocalSafe(ctx context.Context, chainID eth.ChainID, block eth.BlockID) error
- func (su *SupervisorBackend) IsLocalUnsafe(ctx context.Context, chainID eth.ChainID, block eth.BlockID) error
- func (su *SupervisorBackend) L1BlockRefByNumber(ctx context.Context, number uint64) (eth.L1BlockRef, error)
- func (su *SupervisorBackend) LocalSafe(ctx context.Context, chainID eth.ChainID) (types.DerivedIDPair, error)
- func (su *SupervisorBackend) LocalUnsafe(ctx context.Context, chainID eth.ChainID) (eth.BlockID, error)
- func (su *SupervisorBackend) OnEvent(ev event.Event) bool
- func (su *SupervisorBackend) PullFinalizedL1() error
- func (su *SupervisorBackend) PullLatestL1() error
- func (su *SupervisorBackend) QueryAnchorpoint(chainID eth.ChainID, src syncnode.SyncNode) error
- func (su *SupervisorBackend) Rewind(chain eth.ChainID, block eth.BlockID) error
- func (su *SupervisorBackend) SafeDerivedAt(ctx context.Context, chainID eth.ChainID, source eth.BlockID) (eth.BlockID, error)
- func (su *SupervisorBackend) SetConfDepthL1(depth uint64)
- func (su *SupervisorBackend) Start(ctx context.Context) error
- func (su *SupervisorBackend) Stop(ctx context.Context) error
- func (su *SupervisorBackend) SuperRootAtTimestamp(ctx context.Context, timestamp hexutil.Uint64) (eth.SuperRootResponse, error)
- func (su *SupervisorBackend) SyncStatus(ctx context.Context) (eth.SupervisorSyncStatus, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics interface { CacheAdd(chainID eth.ChainID, label string, cacheSize int, evicted bool) CacheGet(chainID eth.ChainID, label string, hit bool) RecordCrossUnsafeRef(chainID eth.ChainID, ref eth.BlockRef) RecordCrossSafeRef(chainID eth.ChainID, ref eth.BlockRef) RecordDBEntryCount(chainID eth.ChainID, kind string, count int64) RecordDBSearchEntriesRead(chainID eth.ChainID, count int64) opmetrics.RPCMetricer event.Metrics }
type MockBackend ¶
type MockBackend struct {
// contains filtered or unexported fields
}
func NewMockBackend ¶
func NewMockBackend() *MockBackend
func (*MockBackend) AllSafeDerivedAt ¶ added in v1.11.0
func (*MockBackend) CheckAccessList ¶ added in v1.12.2
func (m *MockBackend) CheckAccessList(ctx context.Context, inboxEntries []common.Hash, minSafety types.SafetyLevel, executingDescriptor types.ExecutingDescriptor) error
func (*MockBackend) Close ¶
func (m *MockBackend) Close() error
func (*MockBackend) CrossDerivedToSource ¶ added in v1.11.0
func (*MockBackend) CrossSafe ¶ added in v1.11.0
func (m *MockBackend) CrossSafe(ctx context.Context, chainID eth.ChainID) (types.DerivedIDPair, error)
func (*MockBackend) FinalizedL1 ¶ added in v1.11.0
func (*MockBackend) LocalUnsafe ¶ added in v1.11.0
func (*MockBackend) SuperRootAtTimestamp ¶ added in v1.11.0
func (m *MockBackend) SuperRootAtTimestamp(ctx context.Context, timestamp hexutil.Uint64) (eth.SuperRootResponse, error)
func (*MockBackend) SyncStatus ¶ added in v1.11.0
func (m *MockBackend) SyncStatus(ctx context.Context) (eth.SupervisorSyncStatus, error)
type SupervisorBackend ¶
type SupervisorBackend struct {
// contains filtered or unexported fields
}
func NewSupervisorBackend ¶
func (*SupervisorBackend) AddL2RPC ¶ added in v1.9.3
AddL2RPC attaches an RPC as the RPC for the given chain, overriding the previous RPC source, if any.
func (*SupervisorBackend) AllSafeDerivedAt ¶ added in v1.11.0
func (su *SupervisorBackend) AllSafeDerivedAt(ctx context.Context, source eth.BlockID) (map[eth.ChainID]eth.BlockID, error)
AllSafeDerivedAt returns the last derived block for each chain, from the given L1 block
func (*SupervisorBackend) AttachEmitter ¶ added in v1.11.0
func (su *SupervisorBackend) AttachEmitter(em event.Emitter)
func (*SupervisorBackend) AttachL1Source ¶ added in v1.11.0
func (su *SupervisorBackend) AttachL1Source(source l1access.L1Source)
AttachL1Source attaches an L1 source to the L1 accessor if the L1 accessor does not exist, it is created if an L1 source is already attached, it is replaced
func (*SupervisorBackend) AttachProcessorSource ¶ added in v1.9.5
func (su *SupervisorBackend) AttachProcessorSource(chainID eth.ChainID, src processors.Source) error
func (*SupervisorBackend) AttachSyncNode ¶ added in v1.11.0
func (su *SupervisorBackend) AttachSyncNode(ctx context.Context, src syncnode.SyncNode, noSubscribe bool) (syncnode.Node, error)
AttachSyncNode attaches a node to be managed by the supervisor. If noSubscribe, the node is not actively polled/subscribed to, and requires manual Node.PullEvents calls.
func (*SupervisorBackend) AttachSyncSource ¶ added in v1.11.0
func (su *SupervisorBackend) AttachSyncSource(chainID eth.ChainID, src syncnode.SyncSource) error
func (*SupervisorBackend) CheckAccessList ¶ added in v1.12.2
func (su *SupervisorBackend) CheckAccessList(ctx context.Context, inboxEntries []common.Hash, minSafety types.SafetyLevel, executingDescriptor types.ExecutingDescriptor) error
func (*SupervisorBackend) CrossDerivedToSource ¶ added in v1.11.0
func (*SupervisorBackend) CrossSafe ¶ added in v1.11.0
func (su *SupervisorBackend) CrossSafe(ctx context.Context, chainID eth.ChainID) (types.DerivedIDPair, error)
func (*SupervisorBackend) CrossUnsafe ¶ added in v1.11.0
func (*SupervisorBackend) DependencySet ¶ added in v1.9.5
func (su *SupervisorBackend) DependencySet() depset.DependencySet
func (*SupervisorBackend) FinalizedL1 ¶ added in v1.11.0
func (*SupervisorBackend) FindSealedBlock ¶ added in v1.12.0
func (*SupervisorBackend) IsCrossSafe ¶ added in v1.12.0
func (*SupervisorBackend) IsLocalSafe ¶ added in v1.12.0
func (*SupervisorBackend) IsLocalUnsafe ¶ added in v1.12.0
func (*SupervisorBackend) L1BlockRefByNumber ¶ added in v1.11.0
func (su *SupervisorBackend) L1BlockRefByNumber(ctx context.Context, number uint64) (eth.L1BlockRef, error)
func (*SupervisorBackend) LocalSafe ¶ added in v1.11.0
func (su *SupervisorBackend) LocalSafe(ctx context.Context, chainID eth.ChainID) (types.DerivedIDPair, error)
func (*SupervisorBackend) LocalUnsafe ¶ added in v1.11.0
func (*SupervisorBackend) OnEvent ¶ added in v1.11.0
func (su *SupervisorBackend) OnEvent(ev event.Event) bool
func (*SupervisorBackend) PullFinalizedL1 ¶ added in v1.11.0
func (su *SupervisorBackend) PullFinalizedL1() error
PullFinalizedL1 makes the supervisor aware of the finalized L1 block. Exposed for testing purposes.
func (*SupervisorBackend) PullLatestL1 ¶ added in v1.11.0
func (su *SupervisorBackend) PullLatestL1() error
PullLatestL1 makes the supervisor aware of the latest L1 block. Exposed for testing purposes.
func (*SupervisorBackend) QueryAnchorpoint ¶ added in v1.11.2
func (*SupervisorBackend) Rewind ¶ added in v1.11.0
Rewind rolls back the state of the supervisor for the given chain.
func (*SupervisorBackend) SafeDerivedAt ¶ added in v1.11.0
func (*SupervisorBackend) SetConfDepthL1 ¶ added in v1.11.0
func (su *SupervisorBackend) SetConfDepthL1(depth uint64)
SetConfDepthL1 changes the confirmation depth of the L1 chain that is accessible to the supervisor.
func (*SupervisorBackend) SuperRootAtTimestamp ¶ added in v1.11.0
func (su *SupervisorBackend) SuperRootAtTimestamp(ctx context.Context, timestamp hexutil.Uint64) (eth.SuperRootResponse, error)
func (*SupervisorBackend) SyncStatus ¶ added in v1.11.0
func (su *SupervisorBackend) SyncStatus(ctx context.Context) (eth.SupervisorSyncStatus, error)