Documentation ¶
Index ¶
- Constants
- func WithSingleSequencerEnforced(o *ConfigOptions)
- type ConfigOption
- func WithBacklogTTLSlots(slots int) ConfigOption
- func WithDelayStart(delay time.Duration) ConfigOption
- func WithMaxBranches(maxBranches int) ConfigOption
- func WithMaxTagAlongInputs(maxInputs int) ConfigOption
- func WithMilestonesTTLSlots(slots int) ConfigOption
- func WithName(name string) ConfigOption
- func WithPace(pace int) ConfigOption
- type ConfigOptions
- type Environment
- type Info
- type Sequencer
- func (seq *Sequencer) AddOwnMilestone(vid *vertex.WrappedTx)
- func (seq *Sequencer) Backlog() *backlog.InputBacklog
- func (seq *Sequencer) BacklogTTLSlots() int
- func (seq *Sequencer) ControllerPrivateKey() ed25519.PrivateKey
- func (seq *Sequencer) Ctx() context.Context
- func (seq *Sequencer) EvidenceBacklogSize(size int)
- func (seq *Sequencer) EvidenceBestProposalForTheTarget(strategyShortName string)
- func (seq *Sequencer) EvidenceProposal(strategyShortName string)
- func (seq *Sequencer) FutureConeOwnMilestonesOrdered(rootOutput vertex.WrappedOutput, targetTs ledger.Time) []vertex.WrappedOutput
- func (seq *Sequencer) Info() Info
- func (seq *Sequencer) IsConsumedInThePastPath(wOut vertex.WrappedOutput, ms *vertex.WrappedTx) bool
- func (seq *Sequencer) Log() *zap.SugaredLogger
- func (seq *Sequencer) LogMilestoneSubmitDefault(ms *vertex.WrappedTx)
- func (seq *Sequencer) MaxTagAlongInputs() int
- func (seq *Sequencer) NumMilestones() int
- func (seq *Sequencer) NumOutputsInBuffer() int
- func (seq *Sequencer) OnExit(fun func())
- func (seq *Sequencer) OnMilestoneSubmitted(fun func(seq *Sequencer, ms *vertex.WrappedTx))
- func (seq *Sequencer) OwnLatestMilestoneOutput() vertex.WrappedOutput
- func (seq *Sequencer) SequencerID() ledger.ChainID
- func (seq *Sequencer) SequencerName() string
- func (seq *Sequencer) Start()
- func (seq *Sequencer) Stop()
Constants ¶
View Source
const ( DefaultMaxTagAlongInputs = 20 MinimumBacklogTTLSlots = 10 MinimumMilestonesTTLSlots = 24 // 10 )
View Source
const TraceTag = "sequencer"
Variables ¶
This section is empty.
Functions ¶
func WithSingleSequencerEnforced ¶
func WithSingleSequencerEnforced(o *ConfigOptions)
Types ¶
type ConfigOption ¶
type ConfigOption func(options *ConfigOptions)
func WithBacklogTTLSlots ¶
func WithBacklogTTLSlots(slots int) ConfigOption
func WithDelayStart ¶
func WithDelayStart(delay time.Duration) ConfigOption
func WithMaxBranches ¶
func WithMaxBranches(maxBranches int) ConfigOption
func WithMaxTagAlongInputs ¶
func WithMaxTagAlongInputs(maxInputs int) ConfigOption
func WithMilestonesTTLSlots ¶
func WithMilestonesTTLSlots(slots int) ConfigOption
func WithName ¶
func WithName(name string) ConfigOption
func WithPace ¶
func WithPace(pace int) ConfigOption
type ConfigOptions ¶
type Environment ¶
type Environment interface { global.NodeGlobal attacher.Environment IsSynced() bool TxBytesStore() global.TxBytesStore GetLatestMilestone(seqID ledger.ChainID) *vertex.WrappedTx LatestMilestonesDescending(filter ...func(seqID ledger.ChainID, vid *vertex.WrappedTx) bool) []*vertex.WrappedTx LatestMilestonesShuffled(filter ...func(seqID ledger.ChainID, vid *vertex.WrappedTx) bool) []*vertex.WrappedTx NumSequencerTips() int ListenToAccount(account ledger.Accountable, fun func(wOut vertex.WrappedOutput)) MustEnsureBranch(txid ledger.TransactionID) *vertex.WrappedTx OwnSequencerMilestoneIn(txBytes []byte, meta *txmetadata.TransactionMetadata) }
type Sequencer ¶
type Sequencer struct { Environment // contains filtered or unexported fields }
func New ¶
func New(env Environment, seqID ledger.ChainID, controllerKey ed25519.PrivateKey, opts ...ConfigOption) (*Sequencer, error)
func (*Sequencer) AddOwnMilestone ¶
func (*Sequencer) Backlog ¶
func (seq *Sequencer) Backlog() *backlog.InputBacklog
func (*Sequencer) BacklogTTLSlots ¶
func (*Sequencer) ControllerPrivateKey ¶
func (seq *Sequencer) ControllerPrivateKey() ed25519.PrivateKey
func (*Sequencer) EvidenceBacklogSize ¶
func (*Sequencer) EvidenceBestProposalForTheTarget ¶
func (*Sequencer) EvidenceProposal ¶
func (*Sequencer) FutureConeOwnMilestonesOrdered ¶
func (seq *Sequencer) FutureConeOwnMilestonesOrdered(rootOutput vertex.WrappedOutput, targetTs ledger.Time) []vertex.WrappedOutput
func (*Sequencer) IsConsumedInThePastPath ¶
func (*Sequencer) Log ¶
func (seq *Sequencer) Log() *zap.SugaredLogger
func (*Sequencer) LogMilestoneSubmitDefault ¶
func (*Sequencer) MaxTagAlongInputs ¶
func (*Sequencer) NumMilestones ¶
func (*Sequencer) NumOutputsInBuffer ¶
func (*Sequencer) OnMilestoneSubmitted ¶
func (*Sequencer) OwnLatestMilestoneOutput ¶
func (seq *Sequencer) OwnLatestMilestoneOutput() vertex.WrappedOutput
func (*Sequencer) SequencerID ¶
func (*Sequencer) SequencerName ¶
Click to show internal directories.
Click to hide internal directories.