From 3056bcc2b70583187adeedb309b22afba90a0089 Mon Sep 17 00:00:00 2001 From: Ian Shim Date: Fri, 31 May 2024 10:46:21 +0900 Subject: [PATCH] update comments --- core/aggregation.go | 5 ++--- disperser/batcher/batcher.go | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/aggregation.go b/core/aggregation.go index da44c68aa7..963c51b454 100644 --- a/core/aggregation.go +++ b/core/aggregation.go @@ -34,13 +34,12 @@ type SigningMessage struct { } // QuorumAttestation contains the results of aggregating signatures from a set of operators by quorums +// It also returns map of all signers across all quorums type QuorumAttestation struct { // QuorumAggPubKeys contains the aggregated public keys for all of the operators each quorum, // including those that did not sign QuorumAggPubKey map[QuorumID]*G1Point - // SignersAggPubKey is the aggregated public key for all of the operators that signed the message for each quorum, - // further aggregated across the quorums; operators signing for multiple quorums will be included in - // the aggregation multiple times + // SignersAggPubKey is the aggregated public key for all of the operators that signed the message by each quorum SignersAggPubKey map[QuorumID]*G2Point // AggSignature is the aggregated signature for all of the operators that signed the message for each quorum, mirroring the // SignersAggPubKey. diff --git a/disperser/batcher/batcher.go b/disperser/batcher/batcher.go index 25516c4261..3f421dc8ca 100644 --- a/disperser/batcher/batcher.go +++ b/disperser/batcher/batcher.go @@ -596,7 +596,9 @@ func (b *Batcher) getBatchID(ctx context.Context, txReceipt *types.Receipt) (uin return batchID, nil } -// numBlobsAttestedByQuorum returns the number of blobs that have been successfully attested by the given quorums +// numBlobsAttestedByQuorum returns two values: +// 1. the number of blobs that have been successfully attested by all quorums +// 2. map[QuorumID]int mapping a quorum to the number of blobs that have been successfully attested by the quorum func numBlobsAttestedByQuorum(signedQuorums map[core.QuorumID]*core.QuorumResult, headers []*core.BlobHeader) (int, map[core.QuorumID]int) { numPassed := 0 quorumCounts := make(map[core.QuorumID]int)