diff --git a/eth/stagedsync/stage_execute.go b/eth/stagedsync/stage_execute.go index 914551512..f7c76e1fe 100644 --- a/eth/stagedsync/stage_execute.go +++ b/eth/stagedsync/stage_execute.go @@ -220,7 +220,7 @@ func logProgress(prev, now uint64, batch ethdb.DbWithPendingMutations) uint64 { var m runtime.MemStats runtime.ReadMemStats(&m) log.Info(fmt.Sprintf("[%s] Executed blocks", stages.Execution), - "currentBlock", now, + "number", now, "blk/second", speed, "batch", common.StorageSize(batch.BatchSize()), "alloc", common.StorageSize(m.Alloc), diff --git a/eth/stagedsync/stage_interhashes.go b/eth/stagedsync/stage_interhashes.go index 0505f3a79..5adaba3d9 100644 --- a/eth/stagedsync/stage_interhashes.go +++ b/eth/stagedsync/stage_interhashes.go @@ -78,7 +78,7 @@ func SpawnIntermediateHashesStage(s *StageState, db ethdb.Database, datadir stri } func regenerateIntermediateHashes(db ethdb.Database, datadir string, expectedRootHash common.Hash, quit <-chan struct{}) error { - log.Info("Regeneration intermediate hashes started") + log.Info(fmt.Sprintf("[%s] Regeneration intermediate hashes started", stages.IntermediateHashes)) buf := etl.NewSortableBuffer(etl.BufferOptimalSize) comparator := db.(ethdb.HasTx).Tx().Comparator(dbutils.IntermediateTrieHashBucket) buf.SetComparator(comparator) @@ -115,7 +115,7 @@ func regenerateIntermediateHashes(db ethdb.Database, datadir string, expectedRoo }); err != nil { return fmt.Errorf("gen ih stage: fail load data to bucket: %w", err) } - log.Info("Regeneration ended") + log.Info(fmt.Sprintf("[%s] Regeneration ended", stages.IntermediateHashes)) return nil } @@ -142,7 +142,7 @@ func (p *HashPromoter) Promote(s *StageState, from, to uint64, storage bool, loa } else { changeSetBucket = dbutils.PlainAccountChangeSetBucket } - log.Debug("Incremental state promotion of intermediate hashes", "from", from, "to", to, "csbucket", changeSetBucket) + log.Debug(fmt.Sprintf("[%s] Incremental state promotion of intermediate hashes", stages.IntermediateHashes), "from", from, "to", to, "csbucket", changeSetBucket) startkey := dbutils.EncodeTimestamp(from + 1) @@ -186,7 +186,7 @@ func (p *HashPromoter) Unwind(s *StageState, u *UnwindState, storage bool, load } else { changeSetBucket = dbutils.PlainAccountChangeSetBucket } - log.Info("Unwinding of intermediate hashes", "from", s.BlockNumber, "to", to, "csbucket", changeSetBucket) + log.Info(fmt.Sprintf("[%s] Unwinding of intermediate hashes", stages.IntermediateHashes), "from", s.BlockNumber, "to", to, "csbucket", changeSetBucket) startkey := dbutils.EncodeTimestamp(to + 1) @@ -273,7 +273,7 @@ func incrementIntermediateHashes(s *StageState, db ethdb.Database, to uint64, da if hash != expectedRootHash { return fmt.Errorf("wrong trie root: %x, expected (from header): %x", hash, expectedRootHash) } - log.Info("Collection finished", + log.Info(fmt.Sprintf("[%s] Collection finished", stages.IntermediateHashes), "root hash", hash.Hex(), "gen IH", generationIHTook, ) @@ -373,7 +373,7 @@ func unwindIntermediateHashesStageImpl(u *UnwindState, s *StageState, db ethdb.D if hash != expectedRootHash { return fmt.Errorf("wrong trie root: %x, expected (from header): %x", hash, expectedRootHash) } - log.Info("Collection finished", + log.Info(fmt.Sprintf("[%s] Collection finished", stages.IntermediateHashes), "root hash", hash.Hex(), "gen IH", generationIHTook, ) diff --git a/eth/stagedsync/stage_senders.go b/eth/stagedsync/stage_senders.go index 0e11f09eb..580adc7de 100644 --- a/eth/stagedsync/stage_senders.go +++ b/eth/stagedsync/stage_senders.go @@ -183,7 +183,7 @@ func SpawnRecoverSendersStage(cfg Stage3Config, s *StageState, db ethdb.Database select { default: case <-logEvery.C: - log.Info(fmt.Sprintf("[%s] Senders recovery", stages.Senders), "block", j.index) + log.Info(fmt.Sprintf("[%s] Senders recovery", stages.Senders), "number", j.index) } binary.BigEndian.PutUint32(k, uint32(j.index)) if err := collector.Collect(k, j.senders); err != nil {