block

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 23 Imported by: 2

Documentation

Index

Constants

This section is empty.

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.AppConnConsensus,
	dalc da.DataAvailabilityLayerClient,
	settlementClient settlement.LayerClient,
	eventBus *tmtypes.EventBus,
	pubsub *pubsub.Server,
	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 the DA.

func (*Manager) PublishBlockLoop

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

PublishBlockLoop 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 updating the syncTarget as read from the SL to a ring buffer which will later be used by retrieveLoop for actually syncing until this target

Jump to

Keyboard shortcuts

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