throw 503 error when submit attestation and sync committee are called on syncing node + align changes to gRPC - #16152
Merged
Merged
Conversation
james-prysm
marked this pull request as ready for review
December 17, 2025 21:53
james-prysm
commented
Dec 17, 2025
| ctx, span := trace.StartSpan(r.Context(), "beacon.SubmitPoolSyncCommitteeSignatures") | ||
| defer span.End() | ||
|
|
||
| if shared.IsSyncing(ctx, w, s.SyncChecker, s.HeadFetcher, s.TimeFetcher, s.OptimisticModeFetcher) { |
Contributor
Author
There was a problem hiding this comment.
should i break this out? this is for /eth/v1/beacon/pool/sync_committees
Contributor
Author
There was a problem hiding this comment.
I wonder if the sync commitee cache should also be checked here
james-prysm
commented
Dec 17, 2025
| } else { | ||
| if err = s.AttestationsPool.SaveUnaggregatedAttestation(att); err != nil { | ||
| log.WithError(err).Error("Could not save attestation") | ||
| committee, err := corehelpers.BeaconCommitteeFromState(context.Background(), targetState, singleAtt.Data.Slot, singleAtt.CommitteeId) |
Contributor
Author
There was a problem hiding this comment.
changed context to background so that it doesn't get context deadlined
rkapka
reviewed
Dec 18, 2025
| } | ||
| } | ||
| } | ||
| }(broadcastedAttestations) |
Contributor
There was a problem hiding this comment.
We should try saving all validAttestations, not just broadcasted ones. Also there is no need for the goroutine to have a parameter, you can loop over validAttestations inside the goroutine
| go func() { | ||
| attCopy := att.Copy() | ||
| go func() { | ||
| attCopy := att.Copy() |
Contributor
There was a problem hiding this comment.
Can you move the copy to the else branch, just as it was originally? The experimental pool doesn't need it
rkapka
approved these changes
Dec 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
Prysm starting throwing this error
Could not write response message" error="write tcp 10.104.92.212:5052->10.104.92.196:41876: write: broken pipebecause a validator got attestation data from a synced node and submitted attestation to a syncing node, when the node couldn't replay the state the validator context deadlined and disconnected but the writer when it finally responded tries to write it gets this broken pipe error.applies to
/eth/v2/beacon/pool/attestationsand/eth/v1/beacon/pool/sync_committeesthe solution is 2 part.
Tested manually running kurtosis with rest validators
Which issues(s) does this PR fix?
Fixes #
Other notes for review
Acknowledgements