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

Handle some errors from hasSeenBit and insertSeenBit differently #15018

Merged
merged 3 commits into from
Mar 6, 2025

Conversation

rkapka
Copy link
Contributor

@rkapka rkapka commented Mar 6, 2025

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
{"error":"bitlists are different lengths","message":"Could not delete expired unaggregated attestation","prefix":"pool/attestations","severity":"ERROR"}

The above error results in the pool not removing old attestations: image

Not being able to pack attestations into blocks
"error":"rpc error: code = Internal desc = Could not get attestations to pack into block: could not get unaggregated attestations: bitlists are different lengths","message":"Could not pack deposits and attestations","prefix":"rpc/validator","severity":"ERROR"
Other
Could not prepare attestations for fork choice error=bitlists are different lengths
ERROR could not aggregate unaggregated attestations error=could not get aggregation bits: bitlists are different lengths
time="2024-05-14 11:49:50" level=error msg="could not prune attestations from pool" error="bitlists are different lengths" prefix=blockchain

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.

  • hasSeenBit returns an error inside UnaggregatedAttestations --> log the error and ignore the attestation
  • insertSeenBit returns an error inside DeleteUnaggregatedAttestation --> log the error and continue (attestation will be deleted)
  • hasSeenBit returns an error inside DeleteSeenUnaggregatedAttestations --> log the error and mark the attestation as seen (attestation will be deleted)

Acknowledgements

@rkapka rkapka requested a review from a team as a code owner March 6, 2025 13:31
@rkapka rkapka added the Electra electra hardfork label Mar 6, 2025
@rkapka rkapka force-pushed the ignore-bit-error branch from c8832dc to 26e23e8 Compare March 6, 2025 13:33
Copy link
Member

@terencechain terencechain left a 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

Copy link
Contributor

@potuz potuz left a comment

Choose a reason for hiding this comment

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

LGTM

@rkapka
Copy link
Contributor Author

rkapka commented Mar 6, 2025

@terencechain There are other usages of both functions where we discontinue on error

@rkapka rkapka added this pull request to the merge queue Mar 6, 2025
Merged via the queue into develop with commit f89afb0 Mar 6, 2025
17 checks passed
@rkapka rkapka deleted the ignore-bit-error branch March 6, 2025 22:57
rkapka added a commit that referenced this pull request Mar 19, 2025
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Electra electra hardfork
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants