mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-14 16:47:21 +00:00
reduce received invalid sync block logging to notice; decimal TTD logging (#3839)
This commit is contained in:
parent
2a2bcea70d
commit
ae05ba9a48
@ -528,27 +528,27 @@ proc exchangeTransitionConfiguration*(p: Eth1Monitor): Future[void] {.async.} =
|
|||||||
if p.terminalBlockHash.isSome:
|
if p.terminalBlockHash.isSome:
|
||||||
p.terminalBlockHash.get
|
p.terminalBlockHash.get
|
||||||
else:
|
else:
|
||||||
# TODO can't use static(default(...)) in this context
|
# https://github.com/nim-lang/Nim/issues/19802
|
||||||
default(BlockHash),
|
(static(default(BlockHash))),
|
||||||
terminalBlockNumber:
|
terminalBlockNumber:
|
||||||
if p.terminalBlockNumber.isSome:
|
if p.terminalBlockNumber.isSome:
|
||||||
p.terminalBlockNumber.get
|
p.terminalBlockNumber.get
|
||||||
else:
|
else:
|
||||||
# TODO can't use static(default(...)) in this context
|
# https://github.com/nim-lang/Nim/issues/19802
|
||||||
default(Quantity))
|
(static(default(Quantity))))
|
||||||
let ecTransitionConfiguration =
|
let ecTransitionConfiguration =
|
||||||
await p.dataProvider.web3.provider.engine_exchangeTransitionConfigurationV1(
|
await p.dataProvider.web3.provider.engine_exchangeTransitionConfigurationV1(
|
||||||
ccTransitionConfiguration)
|
ccTransitionConfiguration)
|
||||||
if ccTransitionConfiguration != ecTransitionConfiguration:
|
if ccTransitionConfiguration != ecTransitionConfiguration:
|
||||||
warn "exchangeTransitionConfiguration: Configuration mismatch detected",
|
warn "exchangeTransitionConfiguration: Configuration mismatch detected",
|
||||||
consensusTerminalTotalDifficulty =
|
consensusTerminalTotalDifficulty =
|
||||||
ccTransitionConfiguration.terminalTotalDifficulty,
|
$ccTransitionConfiguration.terminalTotalDifficulty,
|
||||||
consensusTerminalBlockHash =
|
consensusTerminalBlockHash =
|
||||||
ccTransitionConfiguration.terminalBlockHash,
|
ccTransitionConfiguration.terminalBlockHash,
|
||||||
consensusTerminalBlockNumber =
|
consensusTerminalBlockNumber =
|
||||||
ccTransitionConfiguration.terminalBlockNumber.uint64,
|
ccTransitionConfiguration.terminalBlockNumber.uint64,
|
||||||
executionTerminalTotalDifficulty =
|
executionTerminalTotalDifficulty =
|
||||||
ecTransitionConfiguration.terminalTotalDifficulty,
|
$ecTransitionConfiguration.terminalTotalDifficulty,
|
||||||
executionTerminalBlockHash =
|
executionTerminalBlockHash =
|
||||||
ecTransitionConfiguration.terminalBlockHash,
|
ecTransitionConfiguration.terminalBlockHash,
|
||||||
executionTerminalBlockNumber =
|
executionTerminalBlockNumber =
|
||||||
|
@ -109,7 +109,7 @@ proc fetchAncestorBlocksFromNetwork(rman: RequestManager,
|
|||||||
of BlockError.Invalid:
|
of BlockError.Invalid:
|
||||||
# We stop processing blocks because peer is either sending us
|
# We stop processing blocks because peer is either sending us
|
||||||
# junk or working a different fork
|
# junk or working a different fork
|
||||||
warn "Received invalid block",
|
notice "Received invalid block",
|
||||||
peer = peer, blocks = shortLog(items),
|
peer = peer, blocks = shortLog(items),
|
||||||
peer_score = peer.getScore()
|
peer_score = peer.getScore()
|
||||||
peer.updateScore(PeerScoreBadBlocks)
|
peer.updateScore(PeerScoreBadBlocks)
|
||||||
|
@ -641,9 +641,9 @@ proc push*[T](sq: SyncQueue[T], sr: SyncRequest[T],
|
|||||||
hasInvalidBlock = true
|
hasInvalidBlock = true
|
||||||
|
|
||||||
let req = item.request
|
let req = item.request
|
||||||
warn "Received invalid sequence of blocks", request = req,
|
notice "Received invalid sequence of blocks", request = req,
|
||||||
blocks_count = len(item.data),
|
blocks_count = len(item.data),
|
||||||
blocks_map = getShortMap(req, item.data)
|
blocks_map = getShortMap(req, item.data)
|
||||||
req.item.updateScore(PeerScoreBadBlocks)
|
req.item.updateScore(PeerScoreBadBlocks)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user