-
Couldn't load subscription status.
- Fork 713
bugfix: enforce bitcoin rpc only for miner #6534
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
bugfix: enforce bitcoin rpc only for miner #6534
Conversation
c3167b1 to
9fd6728
Compare
… node to try to generate bitcoin blocks
7882156 to
bafbfde
Compare
|
Just an heads-up:
|
4da4c6a
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6534 +/- ##
===========================================
- Coverage 79.51% 79.21% -0.31%
===========================================
Files 566 566
Lines 345340 345421 +81
===========================================
- Hits 274596 273610 -986
- Misses 70744 71811 +1067
... and 96 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This patch addresses an issue in the
BitcoinRegtestControllerwhere instantiating aBitcoinRpcClientrequired Bitcoin RPC credentials unconditionally.While RPC credentials are indeed mandatory for nodes configured as miners, they should not be required for other node types (e.g., follower nodes), becase they don't use a RPC client at all.
Previously (before the RPC rollout in #6387), it was possible to instantiate an RPC client without credentials (even though this behavior is not supported by
bitcoind).In this patch, instead of permitting instantiation without authentication, I’ve made the BitcoinRegtestController’s behavior explicit and dependent on the node type:
The idea is to make the code behavior clearer around this scenario.
Is this reasoning correct?
Context:
This issue was surfaced by @Jiloc, on develop branch, during live testing with a follower node using:
Which resulted in the following error:
Applicable issues
Additional info (benefits, drawbacks, caveats)
Checklist
docs/rpc/openapi.yamlandrpc-endpoints.mdfor v2 endpoints,event-dispatcher.mdfor new events)clarity-benchmarkingrepobitcoin-tests.yml