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)
|
||||
|
||||
# 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
|
||||
|
||||
proc handleMissingBlocks(node: BeaconNode) =
|
||||
|
|
|
@ -1282,7 +1282,7 @@ proc getValidatorRegistration(
|
|||
|
||||
from std/sequtils import toSeq
|
||||
|
||||
proc registerValidators(node: BeaconNode, epoch: Epoch) {.async.} =
|
||||
proc registerValidators*(node: BeaconNode, epoch: Epoch) {.async.} =
|
||||
try:
|
||||
if (not node.config.payloadBuilderEnable) or
|
||||
node.currentSlot.epoch < node.dag.cfg.BELLATRIX_FORK_EPOCH:
|
||||
|
@ -1444,13 +1444,6 @@ proc handleValidatorDuties*(node: BeaconNode, lastSlot, slot: Slot) {.async.} =
|
|||
|
||||
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
|
||||
newHead = await handleProposal(node, head, slot)
|
||||
didSubmitBlock = (newHead != head)
|
||||
|
|
Loading…
Reference in New Issue