Skip to content

Add fuzz testing for bloom filter folding#8

Closed
alamb wants to merge 1 commit intopydantic:bloom-filter-foldingfrom
alamb:alamb/bloom-filter-fuzz
Closed

Add fuzz testing for bloom filter folding#8
alamb wants to merge 1 commit intopydantic:bloom-filter-foldingfrom
alamb:alamb/bloom-filter-fuzz

Conversation

@alamb
Copy link
Copy Markdown

@alamb alamb commented Apr 1, 2026

This is a fuzz test I wrote to prove to myself that the bloom filter auto sizing in the following PR is correct

Right now I think this takes too long to run

folded.fold_to_target_fpp(target_fpp);

// Recreate the SBBF with the same block size
let folded_bytes = folded.0.len() * size_of::<Block>();
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I also verified manually that this test covers different size

Testing ndv 5990 target_fpp 0.999, folded 1024 bytes
Testing ndv 19130 target_fpp 0.0001, folded 65536 bytes
Testing ndv 19130 target_fpp 0.001, folded 65536 bytes
Testing ndv 19130 target_fpp 0.1, folded 16384 bytes
Testing ndv 19130 target_fpp 0.2, folded 16384 bytes
Testing ndv 19130 target_fpp 0.9, folded 8192 bytes
Testing ndv 19130 target_fpp 0.99, folded 4096 bytes
Testing ndv 19130 target_fpp 0.999, folded 2048 bytes
Testing ndv 1809 target_fpp 0.0001, folded 8192 bytes
Testing ndv 1809 target_fpp 0.001, folded 4096 bytes
Testing ndv 1809 target_fpp 0.1, folded 2048 bytes
Testing ndv 1809 target_fpp 0.2, folded 2048 bytes
Testing ndv 1809 target_fpp 0.9, folded 512 bytes
Testing ndv 1809 target_fpp 0.99, folded 256 bytes
Testing ndv 1809 target_fpp 0.999, folded 256 bytes

@alamb alamb force-pushed the alamb/bloom-filter-fuzz branch from 8c3b8e4 to 76bafd2 Compare April 6, 2026 18:07
@adriangb
Copy link
Copy Markdown
Member

adriangb commented Apr 6, 2026

Just checking, do you want to commit this? We already have a test in the PR that verifies equivalence between a folded filter and an originally smaller filter.

@alamb
Copy link
Copy Markdown
Author

alamb commented Apr 7, 2026

No I don't think we should commit this -- it takes too long. I think it was more of a review exercise for me than anything else.

Tanks for checking

@alamb alamb closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants