Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DARetriever ¶
type DARetriever struct {
// contains filtered or unexported fields
}
DARetriever handles DA retrieval operations for syncing
func NewDARetriever ¶
func NewDARetriever( da coreda.DA, cache cache.Manager, config config.Config, genesis genesis.Genesis, options common.BlockOptions, logger zerolog.Logger, ) *DARetriever
NewDARetriever creates a new DA retriever
func (*DARetriever) RetrieveFromDA ¶
func (r *DARetriever) RetrieveFromDA(ctx context.Context, daHeight uint64) ([]common.DAHeightEvent, error)
RetrieveFromDA retrieves blocks from the specified DA height and returns height events
type P2PHandler ¶
type P2PHandler struct {
// contains filtered or unexported fields
}
P2PHandler handles all P2P operations for the syncer
func NewP2PHandler ¶
func NewP2PHandler( headerStore goheader.Store[*types.SignedHeader], dataStore goheader.Store[*types.Data], genesis genesis.Genesis, options common.BlockOptions, logger zerolog.Logger, ) *P2PHandler
NewP2PHandler creates a new P2P handler
func (*P2PHandler) ProcessDataRange ¶
func (h *P2PHandler) ProcessDataRange(ctx context.Context, startHeight, endHeight uint64) []common.DAHeightEvent
ProcessDataRange processes data from the data store within the given range
func (*P2PHandler) ProcessHeaderRange ¶
func (h *P2PHandler) ProcessHeaderRange(ctx context.Context, startHeight, endHeight uint64) []common.DAHeightEvent
ProcessHeaderRange processes headers from the header store within the given range
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer handles block synchronization from DA and P2P sources.
func NewSyncer ¶
func NewSyncer( store store.Store, exec coreexecutor.Executor, da coreda.DA, cache cache.Manager, metrics *common.Metrics, config config.Config, genesis genesis.Genesis, headerStore goheader.Store[*types.SignedHeader], dataStore goheader.Store[*types.Data], logger zerolog.Logger, options common.BlockOptions, errorCh chan<- error, ) *Syncer
NewSyncer creates a new block syncer
func (*Syncer) GetDAHeight ¶
GetDAHeight returns the current DA height
func (*Syncer) GetLastState ¶
GetLastState returns the current state
func (*Syncer) SetDAHeight ¶
SetDAHeight updates the DA height
func (*Syncer) SetLastState ¶
SetLastState updates the current state