collection

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: AGPL-3.0 Imports: 10 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finalizer

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

Finalizer is a simple wrapper around our temporary state to clean up after a block has been finalized. This involves removing the transactions within the finalized collection from the mempool and updating the finalized boundary in the cluster state.

func NewFinalizer

func NewFinalizer(
	db storage.DB,
	lockManager lockctx.Manager,
	transactions mempool.Transactions,
	pusher collection.GuaranteedCollectionPublisher,
	metrics module.CollectionMetrics,
) *Finalizer

NewFinalizer creates a new finalizer for collection nodes.

func (*Finalizer) MakeFinal

func (f *Finalizer) MakeFinal(blockID flow.Identifier) error

MakeFinal handles finalization logic for a block.

The newly finalized block, and all un-finalized ancestors, are marked as finalized in the cluster state. All transactions included in the collections within the finalized blocks are removed from the mempool.

This assumes that transactions are added to persistent state when they are included in a block proposal. Between entering the non-finalized chain state and being finalized, entities should be present in both the volatile memory pools and persistent storage. No errors are expected during normal operation.

Jump to

Keyboard shortcuts

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