block

package
v0.4.1-furyint-rc0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 26 Imported by: ? modules, 0 packages

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

View Source
const (
	DABatchRetryDelay = 20 * time.Second
	SLBatchRetryDelay = 10 * time.Second
)

defaultDABlockTime is used only if DABlockTime is not configured for manager

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager is responsible for aggregating transactions into blocks.

func NewManager

func NewManager(
	proposerKey crypto.PrivKey,
	conf config.BlockManagerConfig,
	genesis *tmtypes.GenesisDoc,
	store store.Store,
	mempool mempool.Mempool,
	proxyApp proxy.AppConns,
	dalc da.DataAvailabilityLayerClient,
	settlementClient settlement.LayerClient,
	eventBus *tmtypes.EventBus,
	pubsub *pubsub.Server,
	p2pClient *p2p.Client,
	logger log.Logger,
) (*Manager, error)

NewManager creates new block Manager.

func (*Manager) ApplyBlockLoop

func (m *Manager) ApplyBlockLoop(ctx context.Context)

ApplyBlockLoop is responsible for applying blocks retrieved from pubsub server.

func (*Manager) ProduceBlockLoop

func (m *Manager) ProduceBlockLoop(ctx context.Context)

ProduceBlockLoop is calling publishBlock in a loop as long as wer'e synced.

func (*Manager) RetriveLoop

func (m *Manager) RetriveLoop(ctx context.Context)

RetriveLoop listens for new sync messages written to a ring buffer and in turn runs syncUntilTarget on the latest message in the ring buffer.

func (*Manager) SetDALC

func (m *Manager) SetDALC(dalc da.DataAvailabilityLayerClient)

SetDALC is used to set DataAvailabilityLayerClient used by Manager. TODO(omritoptix): Remove this from here as it's only being used for tests.

func (*Manager) SyncTargetLoop

func (m *Manager) SyncTargetLoop(ctx context.Context)

SyncTargetLoop is responsible for getting real time updates about batches submission. for non aggregator: updating the sync target which will be used by retrieveLoop to sync until this target. for aggregator: get notification that batch has been accepted so can send next batch.

Jump to

Keyboard shortcuts

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