mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-10 14:26:26 +00:00
log expected_withdrawals discrepancy (#4595)
* log expected_withdrawals discrepancy * capella-only rather than not-bellatrix * add one more (in theory unnecessary, but) guard against get(none)
This commit is contained in:
parent
72797cad09
commit
b19f7001aa
@ -353,7 +353,14 @@ proc runProposalForkchoiceUpdated*(
|
|||||||
debug "runProposalForkchoiceUpdated: expected to be proposing next slot",
|
debug "runProposalForkchoiceUpdated: expected to be proposing next slot",
|
||||||
nextWallSlot, validatorIndex, nextProposer
|
nextWallSlot, validatorIndex, nextProposer
|
||||||
|
|
||||||
# Approximately lines up with validator_duties version. Used optimistcally/
|
withState(self.dag.headState):
|
||||||
|
let nextSlotFork = self.dag.cfg.forkAtEpoch(nextWallSlot.epoch)
|
||||||
|
if forkyState.data.fork != nextSlotFork:
|
||||||
|
debug "runProposalForkchoiceUpdated: about to do fork transition; don't have appropriate state to fcU ahead",
|
||||||
|
nextWallSlot, validatorIndex, nextProposer, nextSlotFork,
|
||||||
|
stateFork = forkyState.data.fork
|
||||||
|
|
||||||
|
# Approximately lines up with validator_duties version. Used optimistically/
|
||||||
# opportunistically, so mismatches are fine if not too frequent.
|
# opportunistically, so mismatches are fine if not too frequent.
|
||||||
let
|
let
|
||||||
timestamp = withState(self.dag.headState):
|
timestamp = withState(self.dag.headState):
|
||||||
|
@ -552,7 +552,7 @@ proc process_execution_payload*(
|
|||||||
|
|
||||||
ok()
|
ok()
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.0/specs/capella/beacon-chain.md#modified-process_execution_payload
|
# https://github.com/ethereum/consensus-specs/blob/v1.3.0-rc.2/specs/capella/beacon-chain.md#modified-process_execution_payload
|
||||||
proc process_execution_payload*(
|
proc process_execution_payload*(
|
||||||
state: var capella.BeaconState, payload: capella.ExecutionPayload,
|
state: var capella.BeaconState, payload: capella.ExecutionPayload,
|
||||||
notify_new_payload: capella.ExecutePayload): Result[void, cstring] =
|
notify_new_payload: capella.ExecutePayload): Result[void, cstring] =
|
||||||
|
@ -415,9 +415,14 @@ proc getExecutionPayload[T](
|
|||||||
|
|
||||||
let random = withState(proposalState[]): get_randao_mix(
|
let random = withState(proposalState[]): get_randao_mix(
|
||||||
forkyState.data, get_current_epoch(forkyState.data))
|
forkyState.data, get_current_epoch(forkyState.data))
|
||||||
(await forkchoice_updated(
|
let fcu_payload_id = (await forkchoice_updated(
|
||||||
latestHead, latestSafe, latestFinalized, timestamp, random,
|
latestHead, latestSafe, latestFinalized, timestamp, random,
|
||||||
feeRecipient, withdrawals, node.consensusManager.eth1Monitor))
|
feeRecipient, withdrawals, node.consensusManager.eth1Monitor))
|
||||||
|
await sleepAsync(500.milliseconds)
|
||||||
|
|
||||||
|
fcu_payload_id
|
||||||
|
|
||||||
|
let
|
||||||
payload = try:
|
payload = try:
|
||||||
awaitWithTimeout(
|
awaitWithTimeout(
|
||||||
get_execution_payload[T](payload_id, node.consensusManager.eth1Monitor),
|
get_execution_payload[T](payload_id, node.consensusManager.eth1Monitor),
|
||||||
@ -431,6 +436,14 @@ proc getExecutionPayload[T](
|
|||||||
payload_id, err = err.msg
|
payload_id, err = err.msg
|
||||||
empty_execution_payload
|
empty_execution_payload
|
||||||
|
|
||||||
|
when T is capella.ExecutionPayload:
|
||||||
|
if payload.isSome and withdrawals.isSome and
|
||||||
|
withdrawals.get() != payload.get.withdrawals.asSeq:
|
||||||
|
warn "Execution client did not return correct withdrawals",
|
||||||
|
payload = shortLog(payload.get()),
|
||||||
|
withdrawals_from_cl = withdrawals.get(),
|
||||||
|
withdrawals_from_el = payload.get.withdrawals
|
||||||
|
|
||||||
return payload
|
return payload
|
||||||
except CatchableError as err:
|
except CatchableError as err:
|
||||||
beacon_block_payload_errors.inc()
|
beacon_block_payload_errors.inc()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user