mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-22 20:42:13 +00:00
only trigger liveness failsafe for mainnet (#4882)
* only trigger liveness failsafe for mainnet * more user-friendly log
This commit is contained in:
parent
bb62fee7d5
commit
dc32add555
@ -37,7 +37,7 @@ type
|
|||||||
|
|
||||||
# Transition
|
# Transition
|
||||||
TERMINAL_TOTAL_DIFFICULTY*: UInt256
|
TERMINAL_TOTAL_DIFFICULTY*: UInt256
|
||||||
TERMINAL_BLOCK_HASH*: BlockHash # TODO use in eht1monitor
|
TERMINAL_BLOCK_HASH*: BlockHash
|
||||||
|
|
||||||
# Genesis
|
# Genesis
|
||||||
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT*: uint64
|
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT*: uint64
|
||||||
|
@ -619,7 +619,7 @@ proc getBlindedBlockParts[EPH: ForkyExecutionPayloadHeader](
|
|||||||
"getBlindedExecutionPayload error: " & exc.msg)
|
"getBlindedExecutionPayload error: " & exc.msg)
|
||||||
|
|
||||||
if executionPayloadHeader.isErr:
|
if executionPayloadHeader.isErr:
|
||||||
debug "getBlindedBlockParts: getBlindedExecutionPayload failed",
|
warn "Could not obtain blinded execution payload header",
|
||||||
error = executionPayloadHeader.error, slot, validator_index,
|
error = executionPayloadHeader.error, slot, validator_index,
|
||||||
head = shortLog(head)
|
head = shortLog(head)
|
||||||
# Haven't committed to the MEV block, so allow EL fallback.
|
# Haven't committed to the MEV block, so allow EL fallback.
|
||||||
@ -759,6 +759,9 @@ proc proposeBlockMEV(node: BeaconNode, blindedBlock: auto):
|
|||||||
"Unblinded block not returned to proposer"
|
"Unblinded block not returned to proposer"
|
||||||
err errMsg
|
err errMsg
|
||||||
|
|
||||||
|
func isEFMainnet(cfg: RuntimeConfig): bool =
|
||||||
|
cfg.DEPOSIT_CHAIN_ID == 1 and cfg.DEPOSIT_NETWORK_ID == 1
|
||||||
|
|
||||||
proc makeBlindedBeaconBlockForHeadAndSlot*[
|
proc makeBlindedBeaconBlockForHeadAndSlot*[
|
||||||
BBB: bellatrix_mev.BlindedBeaconBlock | capella_mev.BlindedBeaconBlock](
|
BBB: bellatrix_mev.BlindedBeaconBlock | capella_mev.BlindedBeaconBlock](
|
||||||
node: BeaconNode, randao_reveal: ValidatorSig,
|
node: BeaconNode, randao_reveal: ValidatorSig,
|
||||||
@ -781,7 +784,7 @@ proc makeBlindedBeaconBlockForHeadAndSlot*[
|
|||||||
pubkey =
|
pubkey =
|
||||||
# Relevant state for knowledge of validators
|
# Relevant state for knowledge of validators
|
||||||
withState(node.dag.headState):
|
withState(node.dag.headState):
|
||||||
if livenessFailsafeInEffect(
|
if node.dag.cfg.isEFMainnet and livenessFailsafeInEffect(
|
||||||
forkyState.data.block_roots.data, forkyState.data.slot):
|
forkyState.data.block_roots.data, forkyState.data.slot):
|
||||||
# It's head block's slot which matters here, not proposal slot
|
# It's head block's slot which matters here, not proposal slot
|
||||||
return err("Builder API liveness failsafe in effect")
|
return err("Builder API liveness failsafe in effect")
|
||||||
@ -832,8 +835,8 @@ proc proposeBlockAux(
|
|||||||
# EL fails -- i.e. it would change priorities, so any block from the
|
# EL fails -- i.e. it would change priorities, so any block from the
|
||||||
# execution layer client would override builder API. But it seems an
|
# execution layer client would override builder API. But it seems an
|
||||||
# odd requirement to produce no block at all in those conditions.
|
# odd requirement to produce no block at all in those conditions.
|
||||||
not livenessFailsafeInEffect(
|
(not node.dag.cfg.isEFMainnet) or (not livenessFailsafeInEffect(
|
||||||
forkyState.data.block_roots.data, forkyState.data.slot)
|
forkyState.data.block_roots.data, forkyState.data.slot))
|
||||||
else:
|
else:
|
||||||
false
|
false
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user