factory

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: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceTag       = "factory"
	TraceTagMining = "mining"
)
View Source
const TraceTagChooseExtendEndorsePair = "ChooseExtendEndorsePair"

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment interface {
	attacher.Environment
	backlog.Environment
	ControllerPrivateKey() ed25519.PrivateKey
	SequencerName() string
	Backlog() *backlog.InputBacklog
	MaxTagAlongOutputs() int
	MilestonesTTLSlots() int
}

type MilestoneFactory

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

func New

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

func (*MilestoneFactory) AddOwnMilestone

func (mf *MilestoneFactory) AddOwnMilestone(vid *vertex.WrappedTx)

func (*MilestoneFactory) AttachTagAlongInputs

func (mf *MilestoneFactory) AttachTagAlongInputs(a *attacher.IncrementalAttacher) (numInserted int)

func (*MilestoneFactory) BestCoverageInTheSlot

func (mf *MilestoneFactory) BestCoverageInTheSlot(targetTs ledger.Time) uint64

func (*MilestoneFactory) ChooseExtendEndorsePair

func (mf *MilestoneFactory) ChooseExtendEndorsePair(proposerName string, targetTs ledger.Time) *attacher.IncrementalAttacher

ChooseExtendEndorsePair implements one of possible strategies: finds a pair: milestone to extend and another sequencer transaction to endorse, as heavy as possible

func (*MilestoneFactory) CurrentTargetTs

func (mf *MilestoneFactory) CurrentTargetTs() ledger.Time

func (*MilestoneFactory) NumMilestones

func (mf *MilestoneFactory) NumMilestones() int

func (*MilestoneFactory) NumOutputsInBuffer

func (mf *MilestoneFactory) NumOutputsInBuffer() int

func (*MilestoneFactory) OwnLatestMilestoneOutput

func (mf *MilestoneFactory) OwnLatestMilestoneOutput() vertex.WrappedOutput

func (*MilestoneFactory) Propose

func (mf *MilestoneFactory) Propose(a *attacher.IncrementalAttacher, strategyName string) error

func (*MilestoneFactory) StartProposingForTargetLogicalTime

func (mf *MilestoneFactory) StartProposingForTargetLogicalTime(targetTs ledger.Time) (*transaction.Transaction, *txmetadata.TransactionMetadata)

type Stats

type Stats struct {
	NumOwnMilestones            int
	OwnMilestoneCount           int
	RemovedMilestonesSinceReset int
	backlog.Stats
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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