-
Notifications
You must be signed in to change notification settings - Fork 36.9k
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
test: Add test for rpcwhitelistdefault #29858
test: Add test for rpcwhitelistdefault #29858
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/29858. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
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.
Thank you for picking this up. Enhancing testing for of the whitelist capability is important to notice regressions associated with this security-minded feature.
Concept ACK. Looks like there could be opportunities to enhance the existing approach taken. Some inline comments were left.
Built and ran all functional tests (all passed).
Checked that the following comments were addressed from PR #17805.
- The additional tests appear to be integrated into rpc_whitelist.py
- Tests were organized into different methods
- num_nodes used is 1
- Trailing comma included in
test_framework.util
imports - nit: Looks like the original comment @jonatack to include explicit
self.setup_clean_chain = False
could be added inbitcoin/test/functional/rpc_whitelist.py
Lines 35 to 36 in 94836b3
class RPCWhitelistTest(BitcoinTestFramework): def set_test_params(self): specififed
typo fixed- nit: Seems like @jonatack's original comment to create constants for HTTP codes (e.g.
HTTP_FORBIDDEN
instead of 403) could increase readability, but I'm not particularly partial either way. If it's decided to factor response codes into constants, there probably should be a follow up PR to refactor response codes used in lines in this file predating this PR. Changing the previous instances of 200/403 in this PR would seem to be combining two separate goals (adding new tests, refactoring).
Thanks a lot for the review, |
94836b3
to
c9358db
Compare
🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the Possibly this is due to a silent merge conflict (the changes in this pull request being Leave a comment here, if you need help tracking down a confusing failure. Debug: https://github.com/bitcoin/bitcoin/runs/24559741310 |
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.
Thanks for adding these tests, concept ACK.
Seems like this is in progress because there is test failure and a debugger is added.
Added few suggestions for now, will review again when the tests pass.
Converted to draft for now. If this is no longer a WIP, you can move it out of draft. |
e02af85
to
c9358db
Compare
Thanks for the review! The initial tests passed successfully. But I pushed an update that implements the suggested alternative approach from this discussion Unfortunately, the tests are currently failing with this new approach, as explained here. While I'm still working on refining the suggested approach, I've decided to revert the PR to its original state (with passing tests) for now. To keep things functional while I continue working on the alternative approach in a separate branch on my fork |
b6c6921
to
9f63581
Compare
be3a301
to
3123eea
Compare
@rkrux I've pushed some changes, and all tests are now passing. |
3123eea
to
9a503aa
Compare
9a503aa
to
fcf0ead
Compare
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.
Code review ACK fcf0ead. I left suggestions below, but none are important and they can be ignored. I think it is better to have this test coverage for this than not to have it, and no need to spend too much time iterating on the PR just to improve test code quality which is already decent.
Note that this PR does not provide any coverage for the case where rpcwhitelistdefault setting is unset, only for the cases where it is explicitly set to 0 and explicitly set to 1. This could be something to consider adding in the future.
fcf0ead
to
cfce5f5
Compare
Thanks for the review, I have pushed an update and resolved all the suggestions, cfce5f5 |
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.
Code review ACK cfce5f5. Left a few more suggestions to consider, but cleanups look good and I think this is pretty easy to understand now.
cfce5f5
to
f0e5e4c
Compare
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.
Code review ACK f0e5e4c. PR seems very clear and simple, moving 1 test and adding 3 new tests.
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.
Tested and Code review ACK f0e5e4c
Comments are just nits can be ignored here but considered in future PR's like the follow-up suggested!
["strangedude5", "d12c6e962d47a454f962eb41225e6ec8$2dd39635b155536d3c1a2e95d05feff87d5ba55f2d5ff975e6e997a836b717c9", ":getblockcount,getblockcount", "s7R4nG3R7H1nGZ"] | ||
["strangedude5", "d12c6e962d47a454f962eb41225e6ec8$2dd39635b155536d3c1a2e95d05feff87d5ba55f2d5ff975e6e997a836b717c9", ":getblockcount,getblockcount", "s7R4nG3R7H1nGZ"], | ||
# Test non-whitelisted user | ||
["strangedude6", "ab02e4fb22ef4ab004cca217a49ee8d2$90dd09b08edd12d552d9d8a5ada838dcef2ac587789fa7e9c47f5990e80cdf93", None, "password123"] |
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: even in test we should not have password123
as passwords! 😃
@@ -24,7 +25,12 @@ def rpccall(node, user, method): | |||
return resp | |||
|
|||
|
|||
def get_permissions(whitelist): | |||
return [perm for perm in whitelist.replace(" ", "").split(",") if perm] |
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: You can remove the .replace
is in this case.
If you want to make a a general function for getting the permission for both users and strange_users you have to replace the :
as well.
return [perm for perm in whitelist.replace(" ", "").split(",") if perm] | |
return [perm for perm in whitelist.split(",") if perm] |
for user in self.users: | ||
permissions = get_permissions(user[2]) | ||
for permission in permissions: | ||
self.log.info("[" + user[0] + "]: Testing whitelisted user permission (" + permission + ")") |
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: You can avoid the verbose concatenations by using python formatted string, here and other places
self.log.info("[" + user[0] + "]: Testing whitelisted user permission (" + permission + ")") | |
self.log.info(f"[{user[0]}]: Testing whitelisted user permission ({permission})") |
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.
Would it be possible to rebase this over master? I am unable to build this PR in local using cmake
.
Edit: Rebased locally and built as per below suggestion.
self.log.info("[" + user[0] + "]: Testing non-permitted permission: getblockchaininfo") | ||
assert_equal(403, rpccall(self.nodes[0], user, "getblockchaininfo").status) | ||
|
||
def test_rpcwhitelistdefault_0_no_permissions(self): |
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.
Reading this PR after a long time, and with this kind of naming I expected these functions to have something related to rpcwhitelistdefault
. I believe that these 2 functions could be just 1 function named test_rpcwhitelistdefault_permissions
.
Reason being that these 2 functions don't update the conf
file and do not indicate to the reader how these 2 are different programmatically. Instead the conf
file is updated outside on line 97, which is fine because those conf file changes are intentionally kept in run_test
: https://github.com/bitcoin/bitcoin/pull/29858/files#diff-59eba8b02871bd01af21093cec702be7bb1efb7833e6439f4652fa05e8e94b19R97
The single function can accept the expected status from the call site, rest all is same in these 2 functions. The log line can also be dependent on the function arguments.
# Replace file configurations | ||
self.nodes[0].replace_in_config([("rpcwhitelistdefault=0", "rpcwhitelistdefault=1")]) | ||
with open(self.nodes[0].datadir_path / "bitcoin.conf", 'a', encoding='utf8') as f: | ||
f.write("rpcwhitelist=__cookie__:getblockcount,getblockchaininfo,getmempoolinfo,stop\n") |
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.
Help me understand why is this whitelist needed that doesn't correspond to any user?
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.
rpcwhitelistdefault=1 revokes permissions for all users, including the cookie user. Since the cookie user is required during the node restart process (for getblockcount and getmempoolinfo), I had to explicitly whitelist
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.
I've just realized that I need to removegetblockchaininfo
from the whitelist, it's unused.
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.
this function will fail without the whitelist https://github.com/bitcoin/bitcoin/blob/master/test/functional/test_framework/test_node.py#L264
There is no conflict with master hence rebase is not necessary, you can easily test this by cherry-picking the commit or rebasing locally. |
Oh interesting, I will try this. |
@ismaelsadeeq and @rkrux thanks for the reviews! I'll be sure to incorporate the suggestion in the follow-up. |
ACK f0e5e4c |
…513955891 29513955891 kernel: Add pure kernel bitcoin-chainstate 9c40433bd4a kernel: Add functions to get the block hash from a block 942df8f287f kernel: Add block index utility functions to C header 87102db87ac kernel: Add function to read block undo data from disk to C header 12b8c9442ad kernel: Add functions to read block from disk to C header d977db3feb2 kernel: Add function for copying block data to C header 8ae33627743 kernel: Add functions for the block validation state to C header 0565a0bbc01 kernel: Add validation interface to C header 837e5a0f536 kernel: Add interrupt function to C header a80b7bfe3de kernel: Add import blocks function to C header 54d1a1231ec kernel: Add chainstate load options for in-memory dbs in C header 659efa9969c kernel: Add options for reindexing in C header 2179127c079 kernel: Add block validation to C header 26143992693 kernel: Add chainstate loading when instantiating a ChainstateManager 82d2bebbe54 kernel: Add chainstate manager option for setting worker threads e875f520851 kernel: Add chainstate manager object to C header 4e486059178 kernel: Add notifications context option to C header a5eb699b978 kernel: Add chain params context option to C header 0818b8d2c07 kernel: Add kernel library context object 71c24c95b31 kernel: Add logging to kernel library C header 0cc810386f7 kernel: Introduce initial kernel C header API 82ba9257157 Merge bitcoin/bitcoin#31366: cmake: Check `-Wno-*` compiler options for `leveldb` target f236854a5bd Merge bitcoin/bitcoin#31731: doc: update translation generation cmake example eb51963d870 Merge bitcoin/bitcoin#31884: cmake: Make implicit `libbitcoinkernel` dependencies explicit 58f15d4b215 Merge bitcoin/bitcoin#31379: cmake: Fix passing `APPEND_*FLAGS` to `secp256k1` subtree e606c577cb2 Merge bitcoin/bitcoin#31899: cmake: Exclude generated sources from translation 758a93d6215 doc: update translation generation cmake example fd14995b6a8 Merge bitcoin/bitcoin#31908: Revert merge of PR #31826 3e9b12b3e0f Revert "Merge bitcoin/bitcoin#31826: random: Check `GetRNDRRS` is supported in `InitHardwareRand` to avoid infinite loop" 785649f3977 Merge bitcoin/bitcoin#29881: guix: use GCC 13 to build releases 139640079ff Merge bitcoin/bitcoin#31826: random: Check `GetRNDRRS` is supported in `InitHardwareRand` to avoid infinite loop dc3a7146337 Merge bitcoin/bitcoin#31794: wallet: abandon orphan coinbase txs, and their descendants, during startup 06757af2da5 Merge bitcoin/bitcoin#29156: tests: add functional test for miniscript decaying multisig ff4ddd3d2e3 Revert "cmake: Ensure generated sources are up to date for `translate` target" 03b3166aac5 cmake: Exclude generated sources from translation 43e287b3ff5 Merge bitcoin/bitcoin#31892: build: remove ENABLE_HARDENING condition from check-security 63d625f7610 Merge bitcoin/bitcoin#31893: test: remove scanning check on `wallet_importdescriptors` 3b42e05aa9e cmake: Make implicit `libbitcoinkernel` dependencies explicit 3fd64efb437 cmake: Avoid using `OBJECT` libraries 28dec6c5f8b Merge bitcoin/bitcoin#31268: cmake: add optional source files to bitcoin_crypto and crc32c directly 50afaf3a389 Merge bitcoin/bitcoin#31836: contrib: Add deterministic-fuzz-coverage 405dd0e647e test: remove scanning check on `wallet_importdescriptors` 113a7a363fa build: remove ENABLE_HARDENING cond from check-security 9da0820ec55 Merge bitcoin/bitcoin#31869: cmake: Add `libbitcoinkernel` target db36a92c02b Merge bitcoin/bitcoin#31879: doc: add release note for #27432 (utxo-to-sqlite tool) 95722d048a8 doc: add release note for #27432 (utxo-to-sqlite tool) e4dd5a351bd test: wallet, abandon coinbase txs and their descendants during startup 09b150bb8ad In `InitHardwareRand`, do trail test for `RNDRRS` by `VerifyRNDRRS` 43e71f74988 Merge bitcoin/bitcoin#27432: contrib: add tool to convert compact-serialized UTXO set to SQLite database e53310c47ab Merge bitcoin/bitcoin#30529: Fix -norpcwhitelist, -norpcallowip, and similar corner case behavior 254fd89d39f Merge bitcoin/bitcoin#31863: random: Initialize variables in hardware RNG functions 75f8396c907 Merge bitcoin/bitcoin#30746: test: cover base[32|58|64] with symmetric roundtrip fuzz (and padding) tests c4b46b45898 Merge bitcoin/bitcoin#31629: wallet: fix rescanning inconsistency d0dfd6d3f60 Merge bitcoin/bitcoin#31865: build: move `rpc/external_signer` to node library ce4dbfc3590 Merge bitcoin/bitcoin#31851: doc: build: Fix instructions for msvc gui builds 504d0c21e26 Merge bitcoin/bitcoin#31439: validation: In case of a continued reindex, only activate chain in the end 0b48f77e101 Merge bitcoin/bitcoin#31413: rpc: Remove deprecated dummy alias for listtransactions::label 21a0efaf8c9 Merge bitcoin/bitcoin#29858: test: Add test for rpcwhitelistdefault 8a00b755e98 Merge bitcoin/bitcoin#31634: doc: Improve dependencies documentation e58605e04f3 Merge bitcoin/bitcoin#31854: net: reduce CAddress usage to CService or CNetAddr 3a914ab96bd cmake: Rename `bitcoinkernel` component to `libbitcoinkernel` 06b9236f432 Merge bitcoin/bitcoin#31359: cmake: Add `CheckLinkerSupportsPIE` module 7ce09a59921 cmake: Add `libbitcoinkernel` target e501246e77c build: move rpc/external_signer to node library 73e2ec13737 Merge bitcoin/bitcoin#31844: cmake: add a component for each binary 99755e04ffa random: Initialize variables in hardware RNG functions 7bbd761e816 Merge bitcoin/bitcoin#31421: cmake: Improve compatibility with Python version managers 9491676438a Merge bitcoin/bitcoin#31157: Cleanups to port mapping module post UPnP drop 109bfe9573b Merge bitcoin/bitcoin#31857: depends: avoid an unset `CMAKE_OBJDUMP` 14d1d8e2120 Merge bitcoin/bitcoin#31758: test: deduplicates p2p_tx_download constants fa3e409c9a0 contrib: Add deterministic-fuzz-coverage 2549fc6fd1c Merge bitcoin/bitcoin#31768: test: check `scanning` field from `getwalletinfo` 9b033bebb18 cmake: rename Kernel component to bitcoinkernel for consistency 2e0c92558e9 cmake: add and use install_binary_component a85e8c0e615 doc: Add some general documentation about negated options 96d30ed4f96 Merge bitcoin/bitcoin#31495: wallet: Utilize IsMine() and CanProvide() in migration to cover edge cases 490c8fa1782 doc: Add release notes summarizing negated option behavior changes. 458ef0a11b5 refactor: Avoid using IsArgSet() on -connect list option 752ab9c3c65 test: Add test to make sure -noconnect disables -dnsseed and -listen by default 3c2920ec98f refactor: Avoid using IsArgSet() on -signetseednode and -signetchallenge list options d05668922a2 refactor: Avoid using IsArgSet() on -debug, -loglevel, and -vbparams list options 3d1e8ca53a0 Normalize inconsistent -noexternalip behavior ecd590d4c1e Normalize inconsistent -noonlynet behavior 5544a19f863 Fix nonsensical bitcoin-cli -norpcwallet behavior 6e8e7f433fc Fix nonsensical -noasmap behavior b6ab3508064 Fix nonsensical -notest behavior 6768389917a Fix nonsensical -norpcwhitelist behavior e03409c70f7 Fix nonsensical -norpcbind and -norpcallowip behavior 40c4899bc20 Fix nonsensical -nobind and -nowhitebind behavior 5453e66fd91 Fix nonsensical -noseednode behavior c242fa5be35 Merge bitcoin/bitcoin#31858: chore: remove redundant word 4c62b37fcd2 chore: remove redundant word 251ea7367cf Merge bitcoin/bitcoin#31767: logging: Ensure -debug=0/none behaves consistently with -nodebug 2434aeab62b depends: avoid an unset CMAKE_OBJDUMP a5b0a441f85 Merge bitcoin/bitcoin#31855: chore: remove redundant word cd4bfaee103 net: reduce CAddress usage to CService or CNetAddr 033acdf03da chore: remove redundant word 55cf39e4c54 Merge bitcoin/bitcoin#31722: cmake: Copy `cov_tool_wrapper.sh.in` to the build tree c3fa043ae56 doc: build: Fix instructions for msvc gui builds 048ef98626b Merge bitcoin/bitcoin#31840: depends: add missing Darwin objcopy 713bf66b1f7 Merge bitcoin/bitcoin#31500: depends: Fix compiling `libevent` package on NetBSD ede388d03df Merge bitcoin/bitcoin#30911: build: simplify by flattening the dependency graph 534414ca9d4 Merge bitcoin/bitcoin#31678: ci: Skip read-write of default env vars 87ce116058f Merge bitcoin/bitcoin#31846: test: Remove stale gettime test fa3a4eafa11 test: Remove stale gettime test 42251e00e8b Merge bitcoin/bitcoin#30584: depends: Make default `host` and `build` comparable 0b6ed342b57 Merge bitcoin/bitcoin#31711: build: set build type and per-build-type flags as early as possible a44ccedcc2c Merge bitcoin/bitcoin#31818: guix: remove test-security/symbol-check scripts 0264c5d86c7 cmake: use per-target components for bitcoin-qt and bitcoin-gui fb0546b1c5e ci: don't try to install for a fuzz build c65233230f1 Merge bitcoin/bitcoin#31022: test: Add mockable steady clock, tests for PCP and NATPMP implementations 86528937e5c Merge bitcoin/bitcoin#31834: build: disable bitcoin-node if daemon is not built 7afeaa24693 test: `-debug=0` and `-debug=none` behave similarly to `-nodebug` a8fedb36a71 logging: Ensure -debug=0/none behaves consistently with -nodebug d39d521d86a test: `-nodebug` clears previously set debug options 3edaf0b4286 depends: add missing Darwin objcopy 2507ebdf1b2 Merge bitcoin/bitcoin#31837: test: add missing sync to p2p_tx_download.py 79f02d56ef7 Merge bitcoin/bitcoin#30623: test: Fuzz the human-readable part of bech32 as well ff3171f96d3 Merge bitcoin/bitcoin#31614: test: expect that files may disappear from /proc/PID/fd/ 56a9b847bba build: set build type and per-build-type flags as early as possible 8fe552fe6e0 test: add missing sync to p2p_tx_download.py af76664b12d test: Test migration of a solvable script with no privkeys 17f01b0795e test: Test migration of taproot output scripts 1eb9a2a39fd test: Test migration of miniscript in legacy wallets e8c3efc7d8f wallet migration: Determine Solvables with CanProvide fa1b7cd6e2c migration: Skip descriptors which do not parse 440ea1ab639 legacy spkm: use IsMine() to extract watched output scripts b777e84cd70 legacy spkm: Move CanProvide to LegacyDataSPKM b1ab927bbf2 tests: Test migration of additional P2WSH scripts 1d813e4bf52 Merge bitcoin/bitcoin#31819: doc: swap CPPFLAGS for APPEND_CPPFLAGS 2ffea09820e build: disable bitcoin-node if daemon is not built f8d3e0edf47 Merge bitcoin/bitcoin#30205: test: add mocked Sock that can read/write custom data and/or CNetMessages 6b165f5906f Merge bitcoin/bitcoin#31384: mining: bugfix: Fix duplicate coinbase tx weight reservation 6a46be75c43 Merge bitcoin/bitcoin#31793: ci: Use clang-20 for sanitizer tasks 76c090145e9 guix: remove test-security/symbol-check scripts 329b60f595e Merge bitcoin/bitcoin#31810: TxOrphanage: account for size of orphans and count announcements bc3f59ca530 Merge bitcoin/bitcoin#31820: build: consistently use `CLIENT_NAME` in libbitcoinkernel.pc.in dead9086543 cmake: Improve compatibility with Python version managers e107bf78f9d [fuzz] TxOrphanage::SanityCheck accounting fb0ada982a7 Merge bitcoin/bitcoin#31811: test: test_inv_block, use mocktime instead of waiting f5b9a2f68c9 build: use CLIENT_NAME in libbitcoinkernel.pc.in ea687d20293 doc: swap CPPFLAGS for APPEND_CPPFLAGS 81eb6cc2c60 Merge bitcoin/bitcoin#31800: depends: Avoid using the `-ffile-prefix-map` compiler option 2f98d1e06ed Merge bitcoin/bitcoin#31814: ci: Bump fuzz task timeout 9cf746d6631 cmake: add optional source files to crc32c directly 9c7823c5b53 cmake: add optional source files to bitcoin_crypto directly faca7ac1321 ci: Bump fuzz task timeout 22dccea5532 [fuzz] txorphan byte accounting 982ce101781 add orphanage byte accounting to TxDownloadManagerImpl::CheckIsEmpty() c289217c014 [txorphanage] track the total number of announcements e5ea7daee01 [txorphanage] add per-peer weight accounting 672c69c688f [refactor] change per-peer workset to info map within orphanage 59cd0f0e091 [txorphanage] account for weight of orphans f93d6cb0caa Merge bitcoin/bitcoin#31809: Prepare "Open Transifex translations for v29.0" release step f605f7a9c26 build: refactor: set debug definitions in main CMakeLists 2706c5b7c8e test: test_inv_block, use mocktime instead of waiting 0a02e7fdeac test: deduplicates p2p_tx_download constants 2f27c910869 qt: Update the `src/qt/locale/bitcoin_en.xlf` translation source file 864386a7444 cmake: Ensure generated sources are up to date for `translate` target d6c229d8bd4 Merge bitcoin/bitcoin#31804: ci: Remove no longer needed `-Wno-error=documentation` 2b51dd384b4 Update Transifex slug for 29.x 82ba5051342 Merge bitcoin/bitcoin#31759: test: fixes p2p_ibd_txrelay wait time ae9eaa063b6 Merge bitcoin/bitcoin#31760: test: make sure we are on sync with a peer before checking if they have sent a message f1d7a6dfa14 ci: Remove no longer needed '-Wno-error=documentation' a43f08c4ae3 Merge bitcoin/bitcoin#25832: tracing: network connection tracepoints 407062f2ac9 depends: Avoid using the `-ffile-prefix-map` compiler option b9c241804c0 Merge bitcoin/bitcoin#30226: test: add validation for gettxout RPC response 1334ca6c070 Merge bitcoin/bitcoin#31437: func test: Expand tx download preference tests 33932d30e38 Merge bitcoin/bitcoin#31784: test: added additional coverage to waitforblock and waitforblockheight rpc's 2aa7be1744a Merge bitcoin/bitcoin#31358: depends: Avoid hardcoding `host_prefix` in toolchain file 386eecff5f1 doc: add release notes 3eaa0a3b663 miner: init: add `-blockreservedweight` startup option 777434a2cd1 doc: rpc: improve `getmininginfo` help text c8acd4032d5 init: fail to start when `-blockmaxweight` exceeds `MAX_BLOCK_WEIGHT` 5bb31633cc9 test: add `-blockmaxweight` startup option functional test 2c7d90a6d67 miner: bugfix: fix duplicate weight reservation in block assembler fa5a02bcfa2 ci: Use clang-20 for sanitizer tasks 474139aa9bf wallet: abandon inactive coinbase tx and their descendants during startup bb0879ddabc test: check `scanning` field from `getwalletinfo` 94ca99ac51d Merge bitcoin/bitcoin#31666: multi-peer orphan resolution followups 6f5ae1a5745 Merge bitcoin/bitcoin#31653: lint: Call more checks from test_runner e3622a96929 tracing: document that peer addrs can be >68 chars b19b526758f tracing: log_p2p_connections.bt example caa5486574b tracing: connection closed tracepoint b2ad6ede95e tracing: add misbehaving conn tracepoint 68c1ef4f19b tracing: add inbound connection eviction tracepoint 4d61d52f438 tracing: add outbound connection tracepoint 85b2603eec6 tracing: add inbound connection tracepoint 7e0db87d4ff test: added additional coverage to waitforblock and waitforblockheight rpc's f89f16846ec depends: Fix compiling `libevent` package on NetBSD 1172bc4157e Merge bitcoin-core/gui#850: psbt: Use SIGHASH_DEFAULT when signing PSBTs 12fa9511b5f build: simplify dependency graph c4e498300c7 build: avoid unnecessary dependencies on generated headers 7426afbe624 [p2p] assign just 1 random announcer in AddChildrenToWorkSet 4c1fa6b28c2 test fix: make peer who sends MSG_TX announcement non-wtxidrelay 2da46b88f09 pass P2PTxInvStore init args to P2PInterface init e3bd51e4b52 [doc] how unique_parents can be empty 32eb6dc758a [refactor] assign local variable for wtxid 18820ccf6b2 multi-announcer orphan handling test fixups c4cc61db98f [fuzz] GetCandidatePeers 7704139cf0d [refactor] make GetCandidatePeers take uint256 and in-out vector 6e4d392a753 [refactor] rename to OrphanResolutionCandidate to MaybeAdd* 57221ad9797 [refactor] move parent inv-adding to OrphanResolutionCandidate 3f4b104b1b7 test: make sure we are on sync with a peer before checking if they have sent a message 1973a9e4f1d test: fixes p2p_ibd_txrelay wait time 723440c5b8e test framework, wallet: rename get_scriptPubKey method to get_output_script fa0232a3e07 test: add validation for gettxout RPC response 81c174e3186 cmake: Refer to the configure log instead of printing PIE test error e3c01527696 cmake: Copy `cov_tool_wrapper.sh.in` to the build tree faf8fc5487d lint: Call lint_commit_msg from test_runner fa99728b0c8 lint: Move commit range printing to test_runner fa673cf3449 lint: Call lint_scripted_diff from test_runner bb633c9407c tests: add functional test for miniscript decaying multisig c39b3cfcd1b test: Extra verification that migratewallet migrates 0c1b29a0577 ci: use GCC 13 for some jobs cbc65b3ad5a guix: use GCC 13.3.0 for base toolchain. fa952acdb6e ci: Skip read-write of default env vars a759ea3e920 doc: Improve dependencies documentation f0e5e4cdbec test: Add test for rpcwhitelistdefault 0f716f28896 qa: cover PROTOCOL_ERROR variant in PCP unit tests fc700bb47fd test: Add tests for PCP and NATPMP implementations 65a0920ca6b cmake: Add `CheckLinkerSupportsPIE` module caf95210331 net: Use mockable steady clock in PCP implementation 03648321ecb util: Add mockable steady_clock ab1d3ece026 net: Add optional length checking to CService::SetSockAddr 4818da809f0 wallet: fix rescanning inconsistency b2e9fdc00f5 test: expect that files may disappear from /proc/PID/fd/ 3e97ff9c5ea gui, psbt: Use SIGHASH_DEFAULT when signing PSBTs f919d919eb8 fuzz: Add fuzzing for max_ret_len in DecodeBase58/DecodeBase58Check 635bc58f46b test: Fuzz Base32/Base58/Base64 roundtrip conversions 5dd3a0d8a89 test: Extend base58_encode_decode.json with edge cases ae40cf1a8e1 test: Add padding tests for Base32/Base64 4080b66cbec test: add test for utxo-to-sqlite conversion script ec99ed73808 contrib: add tool to convert compact-serialized UTXO set to SQLite database b448b014947 test: add a mocked Sock that allows inspecting what has been Send() to it f1864148c4a test: put the generic parts from StaticContentsSock into a separate class c9136ca9060 validation: fix issue with an interrupted -reindex a2675897e2a validation: Don't loop over all chainstates in LoadExternalBlock 846a1387280 func test: Expand tx download preference tests c4c5cf17488 cmake: Fix passing `APPEND_*FLAGS` to `secp256k1` subtree eb540a26295 cmake: Remove `core_sanitizer_{cxx,linker}_flags` helper variables fa8e0956c23 rpc: Remove deprecated dummy alias for listtransactions::label 9e4a4b48322 cmake: Check `-Wno-*` compiler options for `leveldb` target d9c8aacce38 depends, refactor: Avoid hardcoding `host_prefix` in toolchain file 4b58d55878d test: move the implementation of StaticContentsSock to .cpp 70398ae05bc mapport: make ProcessPCP void 9e6cba29882 mapport: remove unnecessary 'g_mapport_enabled' 8fb45fcda07 mapport: remove unnecessary 'g_mapport_current' variable 1b223cb19b4 mapport: merge DispatchMapPort into StartMapPort 9bd936fa34a mapport: drop unnecessary function 2a6536ceda7 mapport: rename 'use_pcp' to 'enable' c4e82b854cd mapport: make 'enabled' and 'current' bool 9b7023d31a3 Fuzz HRP of bech32 as well c1a5d5c100b Split out bech32 separator char to header b28917be363 depends: Make default `host` and `build` comparable REVERT: 5aeaa3f49d1 kernel: Add pure kernel bitcoin-chainstate REVERT: 6fd40a85c58 kernel: Add functions to get the block hash from a block REVERT: 5a455e0f302 kernel: Add block index utility functions to C header REVERT: 0ecac1bb090 kernel: Add function to read block undo data from disk to C header REVERT: aa3a766eefc kernel: Add functions to read block from disk to C header REVERT: b0e4555ed33 kernel: Add function for copying block data to C header REVERT: 145bd659066 kernel: Add functions for the block validation state to C header REVERT: b45b99fbb79 kernel: Add validation interface to C header REVERT: 881f91aab96 kernel: Add interrupt function to C header REVERT: fdd3ba615ca kernel: Add import blocks function to C header REVERT: 1484e67bf08 kernel: Add chainstate load options for in-memory dbs in C header REVERT: ab872e24041 kernel: Add options for reindexing in C header REVERT: 1abb7360f88 kernel: Add block validation to C header REVERT: c42bfed83d4 kernel: Add chainstate loading when instantiating a ChainstateManager REVERT: 1b7df118081 kernel: Add chainstate manager option for setting worker threads REVERT: 5f61d9eafde kernel: Add chainstate manager object to C header REVERT: a677be25c5d kernel: Add notifications context option to C header REVERT: 1d567b07136 kernel: Add chain params context option to C header REVERT: 60aed1c857c kernel: Add kernel library context object REVERT: ad5c98980a0 kernel: Add logging to kernel library C header REVERT: 6ba27ef2b41 kernel: Introduce initial kernel C header API git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: 29513955891e40e78466f2c666dfa13e9c1b2914
This PR adds tests for
rpcwhitelistdefault.
The implementation is a continuation of this PR.Applied suggestions to include the tests in
rpc_whitelist.py
and to use a single node.PR covers three test cases:
I didn't add tests for rpcwhitelistdefault = 0 with user permissions since that is already tested here: rpc_whitelist.py#L77.