diff --git a/params/version.go b/params/version.go index fce502c363af..330ab7c0ec9e 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 8 // Minor version component of the current release - VersionPatch = 2 // Patch version component of the current release + VersionPatch = 3 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string ) diff --git a/rollup/da_syncer/da/calldata_blob_source.go b/rollup/da_syncer/da/calldata_blob_source.go index 5b665aa0160f..a17ebdb0fc15 100644 --- a/rollup/da_syncer/da/calldata_blob_source.go +++ b/rollup/da_syncer/da/calldata_blob_source.go @@ -85,6 +85,10 @@ func (ds *CalldataBlobSource) L1Height() uint64 { return ds.l1Height } +func (ds *CalldataBlobSource) L1Finalized() uint64 { + return ds.l1Finalized +} + func (ds *CalldataBlobSource) processRollupEventsToDA(rollupEvents l1.RollupEvents) (Entries, error) { var entries Entries var entry Entry diff --git a/rollup/da_syncer/da_queue.go b/rollup/da_syncer/da_queue.go index 3602947f51e2..49e9f8ebc310 100644 --- a/rollup/da_syncer/da_queue.go +++ b/rollup/da_syncer/da_queue.go @@ -69,6 +69,10 @@ func (dq *DAQueue) getNextData(ctx context.Context) error { return err } +func (dq *DAQueue) DataSource() DataSource { + return dq.dataSource +} + func (dq *DAQueue) Reset(height uint64) { dq.l1height = height dq.dataSource = nil diff --git a/rollup/da_syncer/da_syncer.go b/rollup/da_syncer/da_syncer.go index a60b73a3f045..6582f3376ebc 100644 --- a/rollup/da_syncer/da_syncer.go +++ b/rollup/da_syncer/da_syncer.go @@ -46,7 +46,7 @@ func (s *DASyncer) SyncOneBlock(block *da.PartialBlock) error { } if s.blockchain.CurrentBlock().Number().Uint64()%1000 == 0 { - log.Info("L1 sync progress", "blockchain height", s.blockchain.CurrentBlock().Number().Uint64(), "block hash", s.blockchain.CurrentBlock().Hash(), "root", s.blockchain.CurrentBlock().Root()) + log.Info("L1 sync progress", "blockchain height", s.blockchain.CurrentBlock().Number().Uint64(), "block hash", s.blockchain.CurrentBlock().Hash().Hex(), "root", s.blockchain.CurrentBlock().Root().Hex()) } return nil diff --git a/rollup/da_syncer/data_source.go b/rollup/da_syncer/data_source.go index 048fec6bb3e2..c57750b43220 100644 --- a/rollup/da_syncer/data_source.go +++ b/rollup/da_syncer/data_source.go @@ -14,6 +14,7 @@ import ( type DataSource interface { NextData() (da.Entries, error) L1Height() uint64 + L1Finalized() uint64 } type DataSourceFactory struct { diff --git a/rollup/da_syncer/syncing_pipeline.go b/rollup/da_syncer/syncing_pipeline.go index 6ed84fe85186..af9a1f685515 100644 --- a/rollup/da_syncer/syncing_pipeline.go +++ b/rollup/da_syncer/syncing_pipeline.go @@ -39,6 +39,7 @@ type SyncingPipeline struct { blockchain *core.BlockChain blockQueue *BlockQueue daSyncer *DASyncer + daQueue *DAQueue } func NewSyncingPipeline(ctx context.Context, blockchain *core.BlockChain, genesisConfig *params.ChainConfig, db ethdb.Database, ethClient l1.Client, l1DeploymentBlock uint64, config Config) (*SyncingPipeline, error) { @@ -92,6 +93,7 @@ func NewSyncingPipeline(ctx context.Context, blockchain *core.BlockChain, genesi blockchain: blockchain, blockQueue: blockQueue, daSyncer: daSyncer, + daQueue: daQueue, }, nil } @@ -115,6 +117,9 @@ func (s *SyncingPipeline) Start() { } func (s *SyncingPipeline) mainLoop() { + progressTicker := time.NewTicker(1 * time.Minute) + defer progressTicker.Stop() + stepCh := make(chan struct{}, 1) var delayedStepCh <-chan time.Time var resetCounter int @@ -152,6 +157,14 @@ func (s *SyncingPipeline) mainLoop() { select { case <-s.ctx.Done(): return + case <-progressTicker.C: + currentBlock := s.blockchain.CurrentBlock() + dataSource := s.daQueue.DataSource() + if dataSource != nil { + log.Info("L1 sync progress", "L1 processed", dataSource.L1Height(), "L1 finalized", dataSource.L1Finalized(), "progress(%)", float64(dataSource.L1Height())/float64(dataSource.L1Finalized())*100, "L2 height", currentBlock.Number().Uint64(), "L2 hash", currentBlock.Hash().Hex()) + } else { + log.Info("L1 sync progress", "blockchain height", currentBlock.Number().Uint64(), "block hash", currentBlock.Hash().Hex()) + } case <-delayedStepCh: delayedStepCh = nil reqStep(false)