Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort quorum IDs before aggregation #375

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/aggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (a *StdSignatureAggregator) AggregateSignatures(ctx context.Context, state

// If operator is not in quorum, skip
if !ok {
a.Logger.Error("Operator not found in quorum", "operatorID", operatorIDHex, "operatorAddress", operatorAddr, "socket", socket)
a.Logger.Error("Operator not found in quorum", "operatorID", operatorIDHex, "operatorAddress", operatorAddr, "socket", socket, "quorumID", id)
continue
}

Expand Down
2 changes: 2 additions & 0 deletions disperser/batcher/batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"math"
"math/big"
"slices"
"time"

"github.com/Layr-Labs/eigenda/common"
Expand Down Expand Up @@ -426,6 +427,7 @@ func (b *Batcher) HandleSingleBatch(ctx context.Context) error {
for quorumID := range batch.State.Operators {
quorumIDs = append(quorumIDs, quorumID)
}
slices.Sort(quorumIDs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, what happens if they aren't sorted?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QuorumApks can be out of order and signature validation can fail


stageTimer = time.Now()
aggSig, err := b.Aggregator.AggregateSignatures(ctx, batch.State, quorumIDs, headerHash, update)
Expand Down
Loading