From f409ed97ae1e4c77b540032b3022eb2a6ff9d215 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Wed, 17 Jan 2024 15:46:54 +0100 Subject: [PATCH] align sync contribution logs with aggregate processing (#5770) There are two conditions leading to `duplicate contribution` log. Align the logs with the ones used for attestation aggregates, so that the two conditions can be separated when reading logs. --- beacon_chain/gossip_processing/gossip_validation.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beacon_chain/gossip_processing/gossip_validation.nim b/beacon_chain/gossip_processing/gossip_validation.nim index 212e08d13..db0bf7713 100644 --- a/beacon_chain/gossip_processing/gossip_validation.nim +++ b/beacon_chain/gossip_processing/gossip_validation.nim @@ -899,7 +899,7 @@ proc validateAggregate*( # `hash_tree_root(aggregate.data)` whose `aggregation_bits` is a non-strict # superset has _not_ already been seen. # https://github.com/ethereum/consensus-specs/pull/2847 - return errIgnore("Aggregate already covered") + return errIgnore("Aggregate: already covered") # [REJECT] aggregate_and_proof.selection_proof selects the validator as an # aggregator for the slot -- i.e. is_aggregator(state, aggregate.data.slot, @@ -1281,7 +1281,7 @@ proc validateContribution*( # (this requires maintaining a cache of size SYNC_COMMITTEE_SIZE for this # topic that can be flushed after each slot). if syncCommitteeMsgPool[].isSeen(msg.message): - return errIgnore("Contribution: duplicate contribution") + return errIgnore("Contribution: validator has already aggregated in slot") # [REJECT] The aggregator's validator index is in the declared subcommittee # of the current sync committee. @@ -1317,7 +1317,7 @@ proc validateContribution*( # `beacon_block_root` and `subcommittee_index` whose `aggregation_bits` # is non-strict superset has _not_ already been seen. if syncCommitteeMsgPool[].covers(msg.message.contribution, blck.bid): - return errIgnore("Contribution: duplicate contribution") + return errIgnore("Contribution: already covered") let sig = if checkSignature: let deferredCrypto = batchCrypto.scheduleContributionChecks(