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

hotfix: resolve ambiguity in signature result #1763

Open
wants to merge 3 commits into
base: testnet
Choose a base branch
from
Open
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
10 changes: 6 additions & 4 deletions aggregator/pkg/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (agg *Aggregator) ProcessOperatorSignedTaskResponseV2(signedTaskResponse *t
defer cancel() // Ensure the cancel function is called to release resources

// Create a channel to signal when the task is done
done := make(chan struct{})
done := make(chan uint8)

agg.logger.Info("Starting bls signature process")
go func() {
Expand All @@ -92,9 +92,11 @@ func (agg *Aggregator) ProcessOperatorSignedTaskResponseV2(signedTaskResponse *t

if err != nil {
agg.logger.Warnf("BLS aggregation service error: %s", err)
done<- 1
// todo shouldn't we here close the channel with a reply = 1?
} else {
agg.logger.Info("BLS process succeeded")
done<- 0
}

close(done)
Expand All @@ -106,10 +108,10 @@ func (agg *Aggregator) ProcessOperatorSignedTaskResponseV2(signedTaskResponse *t
case <-ctx.Done():
// The context's deadline was exceeded or it was canceled
agg.logger.Info("Bls process timed out, operator signature will be lost. Batch may not reach quorum")
case <-done:
case res := <-done:
// The task completed successfully
agg.logger.Info("Bls context finished correctly")
*reply = 0
agg.logger.Info("Bls context finished on time")
*reply = res
}

return nil
Expand Down