aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2021-10-07Merge bitcoin/bitcoin#23118: test: refactor: introduce `script_util` helper ↵W. J. van der Laan
for creating P2PK scripts 429b49378ee3a3d73abe276cfd176c1ca08bf9b9 test: introduce script_util helper for creating P2PK scripts (Sebastian Falbesoner) Pull request description: This PR is a follow-up to #22363, which took use of already existing `script_util` helpers to get rid of manual CScript for the P2{PKH,SH,WPKH,WSH} output types, in order to increase readability and maintainability of the test code. Here the same is done for P2PK scripts by introducing a helper `key_to_p2pk_script` and using it. Note that the helper only accepts ECDSA pubkeys (i.e. ones with a size of 33 or 65 bytes), hence it can't be used for scripts in the form of [x-only-pubkey, OP_CHECKSIG]. ACKs for top commit: brunoerg: Code review ACK 429b49378ee3a3d73abe276cfd176c1ca08bf9b9 laanwj: Code review ACK 429b49378ee3a3d73abe276cfd176c1ca08bf9b9 rajarshimaitra: Concept + tACK https://github.com/bitcoin/bitcoin/pull/23118/commits/429b49378ee3a3d73abe276cfd176c1ca08bf9b9 Tree-SHA512: 984aea01eba5f38a328d69905d90a3a36f0a02419ca3e5baf3c8095895fb094e3780c7da16fad5851db3847bdb05ce8cda244ab09b79b8aa9602dfb3c5e0414c
2021-10-07Merge bitcoin/bitcoin#22539: Re-include RBF replacement txs in fee estimationW. J. van der Laan
3b613722f6b895d7b268b3f878fddfc888381226 Add release notes for fee est with replacement txs (Antoine Poinsot) 45564065627ada5dfadff13bc32bc672a4edf152 qa: test fee estimation with replacement transactions (Antoine Poinsot) 053415b297b8665f2d2c4dce7c2c54bcc5298ef4 qa: split run_test into smaller parts (Antoine Poinsot) 06c5ce9714f7090bfb494309980f375975b7a00e Re-include RBF replacement txs in fee estimation (Antoine Poinsot) Pull request description: This effectively reverts #9519. RBF is now largely in use on the network (signaled for by around 20% of all transactions on average) and replacement logic is implemented in most end-user wallets. The rate of replaced transactions is also expected to rise as fee-bumping techniques are being developed for pre-signed transaction ("L2") protocols. ACKs for top commit: prayank23: reACK https://github.com/bitcoin/bitcoin/pull/22539/commits/3b613722f6b895d7b268b3f878fddfc888381226 Zero-1729: re-ACK 3b613722f6b895d7b268b3f878fddfc888381226 benthecarman: reACK 3b613722f6b895d7b268b3f878fddfc888381226 glozow: ACK 3b613722f6b895d7b268b3f878fddfc888381226 theStack: re-ACK 3b613722f6b895d7b268b3f878fddfc888381226 🍪 Tree-SHA512: a6146d15c80ff4ba9249314b0ef953a66a15673e61b8f98979642814f1b169b5695e330e3ee069fa9a7e4d1f8aa10e1dcb7f9aa79181cea5a4c4dbcaf5483023
2021-10-07Merge bitcoin/bitcoin#23146: Test transactions conflicted by double spend in ↵MarcoFalke
listtransactions 502f50da12694dd0193744427f0f89238e612f54 Test transactions conflicted by double spend in listtransactions (Jon Atack) Pull request description: Test the properties of transactions conflicted by a double spend as returned by RPC listtransactions in the abandoned, confirmations, trusted and walletconflicts fields. These fields are also returned by RPCs listsinceblock and gettransactions. ACKs for top commit: brunoerg: tACK 502f50da12694dd0193744427f0f89238e612f54 rajarshimaitra: Concept + tACK https://github.com/bitcoin/bitcoin/pull/23146/commits/502f50da12694dd0193744427f0f89238e612f54 Tree-SHA512: 28968f4a5f1960ea45b2e6f5b20fe25c1b51f66944062dcddea52ea970ad21c74d583793d091b84e8a5e506d6aecc1f0435c5b918213975b22c38e02bba19aa1
2021-10-07Merge bitcoin/bitcoin#23210: test: Replace satoshi_round with int() or Decimal()MarcoFalke
fa2ac5881edf8d0d3f15c43f089f1831348dfae2 test: Replace satoshi_round with int() or Decimal() (MarcoFalke) Pull request description: satoshi_round will round down. To make the code easier to parse use Decimal() where possible, which does not round. Or use int(), which explicitly rounds down. ACKs for top commit: lsilva01: Tested ACK https://github.com/bitcoin/bitcoin/pull/23210/commits/fa2ac5881edf8d0d3f15c43f089f1831348dfae2 on Ubuntu 20.04. Tree-SHA512: 17795d906aa7652933d43e510e993cdd9cf8926da1febf1c42d463048cb38c92dc518ec08736efe29c0189ffd532b108bc7a715f32b4c2ee58b215df65352eb9
2021-10-06test: Replace satoshi_round with int() or Decimal()MarcoFalke
satoshi_round will round down. To make the code easier to parse use Decimal() where possible, which does not round. Or use int(), which explicitly rounds down.
2021-10-06test: Avoid RPC roundtrip in MiniWallet get_descriptor()MarcoFalke
2021-10-06Fix intermittent test failures due to missing sync_allSamuel Dobson
2021-10-06Use self.generate not node.generate throughout testsSamuel Dobson
2021-10-05Merge bitcoin/bitcoin#22950: [p2p] Pimpl AddrMan to abstract implementation ↵MarcoFalke
details 021f86953e8a1dff8ecc768186368d345c865cc2 [style] Run changed files through clang formatter. (Amiti Uttarwar) 375750387e35ed751d1f5ab48860bdec93977f64 scripted-diff: Rename CAddrInfo to AddrInfo (Amiti Uttarwar) dd8f7f250095e58bbf4cd4effb481b52143bd1ed scripted-diff: Rename CAddrMan to AddrMan (Amiti Uttarwar) 3c263d3f63c3598954ee2b65a0e721e3c22e52f8 [includes] Fix up included files (Amiti Uttarwar) 29727c2aa1233f7c5b91a17884c405e0aef10c6e [doc] Update comments (Amiti Uttarwar) 14f9e000d05f82b364d5a142cafc70b10406b660 [refactor] Update GetAddr_() function signature (Amiti Uttarwar) 40acd6fc9a8098fed85abf4fb727a5f0dff8a2ff [move-only] Move constants to test-only header (Amiti Uttarwar) 7cf41bbb38db5008f9b69037b88138076d6a6cc5 [addrman] Change CAddrInfo access (Amiti Uttarwar) e3f1ea659c9eb1e8be4579923d6acaaab148c2ef [move-only] Move CAddrInfo to test-only header file (Amiti Uttarwar) 7cba9d56185b9325ce41d79364e448462fff0f6a [net, addrman] Remove external dependencies on CAddrInfo objects (Amiti Uttarwar) 8af5b54f973e11c847345418d8631bc301b96130 [addrman] Introduce CAddrMan::Impl to encapsulate addrman implementation. (Amiti Uttarwar) f2e5f38f09ee40933f752680fe7d75ee8e529fae [move-only] Match ordering of CAddrMan declarations and definitions (Amiti Uttarwar) 5faa7dd6d871eac1a0ec5c4a93f2ad7577781a56 [move-only] Move CAddrMan function definitions to cpp (Amiti Uttarwar) Pull request description: Introduce the pimpl pattern for AddrMan to separate the implementation details from the externally used object representation. This reduces compile-time dependencies and conceptually clarifies AddrMan's interface from the implementation specifics. Since the unit & fuzz tests currently rely on accessing AddrMan internals, this PR introduces addrman_impl.h, which is exclusively imported by addrman.cpp and test files. ACKs for top commit: jnewbery: ACK 021f86953e8a1dff8ecc768186368d345c865cc2 GeneFerneau: utACK [021f869](https://github.com/bitcoin/bitcoin/pull/22950/commits/021f86953e8a1dff8ecc768186368d345c865cc2) mzumsande: ACK 021f86953e8a1dff8ecc768186368d345c865cc2 rajarshimaitra: Concept + Code Review ACK https://github.com/bitcoin/bitcoin/pull/22950/commits/021f86953e8a1dff8ecc768186368d345c865cc2 theuni: ACK 021f86953e8a1dff8ecc768186368d345c865cc2 Tree-SHA512: aa70cb77927a35c85230163c0cf6d3872382d79048b0fb79341493caa46f8e91498cb787d8b06aba4da17b2f921f2230e73f3d66385519794fff86a831b3a71d
2021-10-04Merge bitcoin/bitcoin#20487: Add syscall sandboxing using seccomp-bpf (Linux ↵W. J. van der Laan
secure computing mode) 4747da3a5b639b5a336b737e7e3cbf060cf2efcf Add syscall sandboxing (seccomp-bpf) (practicalswift) Pull request description: Add experimental syscall sandboxing using seccomp-bpf (Linux secure computing mode). Enable filtering of system calls using seccomp-bpf: allow only explicitly allowlisted (expected) syscalls to be called. The syscall sandboxing implemented in this PR is an experimental feature currently available only under Linux x86-64. To enable the experimental syscall sandbox the `-sandbox=<mode>` option must be passed to `bitcoind`: ``` -sandbox=<mode> Use the experimental syscall sandbox in the specified mode (-sandbox=log-and-abort or -sandbox=abort). Allow only expected syscalls to be used by bitcoind. Note that this is an experimental new feature that may cause bitcoind to exit or crash unexpectedly: use with caution. In the "log-and-abort" mode the invocation of an unexpected syscall results in a debug handler being invoked which will log the incident and terminate the program (without executing the unexpected syscall). In the "abort" mode the invocation of an unexpected syscall results in the entire process being killed immediately by the kernel without executing the unexpected syscall. ``` The allowed syscalls are defined on a per thread basis. I've used this feature since summer 2020 and I find it to be a helpful testing/debugging addition which makes it much easier to reason about the actual capabilities required of each type of thread in Bitcoin Core. --- Quick start guide: ``` $ ./configure $ src/bitcoind -regtest -debug=util -sandbox=log-and-abort … 2021-06-09T12:34:56Z Experimental syscall sandbox enabled (-sandbox=log-and-abort): bitcoind will terminate if an unexpected (not allowlisted) syscall is invoked. … 2021-06-09T12:34:56Z Syscall filter installed for thread "addcon" 2021-06-09T12:34:56Z Syscall filter installed for thread "dnsseed" 2021-06-09T12:34:56Z Syscall filter installed for thread "net" 2021-06-09T12:34:56Z Syscall filter installed for thread "msghand" 2021-06-09T12:34:56Z Syscall filter installed for thread "opencon" 2021-06-09T12:34:56Z Syscall filter installed for thread "init" … # A simulated execve call to show the sandbox in action: 2021-06-09T12:34:56Z ERROR: The syscall "execve" (syscall number 59) is not allowed by the syscall sandbox in thread "msghand". Please report. … Aborted (core dumped) $ ``` --- [About seccomp and seccomp-bpf](https://en.wikipedia.org/wiki/Seccomp): > In computer security, seccomp (short for secure computing mode) is a facility in the Linux kernel. seccomp allows a process to make a one-way transition into a "secure" state where it cannot make any system calls except exit(), sigreturn(), and read() and write() to already-open file descriptors. Should it attempt any other system calls, the kernel will terminate the process with SIGKILL or SIGSYS. In this sense, it does not virtualize the system's resources but isolates the process from them entirely. > > […] > > seccomp-bpf is an extension to seccomp that allows filtering of system calls using a configurable policy implemented using Berkeley Packet Filter rules. It is used by OpenSSH and vsftpd as well as the Google Chrome/Chromium web browsers on Chrome OS and Linux. (In this regard seccomp-bpf achieves similar functionality, but with more flexibility and higher performance, to the older systrace—which seems to be no longer supported for Linux.) ACKs for top commit: laanwj: Code review and lightly tested ACK 4747da3a5b639b5a336b737e7e3cbf060cf2efcf Tree-SHA512: e1c28e323eb4409a46157b7cc0fc29a057ba58d1ee2de268962e2ade28ebd4421b5c2536c64a3af6e9bd3f54016600fec88d016adb49864b63edea51ad838e17
2021-10-04Merge bitcoin/bitcoin#20452: util: Replace use of locale dependent atoi(…) ↵W. J. van der Laan
with locale-independent std::from_chars(…) (C++17) 4343f114cc661cf031ec915538c11b9b030e2e15 Replace use of locale dependent atoi(…) with locale-independent std::from_chars(…) (C++17) (practicalswift) Pull request description: Replace use of locale dependent `atoi(…)` with locale-independent `std::from_chars(…)` (C++17). ACKs for top commit: laanwj: Code review ACK 4343f114cc661cf031ec915538c11b9b030e2e15 jonatack: Code review ACK 4343f114cc661cf031ec915538c11b9b030e2e15 Tree-SHA512: e4909da282b6cefc5ca34e13b02cc489af56cab339a77ae5c35ac9ef355d9b941b129a2bfddc1b37426b11c79a21c8b729fbb5255e6d9eaa344406b18b825494
2021-10-04Merge bitcoin/bitcoin#23052: test: use miniwallet in test_rpc function in ↵MarcoFalke
feature_rbf.py 74c0d81b46150923f9af9631f4e3ecf80213cca2 test: use miniwallet in test_rpc() function in feature_rbf.py (Shubhankar) Pull request description: This PR aims to further increase MiniWallet usage in the functional test feature_rbf.py by using it in the test_rpc(...) . Sub test needs wallet to get a utxo for creating raw txn, and to get address for output, address can be hardcoded and mini wallet can be used for utxo. fund raw transaction is a wallet rpc and should be tested only when bitcoin core is compiled with wallet ACKs for top commit: laanwj: Code review ACK 74c0d81b46150923f9af9631f4e3ecf80213cca2 theStack: tACK 74c0d81b46150923f9af9631f4e3ecf80213cca2 Tree-SHA512: a98cc0df0fe70ee113a293cd4fd659c5bece47c17937d368193b65b150b331a2c694cdeb2792386f1a6deefb8d6750ed83ffa0ae6f9d13fa2b7625cd80bc692a
2021-10-04Merge bitcoin/bitcoin#17211: Allow fundrawtransaction and ↵Samuel Dobson
walletcreatefundedpsbt to take external inputs 928af61cdb2c4de1c3d10e6fda13bbba5ca0bba9 allow send rpc take external inputs and solving data (Andrew Chow) e39b5a5e7aa4d015257565ca79dc7b1f7a65e074 Tests for funding with external inputs (Andrew Chow) 38f5642cccf2b6708e58f5e2af5ecdcf752e61ec allow fundtx rpcs to work with external inputs (Andrew Chow) d5cfb864ae16da62399bc97ab1ed54d32cf0cce9 Allow Coin Selection be able to take external inputs (Andrew Chow) a00eb388e8046fe105666445dff6c91e8f8664cb Allow CInputCoin to also be constructed with COutPoint and CTxOut (Andrew Chow) Pull request description: Currently `fundrawtransaction` and `walletcreatefundedpsbt` both do not allow external inputs as the wallet does not have the information necessary to estimate their fees. This PR adds an additional argument to both those RPCs which allows the user to specify solving data. This way, the wallet can use that solving data to estimate the size of those inputs. The solving data can be public keys, scripts, or descriptors. ACKs for top commit: prayank23: reACK https://github.com/bitcoin/bitcoin/commit/928af61cdb2c4de1c3d10e6fda13bbba5ca0bba9 meshcollider: Re-utACK 928af61cdb2c4de1c3d10e6fda13bbba5ca0bba9 instagibbs: crACK 928af61cdb2c4de1c3d10e6fda13bbba5ca0bba9 yanmaani: utACK 928af61. Tree-SHA512: bc7a6ef8961a7f4971ea5985d75e2d6dc50c2a90b44c664a1c4b0f1be5c1c97823516358fdaab35771a4701dbefc0862127b1d0d4bfd02b4f20d2befa4434700
2021-10-03allow send rpc take external inputs and solving dataAndrew Chow
2021-10-03Tests for funding with external inputsAndrew Chow
2021-10-02Test transactions conflicted by double spend in listtransactionsJon Atack
Test the properties of transactions conflicted by a double spend as returned by RPC listtransactions in the "abandoned", "confirmations", "trusted" and "walletconflicts" fields. These fields are also returned by RPCs listsinceblock and gettransactions.
2021-10-01Add syscall sandboxing (seccomp-bpf)practicalswift
2021-10-01Merge bitcoin/bitcoin#23136: test: update fee rate assertion helper in the ↵MarcoFalke
functional test framework b658d7d5c5339739dc19bf961d84186469a818d5 test: update assert_fee_amount() in test_framework/util.py (Jon Atack) Pull request description: Follow-up to 42e1b5d9797b65 (#12486). - update call to `round()` with our utility function `satoshi_round()` to avoid intermittent test failures - rename `fee_per_kB` to `feerate_BTC_kvB` for precision - store division result in `feerate_BTC_vB` Possibly resolves #19418. ACKs for top commit: meshcollider: utACK b658d7d5c5339739dc19bf961d84186469a818d5 Tree-SHA512: f124ded98c913f98782dc047a85a05d3fdf5f0585041fa81129be562138f6261ec1bd9ee2af89729028277e75b591b0a7ad50244016c2b2fa935c6e400523183
2021-10-01Merge bitcoin/bitcoin#22340: p2p: Use legacy relaying to download blocks in ↵MarcoFalke
blocks-only mode 18c5b23a0f7adf9a08bcaa967ed800badf62d90a [test] Test that -blocksonly nodes still serve compact blocks. (Niklas Gögge) a79ad65fc2c31a2b1132a6aab389d0197a95c395 [test] Test that getdata(CMPCT) is still sent on regular low bandwidth connections. (Niklas Gögge) 5e231c116ba8165e9d8c795b85ca2833238aed54 [test] Test that -blocksonly nodes do not send getdata(CMPCT) on a low bandwidth connection. (Niklas Gögge) 5bf658745782eb571215d6c1e5fe3c655edb55b3 [test] Test that -blocksonly nodes do not request high bandwidth mode. (Niklas Gögge) 0dc8bf5b925ca876c0b1a100e426056d741aafde [net processing] Dont request compact blocks in blocks-only mode (Niklas Gögge) Pull request description: A blocks-only node does not participate in transaction relay to reduce its own bandwidth usage and therefore does not have a mempool. The use of compact blocks is not beneficial to such a node since it will always have to download full blocks. In both high- and low-bandwidth relaying the `cmpctblock` message is sent. This represent a bandwidth overhead for blocks-only nodes because the `cmpctblock` message is several times larger in the average case than the equivalent `headers` or `inv` announcement. ![compact blocks](https://raw.githubusercontent.com/bitcoin/bips/master/bip-0152/protocol-flow.png) >**Example:** >A block with 2000 txs results in a `cmpctblock` with 2000*6 bytes in short ids. This is several times larger than the equivalent 82 bytes for a `headers` message or 37 bytes for an `inv`. ## Approach This PR makes blocks-only nodes always use the legacy relaying to download new blocks. It does so by making blocks-only nodes never initiate a high-bandwidth block relay connection by disabling the sending of `sendcmpct(1)`. Additionally a blocks-only node will never request a compact block using `getdata(CMPCT)`. A blocks-only node will continue to serve compact blocks to its peers in both high- and low-bandwidth mode. ACKs for top commit: naumenkogs: ACK 18c5b23a0f7adf9a08bcaa967ed800badf62d90a rajarshimaitra: tACK https://github.com/bitcoin/bitcoin/pull/22340/commits/18c5b23a0f7adf9a08bcaa967ed800badf62d90a jnewbery: reACK 18c5b23a0f theStack: re-ACK 18c5b23a0f7adf9a08bcaa967ed800badf62d90a 🥛 Tree-SHA512: 0c78804aa397513d41f97fe314efb815efcd852d452dd903df9d4749280cd3faaa010fa9b51d7d5168b8a77e08c8ab0a491ecdbdb3202f2e9cd5137cddc74624
2021-09-30Merge bitcoin/bitcoin#23123: Remove `-rescan` startup parameterW. J. van der Laan
dc3ec74d67abc85e8f724648f93efdd097e6f783 Add rescan removal release note (Samuel Dobson) bccd1d942d971e70e7a0f4f5628e1b74b3ac15e0 Remove -rescan startup parameter (Samuel Dobson) f963b0fa8cdd5223feb828c5faf6c57bc4107c8a Corrupt wallet tx shouldn't trigger rescan of all wallets (Samuel Dobson) 6c006495ef07f163d0734ec35d3cd1589a4aae9d Remove outdated dummy wallet -salvagewallet arg (Samuel Dobson) Pull request description: Remove the `-rescan` startup parameter. Rescans can be run with the `rescanblockchain` RPC. Rescans are still done on wallet-load if needed due to corruption, for example. ACKs for top commit: achow101: ACK dc3ec74d67abc85e8f724648f93efdd097e6f783 laanwj: re-ACK dc3ec74d67abc85e8f724648f93efdd097e6f783 Tree-SHA512: 608360d0e7d73737fd3ef408b01b33d97a75eebccd70c6d1b47a32fecb99b9105b520b111b225beb10611c09aa840a2b6d2b6e6e54be5d0362829e757289de5c
2021-09-30test: update assert_fee_amount() in test_framework/util.pyJon Atack
- update call to round() with satoshi_round() to avoid intermittent test failures - rename fee_per_kB to feerate_BTC_kvB for precision - store division result in feerate_BTC_vB
2021-09-30Replace use of locale dependent atoi(…) with locale-independent ↵practicalswift
std::from_chars(…) (C++17) test: Add test cases for LocaleIndependentAtoi fuzz: Assert legacy atoi(s) == LocaleIndependentAtoi<int>(s) fuzz: Assert legacy atoi64(s) == LocaleIndependentAtoi<int64_t>(s)
2021-09-30Merge bitcoin/bitcoin#20457: util: Make Parse{Int,UInt}{32,64} use locale ↵W. J. van der Laan
independent std::from_chars(…) (C++17) instead of locale dependent strto{l,ll,ul,ull} 4747db876154ddd828c03d9eda10ecf8b25d8dc8 util: Introduce ToIntegral<T>(const std::string&) for locale independent parsing using std::from_chars(…) (C++17) (practicalswift) Pull request description: Make `Parse{Int,UInt}{32,64}` use locale independent `std::from_chars(…)` (C++17) instead of locale dependent `strto{l,ll,ul,ull}`. [About `std::from_chars`](https://en.cppreference.com/w/cpp/utility/from_chars): _"Unlike other parsing functions in C++ and C libraries, `std::from_chars` is locale-independent, non-allocating, and non-throwing."_ ACKs for top commit: laanwj: Code review ACK 4747db876154ddd828c03d9eda10ecf8b25d8dc8 Tree-SHA512: 40f2cd582bc19ddcf2c498eca3379167619eff6aa047bbac2f73b8fd8ecaefe5947c66700a189f83848751f9f8c05645e83afd4a44a1679062aee5440dba880a
2021-09-30Merge bitcoin/bitcoin#23104: log: Avoid breaking single log lines over ↵W. J. van der Laan
multiple lines in the log file 2222c04e1b9960030cb590c789a0d2375add4544 log: Adjust coin selection log string (MarcoFalke) fa6c1e850f3a96f884ba8a635b72d3abea1f4e56 test: Fix typos in tests (MarcoFalke) faeae2980fa2493391cdced20950a991e28cf47d log: Avoid broken DEBUG_LOCKORDER log (MarcoFalke) faffaa85cde32b621f598a8ea8dceae34f33f021 log: Avoid broken SELECTCOINS log (MarcoFalke) Pull request description: Follow up to commit d8b4b3077fd20c90b635eff1dd240bdad9725027 ACKs for top commit: laanwj: re-ACK 2222c04e1b9960030cb590c789a0d2375add4544 practicalswift: cr ACK 2222c04e1b9960030cb590c789a0d2375add4544 Tree-SHA512: e0daf76815a1b7c4898ceffedeaf7ede093223abf709874f9a0d78c8e41551c14e8b56d055c8fdf06ec698df64e67dfc168bbd8716131b23648d1d1294fa6636
2021-09-30Merge bitcoin/bitcoin#23126: doc: update developer docs for subtree renamingfanquake
2b90eae33c0b368cc9b3939be224c36c45abd50d doc: update developer docs for subtree renaming (fanquake) Pull request description: Update the developer docs after the [recent subtree renaming](https://github.com/bitcoin/bitcoin/pull/22646#issuecomment-921154730). ACKs for top commit: hebasto: ACK 2b90eae33c0b368cc9b3939be224c36c45abd50d Tree-SHA512: ed0eec8db888e60595c07f4fad0a506673e4b10345fb2dd6d1a98d785da22bddf1fe8896aa52fd67f5e1688e3c91c6b642739e08646f1b920f50f0d35037d961
2021-09-30Remove -rescan startup parameterSamuel Dobson
2021-09-29test: Fix typos in testsMarcoFalke
2021-09-29qa: test fee estimation with replacement transactionsAntoine Poinsot
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-09-29qa: split run_test into smaller partsAntoine Poinsot
Let's not have run_test get into a giant function as we add more tests Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-09-29test: use miniwallet in test_rpc() function in feature_rbf.pyShubhankar
2021-09-29test: introduce script_util helper for creating P2PK scriptsSebastian Falbesoner
2021-09-29Merge bitcoin/bitcoin#23124: Fix feature_segwit.py failure due to witnessMarcoFalke
b207971465f5c0dd2b1b663dcb8b74e0ac59b301 Fix feature_segwit failure due to witness (Samuel Dobson) Pull request description: Fixes #23116 The failure is due to sometimes spending segwit outputs, which add an additional 1 sigop in the witness, added to the 2 (*4) in the outputs. ACKs for top commit: brunoerg: tACK b207971465f5c0dd2b1b663dcb8b74e0ac59b301 Tree-SHA512: 7e3c09d162e6941a3028514e95ae3aab2a3f858e2f056229c5faff5e37ece897dc63e3f8c0e07fad9fc4621b74a6dee5ff777e910b2b009a41bb6e72a09217bd
2021-09-29Merge bitcoin/bitcoin#23079: test: use MiniWallet for p2p_filter.pyMarcoFalke
cfdb6baa22b8eb526fcbe1e5131bf4a3fd0cd672 test: use MiniWallet for p2p_filter.py (Sebastian Falbesoner) 6fc2cd3f09d023b2e971dcdf8472956259f94c1d test: introduce helper to create random P2WPKH scriptPubKeys (Sebastian Falbesoner) aa26797f69e6ed10efcad9fb07be7f5b3b0ee513 test: MiniWallet: add `send_to` method to create arbitrary txouts (Sebastian Falbesoner) Pull request description: This PR enables one more of the non-wallet functional tests (p2p_filter.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in #20078. For this purpose, a MiniWallet method `send_to` is introduced first, which allows to create arbitrary outputs (scriptPubKey/amount). Note that the implementation for this is already present in feature_rbf.py (recently added in PR #22998), i.e. it is simply moved to the MiniWallet interface. ACKs for top commit: laanwj: Code review ACK cfdb6baa22b8eb526fcbe1e5131bf4a3fd0cd672 Tree-SHA512: 13b063631f0d7af065b7757cfe8b47c9be6cb9850ac5db2968a2bba4f5a18cdc9f89173a9b03971545356225082042f5fdbe49d3036027d18e8b7eb042d04f5e
2021-09-29doc: update developer docs for subtree renamingfanquake
2021-09-29Merge bitcoin/bitcoin#23120: test: Remove unused and confusing main ↵MarcoFalke
parameter from script_util fa54efda9bc8f8f742dacbc3673516d88d9d601d test: pep-8 touched test (MarcoFalke) fa4676805910bfea5549f5b51460c8456bc8945c test: Remove unused and confusing main parameter from script_util (MarcoFalke) Pull request description: ACKs for top commit: fanquake: ACK fa54efda9bc8f8f742dacbc3673516d88d9d601d Tree-SHA512: 124e888e16c92bb24ab4d6f68a768d295500a48f8c6c0b4f069493effcd761f80be78dd93b31edbb529ebe4c8aaca764aaff48d1e3b23659dde722981dc787a5
2021-09-29Fix feature_segwit failure due to witnessSamuel Dobson
2021-09-28scripted-diff: Rename CAddrMan to AddrManAmiti Uttarwar
-BEGIN VERIFY SCRIPT- git grep -l CAddrMan src/ test/ | xargs sed -i 's/CAddrMan/AddrMan/g' -END VERIFY SCRIPT-
2021-09-29Merge bitcoin/bitcoin#20591: wallet, bugfix: fix ComputeTimeSmart function ↵Samuel Dobson
during rescanning process. 240ea294d5e899a906f213f039b21e94c24d6018 doc: update doxygen documention of ComputeTimeSmart() and AddToWalletIfInvolvingMe() regarding rescanning_old_block parameter (BitcoinTsunami) d6eb39af21810bf1c3bdce0ef2212c1ad6597bcd test: add functional test to check transaction time determination during block rescanning (BitcoinTsunami) 07b44f16e71b9df10dfac7f32f92997938f7e7aa wallet: fix ComputeTimeSmart algorithm to use blocktime during old block rescanning (BitcoinTsunami) Pull request description: The function ComputeTimeSmart in wallet.cpp assume that transaction are discovered in the right order. Moreover the 'smarttime' determination algorithm is coded with realtime scenario in mind and not rescanning of old block. The functional test demonstrate that if the user import a wallet, then rescan only recent history, and then rescan the entire history, the older transaction discovered would have an incorrect time determination. In the context of rescanning old block, the only time value that as a meaning is the blocktime. That's why I've fixed the problem with a simple separation between rescanning of old block and realtime time determination. The fix is written to have no impact on every realtime scenario and only impact the behaviour during a rescanning process. This PR Fixes #20181. To be fair, I don't think that this bug could be triggered with the wallet GUI, because it always proceed with a proper rescan. But RPC API provide the possibility to trigger it. I've discovered it, because Specter desktop v0.10.0 was impacted. (https://github.com/cryptoadvance/specter-desktop/issues/680). ACKs for top commit: jonatack: ACK 240ea294d5e899a906f213f039b21e94c24d6018 per `git diff b92d552 240ea29`, re-verified rebase to latest master + debug build clean + new test passes on the branch and fails on master, only change since my review a few hours ago is incorporation of latest review suggestions meshcollider: re-utACK 240ea294d5e899a906f213f039b21e94c24d6018 Tree-SHA512: 514b02e41d011ddfa325f5e8080b93800e1ea4ed5853fa420670a6ac700e8b463000dbea65f8ced8565cfb950c7f51b69154034dcb111e67aca3b964a0061494
2021-09-29Merge bitcoin/bitcoin#22722: rpc: update estimatesmartfee to return max of ↵Samuel Dobson
CBlockPolicyEstimator::estimateSmartFee, mempoolMinFee and minRelayTxFee ea31caf6b4c182c6f10f136548f84e603800511c update estimatesmartfee rpc to return max of estimateSmartFee, mempoolMinFee and minRelayTxFee. (pranabp-bit) Pull request description: This PR is in response to the issue [#19699](https://github.com/bitcoin/bitcoin/issues/19699). Based on the discussion in the comments of PR [#22673](https://github.com/bitcoin/bitcoin/pull/22673) changes have been made in the `estimatesmartfee` itself such that it takes into account `mempoolMinFee` and `relayMinFee` . Hence it provides a fee estimate that is most likely to be paid by the user in an actual transaction, preventing issues such as [#16072](https://github.com/bitcoin/bitcoin/issues/16072). The test file test/functional/feature_fee_estimation.py has also been updated to check this functionality. ACKs for top commit: meshcollider: re-utACK ea31caf6b4c182c6f10f136548f84e603800511c Tree-SHA512: 8f36153a07cbd552c5c13d11d9c6e987a7a555ea4cc83f2573c0c92dd97c706d90c30a7248671437c2f3a836d3272f8fad53d15a5fa6efaa0409ae8009b0a18d
2021-09-29Merge bitcoin/bitcoin#22650: Remove -deprecatedrpc=addresses flag and ↵Samuel Dobson
corresponding code/logic 43cd6b8af9d613ca033800c5cd8524c3f77e13ec doc: add release notes for removal of the -deprecatedrpc=addresses flag (Michael Dietz) 2b1fdc2c6ce1d0b0e51a3f107e23443c142d57af refactor: minor styling, prefer snake case and same line if (Michael Dietz) d64deac7b823a0eba97ab3a3686054eefe330d3c refactor: share logic between ScriptPubKeyToUniv and ScriptToUniv (Michael Dietz) 8721638daa8502c7f8de5ae24a9393d7290a2ce5 rpc: remove deprecated addresses and reqSigs from rpc outputs (Michael Dietz) Pull request description: Resolves #21797 now that we've branched-off to v23 ("addresses" and "reqSigs" deprecated) "ExtractDestinations" should be removed. `-deprecatedrpc=addresses` was initially added in this PR #20286 (which resolved the original issue #20102). Some chunks of code and logic are no longer used/necessary with the removal of this, and therefore some minor refactoring is done in this PR as well (separated commits) ACKs for top commit: MarcoFalke: re-ACK 43cd6b8af9d613ca033800c5cd8524c3f77e13ec 🐉 meshcollider: Code review ACK 43cd6b8af9d613ca033800c5cd8524c3f77e13ec jonatack: ACK 43cd6b8af9d613ca033800c5cd8524c3f77e13ec per `git range-diff a9d0cec 92dc5e9 43cd6b8`, also rebased to latest master, debug built + quick re-review of each commit to bring back context, and ran tests locally at the final commit Tree-SHA512: fba83495e396d3c06f0dcf49292f14f4aa6b68fa758f0503941fade1a6e7271cda8378e2734af1faea550d1b43c85a36c52ebcc9dec0732936f9233b4b97901c
2021-09-28[test] Test that -blocksonly nodes still serve compact blocks.Niklas Gögge
2021-09-28[test] Test that getdata(CMPCT) is still sent on regular low bandwidth ↵Niklas Gögge
connections. Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org>
2021-09-28[test] Test that -blocksonly nodes do not send getdata(CMPCT) on a low ↵Niklas Gögge
bandwidth connection. Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org>
2021-09-28[test] Test that -blocksonly nodes do not request high bandwidth mode.Niklas Gögge
Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org>
2021-09-28test: add functional test to check transaction time determination during ↵BitcoinTsunami
block rescanning
2021-09-28test: pep-8 touched testMarcoFalke
Can be reviewed with "--word-diff-regex=.".
2021-09-28test: Remove unused and confusing main parameter from script_utilMarcoFalke
Bitcoin script opcodes are equal on all chains (main and test) anyway. Can be reviewed with "--word-diff-regex=.".
2021-09-28Merge bitcoin/bitcoin#23097: Run specified functional tests with all ↵W. J. van der Laan
matching flags b8909b074603a05a1a255461ca78d8a013dd3044 Run functional tests with all possible flags (Samuel Dobson) Pull request description: Functional tests which use flags like `--descriptors` or `--legacy-wallet` won't run if only the base script is given to `test_runner.py` because it doesn't match any script in the list exactly. It would be easier if it would just run both options. For example, instead of: ``` test_runner.py 'wallet_basic.py --legacy-wallet' 'wallet_basic.py --descriptors' ``` We can now just run: ``` test_runner.py wallet_basic ``` Also useful for `--usecli`, the IPv4/IPv6/nonloopback `rpc_bind.py` variations, etc. ACKs for top commit: laanwj: Code review ACK b8909b074603a05a1a255461ca78d8a013dd3044 MarcoFalke: review ACK b8909b074603a05a1a255461ca78d8a013dd3044 Tree-SHA512: d367037cb170e705551726d47fe4569ebc3ceadece280dd3edbb3ecb41e19f3263d6d272b407316ed6011164e850df4321fb340b1b183b34497c9f7cc439f4d8
2021-09-28update estimatesmartfee rpc to return max of estimateSmartFee, mempoolMinFee ↵pranabp-bit
and minRelayTxFee. This will provide better estimates which would be closer to fee paid in actual transactions. The test has also been changed such that when the node is restarted with a high mempoolMinFee, the estimatesmartfee still returns a feeRate greater than or equal to the mempoolMinFee, minRelayTxFee.(just like the feeRate of actual transactions)
2021-09-28test: pep-8MarcoFalke