rust-create-cascade: invert blocks where more than 2/3 of known certs are revoked - #389
Merged
Merged
Conversation
Collaborator
Author
|
Depends on mozilla/clubcard#8 |
mozkeeler
approved these changes
Jul 31, 2026
mozkeeler
left a comment
Collaborator
There was a problem hiding this comment.
LGTM - just a couple of comments.
| let clubcard = | ||
| CRLiteClubcard::from_bytes(&clubcard_bytes).expect("cannot deserialize clubcard"); | ||
| let issuer_bytes = decode_issuer(&issuer); | ||
| assert!(clubcard.as_ref().index()[issuer_bytes.as_slice()].inverted); |
Collaborator
There was a problem hiding this comment.
Should we also check that e.g. the clubcard in the previous test isn't inverted?
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.
(Stacked on top of #388)
The clubcard crate has long supported "inverted blocks" which encode the complement of a set rather than the set itself. Prior to this PR we were only using an inverted block when all of the known certificates for a CA were revoked. This PR uses an inverted block whenever doing so drops the expected size of a filter.
For the 2026-07-27-0 data set, this increases the number of inverted blocks from 19 to 47 and it decreases the filter size by 24 kB. Much larger savings can be expected during mass revocation events.
Encoding an inverted block requires an extra pass over the set of known certificates. This is, at worst, a factor 2 increase in runtime. In practice, the runtime of filter generation is dominated by a few large CAs with small revocation rates, and the runtime increase from handling the few small CAs with high revocation rates is negligible.