backlog

package
v0.0.0-...-4d02eb9 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const TraceTag = "backlog"

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment interface {
	global.NodeGlobal
	attacher.Environment
	ListenToAccount(account ledger.Accountable, fun func(wOut vertex.WrappedOutput))
	SequencerID() ledger.ChainID
	SequencerName() string
	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
	BacklogTTLSlots() int
	MustEnsureBranch(txid ledger.TransactionID) *vertex.WrappedTx
	MilestoneArrivedSince(when time.Time) bool
	EvidenceBacklogSize(size int)
}

type InputBacklog

type InputBacklog struct {
	Environment
	// contains filtered or unexported fields
}

func New

func New(env Environment) (*InputBacklog, error)

func (*InputBacklog) ArrivedOutputsSince

func (b *InputBacklog) ArrivedOutputsSince(t time.Time) bool

func (*InputBacklog) CandidatesToEndorseShuffled

func (b *InputBacklog) CandidatesToEndorseShuffled(targetTs ledger.Time) []*vertex.WrappedTx

CandidatesToEndorseShuffled returns randomly ordered list of transactions which can be endorsed from the given timestamp

func (*InputBacklog) CandidatesToEndorseSorted

func (b *InputBacklog) CandidatesToEndorseSorted(targetTs ledger.Time) []*vertex.WrappedTx

CandidatesToEndorseSorted returns descending (by coverage) list of transactions which can be endorsed from the given timestamp

func (*InputBacklog) ChangedSince

func (b *InputBacklog) ChangedSince(t time.Time) bool

func (*InputBacklog) FilterAndSortOutputs

func (b *InputBacklog) FilterAndSortOutputs(filter func(wOut vertex.WrappedOutput) bool) []vertex.WrappedOutput

func (*InputBacklog) GetOwnLatestMilestoneTx

func (b *InputBacklog) GetOwnLatestMilestoneTx() *vertex.WrappedTx

func (*InputBacklog) LoadSequencerStartTips

func (b *InputBacklog) LoadSequencerStartTips(seqID ledger.ChainID) error

LoadSequencerStartTips loads tip transactions relevant to the sequencer startup from persistent state to the memDAG

func (*InputBacklog) NumOutputsInBuffer

func (b *InputBacklog) NumOutputsInBuffer() int

type Stats

type Stats struct {
	NumOtherSequencers       int
	NumOutputs               int
	OutputCount              int
	RemovedOutputsSinceReset int
}

Jump to

Keyboard shortcuts

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