From 0987628c0b920989bbbc013f41d12bbdd1360685 Mon Sep 17 00:00:00 2001 From: tersec Date: Tue, 5 Sep 2023 12:31:33 +0200 Subject: [PATCH] simplify beacon validator sync committee production for blocks slightly (#5364) --- beacon_chain/validators/beacon_validators.nim | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/beacon_chain/validators/beacon_validators.nim b/beacon_chain/validators/beacon_validators.nim index 9ee3f3733..54c136abe 100644 --- a/beacon_chain/validators/beacon_validators.nim +++ b/beacon_chain/validators/beacon_validators.nim @@ -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