From 27ecf448a74c7b2d7bff45985804b2172f1dcda6 Mon Sep 17 00:00:00 2001 From: terence Date: Wed, 20 Mar 2024 04:53:02 -1000 Subject: [PATCH] Add da waited time to sync block log (#13775) --- beacon-chain/blockchain/log.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/beacon-chain/blockchain/log.go b/beacon-chain/blockchain/log.go index ce95daa8c..b8f4e0d94 100644 --- a/beacon-chain/blockchain/log.go +++ b/beacon-chain/blockchain/log.go @@ -82,19 +82,20 @@ func logBlockSyncStatus(block interfaces.ReadOnlyBeaconBlock, blockRoot [32]byte if level >= logrus.DebugLevel { parentRoot := block.ParentRoot() lf := logrus.Fields{ - "slot": block.Slot(), - "slotInEpoch": block.Slot() % params.BeaconConfig().SlotsPerEpoch, - "block": fmt.Sprintf("0x%s...", hex.EncodeToString(blockRoot[:])[:8]), - "epoch": slots.ToEpoch(block.Slot()), - "justifiedEpoch": justified.Epoch, - "justifiedRoot": fmt.Sprintf("0x%s...", hex.EncodeToString(justified.Root)[:8]), - "finalizedEpoch": finalized.Epoch, - "finalizedRoot": fmt.Sprintf("0x%s...", hex.EncodeToString(finalized.Root)[:8]), - "parentRoot": fmt.Sprintf("0x%s...", hex.EncodeToString(parentRoot[:])[:8]), - "version": version.String(block.Version()), - "sinceSlotStartTime": prysmTime.Now().Sub(startTime), - "chainServiceProcessedTime": prysmTime.Now().Sub(receivedTime) - daWaitedTime, - "deposits": len(block.Body().Deposits()), + "slot": block.Slot(), + "slotInEpoch": block.Slot() % params.BeaconConfig().SlotsPerEpoch, + "block": fmt.Sprintf("0x%s...", hex.EncodeToString(blockRoot[:])[:8]), + "epoch": slots.ToEpoch(block.Slot()), + "justifiedEpoch": justified.Epoch, + "justifiedRoot": fmt.Sprintf("0x%s...", hex.EncodeToString(justified.Root)[:8]), + "finalizedEpoch": finalized.Epoch, + "finalizedRoot": fmt.Sprintf("0x%s...", hex.EncodeToString(finalized.Root)[:8]), + "parentRoot": fmt.Sprintf("0x%s...", hex.EncodeToString(parentRoot[:])[:8]), + "version": version.String(block.Version()), + "sinceSlotStartTime": prysmTime.Now().Sub(startTime), + "chainServiceProcessedTime": prysmTime.Now().Sub(receivedTime) - daWaitedTime, + "dataAvailabilityWaitedTime": daWaitedTime, + "deposits": len(block.Body().Deposits()), } log.WithFields(lf).Debug("Synced new block") } else {