tracker

package
v0.17.6 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: AGPL-3.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SealingRecord

type SealingRecord struct {
	// the incorporated result whose sealing status is tracked
	IncorporatedResult *flow.IncorporatedResult

	// SufficientApprovalsForSealing: True iff all chunks in the result have
	// sufficient approvals
	SufficientApprovalsForSealing bool
	// contains filtered or unexported fields
}

SealingRecord is a record of the sealing status for a specific incorporated result. It holds information whether the result is sealable, or what is missing to be sealable. Not concurrency safe.

func NewRecordWithInsufficientApprovals

func NewRecordWithInsufficientApprovals(ir *flow.IncorporatedResult, firstUnmatchedChunkIndex uint64) *SealingRecord

NewRecordWithInsufficientApprovals creates a sealing record for an incorporated result that has insufficient approvals to be sealed. firstUnmatchedChunkIndex specifies the index of first chunk that hasn't received sufficient approval.

func NewRecordWithSufficientApprovals

func NewRecordWithSufficientApprovals(ir *flow.IncorporatedResult) *SealingRecord

NewRecordWithSufficientApprovals creates a sealing record for an incorporated result with sufficient approvals for sealing.

func (*SealingRecord) SetHasMultipleReceipts

func (sr *SealingRecord) SetHasMultipleReceipts(hasMultipleReceipts bool)

SetHasMultipleReceipts specifies whether there are at least 2 receipts from _different_ ENs committing to the incorporated result.

func (*SealingRecord) SetQualifiesForEmergencySealing

func (sr *SealingRecord) SetQualifiesForEmergencySealing(qualifiesForEmergencySealing bool)

SetQualifiesForEmergencySealing specifies whether the incorporated result qualifies for emergency sealing

type SealingTracker

type SealingTracker struct {
	// contains filtered or unexported fields
}

SealingTracker is an auxiliary component for tracking sealing progress. Its primary purpose is to decide which SealingRecords should be tracked and to store references to them. A SealingTracker is intended to track progress for a _single run_ of the sealing algorithm, i.e. Core.CheckSealing(). Not concurrency safe.

func NewSealingTracker

func NewSealingTracker(state protocol.State) *SealingTracker

func (*SealingTracker) MempoolHasNextSeal

func (st *SealingTracker) MempoolHasNextSeal(seals mempool.IncorporatedResultSeals) bool

MempoolHasNextSeal returns true iff the seals mempool contains a candidate seal for the next block

func (*SealingTracker) String

func (st *SealingTracker) String() string

String converts the most relevant information from the SealingRecords to key-value pairs (in json format).

func (*SealingTracker) Track

func (st *SealingTracker) Track(sealingRecord *SealingRecord)

Track tracks the given SealingRecord, provided it should be tracked according to the SealingTracker's internal policy.

Jump to

Keyboard shortcuts

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