Commit Graph

6079 Commits

Author SHA1 Message Date
Luke Dashjr
aa474f1085 Merge 19242 via uaappend 2024-03-25 17:26:53 +00:00
Luke Dashjr
35723dcd2b Merge 24202 via rpc_dumptxoutset_hr 2024-03-25 17:26:53 +00:00
Luke Dashjr
5a9b913aa7 Merge 18972 via neutrino_whitelist-mini 2024-03-25 17:26:53 +00:00
Luke Dashjr
9c899a42c9 Merge 22693 via getaddressinfo_txids-26 2024-03-25 17:26:53 +00:00
Luke Dashjr
e7bba10dea Merge 15836 via fee_histogram+pr15836_api 2024-03-25 17:26:53 +00:00
Luke Dashjr
ebe4a4a2c4 Merge 18479 via rpc_sign_show_fees 2024-03-25 17:26:53 +00:00
Luke Dashjr
05f22484c3 Merge 26375 via zmq_optimise_duplread-26+k 2024-03-25 17:26:53 +00:00
Luke Dashjr
92bf9fcbfd Merge 29586 via wallet_migrate_null_walletname_bak-26 2024-03-25 17:26:53 +00:00
Luke Dashjr
69eba11ab6 Merge 28805 via qafix_v2t_pr28805-26 2024-03-25 17:26:53 +00:00
Luke Dashjr
4b9186929f Merge 29434 via fix_rpc_feerate_overflow-26 2024-03-25 17:26:53 +00:00
Luke Dashjr
c6a33278a9 Merge 29262 via fix_rpc_loadtxoutset_race-26 2024-03-25 17:26:53 +00:00
Luke Dashjr
60ffe7000f Merge 29175 via fix_rpc_estmode_unset_case-24 2024-03-25 17:26:53 +00:00
Luke Dashjr
9fae003bc4 Merge 29112 via fix_wallet_single_batch_only-26+knots 2024-03-25 17:26:53 +00:00
Luke Dashjr
88b92aedd0 Merge 29141 via fix_rpcauth_blank 2024-03-25 17:26:53 +00:00
Luke Dashjr
27def4d1a0 Merge 29022 via fix_btx_replacable_blank-21 2024-03-25 17:26:53 +00:00
Luke Dashjr
c6906c5a12 Merge 28976 via fix_wallet_migrate_blank-26 2024-03-25 17:26:53 +00:00
Luke Dashjr
89ad002b48 Merge 28946 via fix_keep_notmy_pidfile-26.1+knots 2024-03-25 17:26:53 +00:00
Luke Dashjr
ddfcbbe7ca Merge 28944 via sendall_antifeesniping-26 2024-03-25 17:26:53 +00:00
Luke Dashjr
75ca2d299d Merge 28849 via fix_qa_v2t_pr28849-26 2024-03-25 17:26:53 +00:00
Luke Dashjr
c323b19a1c Merge 28554 via fix_rpc_getnetworkhashps_heightchk-25 2024-03-25 17:26:53 +00:00
Luke Dashjr
a1876706df Merge 28055 via fix_getblockfrompeer_rereq_err 2024-03-25 17:26:53 +00:00
Luke Dashjr
a69e724eed Merge acceptstalefeeestimates_mainnet_opt 2024-03-25 17:26:53 +00:00
Luke Dashjr
8289200d85 Merge 23027 via bugfix_util_test_config 2024-03-25 17:26:53 +00:00
Luke Dashjr
f3b600f95c Merge 22417 via bpchild_closefds 2024-03-25 17:26:53 +00:00
Luke Dashjr
ddcd8a2466 Merge bugfix_rpc_getbalance_hacky 2024-03-25 17:26:53 +00:00
Luke Dashjr
4d85bbdfc2 Merge 14968 via http_bind_error 2024-03-25 17:26:53 +00:00
Luke Dashjr
2501496a0d Merge lint_relaxer-26+knots 2024-03-25 17:26:53 +00:00
Luke Dashjr
8b38251873 Merge 15155 via test_external_bcli 2024-03-25 17:26:53 +00:00
furszy
8a16b8f6a4 wallet: default wallet migration, modify inconvenient backup filename
On default legacy wallets, the backup filename starts with an "-" due
to the wallet name being empty. This is inconvenient for systems who
treat what follows the initial "-" character as flags.

Github-Pull: #29586
Rebased-From: a951dba3a9
2024-03-14 22:42:53 +00:00
Ava Chow
4c3b187547 tests: Test for concurrent writes with db tx
There are occasions where a multi-statement tx is begun in one batch,
and a second batch is created which does a normal write (without a
multi-statement tx). These should not conflict with each other and all
of the data should end up being written to disk.

Github-Pull: #29112
Rebased-From: 548ecd1155
2024-03-14 21:58:14 +00:00
Andrew Toth
38c883d635 test: add test for SyncCoinsTipAfterChainSync
Github-Pull: #15218
Rebased-From: 363f3258b0001faa531cccdaea20d27adbc0d4a6
2024-03-14 18:52:39 +00:00
Doron Somech
22ae5a8bb9 ZMQ: add publishers of wallet tx
Topic will indicate if transaction came from mempool or block so developers can handle the transaction accordingly without a RPC round trip to bitcoind.

(includes ZMQ: Making CWallet::TransactionAddedToWallet static)
2024-03-14 18:38:11 +00:00
Luke Dashjr
3e8c26eb05 Merge branch 'zmq_optimise_duplread-26+k' into zmq_wtx-26+knots 2024-03-14 18:38:02 +00:00
Luke Dashjr
419a749ed7 QA/p2p_mutated_blocks: Adapt disconnection test for relaxed behaviour 2024-03-14 18:33:07 +00:00
Luke Dashjr
dfb7a3a5df QA: Use addconnection rather than addnode onetry 2024-03-14 18:33:05 +00:00
Luke Dashjr
5b89367ff7 Bugfix: QA: p2p_unrequested_blocks: Expect to be disconnected for sending a block with unknown prev
After a1a07cfe99, this is a disconnection trigger for a node's outgoing connections.
2024-03-14 18:33:05 +00:00
Luke Dashjr
e861c7e78e QA: p2p_dos_header_tree: Use node-to-test / outgoing connection to check disconnect due to checkpoint violation
Also disable minimumchainwork test to avoid being disconnected for that

For relax_invblk_punishment
2024-03-14 18:33:05 +00:00
Luke Dashjr
7630a8d474 QA: p2p_invalid_tx: Use node-to-test / outgoing connection to check invalid transaction disconnection
For relax_invblk_punishment
2024-03-14 18:33:05 +00:00
Luke Dashjr
0d2cfe828c QA/feature_block: Adapt disconnection tests for relaxed behaviour 2024-03-14 18:33:05 +00:00
Luke Dashjr
42f639aec3 test/functional/p2p_sendheaders: Don't test for undesirable behaviour 2024-03-14 18:33:05 +00:00
Luke Dashjr
76196f7d41 QA: p2p_unrequested_blocks: Use node-to-test / outgoing connection to check invalid header disconnection 2024-03-14 18:33:05 +00:00
Luke Dashjr
b4e037ee01 QA/Mininode: Support node-to-test connections 2024-03-14 18:33:05 +00:00
ishaanam
a20609e70a test: test sendall and send do anti-fee-sniping
Github-Pull: #28944
Rebased-From: fa1fa35158
2024-03-13 15:45:00 +00:00
ishaanam
13e36c822b wallet, rpc: add anti-fee-sniping to send and sendall
Github-Pull: #28944
Rebased-From: 8e5778a9fb
2024-03-13 15:44:58 +00:00
Matthew Zipkin
621c9903fa test: cover "ismine" and "isactive" field in rpc getaddressinfo
Github-Pull: #27216
Rebased-From: 67650211e36003ca3adddef34118ea45023c283f
2024-03-13 14:28:08 +00:00
Luke Dashjr
c6d76eb31c QA: rpc_getrpcwhitelist: Use requires_wallet rather than manual creation of unnamed wallet 2024-03-10 19:11:12 +00:00
Luke Dashjr
30b14d15a8 RPC: getrpcwhitelist: Return a list of wallets as a JSON Object 2024-03-10 19:11:12 +00:00
Luke Dashjr
638c8f83e5 Merge branch 'multiwallet_rpc-26+knots' into getrpcwhitelist_wallets-26+knots 2024-03-10 19:11:04 +00:00
Luke Dashjr
651c171539 RPC: getrpcwhitelist: Return all methods (or none) if no explicit whitelist defined 2024-03-10 19:10:28 +00:00
Luke Dashjr
05077feddb Merge branch 'rpc_dumptxoutset_hr' into multiwallet_rpc-26+knots 2024-03-10 19:08:36 +00:00
Luke Dashjr
2497930962 QA: Functional test for sweepprivkeys 2024-03-10 19:07:51 +00:00
w0xlt
f77f522f25 test: add test for dump human-readable dumptxoutset
Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
Co-authored-by: brunoerg <brunoely.gc@gmail.com>
2024-03-10 19:06:23 +00:00
Luke Dashjr
b83763a4d9 QA: Allow test_runner to pass without full RPC coverage 2024-03-10 18:59:23 +00:00
Luke Dashjr
03fea09e1f lint-python: Allow for some style differences 2024-03-10 18:59:23 +00:00
Luke Dashjr
2894c2c5a5 lint/python-dead-code: Just warn, but allow 2024-03-10 18:45:15 +00:00
Luke Dashjr
acb3c923e9 lint/circular-dependencies: Only check for real circular dependencies 2024-03-10 18:45:12 +00:00
Luke Dashjr
e8fc5d1e37 lint/includes: Ignore duplicate includes in .cpp files 2024-03-10 18:45:09 +00:00
UdjinM6
40c56a4d13 test: make sure keypool sizes do not change on getrawchangeaddress/getnewaddress failures
Github-Pull: #29510
Rebased-From: e073f1dfda
2024-03-05 10:50:03 +00:00
Greg Sanders
b5419ce6b6 p2p: Don't consider blocks mutated if they don't connect to known prev block
Github-Pull: #29524
Rebased-From: a1fbde0ef7
2024-03-05 10:47:50 +00:00
dergoegge
0c5c5962cb [test] Add regression test for #27608
Github-Pull: #29412
Rebased-From: 5bf4f5ba32
2024-03-05 10:24:27 +00:00
Sergi Delgado Segura
49815aba19 rpc/net: Adds misbehaving_score to getpeerinfo
Github-Pull: #29530
Rebased-From: 976d61c974ed045c2e2497dcebc4d1fcc4d60a29
2024-03-04 20:53:20 +00:00
Luke Dashjr
34bf07df61 Bugfix: QA: rpc_getgeneralinfo: Adapt test for startuptime ignoring mocktime 2024-03-04 17:53:34 +00:00
Luke Dashjr
98aedae443 QA: Actually check getgeneralinfo results are correct 2024-03-04 17:53:34 +00:00
Pieter Wuille
ff52aa4a22 net: enable v2transport by default
Github-Pull: #29347
Rebased-From: 0bef1042ce
2024-03-04 17:50:54 +00:00
Luke Dashjr
5efeaaa5ca Merge remote-tracking branch 'furszy/2023_rpc_getblockfileinfo' into rpc_getblockfileinfo-26+knots 2024-03-04 17:50:04 +00:00
Andrew Poelstra
8721d6f228 codex32: add functional test for seed import
Github-Pull: #27351
Rebased-From: 91771366a3df22b9e8b4b7152d368d739bfeda94
2024-03-04 17:48:21 +00:00
Luke Dashjr
023807a8cc Diff-minimise 2024-03-04 17:45:54 +00:00
Luke Dashjr
5c487b614e Merge remote-tracking branch 'furszy/2022_rpc_importaddress_descriptors_compatible' into rpc_importaddr_for_descwallet-26+k 2024-03-04 17:45:49 +00:00
Luke Dashjr
d29d7580b1 QA: wallet_reindex: Use importdescriptors directly rather than abusing test_framework's importaddress wrapper
`importdescriptors` is expected to initialise wallet birth time to "now", but `importaddress` initialises it to 1 instead.
2024-03-04 17:45:43 +00:00
Lawrence Nahum
1f433a86b7 add support to save fee estimates without shutting down the node 2024-03-04 17:39:26 +00:00
Roman Zeyde
2ee1991c7d RPC: Add getblocklocations call
This RPC allows the client to retrieve the file system locations
of the confirmed blocks and their undo data, to allow building
efficient indexes outside of Bitcoin Core.

An example usage is described here:
https://github.com/romanz/electrs/issues/308

By using the new RPC, it is possible to build an address-based
index taking ~24GB and a txindex taking ~6GB (as of Dec. 2020).
2024-03-04 17:39:06 +00:00
Luke Dashjr
003720ebd5 Allow acceptstalefeeestimates on all networks 2024-03-04 17:26:48 +00:00
Martin Zumsande
255004a460 test: enable v2 transport for p2p_timeouts.py
by skipping the part where we send a non-version message
before the version - this message would be interpreted as
part of the v2 handshake.

Github-Pull: #28805
Rebased-From: 35fb9930ad
2024-03-04 17:20:58 +00:00
Sebastian Falbesoner
5f0f3f942c test: enable v2 transport for rpc_net.py
- "transport_protocol_type" of inbound peer before version handshake
  is "detecting" on p2p v2 nodes (as opposed to "v1" for p2p v1)
- size of a ping/pong message is 29 bytes (as opposed to 32 for p2p v1)
- for the sendmsgtopeer RPC sub-test, enforce p2p v1 connection to
  have a peer id of zero

Github-Pull: #28805
Rebased-From: 2c1669c37a
2024-03-04 17:20:58 +00:00
Luke Dashjr
1dc0afea1b test: enable v2 transport for p2p_node_network_limited.py
Github-Pull: #28805
Rebased-From: cc961c2695
2024-03-04 17:20:58 +00:00
Martin Zumsande
9d6c08ec30 test: enable --v2transport in combination with --usecli
By renaming the "command" send_cli arg. The old name was unsuitable
because the "addnode" RPC has its own "command" arg, leading to
ambiguity when included in kwargs.
Can be tested with
"python3 wallet_multiwallet.py --usecli --v2transport"
which fails on master because of this (python throws a TypeError).

Github-Pull: #28805
Rebased-From: 3598a1b5c9
2024-03-04 17:20:58 +00:00
Luke Dashjr
1d0a7a8198 test: persist -v2transport over restarts and respect -v2transport=0
Before, a global -v2transport provided to the test would be dropped
when restarting the node within a test and specifying any extra_args.

Fix this by adding "v2transport=1" to args (not extra_args) based
on the global parameter, and deciding for each (re)start of the node
based on this default and test-specific extra_args
(which take precedence over args) whether v2 should be used.

Github-Pull: #28805
Rebased-From: 68a9001751
2024-03-04 17:20:58 +00:00
Luke Dashjr
08647db809 Skip changing permissions entirely if -rpccookieperms=0 specified 2024-02-29 01:31:30 +00:00
Luke Dashjr
24ea5d9724 rpccookieperms: Allow setting setxid/sticky bits
Simply for backward compatibility
2024-02-29 01:31:30 +00:00
willcl-ark
c3bf4ef27d test: add rpccookieperms test
Tests various perms on non-Windows OSes

Github-Pull: #28167
Rebased-From: ce9df2aba3e98ba7f2a576d587ba8e59bf341083
2024-02-29 01:31:30 +00:00
Luke Dashjr
546e462f0a Merge branch 'rpcauthfile-26+knots' into rpccookieperms-26+knots 2024-02-29 01:31:16 +00:00
willcl-ark
cc3dd62493 init: don't delete PID file if it was not generated
Previously, starting a second bitcoind using the same datadir would
correctly fail to init and shutdown. However during shutdown the PID
file belonging to the first instance would be erroneously removed by
the second process shutting down.

Fix this to only delete the PID file if we created it.

Github-Pull: #28946
Rebased-From: 8f6ab31863
2024-02-29 01:10:10 +00:00
Luke Dashjr
44256fc2e9 net: Remove forcedinbound limit antifeature 2024-02-28 17:47:30 +00:00
Matthew Zipkin
9349155145 net: add forced_inbound to getpeerinfo
Github-Pull: #27600
Rebased-From: 8c2026848da910fdebff0a9f73e29f1f6ae81e43
2024-02-28 17:47:30 +00:00
Matthew Zipkin
07b24236a8 net: only allow 8 simultaneous forced inbound connections
Github-Pull: #27600
Rebased-From: 75868022a904c1f77871abf962bf9b88a9c5faf6
2024-02-28 17:47:30 +00:00
Matthew Zipkin
cee2e8c415 test: cover ForceInbound permission success even when connections are full
Github-Pull: #27600
Rebased-From: 6b6bcaf0b9ae0a7adaf96bf791aaafc6b5e9f000
2024-02-28 17:47:30 +00:00
brunoerg
f33cd8869d QA: p2p_invalid_messages: Check misbehaving with noban,out whitelisting
Github-Pull: #27114
Rebased-From: 1bae3b2ee6cb96c12fd7810c9362cfb7bdc165ad (partial)
2024-02-28 17:41:11 +00:00
brunoerg
8d290f4c57 test: add coverage for whitelisting manual connections
Github-Pull: #27114
Rebased-From: e6b8f19de9
2024-02-28 17:40:00 +00:00
Roman Zeyde
1e956439eb
rpc: keep .cookie if it was not generated
Otherwise, starting bitcoind twice may cause the `.cookie`
file generated by the first instance to be deleted by the
second instance shutdown (after failing to obtain a lock).

Github-Pull: bitcoin/bitcoin#28784
Rebased-From: 7cb9367157
2024-02-28 11:19:27 +01:00
Luke Dashjr
0e3c426ac1 rpc: implement getgeneralinfo 2024-02-23 22:45:12 +00:00
Jonas Schnelli
c470b72ba3 [RPC] Add interface to access mempool stats 2024-02-22 19:13:44 +00:00
Luke Dashjr
06aafaaa85 RPC/Wallet: Add "use_txids" to output of getaddressinfo
Github-Pull: #22693
Rebased-From: a00bc6f395
2024-02-21 15:58:47 +00:00
MarcoFalke
2d35cc3995 rpc: Fixed signed integer overflow for large feerates
Github-Pull: #29434
Rebased-From: fa2a4fdef7
2024-02-21 03:51:14 +00:00
Ava Chow
66d1d242a1 tests: Test that descriptors flag is set for migrated blank wallets
Github-Pull: #29367
Rebased-From: 3904123da9
2024-02-21 00:49:06 +00:00
Andrew Chow
c0560fccf3 tests: Test migration of blank wallets
Github-Pull: #28976
Rebased-From: c11c404281
2024-02-21 00:47:29 +00:00
Pieter Wuille
7caf2a8895 Make v2transport default for addnode RPC when enabled
Github-Pull: #29239
Rebased-From: 3ba815b42d
2024-01-27 16:05:56 +00:00
Torkel Rogstad
cfd1c957a5 rpc: validate conf_target is set alongside estimate_mode
Github-Pull: #29175
Rebased-From: be8ae64b82
2024-01-26 16:10:45 +00:00
Torkel Rogstad
b8e4d0a26a rpc: validate fee estimation mode case insensitive
Github-Pull: #29175
Rebased-From: 8d40addbd2
2024-01-26 16:10:44 +00:00
MarcoFalke
0aa26d600e test: Use blocks_path where possible
Github-Pull: #29262
Rebased-From: 5555d8db33
2024-01-24 03:44:58 +00:00
glozow
ac1b9a51db
[test] import descriptor wallet with reorged parent + IsFromMe child in mempool
Test that wallet rescans process transactions topologically, even if a
parent's entry into the mempool is later than that of its child.
This behavior is important because IsFromMe requires the ability to look
up a transaction's inputs.

Co-authored-by: furszy <matiasfurszyfer@protonmail.com>

Github-Pull: #29179
Rebased-From: df30247705
2024-01-19 16:13:22 +00:00