-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: enable bip157 filters by default #6711
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
base: develop
Are you sure you want to change the base?
feat: enable bip157 filters by default #6711
Conversation
WalkthroughThe changes update default configuration values to enable BIP157 compact block filters by default. Specifically, the default for the 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This change enables compact block filters (BIP157) functionality by default: - Sets DEFAULT_BLOCKFILTERINDEX to "basic" instead of "0" - Sets DEFAULT_PEERBLOCKFILTERS to true instead of false This improves privacy for light clients and enables better pruned node support.
Documents the change to enable BIP157 block filters by default.
Updates the release notes file name and PR reference from 6708 to 6711.
When blockfilterindex defaults to "basic" but no explicit command line argument is provided, GetArgs("-blockfilterindex") returns an empty vector. This caused the validation logic to fail with "Cannot set -peerblockfilters without -blockfilterindex" error. Add check for empty names vector and use the default value when needed.
Three tests needed updates to work with the new defaults where -blockfilterindex=basic and -peerblockfilters=true: - p2p_blockfilters.py: Explicitly disable peerblockfilters for node 1 which doesn't serve compact filters - rpc_getblockfilter.py: Explicitly disable both options for nodes that should not have block filter index - rpc_misc.py: Explicitly disable both options when testing the absence of indices 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
9663948
to
e6e9ff8
Compare
…faults Node 1 was configured with only -coinstatsindex=1, but with the new defaults it was also getting -blockfilterindex=basic enabled. The test expects node 1 to only have coinstatsindex, so we need to explicitly disable blockfilterindex and peerblockfilters. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
When BIP157 filters are enabled by default, the restart_without_indices function needs to explicitly disable both blockfilterindex and coinstatsindex to avoid conflicts with pruning.
With peerblockfilters now enabled by default, the test must explicitly disable it when disabling blockfilterindex to avoid initialization errors. Co-Authored-By: Claude <[email protected]>
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
Issue being fixed or feature implemented
This pull request introduces updates to improve privacy and functionality for light clients and pruned nodes by serving BIP157 compact block filters by default. The changes update default settings and configuration values to reflect this enhancement.
What was done?
Release Notes: Updated the release notes to highlight that BIP157 compact block filters are now enabled by default. The
-blockfilterindex
option defaults tobasic
instead of0
(disabled), and the-peerblockfilters
option defaults totrue
instead offalse
. This change improves privacy for light clients and enhances support for pruned nodes.Default Peer Block Filters: Changed the default value of
DEFAULT_PEERBLOCKFILTERS
fromfalse
totrue
in the network processing configuration.Default Block Filter Index: Updated the default value of
DEFAULT_BLOCKFILTERINDEX
from"0"
to"basic"
in the validation configuration.How Has This Been Tested?
Built locally
Breaking Changes
None
Checklist:
Go over all the following points, and put an
x
in all the boxes that apply.