batchfetcher

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModule

func NewModule(mc ModuleConfig, epochNr tt.EpochNr, clientProgress *clientprogress.ClientProgress, logger logging.Logger) modules.Module

NewModule returns a new batch fetcher module. The batch fetcher receives events output by the ordering protocol (e.g. ISS) and relays them to the application in the same order. It replaces the DeliverCert events from the input stream by the corresponding ProvideTransactions that it obtains from the availability layer. It keeps track of the current epoch (by observing the relayed NewEpoch events) and automatically requests the transactions from the correct instance of the availability module.

The batch fetcher also deduplicates the transactions, guaranteeing that each transaction is output only the first time it appears in a batch. For this purpose, the batch fetcher maintains information about which transactions have been delivered and provides it to the checkpoint module when relaying a state snapshot request to the application. Analogously, when relaying a RestoreState event, it restores its state (including the delivered transactions) using the relayed information.

Types

type ModuleConfig

type ModuleConfig struct {
	Self t.ModuleID // Own ID.

	Availability t.ModuleID // ID of the factory module containing the availability modules.
	Checkpoint   t.ModuleID // ID of the checkpoint factory module to which to submit client progress.
	Destination  t.ModuleID // ID of the module to deliver the produced event stream to (usually the application).
	Mempool      t.ModuleID // ID of the mempool module to send updates on client progress to.
}

ModuleConfig determines the IDs of the modules the batch fetcher interacts with.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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