mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-17 08:56:45 +00:00
register validators for MEV regardless of whether attached to BN (#4363)
This commit is contained in:
parent
898684c175
commit
c5d52f1b25
@ -1312,6 +1312,13 @@ proc onSlotStart(node: BeaconNode, wallTime: BeaconTime,
|
|||||||
|
|
||||||
await onSlotEnd(node, wallSlot)
|
await onSlotEnd(node, wallSlot)
|
||||||
|
|
||||||
|
# https://github.com/ethereum/builder-specs/blob/v0.2.0/specs/validator.md#registration-dissemination
|
||||||
|
# This specification suggests validators re-submit to builder software every
|
||||||
|
# `EPOCHS_PER_VALIDATOR_REGISTRATION_SUBMISSION` epochs.
|
||||||
|
if wallSlot.is_epoch and
|
||||||
|
wallSlot.epoch mod EPOCHS_PER_VALIDATOR_REGISTRATION_SUBMISSION == 0:
|
||||||
|
asyncSpawn node.registerValidators(wallSlot.epoch)
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
|
||||||
proc handleMissingBlocks(node: BeaconNode) =
|
proc handleMissingBlocks(node: BeaconNode) =
|
||||||
|
@ -1282,7 +1282,7 @@ proc getValidatorRegistration(
|
|||||||
|
|
||||||
from std/sequtils import toSeq
|
from std/sequtils import toSeq
|
||||||
|
|
||||||
proc registerValidators(node: BeaconNode, epoch: Epoch) {.async.} =
|
proc registerValidators*(node: BeaconNode, epoch: Epoch) {.async.} =
|
||||||
try:
|
try:
|
||||||
if (not node.config.payloadBuilderEnable) or
|
if (not node.config.payloadBuilderEnable) or
|
||||||
node.currentSlot.epoch < node.dag.cfg.BELLATRIX_FORK_EPOCH:
|
node.currentSlot.epoch < node.dag.cfg.BELLATRIX_FORK_EPOCH:
|
||||||
@ -1444,13 +1444,6 @@ proc handleValidatorDuties*(node: BeaconNode, lastSlot, slot: Slot) {.async.} =
|
|||||||
|
|
||||||
curSlot += 1
|
curSlot += 1
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.2.0/specs/validator.md#registration-dissemination
|
|
||||||
# This specification suggests validators re-submit to builder software every
|
|
||||||
# `EPOCHS_PER_VALIDATOR_REGISTRATION_SUBMISSION` epochs.
|
|
||||||
if slot.is_epoch and
|
|
||||||
slot.epoch mod EPOCHS_PER_VALIDATOR_REGISTRATION_SUBMISSION == 0:
|
|
||||||
asyncSpawn node.registerValidators(slot.epoch)
|
|
||||||
|
|
||||||
let
|
let
|
||||||
newHead = await handleProposal(node, head, slot)
|
newHead = await handleProposal(node, head, slot)
|
||||||
didSubmitBlock = (newHead != head)
|
didSubmitBlock = (newHead != head)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user