mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 11:41:19 +00:00
Bump log level of some PoS messages from Trace to Debug (#4682)
This commit is contained in:
parent
d54a007289
commit
225935b376
@ -88,7 +88,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.Trace("Received ForkchoiceUpdated", "head", forkChoiceState.HeadHash, "safe", forkChoiceState.HeadHash, "finalized", forkChoiceState.FinalizedBlockHash,
|
||||
log.Debug("Received ForkchoiceUpdated", "head", forkChoiceState.HeadHash, "safe", forkChoiceState.HeadHash, "finalized", forkChoiceState.FinalizedBlockHash,
|
||||
"build", payloadAttributes != nil)
|
||||
|
||||
var prepareParameters *remote.EnginePayloadAttributes
|
||||
@ -143,7 +143,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.Trace("Received NewPayload", "height", uint64(payload.BlockNumber), "hash", payload.BlockHash)
|
||||
log.Debug("Received NewPayload", "height", uint64(payload.BlockNumber), "hash", payload.BlockHash)
|
||||
|
||||
var baseFee *uint256.Int
|
||||
if payload.BaseFeePerGas != nil {
|
||||
|
@ -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.Trace("Received ForkchoiceUpdated", "head", forkChoiceState.HeadHash, "safe", forkChoiceState.HeadHash, "finalized", forkChoiceState.FinalizedBlockHash,
|
||||
log.Debug("Received ForkchoiceUpdated", "head", forkChoiceState.HeadHash, "safe", forkChoiceState.HeadHash, "finalized", forkChoiceState.FinalizedBlockHash,
|
||||
"build", payloadAttributes != nil)
|
||||
|
||||
var prepareParameters *remote.EnginePayloadAttributes
|
||||
@ -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.Trace("Received NewPayload", "height", uint64(payload.BlockNumber), "hash", payload.BlockHash)
|
||||
log.Debug("Received NewPayload", "height", uint64(payload.BlockNumber), "hash", payload.BlockHash)
|
||||
|
||||
var baseFee *uint256.Int
|
||||
if payload.BaseFeePerGas != nil {
|
||||
|
@ -461,7 +461,7 @@ func handleNewPayload(
|
||||
headerNumber := header.Number.Uint64()
|
||||
headerHash := header.Hash()
|
||||
|
||||
log.Trace(fmt.Sprintf("[%s] Handling new payload", s.LogPrefix()), "height", headerNumber, "hash", headerHash)
|
||||
log.Debug(fmt.Sprintf("[%s] Handling new payload", s.LogPrefix()), "height", headerNumber, "hash", headerHash)
|
||||
cfg.hd.UpdateTopSeenHeightPoS(headerNumber)
|
||||
|
||||
existingCanonicalHash, err := rawdb.ReadCanonicalHash(tx, headerNumber)
|
||||
@ -541,9 +541,9 @@ func handleNewPayload(
|
||||
}, nil
|
||||
}
|
||||
|
||||
log.Trace(fmt.Sprintf("[%s] New payload begin verification", s.LogPrefix()))
|
||||
log.Debug(fmt.Sprintf("[%s] New payload begin verification", s.LogPrefix()))
|
||||
response, success, err := verifyAndSaveNewPoSHeader(requestStatus, s, tx, cfg, header, payloadMessage.Body, headerInserter)
|
||||
log.Trace(fmt.Sprintf("[%s] New payload verification ended", s.LogPrefix()), "success", success, "err", err)
|
||||
log.Debug(fmt.Sprintf("[%s] New payload verification ended", s.LogPrefix()), "success", success, "err", err)
|
||||
if err != nil || !success {
|
||||
return response, err
|
||||
}
|
||||
@ -656,7 +656,7 @@ func schedulePoSDownload(
|
||||
cfg.hd.BeaconRequestList.SetStatus(requestId, engineapi.DataWasMissing)
|
||||
|
||||
if cfg.hd.PosStatus() != headerdownload.Idle {
|
||||
log.Trace(fmt.Sprintf("[%s] Postponing PoS download since another one is in progress", s.LogPrefix()), "height", heightToDownload, "hash", hashToDownload)
|
||||
log.Debug(fmt.Sprintf("[%s] Postponing PoS download since another one is in progress", s.LogPrefix()), "height", heightToDownload, "hash", hashToDownload)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -420,7 +420,7 @@ func (hd *HeaderDownload) RequestMoreHeaders(currentTime time.Time) (*HeaderRequ
|
||||
func (hd *HeaderDownload) requestMoreHeadersForPOS(currentTime time.Time) (timeout bool, request *HeaderRequest, penalties []PenaltyItem) {
|
||||
anchor := hd.posAnchor
|
||||
if anchor == nil {
|
||||
log.Trace("No PoS anchor")
|
||||
log.Debug("No PoS anchor")
|
||||
return
|
||||
}
|
||||
|
||||
@ -626,7 +626,7 @@ func (hd *HeaderDownload) SetHeaderToDownloadPoS(hash common.Hash, height uint64
|
||||
hd.lock.Lock()
|
||||
defer hd.lock.Unlock()
|
||||
|
||||
log.Trace("Set posAnchor", "blockHeight", height+1)
|
||||
log.Debug("Set posAnchor", "blockHeight", height+1)
|
||||
hd.posAnchor = &Anchor{
|
||||
parentHash: hash,
|
||||
blockHeight: height + 1,
|
||||
@ -637,12 +637,12 @@ func (hd *HeaderDownload) ProcessHeadersPOS(csHeaders []ChainSegmentHeader, tx k
|
||||
if len(csHeaders) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
log.Trace("Collecting...", "from", csHeaders[0].Number, "to", csHeaders[len(csHeaders)-1].Number, "len", len(csHeaders))
|
||||
log.Debug("Collecting...", "from", csHeaders[0].Number, "to", csHeaders[len(csHeaders)-1].Number, "len", len(csHeaders))
|
||||
hd.lock.Lock()
|
||||
defer hd.lock.Unlock()
|
||||
if hd.posAnchor == nil {
|
||||
// May happen if peers are sending unrequested header packets after we've synced
|
||||
log.Trace("posAnchor is nil")
|
||||
log.Debug("posAnchor is nil")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@ -673,10 +673,10 @@ func (hd *HeaderDownload) ProcessHeadersPOS(csHeaders []ChainSegmentHeader, tx k
|
||||
return nil, err
|
||||
}
|
||||
if hh != nil {
|
||||
log.Trace("Synced", "requestId", hd.requestId)
|
||||
log.Debug("Synced", "requestId", hd.requestId)
|
||||
if headerNumber != hh.Number.Uint64()+1 {
|
||||
hd.badPoSHeaders[headerHash] = header.ParentHash
|
||||
return nil, fmt.Errorf("Invalid PoS segment detected: invalid block number. got %d, expected %d", headerNumber, hh.Number.Uint64()+1)
|
||||
return nil, fmt.Errorf("invalid PoS segment detected: invalid block number. got %d, expected %d", headerNumber, hh.Number.Uint64()+1)
|
||||
}
|
||||
hd.posAnchor = nil
|
||||
hd.posStatus = Synced
|
||||
@ -1429,7 +1429,7 @@ func (hd *HeaderDownload) StartPoSDownloader(
|
||||
if sentToPeer {
|
||||
// If request was actually sent to a peer, we update retry time to be 5 seconds in the future
|
||||
hd.UpdateRetryTime(req, currentTime, 5*time.Second /* timeout */)
|
||||
log.Trace("Sent request", "height", req.Number)
|
||||
log.Debug("Sent request", "height", req.Number)
|
||||
}
|
||||
}
|
||||
if len(penalties) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user