Closed Bug 1620621 (blocklist-v3) Opened 4 years ago Closed 4 years ago

Use cascade bloom filters in add-on blocklist

Categories

(Toolkit :: Blocklist Implementation, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

(Blocks 3 open bugs)

Details

Attachments

(8 files)

To improve the performance and scalability of the add-on blocklist, we're going to replace the current JSON blocklist (and its predecessor, the XML blocklist) with a blocklist based on cascade bloom filters (inspired by CRLite).

We will drop unused features. The only supported operation is querying whether a given add-on is blocked. In particular, the block reason won't be part of the blocklist data itself, but can be looked up on demand.

PRD: https://docs.google.com/document/d/12wGjFjscu2pixwt795aHAyoswHsQzztzVUzWjiQz4vg/edit

Blocks: 1620580
Blocks: 1589535
Blocks: 1505852
Depends on: 1624995
Depends on: 1626636
Depends on: 1630682
Depends on: 1631008

With this piece, it is now possible for RemoteSettings clients to always
have a valid attachment.

NOTE: This commit does not yet include a dump of the RemoteSettings
collection and attachment. This will be added in the near future.

Depends on: 1633403
Blocks: 1634127
Attachment #9143153 - Attachment description: Bug 1620621 - Add downloadWithCache helper to RemoteSettings → Bug 1620621 - Add caching and recovery mechanisms to RemoteSettings's download() method

The MLBF (addons-mlbf.bin) itself is 64 KB.
Together with the metadata, this is 65 KB.
In contrast, the current JSON-based dump (addons.json) is 913 KB.

These two tests use the Kinto client to access the RemoteSettings
database. However, due to the database version bump from D72416,
the kinto client is no longer compatible with the RemoteSettings
database.

This will be fixed in bug 1634203.

Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/bbc991f09d5d
Add XPCOM FFI for rust_cascade r=emilio,vporof
https://hg.mozilla.org/integration/autoland/rev/723a3b4e7bbf
Add caching and recovery mechanisms to RemoteSettings's download() method r=Gijs,leplatrem
https://hg.mozilla.org/integration/autoland/rev/90c08438be0a
Add support for fallback to dumps for attachments r=Gijs,leplatrem
https://hg.mozilla.org/integration/autoland/rev/1a28d1de8f76
Add bloomfilter-based blocklist for addons r=Gijs,aswan
https://hg.mozilla.org/integration/autoland/rev/7abf836343be
Unit tests for MLBF-based blocklist r=Gijs
https://hg.mozilla.org/integration/autoland/rev/cfde27a748fd
Implement blocklist stashing behind pref r=Gijs
https://hg.mozilla.org/integration/autoland/rev/8b4e286967c0
Add initial dump of addons blocklist r=Gijs
https://hg.mozilla.org/integration/autoland/rev/06fccc75c09e
Temporarily disable 2 RemoteSettings tests r=glasserc
Attachment #9144500 - Attachment description: Bug 1620621 - Temporarily disable 2 RemoteSettings tests → Bug 1620621 - Temporarily disable test_remote_settings_poll.js
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/80dcb089ce8e
Add XPCOM FFI for rust_cascade r=emilio,vporof
https://hg.mozilla.org/integration/autoland/rev/12817823a3c9
Add caching and recovery mechanisms to RemoteSettings's download() method r=Gijs,leplatrem
https://hg.mozilla.org/integration/autoland/rev/e0f3e057b311
Add support for fallback to dumps for attachments r=Gijs,leplatrem
https://hg.mozilla.org/integration/autoland/rev/206ad824e1bc
Add bloomfilter-based blocklist for addons r=Gijs,aswan
https://hg.mozilla.org/integration/autoland/rev/c23703684254
Unit tests for MLBF-based blocklist r=Gijs
https://hg.mozilla.org/integration/autoland/rev/6df42b7528ec
Implement blocklist stashing behind pref r=Gijs
https://hg.mozilla.org/integration/autoland/rev/56b2b19a9bc1
Add initial dump of addons blocklist r=Gijs
https://hg.mozilla.org/integration/autoland/rev/14a57e32c414
Temporarily disable test_remote_settings_poll.js r=glasserc
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/15049f81c652
Add XPCOM FFI for rust_cascade r=emilio,vporof
https://hg.mozilla.org/integration/autoland/rev/c0a18dbb6c50
Add caching and recovery mechanisms to RemoteSettings's download() method r=Gijs,leplatrem
https://hg.mozilla.org/integration/autoland/rev/c4a4b03a7647
Add support for fallback to dumps for attachments r=Gijs,leplatrem
https://hg.mozilla.org/integration/autoland/rev/2a8f00adf40e
Add bloomfilter-based blocklist for addons r=Gijs,aswan
https://hg.mozilla.org/integration/autoland/rev/061107092afd
Unit tests for MLBF-based blocklist r=Gijs
https://hg.mozilla.org/integration/autoland/rev/55b40420f1b5
Implement blocklist stashing behind pref r=Gijs
https://hg.mozilla.org/integration/autoland/rev/ae10e6fa5a55
Add initial dump of addons blocklist r=Gijs
https://hg.mozilla.org/integration/autoland/rev/d34716786f5b
Temporarily disable test_remote_settings_poll.js r=glasserc

The initial backout was due to bug 1620621, which addressed by a work-around in the test.

The build failures for the second backout is due to Lando zeroing the binary from the "initial dump" commit. I fixed that by pushing my local commits to Phabricator and relanded.

Flags: needinfo?(rob)
Depends on: 1634671
Depends on: 1634700
Depends on: 1636158
Blocks: 1639050

With this flag enabled it's not possible to re-enable a blocked extension like it was before

(In reply to tbodt from comment #17)

With this flag enabled it's not possible to re-enable a blocked extension like it was before

Previously, there was the concept of "hard block" and "soft block", with the latter being optional. In practice, soft-blocking was not used for new blocks any more, so the new implementation only supports hard blocks. If you have a situation where an add-on was unexpectedly blocked, please file a new bug with an example of the blocked add-on and cc me on it.

Blocks: 1649906
Depends on: 1650825
Depends on: 1652852
See Also: → 1654581
Depends on: 1757069
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: