You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #6711: feat: auto-enable BIP157 block filters for masternodes only
2b17480 fix(tests): add feature_masternode_params.py to test runner (pasta)
bcff97a test: remove unused import from feature_masternode_params (pasta)
fcd1b8c doc: add disk space requirement note to release notes (pasta)
cec4ae0 test: address code review feedback for feature_masternode_params (pasta)
4e33c24 fix: specify utf8 (pasta)
ac5c499 chore: trailing whitespace (pasta)
2fabaa9 fix: Address code review feedback for masternode-only BIP157 (pasta)
90ef2d5 refactor: Enable BIP157 block filters only for masternodes (pasta)
d40ae45 test: fix tests incompatible with default peerblockfilters=1 (pasta)
d6c11f0 test: fix feature_index_prune.py for new peerblockfilters default (pasta)
2a88db9 test: Fix feature_index_prune.py to explicitly disable indices (pasta)
4412ced test: Fix feature_index_prune.py to work with new blockfilterindex defaults (pasta)
e6e9ff8 test: Fix functional tests to work with new blockfilterindex defaults (pasta)
ef2a1e3 Fix initialization error when using default blockfilterindex value (pasta)
fbde721 docs: Fix PR number in release notes - rename to 6711 (pasta)
0274cd2 docs: Add release notes for PR #6708 (pasta)
ac7e03e Enable BIP157 block filters index and serving by default (pasta)
Pull request description:
## Issue being fixed or feature implemented
This pull request introduces automatic enabling of BIP157 compact block filters specifically for masternodes to improve privacy and functionality for light clients connecting to them. Regular nodes retain the existing default settings.
## What was done?
- **Automatic Enablement for Masternodes**: When a node is configured as a masternode (via `-masternodeblsprivkey`), both `-peerblockfilters` and `-blockfilterindex=basic` are now automatically enabled.
- **Regular Nodes Unchanged**: Regular (non-masternode) nodes keep the previous defaults with both options disabled (`-peerblockfilters=false` and `-blockfilterindex=0`).
- **Opt-out Available**: Masternodes can still explicitly disable these features if needed by setting `-peerblockfilters=0` or `-blockfilterindex=0`.
- **Release Notes**: Updated to clearly document this masternode-specific behavior and the ~1GB disk space requirement for the block filter index.
- **Tests**: Added functional test to verify the parameter interactions and that the settings are correctly applied only to masternodes.
## How Has This Been Tested?
- Built locally
- Added new functional test `feature_masternode_params.py` that verifies:
- Regular nodes have filters disabled by default
- Masternodes have filters auto-enabled
- Masternodes can explicitly disable filters
- Parameter interaction logging works correctly
## Breaking Changes
None - this only affects masternodes and they can opt out if needed.
## Checklist:
_Go over all the following points, and put an `x` in all the boxes that apply._
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e tests
- [x] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
UdjinM6:
utACK 2b17480
Tree-SHA512: 6a11305cf54c7584de4ca8dbe520e022e23f211ec6b0e2ee7679073f75a465ead927814f3f01f77e8576f96a187167511204d1906d380937f98310948933dc83
argsman.AddArg("-txindex", strprintf("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)", DEFAULT_TXINDEX), ArgsManager::ALLOW_ANY, OptionsCategory::INDEXING);
557
557
argsman.AddArg("-blockfilterindex=<type>",
558
558
strprintf("Maintain an index of compact filters by block (default: %s, values: %s).", DEFAULT_BLOCKFILTERINDEX, ListBlockFilterTypes()) +
559
-
" If <type> is not supplied or if <type> = 1, indexes for all known types are enabled.",
559
+
" If <type> is not supplied or if <type> = 1, indexes for all known types are enabled." +
560
+
" Automatically enabled for masternodes with value 'basic'.",
argsman.AddArg("-asmap=<file>", strprintf("Specify asn mapping used for bucketing of the peers (default: %s). Relative paths will be prefixed by the net-specific datadir location.", DEFAULT_ASMAP_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
argsman.AddArg("-i2pacceptincoming", strprintf("Whether to accept inbound I2P connections (default: %i). Ignored if -i2psam is not set. Listening for inbound I2P connections is done through the SAM proxy, not by binding to a local address and port.", DEFAULT_I2P_ACCEPT_INCOMING), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
589
590
argsman.AddArg("-onlynet=<net>", "Make automatic outbound connections only to network <net> (" + Join(GetNetworkNames(), ", ") + "). Inbound and manual connections are not affected by this option. It can be specified multiple times to allow multiple networks.", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
590
591
argsman.AddArg("-v2transport", strprintf("Support v2 transport (default: %u)", DEFAULT_V2_TRANSPORT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
591
-
argsman.AddArg("-peerblockfilters", strprintf("Serve compact block filters to peers per BIP 157 (default: %u)", DEFAULT_PEERBLOCKFILTERS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
592
+
argsman.AddArg("-peerblockfilters", strprintf("Serve compact block filters to peers per BIP 157 (default: %u, automatically enabled for masternodes)", DEFAULT_PEERBLOCKFILTERS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
592
593
argsman.AddArg("-peerbloomfilters", strprintf("Support filtering of blocks and transaction with bloom filters (default: %u)", DEFAULT_PEERBLOOMFILTERS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
argsman.AddArg("-peertimeout=<n>", strprintf("Specify a p2p connection timeout delay in seconds. After connecting to a peer, wait this amount of time before considering disconnection based on inactivity (minimum: 1, default: %d)", DEFAULT_PEER_CONNECT_TIMEOUT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
0 commit comments