Commit Graph

6629 Commits

Author SHA1 Message Date
Luke Dashjr
8b315fea6e Merge 31374 via fix_wallet_migrate_pr31374-27 2025-03-05 03:27:08 +00:00
Luke Dashjr
bb9302e344 Merge 31646 via qafix_inet_access_pr31646-28 2025-03-05 03:27:08 +00:00
Luke Dashjr
0247e6fe0b Merge 31343 via qa_dummy_proxy-21 2025-03-05 03:27:08 +00:00
Luke Dashjr
771789a300 Merge 31212 via improve_args_pr31212-28 2025-03-05 03:27:08 +00:00
Luke Dashjr
ef80edf7c0 Merge 31097 via scripterr_prefer_consensus-28 2025-03-05 03:27:08 +00:00
Luke Dashjr
5f08e7fee5 Merge 29175 via origin-pull/29175/head 2025-03-05 03:27:08 +00:00
Luke Dashjr
3ad996f41b Merge 29141 via fix_rpcauth_blank 2025-03-05 03:27:08 +00:00
Luke Dashjr
2511736937 Merge 28944 via ishaanam/sendall_anti_fee_sniping 2025-03-05 03:27:08 +00:00
Luke Dashjr
52de30f484 Merge 28055 via fix_getblockfrompeer_rereq_err 2025-03-05 03:27:08 +00:00
Luke Dashjr
04db65df5e Merge acceptstalefeeestimates_mainnet_opt 2025-03-05 03:27:08 +00:00
Luke Dashjr
8d840e7947 Merge qafix_assert_debug_log_create 2025-03-05 03:27:08 +00:00
Luke Dashjr
159d9c36b0 Merge 23027 via bugfix_util_test_config 2025-03-05 03:27:08 +00:00
Luke Dashjr
ccf3424296 Merge bugfix_rpc_getbalance_hacky 2025-03-05 03:27:08 +00:00
Luke Dashjr
def0d7f8f8 Merge 14968 via http_bind_error 2025-03-05 03:27:08 +00:00
Luke Dashjr
8d7611a7ec Merge 31408 via qafix_framework_pr31408-27 2025-03-05 03:27:08 +00:00
Luke Dashjr
efeece9f03 Merge lint_relaxer-28+knots 2025-03-05 03:27:08 +00:00
Luke Dashjr
7d6366b565 Merge 15155 via test_external_bcli 2025-03-05 03:27:08 +00:00
Luke Dashjr
5faa5027fa QA: Allow test_runner to pass without full RPC coverage 2025-02-25 19:38:14 +00:00
Luke Dashjr
b24c622edf lint: Allow including bitcoin-config.h without IWYU pragma 2025-02-25 19:38:14 +00:00
Luke Dashjr
eed7bb6496 lint-python: Allow for some style differences 2025-02-25 19:38:14 +00:00
furszy
f56b53cc49 test: add coverage for migrating standalone imported keys
Github-Pull: #31374
Rebased-From: cdd207c0e4
2025-02-24 20:00:08 +00:00
furszy
02e5d9485c test: add coverage for migrating watch-only script
Github-Pull: #31374
Rebased-From: 297a876c98
2025-02-24 20:00:06 +00:00
Luke Dashjr
3abda6a001 Bugfix: QA: test_node: Ensure debug.log exists at start of assert_debug_log 2025-02-24 19:48:11 +00:00
Vasil Dimov
c2ef3896f8 test: avoid generating non-loopback traffic from p2p_dns_seeds.py
`p2p_dns_seeds.py` would try to connect to the DNS server configured on
the machine and resolve `dummySeed.invalid`.

To block that configure an unavailable proxy which will be used also to
connect to the name server. The test needs 2 successful connections to
other peers (two Python `P2PInterface`s) and they work in spite of the
unavailable proxy because they are on `127.0.0.1` (`NET_UNROUTABLE`) and
the proxy is not used for that.

Github-Pull: #31646
Rebased-From: 2ed161c5ce
2025-02-21 15:38:43 +00:00
Vasil Dimov
a015a39bc5 test: avoid generating non-loopback traffic from feature_config_args.py
`feature_config_args.py` uses a proxy address of `1.2.3.4`. This results
in actually trying to open TCP connections over the internet to
`1.2.3.4:9050`.

The test does not need those to succeed so use `127.0.0.1:1` instead.

Also avoid `-noconnect=0` because that is interpreted as `-connect=1`
which is interpreted as `-connect=0.0.0.1` and a connection to
`0.0.0.1:18444` is attempted.

Github-Pull: #31646
Rebased-From: a5746dc559
2025-02-21 15:38:43 +00:00
Vasil Dimov
95f8bfd162 QA/test_framework: Add UNREACHABLE_PROXY_ARG
Github-Pull: #31646
Rebased-From: 6b3f6eae70 (partial)
2025-02-21 15:38:43 +00:00
Hodlinator
c58ca376e2 chore: Typo Overriden -> Overridden
Github-Pull: #31433
Rebased-From: 41d934c72d
2025-02-21 15:32:09 +00:00
Luke Dashjr
529fea94db lint/python-dead-code: Just warn, but allow 2025-02-21 15:27:23 +00:00
Luke Dashjr
f1c9717c7e lint/circular-dependencies: Only check for real circular dependencies 2025-02-21 15:27:23 +00:00
Luke Dashjr
3248ebd754 lint/includes: Ignore duplicate includes in .cpp files 2025-02-21 15:27:23 +00:00
Sebastian Falbesoner
16d60e56de test: avoid internet traffic in rpc_net.py
Can be tested by running

```
$ sudo tcpdump -i eth0 host 11.22.33.44
```

and verifying that no packets appear in the tcpdump output.

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>

Github-Pull: #31343
Rebased-From: 988721d37a
2025-01-08 20:13:57 +00:00
Hodlinator
e1b776466d test: Add tests for directories in place of config files
Github-Pull: #31212
Rebased-From: 95a0104f2e
2025-01-08 18:48:13 +00:00
Hodlinator
6b837312c6 test: Add tests for -noconf
Github-Pull: #31212
Rebased-From: e4b6b1822c
2025-01-08 18:48:13 +00:00
Hodlinator
41970350d4 test refactor: feature_config_args.py - Stop nodes at the end of tests, not at the beginning
This ensures we don't needlessly start the node, and reduces implicit dependencies between test functions.

test_seed_peers() - Move assert calling RPC to verify correct chain after our own function actually started the node.

Github-Pull: #31212
Rebased-From: 312ec64cc0
2025-01-08 18:48:13 +00:00
Hodlinator
56c374dfad test: -norpccookiefile
Both bitcoind and bitcoin-cli.

Github-Pull: #31212
Rebased-From: 7402658bc2
2025-01-08 18:48:13 +00:00
Hodlinator
9b90eea2a1 test: Harden testing of cookie file existence
Github-Pull: #31212
Rebased-From: 6e28c76907
2025-01-08 18:48:13 +00:00
Hodlinator
a613155808 test: combine_logs.py - Output debug.log paths on error
Github-Pull: #31212
Rebased-From: 75bacabb55
2025-01-08 18:48:13 +00:00
MarcoFalke
81b6de569e test: Avoid logging error when logging error
Github-Pull: #31408
Rebased-From: cccca8a77f (minimised)
2025-01-08 14:19:17 +00:00
MarcoFalke
05cd448e33 test: generateblocks called by multiple threads
Co-Authored-By: David Gumberg <davidzgumberg@gmail.com>

Github-Pull: 31563
Rebased-From: fa63b8232f
2025-01-02 14:17:02 +01:00
Martin Zumsande
a0585b6087
test: add functional test for -port behavior
Github-Pull: bitcoin/bitcoin#31223
Rebased-From: 997757dd2b
2024-12-13 21:15:26 -05:00
Martin Zumsande
bbde830b97
net, init: derive default onion port if a user specified a -port
After port collisions are no longer tolerated but lead to
a startup failure in v28.0, local setups of multiple nodes,
each with a different -port value would not be possible anymore
due to collision of the onion default port - even if the nodes
were using tor or not interested in receiving onion inbound connections.

Fix this by deriving the onion listening port to be -port + 1.
(idea by vasild / laanwj)

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>

Github-Pull: bitcoin/bitcoin#31223
Rebased-From: 0e2b12b92a
2024-12-13 21:15:23 -05:00
0xb10c
227642d5af
test: fix MIN macro-redefinition
Renames the `MIN` macro to `_TRACEPOINT_TEST_MIN`.

From #31418:

```
stderr:
/virtual/main.c:70:9: warning: 'MIN' macro redefined [-Wmacro-redefined]
   70 | #define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
      |         ^
include/linux/minmax.h:329:9: note: previous definition is here
  329 | #define MIN(a,b) __cmp(min,a,b)
      |         ^
1 warning generated.
```

fixes: https://github.com/bitcoin/bitcoin/issues/31418

Github-Pull: bitcoin/bitcoin#31419
Rebased-From: 00c1dbd26d
2024-12-11 11:41:49 -05:00
Luke Dashjr
d09a74c7e4 RPC/Wallet: Hacky fix for getbalance bugs 2024-11-14 18:30:13 +00:00
Antoine Poinsot
6c24ce7025 [test] A non-standard transaction which is also consensus-invalid should return the consensus error
Github-Pull: #31097
Rebased-From: 86e2a6b749
2024-11-10 17:58:12 +00:00
Martin Zumsande
b917334208
test: add missing sync to feature_fee_estimation.py
Fixes a race between node 1 catching up with the chain and mining a
new block in the sanity_check_rbf_estimates subtest.

Github-Pull: #31016
Rebased-From: a1576edab3
2024-10-22 16:04:14 +01:00
Fabian Jahr
d39262e5d4
test: Wait for local services to update in feature_assumeutxo
Github-Pull: bitcoin/bitcoin#30880
Rebased-From: 19f4a7c95a
2024-09-12 15:02:05 -04:00
furszy
b329ed739b
test: add coverage for assumeUTXO honest peers disconnection
Exercising and verifying the following points:

1. An IBD node can sync headers from an AssumeUTXO node at
   any time.

2. IBD nodes do not request historical blocks from AssumeUTXO
   nodes while they are syncing the background-chain.

3. The assumeUTXO node dynamically adjusts the network services
   it offers according to its state.

4. IBD nodes can fully sync from AssumeUTXO nodes after they
   finish the background-chain sync.

Github-Pull: bitcoin/bitcoin#30807
Rebased-From: 992f83bb6f
2024-09-11 13:42:54 -04:00
furszy
c6b5db1d59
assumeUTXO: fix peers disconnection during sync
Because AssumeUTXO nodes prioritize tip synchronization, they relay their local
address through the network before completing the background chain sync.
This, combined with the advertising of full-node service (NODE_NETWORK), can
result in an honest peer in IBD connecting to the AssumeUTXO node (while syncing)
and requesting an historical block the node does not have. This behavior leads to
an abrupt disconnection due to perceived unresponsiveness (lack of response)
from the AssumeUTXO node.

This lack of response occurs because nodes ignore getdata requests when they do
not have the block data available (further discussion can be found in PR 30385).

Fix this by refraining from signaling full-node service support while the
background chain is being synced. During this period, the node will only
signal 'NODE_NETWORK_LIMITED' support. Then, full-node ('NODE_NETWORK')
support will be re-enabled once the background chain sync is completed.

Github-Pull: bitcoin/bitcoin#30807
Rebased-From: 6d5812e5c8
2024-09-11 13:42:51 -04:00
MarcoFalke
342baabaff
test: Avoid intermittent timeout in p2p_headers_sync_with_minchainwork.py
Github-Pull: #30761
Rebased-From: fa247e6e8c
2024-09-03 10:01:56 +01:00
Luke Dashjr
a303cde2fd Allow acceptstalefeeestimates on all networks 2024-08-30 17:28:45 +00:00