simplify beacon validator sync committee production for blocks slightly (#5364)

This commit is contained in:
tersec 2023-09-05 12:31:33 +02:00 committed by GitHub
parent afb5fdae34
commit 0987628c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 9 deletions

View File

@ -482,11 +482,6 @@ proc makeBeaconBlockForHeadAndSlot*(
exits = withState(state[]):
node.validatorChangePool[].getBeaconBlockValidatorChanges(
node.dag.cfg, forkyState.data)
syncAggregate =
if slot.epoch >= node.dag.cfg.ALTAIR_FORK_EPOCH:
node.syncCommitteeMsgPool[].produceSyncAggregate(head.bid, slot)
else:
SyncAggregate.init()
payload = (await payloadFut).valueOr:
beacon_block_production_errors.inc()
warn "Unable to get execution payload. Skipping block proposal",
@ -503,7 +498,7 @@ proc makeBeaconBlockForHeadAndSlot*(
attestations,
eth1Proposal.deposits,
exits,
syncAggregate,
node.syncCommitteeMsgPool[].produceSyncAggregate(head.bid, slot),
payload,
noRollback, # Temporary state - no need for rollback
cache,
@ -1539,9 +1534,7 @@ proc getValidatorRegistration(
proc registerValidators*(node: BeaconNode, epoch: Epoch) {.async.} =
try:
if (not node.config.payloadBuilderEnable) or
node.currentSlot.epoch < node.dag.cfg.BELLATRIX_FORK_EPOCH:
return
if not node.config.payloadBuilderEnable: return
const HttpOk = 200