mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-22 11:18:25 +00:00
temporarily disable optimistic block hashing on electra
This commit is contained in:
parent
c7b916fe7b
commit
4355f81731
@ -551,7 +551,8 @@ proc storeBlock(
|
||||
# Client software MUST validate `blockHash` value as being equivalent to
|
||||
# `Keccak256(RLP(ExecutionBlockHeader))`
|
||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/paris.md#specification
|
||||
when typeof(signedBlock).kind >= ConsensusFork.Bellatrix:
|
||||
when typeof(signedBlock).kind >= ConsensusFork.Bellatrix and typeof(signedBlock).kind <= ConsensusFork.Deneb:
|
||||
debugComment "electra can do this in principle"
|
||||
template payload(): auto = signedBlock.message.body.execution_payload
|
||||
if signedBlock.message.is_execution_block and
|
||||
payload.block_hash !=
|
||||
|
@ -366,6 +366,8 @@ proc updateGossipStatus*(
|
||||
lightClient: LightClient, slot: Slot, dagIsBehind = default(Option[bool])) =
|
||||
template cfg(): auto = lightClient.cfg
|
||||
|
||||
debugComment "when LC on electra works, add cfg.ELECTRA_FORK_EPOCH"
|
||||
|
||||
let
|
||||
epoch = slot.epoch
|
||||
|
||||
@ -382,7 +384,7 @@ proc updateGossipStatus*(
|
||||
|
||||
currentEpochTargetGossipState = getTargetGossipState(
|
||||
epoch, cfg.ALTAIR_FORK_EPOCH, cfg.BELLATRIX_FORK_EPOCH,
|
||||
cfg.CAPELLA_FORK_EPOCH, cfg.DENEB_FORK_EPOCH, cfg.ELECTRA_FORK_EPOCH,
|
||||
cfg.CAPELLA_FORK_EPOCH, cfg.DENEB_FORK_EPOCH, FAR_FUTURE_EPOCH,
|
||||
isBehind)
|
||||
targetGossipState =
|
||||
if lcBehind or epoch < 1:
|
||||
@ -393,7 +395,7 @@ proc updateGossipStatus*(
|
||||
# Therefore, LC topic subscriptions are kept for 1 extra epoch.
|
||||
let previousEpochTargetGossipState = getTargetGossipState(
|
||||
epoch - 1, cfg.ALTAIR_FORK_EPOCH, cfg.BELLATRIX_FORK_EPOCH,
|
||||
cfg.CAPELLA_FORK_EPOCH, cfg.DENEB_FORK_EPOCH, cfg.ELECTRA_FORK_EPOCH,
|
||||
cfg.CAPELLA_FORK_EPOCH, cfg.DENEB_FORK_EPOCH, FAR_FUTURE_EPOCH,
|
||||
isBehind)
|
||||
currentEpochTargetGossipState + previousEpochTargetGossipState
|
||||
|
||||
|
@ -224,7 +224,7 @@ programMain:
|
||||
|
||||
targetGossipState = getTargetGossipState(
|
||||
slot.epoch, cfg.ALTAIR_FORK_EPOCH, cfg.BELLATRIX_FORK_EPOCH,
|
||||
cfg.CAPELLA_FORK_EPOCH, cfg.DENEB_FORK_EPOCH, cfg.ELECTRA_FORK_EPOCH,
|
||||
cfg.CAPELLA_FORK_EPOCH, cfg.DENEB_FORK_EPOCH, FAR_FUTURE_EPOCH,
|
||||
isBehind)
|
||||
|
||||
template currentGossipState(): auto = blocksGossipState
|
||||
|
Loading…
x
Reference in New Issue
Block a user