sequencer

package
v0.0.0-...-aa082da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxTagAlongInputs  = 20
	MinimumBacklogTTLSlots    = 10
	MinimumMilestonesTTLSlots = 10
)
View Source
const TraceTag = "sequencer"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigOption

type ConfigOption func(options *ConfigOptions)

func WithBacklogTTLSlots

func WithBacklogTTLSlots(slots int) ConfigOption

func WithLogAttacherStats

func WithLogAttacherStats(logAttacherStats bool) 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 ConfigOptions struct {
	SequencerName      string
	Pace               int // pace in ticks
	MaxTagAlongInputs  int
	MaxTargetTs        ledger.Time
	MaxBranches        int
	DelayStart         time.Duration
	BacklogTTLSlots    int
	MilestonesTTLSlots int
	LogAttacherStats   bool
}

type Info

type Info struct {
	In                     int
	Out                    int
	InflationAmount        uint64
	NumConsumedFeeOutputs  int
	NumFeeOutputsInTippool int
	NumOtherMsInTippool    int
	LedgerCoverage         uint64
	PrevLedgerCoverage     uint64
}

type Sequencer

type Sequencer struct {
	*workflow.Workflow
	// contains filtered or unexported fields
}

func New

func New(glb *workflow.Workflow, seqID ledger.ChainID, controllerKey ed25519.PrivateKey, opts ...ConfigOption) (*Sequencer, error)

func NewFromConfig

func NewFromConfig(name string, glb *workflow.Workflow) (*Sequencer, error)

func (*Sequencer) Backlog

func (seq *Sequencer) Backlog() *backlog.InputBacklog

func (*Sequencer) BacklogTTLSlots

func (seq *Sequencer) BacklogTTLSlots() int

func (*Sequencer) ControllerPrivateKey

func (seq *Sequencer) ControllerPrivateKey() ed25519.PrivateKey

func (*Sequencer) Ctx

func (seq *Sequencer) Ctx() context.Context

func (*Sequencer) Info

func (seq *Sequencer) Info() Info

func (*Sequencer) Log

func (seq *Sequencer) Log() *zap.SugaredLogger

func (*Sequencer) LogMilestoneSubmitDefault

func (seq *Sequencer) LogMilestoneSubmitDefault(ms *vertex.WrappedTx)

func (*Sequencer) MaxTagAlongOutputs

func (seq *Sequencer) MaxTagAlongOutputs() int

func (*Sequencer) MilestonesTTLSlots

func (seq *Sequencer) MilestonesTTLSlots() int

func (*Sequencer) OnExit

func (seq *Sequencer) OnExit(fun func())

func (*Sequencer) OnMilestoneSubmitted

func (seq *Sequencer) OnMilestoneSubmitted(fun func(seq *Sequencer, ms *vertex.WrappedTx))

func (*Sequencer) SequencerID

func (seq *Sequencer) SequencerID() ledger.ChainID

func (*Sequencer) SequencerName

func (seq *Sequencer) SequencerName() string

func (*Sequencer) Start

func (seq *Sequencer) Start()

func (*Sequencer) Stop

func (seq *Sequencer) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL