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",
|
||||
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.
|
||||
let
|
||||
timestamp = withState(self.dag.headState):
|
||||
|
|
|
@ -552,7 +552,7 @@ proc process_execution_payload*(
|
|||
|
||||
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*(
|
||||
state: var capella.BeaconState, payload: capella.ExecutionPayload,
|
||||
notify_new_payload: capella.ExecutePayload): Result[void, cstring] =
|
||||
|
|
|
@ -415,9 +415,14 @@ proc getExecutionPayload[T](
|
|||
|
||||
let random = withState(proposalState[]): get_randao_mix(
|
||||
forkyState.data, get_current_epoch(forkyState.data))
|
||||
(await forkchoice_updated(
|
||||
let fcu_payload_id = (await forkchoice_updated(
|
||||
latestHead, latestSafe, latestFinalized, timestamp, random,
|
||||
feeRecipient, withdrawals, node.consensusManager.eth1Monitor))
|
||||
await sleepAsync(500.milliseconds)
|
||||
|
||||
fcu_payload_id
|
||||
|
||||
let
|
||||
payload = try:
|
||||
awaitWithTimeout(
|
||||
get_execution_payload[T](payload_id, node.consensusManager.eth1Monitor),
|
||||
|
@ -431,6 +436,14 @@ proc getExecutionPayload[T](
|
|||
payload_id, err = err.msg
|
||||
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
|
||||
except CatchableError as err:
|
||||
beacon_block_payload_errors.inc()
|
||||
|
|
Loading…
Reference in New Issue