-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Handle some errors from hasSeenBit and insertSeenBit differently
#15018
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
Conversation
terencechain
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about DeleteAggregatedAttestation?
It seems to me another way of doing this is the following, I'm not sure if we have considered it?
insertSeenBit(att ethpb.Att) error -> insertSeenBit(att ethpb.Att)
hasSeenBit(att ethpb.Att) (bool, error) -> hasSeenBit(att ethpb.Att) bool
potuz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@terencechain There are other usages of both functions where we discontinue on error |
…ffchainLabs#15018) * Ignore errors from `hasSeenBit` and don't pack unaggregated attestations * changelog <3 * Revert "Ignore errors from `hasSeenBit` and don't pack unaggregated attestations" This reverts commit dc86cb6.
…ffchainLabs#15018) * Ignore errors from `hasSeenBit` and don't pack unaggregated attestations * changelog <3 * Revert "Ignore errors from `hasSeenBit` and don't pack unaggregated attestations" This reverts commit dc86cb6.
What type of PR is this?
Change
What does this PR do? Why is it needed?
Problem
During the Holesky incident, we saw a lot errors about attestation bitlists having different lengths.
Number of attestations in the pool growing over time
The above error results in the pool not removing old attestations:
Not being able to pack attestations into blocks
Other
Solution
It is currently not known how we can end up in a state where committee bits of attestations have different lengths. This PR attempts to reduce the severity of negative effects of being in such a state.
hasSeenBitreturns an error insideUnaggregatedAttestations--> log the error and ignore the attestationinsertSeenBitreturns an error insideDeleteUnaggregatedAttestation--> log the error and continue (attestation will be deleted)hasSeenBitreturns an error insideDeleteSeenUnaggregatedAttestations--> log the error and mark the attestation as seen (attestation will be deleted)Acknowledgements