Skip to content

Commit

Permalink
demoted logs (#3753)
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 authored Mar 23, 2022
1 parent fed19d5 commit b7fb85d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions cmd/rpcdaemon/commands/engine_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func convertPayloadStatus(x *remote.EnginePayloadStatus) map[string]interface{}
}

func (e *EngineImpl) ForkchoiceUpdatedV1(ctx context.Context, forkChoiceState *ForkChoiceState, payloadAttributes *PayloadAttributes) (map[string]interface{}, error) {
log.Info("Received ForkchoiceUpdated", "head", forkChoiceState.HeadHash, "safe", forkChoiceState.HeadHash, "finalized", forkChoiceState.FinalizedBlockHash,
log.Trace("Received ForkchoiceUpdated", "head", forkChoiceState.HeadHash, "safe", forkChoiceState.HeadHash, "finalized", forkChoiceState.FinalizedBlockHash,
"build", payloadAttributes != nil)

var prepareParameters *remote.EnginePayloadAttributes
Expand Down Expand Up @@ -125,7 +125,7 @@ func (e *EngineImpl) ForkchoiceUpdatedV1(ctx context.Context, forkChoiceState *F
// NewPayloadV1 processes new payloads (blocks) from the beacon chain.
// See https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md#engine_newpayloadv1
func (e *EngineImpl) NewPayloadV1(ctx context.Context, payload *ExecutionPayload) (map[string]interface{}, error) {
log.Info("Received NewPayload", "height", uint64(payload.BlockNumber), "hash", payload.BlockHash)
log.Trace("Received NewPayload", "height", uint64(payload.BlockNumber), "hash", payload.BlockHash)

var baseFee *uint256.Int
if payload.BaseFeePerGas != nil {
Expand Down
10 changes: 5 additions & 5 deletions eth/stagedsync/stage_headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ func handleForkChoice(
}
}

log.Info(fmt.Sprintf("[%s] Fork choice beginning unwind", s.LogPrefix()))
log.Trace(fmt.Sprintf("[%s] Fork choice beginning unwind", s.LogPrefix()))
u.UnwindTo(forkingPoint, common.Hash{})
log.Info(fmt.Sprintf("[%s] Fork choice unwind finished", s.LogPrefix()))
log.Trace(fmt.Sprintf("[%s] Fork choice unwind finished", s.LogPrefix()))

cfg.hd.SetPendingHeader(headerHash, headerNumber)

Expand All @@ -314,7 +314,7 @@ func handleNewPayload(
headerNumber := header.Number.Uint64()
headerHash := header.Hash()

log.Info(fmt.Sprintf("[%s] Handling new payload", s.LogPrefix()), "height", headerNumber, "hash", headerHash)
log.Trace(fmt.Sprintf("[%s] Handling new payload", s.LogPrefix()), "height", headerNumber, "hash", headerHash)

cfg.hd.UpdateTopSeenHeightPoS(headerNumber)

Expand Down Expand Up @@ -366,9 +366,9 @@ func handleNewPayload(

cfg.hd.BeaconRequestList.Remove(requestId)

log.Info(fmt.Sprintf("[%s] New payload begin verification", s.LogPrefix()))
log.Trace(fmt.Sprintf("[%s] New payload begin verification", s.LogPrefix()))
success, err := verifyAndSaveNewPoSHeader(requestStatus, s, tx, cfg, header, headerInserter)
log.Info(fmt.Sprintf("[%s] New payload verification ended", s.LogPrefix()), "success", success, "err", err)
log.Trace(fmt.Sprintf("[%s] New payload verification ended", s.LogPrefix()), "success", success, "err", err)
if err != nil || !success {
return err
}
Expand Down
8 changes: 4 additions & 4 deletions ethdb/privateapi/ethbackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func (s *EthBackendServer) EngineNewPayloadV1(ctx context.Context, req *types2.E
return &remote.EnginePayloadStatus{Status: remote.EngineStatus_SYNCING}, nil
}

log.Info("[NewPayload] sending block", "height", header.Number, "hash", common.Hash(blockHash))
log.Trace("[NewPayload] sending block", "height", header.Number, "hash", common.Hash(blockHash))
s.requestList.AddPayloadRequest(&engineapi.PayloadMessage{
Header: &header,
Body: &types.RawBody{
Expand All @@ -314,7 +314,7 @@ func (s *EthBackendServer) EngineNewPayloadV1(ctx context.Context, req *types2.E
})

payloadStatus := <-s.statusCh
log.Info("[NewPayload] got reply", "payloadStatus", payloadStatus)
log.Trace("[NewPayload] got reply", "payloadStatus", payloadStatus)

if payloadStatus.CriticalError != nil {
return nil, payloadStatus.CriticalError
Expand Down Expand Up @@ -410,11 +410,11 @@ func (s *EthBackendServer) EngineForkChoiceUpdatedV1(ctx context.Context, req *r
FinalizedBlockHash: gointerfaces.ConvertH256ToHash(req.ForkchoiceState.FinalizedBlockHash),
}

log.Info("[ForkChoiceUpdated] sending forkChoiceMessage", "head", forkChoiceMessage.HeadBlockHash)
log.Trace("[ForkChoiceUpdated] sending forkChoiceMessage", "head", forkChoiceMessage.HeadBlockHash)
s.requestList.AddForkChoiceRequest(&forkChoiceMessage)

payloadStatus := <-s.statusCh
log.Info("[ForkChoiceUpdated] got reply", "payloadStatus", payloadStatus)
log.Trace("[ForkChoiceUpdated] got reply", "payloadStatus", payloadStatus)

if payloadStatus.CriticalError != nil {
return nil, payloadStatus.CriticalError
Expand Down

0 comments on commit b7fb85d

Please sign in to comment.