From a1ae53fbdfb95ba737374684e04151a656115001 Mon Sep 17 00:00:00 2001 From: tersec Date: Thu, 28 Apr 2022 10:51:49 +0000 Subject: [PATCH] don't always broadcast sync contributions and aggregates on Altair topics (#3611) --- beacon_chain/networking/eth2_network.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/beacon_chain/networking/eth2_network.nim b/beacon_chain/networking/eth2_network.nim index 941f32eec..ea9e2125e 100644 --- a/beacon_chain/networking/eth2_network.nim +++ b/beacon_chain/networking/eth2_network.nim @@ -2334,12 +2334,14 @@ proc broadcastBeaconBlock*(node: Eth2Node, forked: ForkedSignedBeaconBlock) = proc broadcastSyncCommitteeMessage*( node: Eth2Node, msg: SyncCommitteeMessage, subcommitteeIdx: SyncSubcommitteeIndex) = - let topic = getSyncCommitteeTopic(node.forkDigests.altair, subcommitteeIdx) + let topic = getSyncCommitteeTopic( + node.forkDigestAtEpoch(node.getWallEpoch), subcommitteeIdx) node.broadcast(topic, msg) proc broadcastSignedContributionAndProof*( node: Eth2Node, msg: SignedContributionAndProof) = - let topic = getSyncCommitteeContributionAndProofTopic(node.forkDigests.altair) + let topic = getSyncCommitteeContributionAndProofTopic( + node.forkDigestAtEpoch(node.getWallEpoch)) node.broadcast(topic, msg) proc broadcastOptimisticLightClientUpdate*(