Documentation
¶
Index ¶
- Variables
- type AsyncGossiper
- type BuildingState
- type DisabledSequencer
- func (ds DisabledSequencer) Active() bool
- func (ds DisabledSequencer) Close()
- func (ds DisabledSequencer) ConductorEnabled(ctx context.Context) bool
- func (ds DisabledSequencer) Init(ctx context.Context, active bool) error
- func (ds DisabledSequencer) NextAction() (t time.Time, ok bool)
- func (ds DisabledSequencer) OnEvent(ev event.Event) bool
- func (ds DisabledSequencer) OverrideLeader(ctx context.Context) error
- func (ds DisabledSequencer) SetMaxSafeLag(ctx context.Context, v uint64) error
- func (ds DisabledSequencer) SetRecoverMode(mode bool)
- func (ds DisabledSequencer) Start(ctx context.Context, head common.Hash) error
- func (ds DisabledSequencer) Stop(ctx context.Context) (hash common.Hash, err error)
- type L1Blocks
- type L1OriginSelector
- func (los *L1OriginSelector) CurrentAndNextOrigin(ctx context.Context, l2Head eth.L2BlockRef) (eth.L1BlockRef, eth.L1BlockRef, error)
- func (los *L1OriginSelector) FindL1Origin(ctx context.Context, l2Head eth.L2BlockRef) (eth.L1BlockRef, error)
- func (los *L1OriginSelector) OnEvent(ev event.Event) bool
- func (los *L1OriginSelector) SetRecoverMode(enabled bool)
- type L1OriginSelectorIface
- type Metrics
- type Sequencer
- func (d *Sequencer) Active() bool
- func (d *Sequencer) AttachEmitter(em event.Emitter)
- func (d *Sequencer) Close()
- func (d *Sequencer) ConductorEnabled(ctx context.Context) bool
- func (d *Sequencer) Init(ctx context.Context, active bool) error
- func (d *Sequencer) NextAction() (t time.Time, ok bool)
- func (d *Sequencer) OnEvent(ev event.Event) bool
- func (d *Sequencer) OverrideLeader(ctx context.Context) error
- func (d *Sequencer) SetMaxSafeLag(ctx context.Context, v uint64) error
- func (d *Sequencer) SetRecoverMode(mode bool)
- func (d *Sequencer) Start(ctx context.Context, head common.Hash) error
- func (d *Sequencer) Stop(ctx context.Context) (common.Hash, error)
- type SequencerActionEvent
- type SequencerIface
- type SequencerStateListener
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSequencerAlreadyStarted = errors.New("sequencer already running") ErrSequencerAlreadyStopped = errors.New("sequencer not running") )
View Source
var ErrSequencerNotEnabled = errors.New("sequencer is not enabled")
Functions ¶
This section is empty.
Types ¶
type AsyncGossiper ¶
type AsyncGossiper interface {
Gossip(payload *eth.ExecutionPayloadEnvelope)
Get() *eth.ExecutionPayloadEnvelope
Clear()
Stop()
Start()
}
type BuildingState ¶
type BuildingState struct {
Onto eth.L2BlockRef
Info eth.PayloadInfo
Started time.Time
// Set once known
Ref eth.L2BlockRef
}
type DisabledSequencer ¶
type DisabledSequencer struct{}
func (DisabledSequencer) Active ¶
func (ds DisabledSequencer) Active() bool
func (DisabledSequencer) Close ¶
func (ds DisabledSequencer) Close()
func (DisabledSequencer) ConductorEnabled ¶ added in v1.9.4
func (ds DisabledSequencer) ConductorEnabled(ctx context.Context) bool
func (DisabledSequencer) Init ¶
func (ds DisabledSequencer) Init(ctx context.Context, active bool) error
func (DisabledSequencer) NextAction ¶
func (ds DisabledSequencer) NextAction() (t time.Time, ok bool)
func (DisabledSequencer) OverrideLeader ¶
func (ds DisabledSequencer) OverrideLeader(ctx context.Context) error
func (DisabledSequencer) SetMaxSafeLag ¶
func (ds DisabledSequencer) SetMaxSafeLag(ctx context.Context, v uint64) error
func (DisabledSequencer) SetRecoverMode ¶ added in v1.13.0
func (ds DisabledSequencer) SetRecoverMode(mode bool)
type L1Blocks ¶
type L1Blocks interface {
derive.L1BlockRefByHashFetcher
derive.L1BlockRefByNumberFetcher
}
type L1OriginSelector ¶
type L1OriginSelector struct {
// contains filtered or unexported fields
}
func NewL1OriginSelector ¶
func (*L1OriginSelector) CurrentAndNextOrigin ¶ added in v1.9.4
func (los *L1OriginSelector) CurrentAndNextOrigin(ctx context.Context, l2Head eth.L2BlockRef) (eth.L1BlockRef, eth.L1BlockRef, error)
func (*L1OriginSelector) FindL1Origin ¶
func (los *L1OriginSelector) FindL1Origin(ctx context.Context, l2Head eth.L2BlockRef) (eth.L1BlockRef, error)
FindL1Origin determines what the next L1 Origin should be. The L1 Origin is either the L2 Head's Origin, or the following L1 block if the next L2 block's time is greater than or equal to the L2 Head's Origin.
func (*L1OriginSelector) OnEvent ¶ added in v1.9.4
func (los *L1OriginSelector) OnEvent(ev event.Event) bool
func (*L1OriginSelector) SetRecoverMode ¶ added in v1.13.0
func (los *L1OriginSelector) SetRecoverMode(enabled bool)
type L1OriginSelectorIface ¶
type L1OriginSelectorIface interface {
FindL1Origin(ctx context.Context, l2Head eth.L2BlockRef) (eth.L1BlockRef, error)
SetRecoverMode(bool)
}
type Sequencer ¶
type Sequencer struct {
// contains filtered or unexported fields
}
Sequencer implements the sequencing interface of the driver: it starts and completes block building jobs.
func NewSequencer ¶
func NewSequencer(driverCtx context.Context, log log.Logger, rollupCfg *rollup.Config, attributesBuilder derive.AttributesBuilder, l1OriginSelector L1OriginSelectorIface, listener SequencerStateListener, conductor conductor.SequencerConductor, asyncGossip AsyncGossiper, metrics Metrics, ) *Sequencer
func (*Sequencer) AttachEmitter ¶
func (*Sequencer) ConductorEnabled ¶ added in v1.9.4
func (*Sequencer) SetMaxSafeLag ¶
func (*Sequencer) SetRecoverMode ¶ added in v1.13.0
type SequencerActionEvent ¶
type SequencerActionEvent struct{}
SequencerActionEvent triggers the sequencer to start/seal a block, if active and ready to act. This event is used to prioritize sequencer work over derivation work, by emitting it before e.g. a derivation-pipeline step. A future sequencer in an async world may manage its own execution.
func (SequencerActionEvent) String ¶
func (ev SequencerActionEvent) String() string
type SequencerIface ¶
type SequencerIface interface {
event.Deriver
// NextAction returns when the sequencer needs to do the next change, and iff it should do so.
NextAction() (t time.Time, ok bool)
Active() bool
Init(ctx context.Context, active bool) error
Start(ctx context.Context, head common.Hash) error
Stop(ctx context.Context) (hash common.Hash, err error)
SetMaxSafeLag(ctx context.Context, v uint64) error
OverrideLeader(ctx context.Context) error
ConductorEnabled(ctx context.Context) bool
SetRecoverMode(mode bool)
Close()
}
type SequencerStateListener ¶
Click to show internal directories.
Click to hide internal directories.