Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demoted logs for PoS downloader #3753

Merged
merged 1 commit into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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