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

Fetch unaggregated atts in GetAggregateAttestation #13533

Merged
merged 2 commits into from
Jan 26, 2024
Merged

Conversation

rkapka
Copy link
Contributor

@rkapka rkapka commented Jan 26, 2024

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

While running the REST VC, many times signature aggregation failed with the Could not get matching attestation error, even though the aggregator did send a matching attestation for the slot. In the implementation of the same functionality in v1alpha1 we don't aggregate first, but we try to find a matching aggregated att first, and then an unaggregated one as a fallback. After implementing the same behavior, there are no more errors observed.

@rkapka rkapka added Ready For Review A pull request ready for code review API Api related tasks labels Jan 26, 2024
@rkapka rkapka requested a review from a team as a code owner January 26, 2024 15:36
return
}
if bytes.Equal(root[:], attDataRoot) {
if bestMatchingAtt == nil || len(att.AggregationBits) > len(bestMatchingAtt.AggregationBits) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The extracted function doesn't have the bits check because they can't be different - otherwise the root wouldn't match.

@rkapka rkapka enabled auto-merge January 26, 2024 16:37
@@ -51,53 +51,67 @@ func (s *Server) GetAggregateAttestation(w http.ResponseWriter, r *http.Request)
return
}

if err := s.AttestationsPool.AggregateUnaggregatedAttestations(ctx); err != nil {
Copy link
Contributor

@james-prysm james-prysm Jan 26, 2024

Choose a reason for hiding this comment

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

note: found out this was just wrong before in the gRPC implementation of GetAggregateAttestation, instead we should be looking at the business logic of SubmitAggregateSelectionProof in v1alpha1

@rkapka rkapka added this pull request to the merge queue Jan 26, 2024
Merged via the queue into develop with commit 1b70d2b Jan 26, 2024
17 checks passed
@rkapka rkapka deleted the fix-att-aggregation branch January 26, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Api related tasks Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants