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

test(eth): fix bloom filter test flake #12643

Merged
merged 1 commit into from
Oct 26, 2024
Merged

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Oct 25, 2024

Related Issues

Proposed Changes

Fix the flaky bloom filter test.

The mask changes based on the address of the deployed actor. In this test, this address is not constant because we don't deploy with CREATE2.

Instead of checking bits and then counting the number of bits, just re-create the expected bloom filter and verify that it's correct.

NOTE: the original test was broken because it expected 6 bits: 3 from the topic, 3 from the address. But bloom filters are probabilistic and we could have anywhere from 3-6 bits depending on how many collisions we get.

Checklist

Before you mark the PR ready for review, please make sure that:

The mask changes based on the address of the deployed actor. In this
test, this address is not constant because we don't deploy with CREATE2.

Instead of checking bits and then counting the number of bits, just
re-create the expected bloom filter and verify that it's correct.

NOTE: the original test was broken because it expected 6 bits: 3 from
the topic, 3 from the address. But bloom filters are probabilistic and
we could have anywhere from 3-6 bits depending on how many collisions we
get.
@Stebalien Stebalien added the skip/changelog This change does not require CHANGELOG.md update label Oct 25, 2024
@Stebalien
Copy link
Member Author

CI (the eth conformance test, specifically) is going to fail because #12642

@Stebalien Stebalien merged commit 29a131c into master Oct 26, 2024
84 of 87 checks passed
@Stebalien Stebalien deleted the steb/fix-bloom-flake branch October 26, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip/changelog This change does not require CHANGELOG.md update
Projects
Status: ☑️ Done (Archive)
Development

Successfully merging this pull request may close these issues.

2 participants