-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: auto-enable BIP157 block filters for masternodes only #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
feat: auto-enable BIP157 block filters for masternodes only #6711
Conversation
WalkthroughWhen a node is configured as a masternode via -masternodeblsprivkey, the build now soft-sets -peerblockfilters=1 and -blockfilterindex=basic and logs those actions. Help text for -blockfilterindex and -peerblockfilters in src/init.cpp was extended to note the automatic enabling for masternodes. Release notes document the change. A new functional test (test/functional/feature_masternode_params.py) checks regular-node defaults, automatic enabling for masternodes, explicit disablement with -peerblockfilters=0 and -blockfilterindex=0, and the presence of the expected log entry. test_runner.py was updated to include the new test in EXTENDED_SCRIPTS. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)test/functional/**/*.py📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-06-09T16:43:20.996ZApplied to files:
⏰ 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)
🔇 Additional comments (1)
✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type 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. |
The PR enables peerblockfilters=1 by default, which also enables blockfilterindex. This is incompatible with -reindex-chainstate. Add -blockfilterindex=0 to tests that use -reindex-chainstate to ensure they can run successfully with the new default. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Instead of enabling peerblockfilters by default for all nodes, this change: - Keeps DEFAULT_PEERBLOCKFILTERS as false (unchanged from current behavior) - Automatically enables peerblockfilters and blockfilterindex for masternodes - Allows masternodes to still explicitly disable with -peerblockfilters=0 This approach: - Deploys block filters to the nodes that provide the majority of network services - Avoids breaking changes for regular nodes - Follows existing Dash patterns (like auto-disabling wallet for masternodes) - Eliminates the need for extensive test suite modifications The parameter interaction happens in InitParameterInteraction() where masternodes (identified by -masternodeblsprivkey) automatically get: - peerblockfilters=1 - blockfilterindex=basic 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
src/init.cpp (1)
1150-1167: Harden multi-arg parsing for “-blockfilterindex”Recognize any empty (
-blockfilterindex) or “1” entries in a mixed list as “all types” to avoid spurious “Unknown … value” errors when users combine-blockfilterindexforms.Locations:
- src/init.cpp around lines 1150–1167
Recommended diff:
// parse and validate enabled filter types std::string blockfilterindex_value = args.GetArg("-blockfilterindex", DEFAULT_BLOCKFILTERINDEX); if (blockfilterindex_value == "" || blockfilterindex_value == "1") { g_enabled_filter_types = AllBlockFilterTypes(); } else if (blockfilterindex_value != "0") { - std::vector<std::string> names = args.GetArgs("-blockfilterindex"); - if (names.empty()) { - // Use default value when no explicit -blockfilterindex was provided - names.push_back(DEFAULT_BLOCKFILTERINDEX); - } - for (const auto& name : names) { - BlockFilterType filter_type; - if (!BlockFilterTypeByName(name, filter_type)) { - return InitError(strprintf(_("Unknown -blockfilterindex value %s."), name)); - } - g_enabled_filter_types.insert(filter_type); - } + std::vector<std::string> names = args.GetArgs("-blockfilterindex"); + if (names.empty()) { + // No explicit entries: fall back to the default type + names.push_back(DEFAULT_BLOCKFILTERINDEX); + } + // If any entry is empty or "1", treat as “all types” + bool any_all = std::any_of(names.begin(), names.end(), + [](const std::string& n){ return n.empty() || n == "1"; }); + if (any_all) { + g_enabled_filter_types = AllBlockFilterTypes(); + } else { + for (const auto& name : names) { + BlockFilterType filter_type; + if (!BlockFilterTypeByName(name, filter_type)) { + return InitError(strprintf(_("Unknown -blockfilterindex value %s."), name)); + } + g_enabled_filter_types.insert(filter_type); + } + } }
🧹 Nitpick comments (2)
src/init.cpp (2)
1029-1031: Use DEFAULT_BLOCKFILTERINDEX instead of hardcoded "basic" for consistencyPrefer the constant over a literal to avoid divergence if the default is adjusted later.
Apply this diff:
- if (args.SoftSetArg("-blockfilterindex", "basic")) { - LogPrintf("%s: parameter interaction: -masternodeblsprivkey set -> setting -blockfilterindex=basic\n", __func__); + if (args.SoftSetArg("-blockfilterindex", DEFAULT_BLOCKFILTERINDEX)) { + LogPrintf("%s: parameter interaction: -masternodeblsprivkey set -> setting -blockfilterindex=%s\n", __func__, DEFAULT_BLOCKFILTERINDEX); }
1025-1031: Minor: Soft-setting -peerblockfilters may be redundant now that it defaults to trueWith DEFAULT_PEERBLOCKFILTERS flipped to true, this SoftSetBoolArg typically won’t change anything. Keeping it is harmless and documents intent, but consider dropping it to reduce noise, or add a short comment noting it’s a no-op when using defaults.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/init.cpp(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/**/*.{cpp,h,cc,cxx,hpp}
📄 CodeRabbit Inference Engine (CLAUDE.md)
src/**/*.{cpp,h,cc,cxx,hpp}: Dash Core C++ codebase must be written in C++20 and require at least Clang 16 or GCC 11.1
Dash uses unordered_lru_cache for efficient caching with LRU eviction
Files:
src/init.cpp
⏰ 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)
- GitHub Check: arm-linux-gnueabihf / Build depends
- GitHub Check: x86_64-pc-linux-gnu_nowallet / Build depends
- GitHub Check: x86_64-pc-linux-gnu_multiprocess / Build depends
- GitHub Check: Lint / Run linters
- GitHub Check: x86_64-w64-mingw32 / Build depends
- GitHub Check: x86_64-apple-darwin / Build depends
- GitHub Check: x86_64-pc-linux-gnu / Build depends
🔇 Additional comments (1)
src/init.cpp (1)
1021-1031: Good parameter interaction for masternodes: enabling filters aligns with serving BIP157Enabling -peerblockfilters and -blockfilterindex=basic when -masternodeblsprivkey is set ensures masternodes can advertise and serve compact filters. This pairs well with the later validation that requires Bloom filters and txindex for masternodes.
- Update release notes to accurately describe masternode-only behavior - Revert DEFAULT_BLOCKFILTERINDEX back to "0" (non-masternodes don't need it) - Add help text mentioning automatic enabling for masternodes - Add functional test to verify masternode parameter interactions - Remove unnecessary code for handling empty blockfilterindex names These changes ensure the feature is properly documented and tested, while keeping the implementation focused on masternodes only. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (3)
src/init.cpp (1)
558-560: Help text addition looks good; minor wording nitThe new guidance is helpful. Minor nit: consider quoting the literal value for clarity (“if is not supplied or if = '1' …”).
Apply this minimal tweak to improve readability:
- " If <type> is not supplied or if <type> = 1, indexes for all known types are enabled." + + " If <type> is not supplied or if <type> = '1', indexes for all known types are enabled." +test/functional/feature_masternode_params.py (2)
12-12: Remove unused import flagged by lintersassert_equal is imported but unused. This triggers Ruff/Flake8 F401.
Apply this diff:
-from test_framework.util import assert_equal
58-63: Explicit disable scenario looks good; keep -txindex=1 to satisfy masternode constraintsEven when disabling filters, node1 is still a masternode; keep -txindex=1 to satisfy startup checks.
Apply this diff:
self.restart_node(1, extra_args=[ f"-masternodeblsprivkey={bls_key}", + "-txindex=1", "-peerblockfilters=0", "-blockfilterindex=0" ])
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
doc/release-notes-6711.md(1 hunks)src/init.cpp(3 hunks)test/functional/feature_masternode_params.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
test/functional/**/*.py
📄 CodeRabbit Inference Engine (CLAUDE.md)
Functional tests should be written in Python and placed in test/functional/
Files:
test/functional/feature_masternode_params.py
doc/**
📄 CodeRabbit Inference Engine (CLAUDE.md)
Unless specifically prompted, avoid making changes to the doc directory (documentation)
Files:
doc/release-notes-6711.md
src/**/*.{cpp,h,cc,cxx,hpp}
📄 CodeRabbit Inference Engine (CLAUDE.md)
src/**/*.{cpp,h,cc,cxx,hpp}: Dash Core C++ codebase must be written in C++20 and require at least Clang 16 or GCC 11.1
Dash uses unordered_lru_cache for efficient caching with LRU eviction
Files:
src/init.cpp
🧠 Learnings (1)
📚 Learning: 2025-06-09T16:43:20.996Z
Learnt from: kwvg
PR: dashpay/dash#6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.
Applied to files:
test/functional/feature_masternode_params.py
🧬 Code Graph Analysis (1)
test/functional/feature_masternode_params.py (3)
test/functional/test_framework/test_framework.py (1)
BitcoinTestFramework(101-1130)test/functional/test_framework/util.py (1)
assert_equal(69-74)test/functional/test_framework/test_node.py (1)
debug_log_path(432-433)
🪛 Ruff (0.12.2)
test/functional/feature_masternode_params.py
12-12: test_framework.util.assert_equal imported but unused
Remove unused import: test_framework.util.assert_equal
(F401)
🪛 Flake8 (7.2.0)
test/functional/feature_masternode_params.py
[error] 12-12: 'test_framework.util.assert_equal' imported but unused
(F401)
⏰ 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)
- GitHub Check: Lint / Run linters
- GitHub Check: x86_64-w64-mingw32 / Build depends
- GitHub Check: x86_64-apple-darwin / Build depends
- GitHub Check: x86_64-pc-linux-gnu / Build depends
- GitHub Check: arm-linux-gnueabihf / Build depends
- GitHub Check: x86_64-pc-linux-gnu_multiprocess / Build depends
- GitHub Check: x86_64-pc-linux-gnu_nowallet / Build depends
🔇 Additional comments (4)
doc/release-notes-6711.md (1)
4-8: Clarify whether global defaults changed or only masternode auto-enable is intendedRelease notes say regular nodes keep previous defaults (disabled) and only masternodes auto-enable filters. However, the PR objectives claim changing global defaults: -blockfilterindex default from 0 to basic and -peerblockfilters default from false to true. Please confirm intent and align docs and code accordingly.
Would you like me to update the notes once we confirm whether defaults changed globally or only masternode auto-enabling is desired?
src/init.cpp (2)
591-591: Help text correctly mentions masternode auto-enableThe addition clearly communicates the masternode behavior. No functional concerns here.
1022-1033: Defaults Verified: peerblockfilters=false, blockfilterindex="0"
Confirmed DEFAULT_PEERBLOCKFILTERS is false (src/net_processing.h:36) and DEFAULT_BLOCKFILTERINDEX is "0" (src/validation.h:82). In AppInitParameterInteraction, setting -masternodeblsprivkey soft-sets both -peerblockfilters=true and -blockfilterindex=basic, so the BASIC filter is enabled before the peer-filters check. Regular nodes retain defaults (both disabled), so there are no startup regressions.test/functional/feature_masternode_params.py (1)
69-72: Index key check may be brittle; prefer a contains checkRPC getindexinfo keys vary (“basic block filter index” vs similar). Checking for exact 'basic filter index' may be fragile.
Consider this more robust check:
- assert 'basic filter index' not in index_info + assert not any(('filter' in k and 'basic' in k) for k in index_info.keys())If you prefer exact matching, verify the exact key used in this branch via the logged keys one line above and assert on that.
| if (args.IsArgSet("-masternodeblsprivkey")) { | ||
| if (args.SoftSetBoolArg("-disablewallet", true)) { | ||
| LogPrintf("%s: parameter interaction: -masternodeblsprivkey set -> setting -disablewallet=1\n", __func__); | ||
| } | ||
| // Enable block filters for masternodes to improve network services | ||
| if (args.SoftSetBoolArg("-peerblockfilters", true)) { | ||
| LogPrintf("%s: parameter interaction: -masternodeblsprivkey set -> setting -peerblockfilters=1\n", __func__); | ||
| } | ||
| if (args.SoftSetArg("-blockfilterindex", "basic")) { | ||
| LogPrintf("%s: parameter interaction: -masternodeblsprivkey set -> setting -blockfilterindex=basic\n", __func__); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Good parameter interaction for masternodes; ensure parsing supports a non-“0” default for -blockfilterindex
Soft-setting -peerblockfilters=1 and -blockfilterindex=basic for masternodes is correct and the logging is consistent with other interactions.
However, if the project ever changes DEFAULT_BLOCKFILTERINDEX to a non-“0” value (e.g., “basic”), the current parsing in AppInitParameterInteraction uses GetArgs("-blockfilterindex") and won’t populate g_enabled_filter_types when the value is coming from the default. That would cause NODE_COMPACT_FILTERS not to be signaled by default and produce a mismatch between help/intent and behavior.
Suggestion: make the parsing robust to defaults by treating the default value as an explicit name when the user hasn’t provided the arg.
Outside the changed region, adjust the parsing around AppInitParameterInteraction where blockfilterindex is processed:
// Current (around lines 1152-1164):
std::string blockfilterindex_value = args.GetArg("-blockfilterindex", DEFAULT_BLOCKFILTERINDEX);
if (blockfilterindex_value == "" || blockfilterindex_value == "1") {
g_enabled_filter_types = AllBlockFilterTypes();
} else if (blockfilterindex_value != "0") {
const std::vector<std::string> names = args.GetArgs("-blockfilterindex");
for (const auto& name : names) {
BlockFilterType filter_type;
if (!BlockFilterTypeByName(name, filter_type)) {
return InitError(strprintf(_("Unknown -blockfilterindex value %s."), name));
}
g_enabled_filter_types.insert(filter_type);
}
}
// Suggested:
std::string blockfilterindex_value = args.GetArg("-blockfilterindex", DEFAULT_BLOCKFILTERINDEX);
if (blockfilterindex_value == "" || blockfilterindex_value == "1") {
g_enabled_filter_types = AllBlockFilterTypes();
} else if (blockfilterindex_value != "0") {
// If the user did not explicitly set -blockfilterindex, treat the default
// value as a single requested type (e.g., "basic").
std::vector<std::string> names = args.IsArgSet("-blockfilterindex")
? args.GetArgs("-blockfilterindex")
: std::vector<std::string>{blockfilterindex_value};
for (const auto& name : names) {
BlockFilterType filter_type;
if (!BlockFilterTypeByName(name, filter_type)) {
return InitError(strprintf(_("Unknown -blockfilterindex value %s."), name));
}
g_enabled_filter_types.insert(filter_type);
}
}This keeps current behavior intact and future-proofs the code if defaults are changed centrally.
🤖 Prompt for AI Agents
In src/init.cpp around lines 1022 to 1033 and the AppInitParameterInteraction
parsing region (around lines ~1152-1164), the code currently reads
GetArgs("-blockfilterindex") only when parsing user-provided values, which
misses treating a non-"0" DEFAULT_BLOCKFILTERINDEX as an explicit filter type;
update the parsing so that if -blockfilterindex is not explicitly set
(args.IsArgSet("-blockfilterindex") is false) you treat the single returned
GetArg("-blockfilterindex", DEFAULT_BLOCKFILTERINDEX) value as the requested
name (wrap it in a one-element vector) and otherwise continue using
args.GetArgs("-blockfilterindex"); then validate each name with
BlockFilterTypeByName and insert into g_enabled_filter_types as before so
defaults like "basic" are correctly honored.
| self.restart_node(1, extra_args=[f"-masternodeblsprivkey={bls_key}"]) | ||
| node1 = self.nodes[1] | ||
|
|
||
| # Masternode should have peerblockfilters enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Masternode start will fail without -txindex=1 (and bloom filters, if not default); add required args
AppInitParameterInteraction enforces that a masternode must have -txindex=1 (and -peerbloomfilters=1 if not already default). Without -txindex=1 the restart is expected to fail.
Apply this diff to ensure node1 starts as a masternode:
- self.restart_node(1, extra_args=[f"-masternodeblsprivkey={bls_key}"])
+ self.restart_node(1, extra_args=[
+ f"-masternodeblsprivkey={bls_key}",
+ "-txindex=1",
+ "-peerbloomfilters=1",
+ ])If -peerbloomfilters is already true by default in this branch, you can omit that line; keeping it explicit avoids flakiness across branches.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| self.restart_node(1, extra_args=[f"-masternodeblsprivkey={bls_key}"]) | |
| node1 = self.nodes[1] | |
| # Masternode should have peerblockfilters enabled | |
| self.restart_node(1, extra_args=[ | |
| f"-masternodeblsprivkey={bls_key}", | |
| "-txindex=1", | |
| "-peerbloomfilters=1", | |
| ]) | |
| node1 = self.nodes[1] | |
| # Masternode should have peerblockfilters enabled |
🤖 Prompt for AI Agents
In test/functional/feature_masternode_params.py around lines 41 to 44, the
masternode restart omits required node args so startup will fail; update the
restart_node call to include -txindex=1 and also -peerbloomfilters=1 (in
addition to the existing -masternodeblsprivkey) so node1 meets
AppInitParameterInteraction requirements; if this branch already defaults
peerbloomfilters to true you may omit that flag, but keep -txindex=1 explicitly
to avoid flakiness.
| services = int(node1.getnetworkinfo()['localservices'], 16) | ||
| self.log.info(f"Masternode services: {hex(services)}, has COMPACT_FILTERS: {services & NODE_COMPACT_FILTERS != 0}") | ||
|
|
||
| # Check blockfilterindex | ||
| index_info = node1.getindexinfo() | ||
| self.log.info(f"Masternode indexes: {list(index_info.keys())}") | ||
|
|
||
| # For now, just check that the node started successfully with masternode key | ||
| # The actual filter enabling might require the node to be fully synced | ||
| assert node1.getblockcount() >= 0 # Basic check that node is running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Assert masternode gets NODE_COMPACT_FILTERS and a basic filter index when auto-enabled
Right now this section only logs values and has a weak liveness check. Given this PR’s goal, we should assert the service bit and that a basic filter index is present.
Apply this diff:
- services = int(node1.getnetworkinfo()['localservices'], 16)
- self.log.info(f"Masternode services: {hex(services)}, has COMPACT_FILTERS: {services & NODE_COMPACT_FILTERS != 0}")
-
- # Check blockfilterindex
- index_info = node1.getindexinfo()
- self.log.info(f"Masternode indexes: {list(index_info.keys())}")
-
- # For now, just check that the node started successfully with masternode key
- # The actual filter enabling might require the node to be fully synced
- assert node1.getblockcount() >= 0 # Basic check that node is running
+ services = int(node1.getnetworkinfo()['localservices'], 16)
+ self.log.info(f"Masternode services: {hex(services)}, has COMPACT_FILTERS: {services & NODE_COMPACT_FILTERS != 0}")
+ assert services & NODE_COMPACT_FILTERS != 0
+
+ # Check that a basic block filter index exists
+ index_info = node1.getindexinfo()
+ self.log.info(f"Masternode indexes: {list(index_info.keys())}")
+ # Be robust to naming: look for any key that contains 'filter' and 'basic'
+ assert any(('filter' in k and 'basic' in k) for k in index_info.keys())📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| services = int(node1.getnetworkinfo()['localservices'], 16) | |
| self.log.info(f"Masternode services: {hex(services)}, has COMPACT_FILTERS: {services & NODE_COMPACT_FILTERS != 0}") | |
| # Check blockfilterindex | |
| index_info = node1.getindexinfo() | |
| self.log.info(f"Masternode indexes: {list(index_info.keys())}") | |
| # For now, just check that the node started successfully with masternode key | |
| # The actual filter enabling might require the node to be fully synced | |
| assert node1.getblockcount() >= 0 # Basic check that node is running | |
| services = int(node1.getnetworkinfo()['localservices'], 16) | |
| self.log.info(f"Masternode services: {hex(services)}, has COMPACT_FILTERS: {services & NODE_COMPACT_FILTERS != 0}") | |
| assert services & NODE_COMPACT_FILTERS != 0 | |
| # Check that a basic block filter index exists | |
| index_info = node1.getindexinfo() | |
| self.log.info(f"Masternode indexes: {list(index_info.keys())}") | |
| # Be robust to naming: look for any key that contains 'filter' and 'basic' | |
| assert any(('filter' in k and 'basic' in k) for k in index_info.keys()) |
| with open(node1.debug_log_path, 'r') as f: | ||
| log_content = f.read() | ||
| assert "parameter interaction: -masternodeblsprivkey set -> setting -disablewallet=1" in log_content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix debug log path usage (method vs attribute)
In the framework, debug_log_path is a method, not a property. Opening it without parentheses will fail.
Apply this diff:
- with open(node1.debug_log_path, 'r') as f:
+ with open(node1.debug_log_path(), 'r') as f:Optionally, you could also add an earlier check (before the explicit-disable restart) to assert that the auto-enable log lines are present:
- "parameter interaction: -masternodeblsprivkey set -> setting -peerblockfilters=1"
- "parameter interaction: -masternodeblsprivkey set -> setting -blockfilterindex=basic"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| with open(node1.debug_log_path, 'r') as f: | |
| log_content = f.read() | |
| assert "parameter interaction: -masternodeblsprivkey set -> setting -disablewallet=1" in log_content | |
| with open(node1.debug_log_path(), 'r') as f: | |
| log_content = f.read() | |
| assert "parameter interaction: -masternodeblsprivkey set -> setting -disablewallet=1" in log_content |
🤖 Prompt for AI Agents
In test/functional/feature_masternode_params.py around lines 75-77, the test
opens node1.debug_log_path as if it were an attribute but debug_log_path is a
method; call node1.debug_log_path() when opening the file. Replace uses of
node1.debug_log_path with node1.debug_log_path() and keep the existing
assertion. Optionally, add an earlier check (before the explicit-disable
restart) asserting that the log contains "parameter interaction:
-masternodeblsprivkey set -> setting -peerblockfilters=1" and "parameter
interaction: -masternodeblsprivkey set -> setting -blockfilterindex=basic" to
validate auto-enable behavior.
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| MasternodeParamsTest().main() No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: missing \n
|
|
||
| # Should not have blockfilterindex | ||
| index_info = node1.getindexinfo() | ||
| assert 'basic filter index' not in index_info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this string is re-used multiple times; consider to define a const
|
|
||
| self.log.info("Test that masternode parameter interaction is logged") | ||
| # Check debug log for parameter interaction messages | ||
| with open(node1.debug_log_path, 'r') as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider using here a helper assert_debug_log instead of manual reading of logs.
See test/functional/p2p_blocksonly.py or test/functional/rpc_net.py for an example (it's not exhausting list of functional tests that uses this helper)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (4)
test/functional/feature_masternode_params.py (4)
41-41: Masternode start may fail without -txindex=1; add required argsDash masternodes typically require
-txindex=1to start. Include it (keep-peerbloomfilters=1explicit if you want cross-branch stability).- self.restart_node(1, extra_args=[f"-masternodeblsprivkey={bls_key}"]) + self.restart_node(1, extra_args=[ + f"-masternodeblsprivkey={bls_key}", + "-txindex=1", + "-peerbloomfilters=1", + ])
44-51: Assert behavior, don’t just log: verify service bit and index for masternodeTurn the logs into assertions so the test enforces the intended behavior.
# Masternode should have peerblockfilters enabled services = int(node1.getnetworkinfo()['localservices'], 16) - self.log.info(f"Masternode services: {hex(services)}, has COMPACT_FILTERS: {services & NODE_COMPACT_FILTERS != 0}") + self.log.info(f"Masternode services: {hex(services)}, has COMPACT_FILTERS: {services & NODE_COMPACT_FILTERS != 0}") + assert services & NODE_COMPACT_FILTERS != 0 # Check blockfilterindex index_info = node1.getindexinfo() - self.log.info(f"Masternode indexes: {list(index_info.keys())}") + self.log.info(f"Masternode indexes: {list(index_info.keys())}") + assert any(('filter' in k and 'basic' in k) for k in index_info.keys())
75-77: Fix debug log path usage (method vs attribute)
debug_log_pathis a method in the framework. Call it.- with open(node1.debug_log_path, 'r', encoding='utf-8') as f: + with open(node1.debug_log_path(), 'r', encoding='utf-8') as f: log_content = f.read() assert "parameter interaction: -masternodeblsprivkey set -> setting -disablewallet=1" in log_content
58-63: Include -txindex=1 for the explicit-disable masternode restart as wellMaintain masternode requirements across restarts. Without
-txindex=1, startup may fail.self.restart_node(1, extra_args=[ f"-masternodeblsprivkey={bls_key}", + "-txindex=1", "-peerblockfilters=0", "-blockfilterindex=0" ])
🧹 Nitpick comments (4)
test/functional/feature_masternode_params.py (4)
52-55: Remove redundant liveness checkOnce you assert the service bit and index, the extra "node is running" check is redundant.
- # For now, just check that the node started successfully with masternode key - # The actual filter enabling might require the node to be fully synced - assert node1.getblockcount() >= 0 # Basic check that node is running + # Node started successfully and exposes compact filter services and index
69-72: Make block filter index checks robust and correct the key"basic filter index" is likely not the exact key. Prefer a robust presence check based on substrings.
# Should not have blockfilterindex index_info = node1.getindexinfo() - assert 'basic filter index' not in index_info + assert not any(('filter' in k and 'basic' in k) for k in index_info.keys())
73-80: Prefer using the built-in assert_debug_log helperThe framework provides a helper to assert log content without manual file IO. It’s cleaner and less brittle. See examples in test/functional/p2p_blocksonly.py or rpc_net.py.
Example:
with node1.assert_debug_log(["parameter interaction: -masternodeblsprivkey set -> setting -disablewallet=1"]): pass
82-83: Add trailing newline at EOFMinor formatting nit to satisfy some tooling.
- MasternodeParamsTest().main() + MasternodeParamsTest().main() +
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
test/functional/feature_masternode_params.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
test/functional/**/*.py
📄 CodeRabbit Inference Engine (CLAUDE.md)
Functional tests should be written in Python and placed in test/functional/
Files:
test/functional/feature_masternode_params.py
🧠 Learnings (2)
📚 Learning: 2025-06-09T16:43:20.996Z
Learnt from: kwvg
PR: dashpay/dash#6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.
Applied to files:
test/functional/feature_masternode_params.py
📚 Learning: 2025-08-10T13:52:46.289Z
Learnt from: kwvg
PR: dashpay/dash#6666
File: test/functional/rpc_netinfo.py:73-81
Timestamp: 2025-08-10T13:52:46.289Z
Learning: In the Bitcoin/Dash test framework, `self.node.extra_args` contains the original startup arguments for a TestNode and is not modified by `test.restart_node()`. Each restart with new `extra_args` doesn't update the stored `self.node.extra_args`, so copying from it always provides a clean slate without accumulated modifications from previous restarts.
Applied to files:
test/functional/feature_masternode_params.py
🧬 Code Graph Analysis (1)
test/functional/feature_masternode_params.py (2)
test/functional/test_framework/util.py (1)
assert_equal(69-74)test/functional/test_framework/test_node.py (1)
debug_log_path(432-433)
🪛 Ruff (0.12.2)
test/functional/feature_masternode_params.py
12-12: test_framework.util.assert_equal imported but unused
Remove unused import: test_framework.util.assert_equal
(F401)
🪛 Flake8 (7.2.0)
test/functional/feature_masternode_params.py
[error] 12-12: 'test_framework.util.assert_equal' imported but unused
(F401)
⏰ 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)
- GitHub Check: Lint / Run linters
- GitHub Check: x86_64-apple-darwin / Build depends
- GitHub Check: x86_64-w64-mingw32 / Build depends
- GitHub Check: x86_64-pc-linux-gnu_nowallet / Build depends
- GitHub Check: x86_64-pc-linux-gnu_multiprocess / Build depends
- GitHub Check: x86_64-pc-linux-gnu / Build depends
- GitHub Check: arm-linux-gnueabihf / Build depends
🔇 Additional comments (1)
test/functional/feature_masternode_params.py (1)
27-34: Incorrect — regular-node defaults remain disabled; do not invert the assertionsinit.cpp only auto-enables -peerblockfilters / -blockfilterindex when a masternode key is set (src/init.cpp:1027-1031, 1152-1177). The man page and release notes show the defaults are 0 (disabled) for regular nodes (doc/man/dashd.1 and doc/release-notes-6711.md). The test assertions at test/functional/feature_masternode_params.py:27-34 (checking peerblockfilters and blockfilterindex are disabled for a regular node) are therefore correct — the proposed inversion is incorrect. Ignore the suggested diff.
Files/locations:
- test/functional/feature_masternode_params.py:27-34 — current assertions check disabled by default (keep as-is).
- src/init.cpp:1027-1031 and 1152-1177 — masternode auto-enable logic and NODE_COMPACT_FILTERS gating.
- doc/man/dashd.1 (defaults: 0) and doc/release-notes-6711.md — confirm regular nodes keep previous disabled defaults.
Optional suggestion: normalize the index-name check (the repo uses "basic block filter index" elsewhere, e.g. test/functional/rpc_misc.py) — use a substring-based or canonicalized key check for robustness.
Likely an incorrect or invalid review comment.
- Add constant for 'basic filter index' string to avoid repetition - Use assert_debug_log helper instead of manual log file reading - Add missing newline at end of file 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (5)
test/functional/feature_masternode_params.py (5)
81-88: Use assert_debug_log helper consistently and add missing auto-enable checks.The test uses
assert_debug_logfor one interaction but manually reads logs elsewhere. For consistency and completeness, add checks for the auto-enable log messages.- # Check debug log for parameter interaction messages during startup - with self.nodes[1].assert_debug_log(["parameter interaction: -masternodeblsprivkey set -> setting -disablewallet=1"]): + # Check debug log for parameter interaction messages during startup + with self.nodes[1].assert_debug_log([ + "parameter interaction: -masternodeblsprivkey set -> setting -disablewallet=1", + "parameter interaction: -masternodeblsprivkey set -> setting -peerblockfilters=1", + "parameter interaction: -masternodeblsprivkey set -> setting -blockfilterindex=basic" + ]): self.start_node(1, extra_args=[ - f"-masternodeblsprivkey={bls_key}", - "-peerblockfilters=0", - "-blockfilterindex=0" + f"-masternodeblsprivkey={bls_key}", + "-txindex=1" ]) - # Note: The peerblockfilters and blockfilterindex messages won't be in the log - # when explicitly disabled, only when auto-enabled
90-90: Add missing newline at end of file.The file should end with a newline character.
+ if __name__ == '__main__': MasternodeParamsTest().main() +
12-12: Remove unused import.The
assert_equalimport is not used in the test and triggers linter errors.-from test_framework.util import assert_equal
44-44: Add required masternode arguments to prevent startup failure.Based on the PR objectives and past review feedback, masternodes require
-txindex=1to start successfully. The current restart will likely fail without this argument.- self.restart_node(1, extra_args=[f"-masternodeblsprivkey={bls_key}"]) + self.restart_node(1, extra_args=[ + f"-masternodeblsprivkey={bls_key}", + "-txindex=1", + ])
47-57: Add proper assertions for auto-enabled block filters.The test should verify that the masternode actually has the expected service flags and block filter index, not just log values and perform a basic liveness check.
- # Masternode should have peerblockfilters enabled - services = int(node1.getnetworkinfo()['localservices'], 16) - self.log.info(f"Masternode services: {hex(services)}, has COMPACT_FILTERS: {services & NODE_COMPACT_FILTERS != 0}") - - # Check blockfilterindex - index_info = node1.getindexinfo() - self.log.info(f"Masternode indexes: {list(index_info.keys())}") - - # For now, just check that the node started successfully with masternode key - # The actual filter enabling might require the node to be fully synced - assert node1.getblockcount() >= 0 # Basic check that node is running + # Masternode should have peerblockfilters enabled + services = int(node1.getnetworkinfo()['localservices'], 16) + self.log.info(f"Masternode services: {hex(services)}, has COMPACT_FILTERS: {services & NODE_COMPACT_FILTERS != 0}") + assert services & NODE_COMPACT_FILTERS != 0 + + # Check that a basic block filter index exists + index_info = node1.getindexinfo() + self.log.info(f"Masternode indexes: {list(index_info.keys())}") + assert BASIC_FILTER_INDEX in index_info
🧹 Nitpick comments (1)
test/functional/feature_masternode_params.py (1)
61-65: Include txindex in explicit disable test.For consistency with the earlier masternode restart, include
-txindex=1in the explicit disable test to ensure the masternode starts properly.self.restart_node(1, extra_args=[ f"-masternodeblsprivkey={bls_key}", + "-txindex=1", "-peerblockfilters=0", "-blockfilterindex=0" ])
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
test/functional/feature_masternode_params.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
test/functional/**/*.py
📄 CodeRabbit Inference Engine (CLAUDE.md)
Functional tests should be written in Python and placed in test/functional/
Files:
test/functional/feature_masternode_params.py
🧠 Learnings (2)
📚 Learning: 2025-06-09T16:43:20.996Z
Learnt from: kwvg
PR: dashpay/dash#6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.
Applied to files:
test/functional/feature_masternode_params.py
📚 Learning: 2025-08-10T13:52:46.289Z
Learnt from: kwvg
PR: dashpay/dash#6666
File: test/functional/rpc_netinfo.py:73-81
Timestamp: 2025-08-10T13:52:46.289Z
Learning: In the Bitcoin/Dash test framework, `self.node.extra_args` contains the original startup arguments for a TestNode and is not modified by `test.restart_node()`. Each restart with new `extra_args` doesn't update the stored `self.node.extra_args`, so copying from it always provides a clean slate without accumulated modifications from previous restarts.
Applied to files:
test/functional/feature_masternode_params.py
🧬 Code Graph Analysis (1)
test/functional/feature_masternode_params.py (4)
test/functional/test_framework/test_framework.py (1)
start_node(639-648)test/functional/test_framework/util.py (1)
assert_equal(69-74)src/bls/bls.h (1)
bls(31-33)test/functional/test_framework/test_node.py (1)
assert_debug_log(441-469)
🪛 Ruff (0.12.2)
test/functional/feature_masternode_params.py
12-12: test_framework.util.assert_equal imported but unused
Remove unused import: test_framework.util.assert_equal
(F401)
🪛 Flake8 (7.2.0)
test/functional/feature_masternode_params.py
[error] 12-12: 'test_framework.util.assert_equal' imported but unused
(F401)
⏰ 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). (2)
- GitHub Check: Build container / Build container
- GitHub Check: predict_conflicts
Mention that BIP157 block filters require approximately 1GB+ of additional disk space, as suggested in code review. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
|
linter complains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
doc/release-notes-6711.md (1)
7-7: Good call-out on disk usage; prior feedback addressed.You’ve added the 1GB+ disk space note, which resolves the earlier reviewer’s concern.
🧹 Nitpick comments (2)
doc/release-notes-6711.md (2)
6-7: Minor editorial nit: spacing and sentence flow.
- There appears to be an extra space before “Note” (double space after the previous sentence). Remove it for consistency.
- Optional: split the long paragraph into two sentences (ending after “are automatically enabled.”) to improve readability.
9-9: Style nit: punctuation around PR reference.Consider either removing the parentheses or adding a comma before “if needed,” and placing the PR number at the end without parentheses for consistency with other release notes (if applicable to this repo).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
doc/release-notes-6711.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
doc/**
📄 CodeRabbit Inference Engine (CLAUDE.md)
Unless specifically prompted, avoid making changes to the doc directory (documentation)
Files:
doc/release-notes-6711.md
🪛 LanguageTool
doc/release-notes-6711.md
[grammar] ~6-~6: There might be a mistake here.
Context: ...rindex=basic` are automatically enabled. Note that this feature requires approx...
(QB_NEW_EN)
[grammar] ~9-~9: There might be a mistake here.
Context: ...ers=0or-blockfilterindex=0` (#6711).
(QB_NEW_EN)
⏰ 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). (4)
- GitHub Check: x86_64-w64-mingw32 / Build depends
- GitHub Check: x86_64-apple-darwin / Build depends
- GitHub Check: Lint / Run linters
- GitHub Check: x86_64-pc-linux-gnu_nowallet / Build depends
Remove unused assert_equal import to fix linter warning. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
|
tests failed with |
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 2b17480
knst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 2b17480
…nodes 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 dashpay#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
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?
-masternodeblsprivkey), both-peerblockfiltersand-blockfilterindex=basicare now automatically enabled.-peerblockfilters=falseand-blockfilterindex=0).-peerblockfilters=0or-blockfilterindex=0.How Has This Been Tested?
feature_masternode_params.pythat verifies:Breaking Changes
None - this only affects masternodes and they can opt out if needed.
Checklist:
Go over all the following points, and put an
xin all the boxes that apply.