don't fcU on blocks for which block processor received no newPayload reply (#4623)
This commit is contained in:
parent
4aae1f0ee8
commit
cf551f10c4
|
@ -276,18 +276,7 @@ proc newExecutionPayload*(
|
||||||
return Opt.none PayloadExecutionStatus
|
return Opt.none PayloadExecutionStatus
|
||||||
|
|
||||||
debug "newPayload: inserting block into execution engine",
|
debug "newPayload: inserting block into execution engine",
|
||||||
parentHash = executionPayload.parent_hash,
|
executionPayload = shortLog(executionPayload)
|
||||||
blockHash = executionPayload.block_hash,
|
|
||||||
stateRoot = shortLog(executionPayload.state_root),
|
|
||||||
receiptsRoot = shortLog(executionPayload.receipts_root),
|
|
||||||
prevRandao = shortLog(executionPayload.prev_randao),
|
|
||||||
blockNumber = executionPayload.block_number,
|
|
||||||
gasLimit = executionPayload.gas_limit,
|
|
||||||
gasUsed = executionPayload.gas_used,
|
|
||||||
timestamp = executionPayload.timestamp,
|
|
||||||
extraDataLen = executionPayload.extra_data.len,
|
|
||||||
baseFeePerGas = $executionPayload.base_fee_per_gas,
|
|
||||||
numTransactions = executionPayload.transactions.len
|
|
||||||
|
|
||||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/paris.md#request
|
# https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/paris.md#request
|
||||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/shanghai.md#request
|
# https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/shanghai.md#request
|
||||||
|
@ -525,9 +514,8 @@ proc storeBlock*(
|
||||||
|
|
||||||
# Grab the new head according to our latest attestation data; determines how
|
# Grab the new head according to our latest attestation data; determines how
|
||||||
# async this needs to be.
|
# async this needs to be.
|
||||||
let
|
let newHead = attestationPool[].selectOptimisticHead(
|
||||||
newHead = attestationPool[].selectOptimisticHead(
|
wallSlot.start_beacon_time)
|
||||||
wallSlot.start_beacon_time)
|
|
||||||
|
|
||||||
if newHead.isOk:
|
if newHead.isOk:
|
||||||
template eth1Monitor(): auto = self.consensusManager.eth1Monitor
|
template eth1Monitor(): auto = self.consensusManager.eth1Monitor
|
||||||
|
@ -557,8 +545,10 @@ proc storeBlock*(
|
||||||
headExecutionPayloadHash =
|
headExecutionPayloadHash =
|
||||||
self.consensusManager.dag.loadExecutionBlockRoot(newHead.get.blck)
|
self.consensusManager.dag.loadExecutionBlockRoot(newHead.get.blck)
|
||||||
wallSlot = self.getBeaconTime().slotOrZero
|
wallSlot = self.getBeaconTime().slotOrZero
|
||||||
if headExecutionPayloadHash.isZero:
|
if headExecutionPayloadHash.isZero or
|
||||||
# Blocks without execution payloads can't be optimistic.
|
NewPayloadStatus.noResponse == payloadStatus:
|
||||||
|
# Blocks without execution payloads can't be optimistic, and don't try
|
||||||
|
# to fcU to a block the EL hasn't seen
|
||||||
self.consensusManager[].updateHead(newHead.get.blck)
|
self.consensusManager[].updateHead(newHead.get.blck)
|
||||||
elif not self.consensusManager.dag.is_optimistic newHead.get.blck.root:
|
elif not self.consensusManager.dag.is_optimistic newHead.get.blck.root:
|
||||||
# Not `NOT_VALID`; either `VALID` or `INVALIDATED`, but latter wouldn't
|
# Not `NOT_VALID`; either `VALID` or `INVALIDATED`, but latter wouldn't
|
||||||
|
|
Loading…
Reference in New Issue