Documentation ¶
Index ¶
- type BlockCache
- type BlockSyncService
- func (bSyncService *BlockSyncService) BlockStore() *goheaderstore.Store[*types.Block]
- func (bSyncService *BlockSyncService) Start() error
- func (bSyncService *BlockSyncService) StartSyncer() error
- func (bSyncService *BlockSyncService) Stop() error
- func (bSyncService *BlockSyncService) WriteToBlockStoreAndBroadcast(ctx context.Context, block *types.Block) error
- type HeaderSynceService
- func (hSyncService *HeaderSynceService) HeaderStore() *goheaderstore.Store[*types.SignedHeader]
- func (hSyncService *HeaderSynceService) Start() error
- func (hSyncService *HeaderSynceService) StartSyncer() error
- func (hSyncService *HeaderSynceService) Stop() error
- func (hSyncService *HeaderSynceService) WriteToHeaderStoreAndBroadcast(ctx context.Context, signedHeader *types.SignedHeader) error
- type Manager
- func (m *Manager) AggregationLoop(ctx context.Context, lazy bool)
- func (m *Manager) BlockStoreRetrieveLoop(ctx context.Context)
- func (m *Manager) BlockSubmissionLoop(ctx context.Context)
- func (m *Manager) GetStoreHeight() uint64
- func (m *Manager) IsProposer() (bool, error)
- func (m *Manager) RetrieveLoop(ctx context.Context)
- func (m *Manager) SetDALC(dalc da.DataAvailabilityLayerClient)
- func (m *Manager) SyncLoop(ctx context.Context, cancel context.CancelFunc)
- type PendingBlocks
- type SyncerStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockCache ¶ added in v0.10.2
type BlockCache struct {
// contains filtered or unexported fields
}
func NewBlockCache ¶ added in v0.10.2
func NewBlockCache() *BlockCache
type BlockSyncService ¶ added in v0.10.5
type BlockSyncService struct {
// contains filtered or unexported fields
}
P2P Sync Service for block that implements the go-header interface. Contains a block store where synced blocks are stored. Uses the go-header library for handling all P2P logic.
func NewBlockSyncService ¶ added in v0.10.5
func NewBlockSyncService(ctx context.Context, store ds.TxnDatastore, conf config.NodeConfig, genesis *cmtypes.GenesisDoc, p2p *p2p.Client, logger log.Logger) (*BlockSyncService, error)
func (*BlockSyncService) BlockStore ¶ added in v0.10.5
func (bSyncService *BlockSyncService) BlockStore() *goheaderstore.Store[*types.Block]
BlockStore returns the blockstore of the BlockSyncService
func (*BlockSyncService) Start ¶ added in v0.10.5
func (bSyncService *BlockSyncService) Start() error
Start is a part of Service interface.
func (*BlockSyncService) StartSyncer ¶ added in v0.10.5
func (bSyncService *BlockSyncService) StartSyncer() error
func (*BlockSyncService) Stop ¶ added in v0.10.5
func (bSyncService *BlockSyncService) Stop() error
OnStop is a part of Service interface.
func (*BlockSyncService) WriteToBlockStoreAndBroadcast ¶ added in v0.10.5
func (bSyncService *BlockSyncService) WriteToBlockStoreAndBroadcast(ctx context.Context, block *types.Block) error
Initialize block store if needed and broadcasts provided block. Note: Only returns an error in case block store can't be initialized. Logs error if there's one while broadcasting.
type HeaderSynceService ¶ added in v0.10.5
type HeaderSynceService struct {
// contains filtered or unexported fields
}
P2P Sync Service for header that implements the go-header interface. Contains a header store where synced headers are stored. Uses the go-header library for handling all P2P logic.
func NewHeaderSynceService ¶ added in v0.10.5
func NewHeaderSynceService(ctx context.Context, store ds.TxnDatastore, conf config.NodeConfig, genesis *cmtypes.GenesisDoc, p2p *p2p.Client, logger log.Logger) (*HeaderSynceService, error)
func (*HeaderSynceService) HeaderStore ¶ added in v0.10.5
func (hSyncService *HeaderSynceService) HeaderStore() *goheaderstore.Store[*types.SignedHeader]
HeaderStore returns the headerstore of the HeaderSynceService
func (*HeaderSynceService) Start ¶ added in v0.10.5
func (hSyncService *HeaderSynceService) Start() error
OnStart is a part of Service interface.
func (*HeaderSynceService) StartSyncer ¶ added in v0.10.5
func (hSyncService *HeaderSynceService) StartSyncer() error
func (*HeaderSynceService) Stop ¶ added in v0.10.5
func (hSyncService *HeaderSynceService) Stop() error
OnStop is a part of Service interface.
func (*HeaderSynceService) WriteToHeaderStoreAndBroadcast ¶ added in v0.10.5
func (hSyncService *HeaderSynceService) WriteToHeaderStoreAndBroadcast(ctx context.Context, signedHeader *types.SignedHeader) error
Initialize header store if needed and broadcasts provided header. Note: Only returns an error in case header store can't be initialized. Logs error if there's one while broadcasting.
type Manager ¶
type Manager struct { HeaderCh chan *types.SignedHeader BlockCh chan *types.Block // contains filtered or unexported fields }
Manager is responsible for aggregating transactions into blocks.
func NewManager ¶
func NewManager( proposerKey crypto.PrivKey, conf config.BlockManagerConfig, genesis *cmtypes.GenesisDoc, store store.Store, mempool mempool.Mempool, proxyApp proxy.AppConnConsensus, dalc da.DataAvailabilityLayerClient, eventBus *cmtypes.EventBus, logger log.Logger, blockStore *goheaderstore.Store[*types.Block], ) (*Manager, error)
NewManager creates new block Manager.
func (*Manager) AggregationLoop ¶
AggregationLoop is responsible for aggregating transactions into rollup-blocks.
func (*Manager) BlockStoreRetrieveLoop ¶ added in v0.10.2
BlockStoreRetrieveLoop is responsible for retrieving blocks from the Block Store.
func (*Manager) BlockSubmissionLoop ¶ added in v0.10.2
BlockSubmissionLoop is responsible for submitting blocks to the DA layer.
func (*Manager) GetStoreHeight ¶ added in v0.10.2
GetStoreHeight returns the manager's store height
func (*Manager) IsProposer ¶ added in v0.7.3
func (*Manager) RetrieveLoop ¶
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.
type PendingBlocks ¶ added in v0.10.3
type PendingBlocks struct {
// contains filtered or unexported fields
}
Maintains blocks that need to be published to DA layer
func NewPendingBlocks ¶ added in v0.10.3
func NewPendingBlocks() *PendingBlocks
type SyncerStatus ¶ added in v0.10.5
type SyncerStatus struct {
// contains filtered or unexported fields
}
Used by header and block exchange service for keeping track of the status of the syncer in them.