block

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	HeaderCh chan *types.SignedHeader

	FraudProofInCh chan *abci.FraudProof
	// 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,
	eventBus *tmtypes.EventBus,
	logger log.Logger,
	doneBuildingCh chan struct{},
) (*Manager, error)

NewManager creates new block Manager.

func (*Manager) AggregationLoop

func (m *Manager) AggregationLoop(ctx context.Context, lazy bool)

AggregationLoop is responsible for aggregating transactions into rollup-blocks.

func (*Manager) GetFraudProofOutChan

func (m *Manager) GetFraudProofOutChan() chan *abci.FraudProof

func (*Manager) RetrieveLoop

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

RetrieveLoop is responsible for interacting with DA layer.

func (*Manager) SetDALC

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

SetDALC is used to set DataAvailabilityLayerClient used by Manager.

func (*Manager) SyncLoop

func (m *Manager) SyncLoop(ctx context.Context, cancel context.CancelFunc)

SyncLoop is responsible for syncing blocks.

SyncLoop processes headers gossiped in P2p network to know what's the latest block height, block data is retrieved from DA layer.

Jump to

Keyboard shortcuts

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