aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-12-06p2p: Make timeout mockable and type safe, speed up testMarcoFalke
2021-11-17scripted-diff: Rename m_last_send and m_last_recvMarcoFalke
-BEGIN VERIFY SCRIPT- ren() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1" ./src) ; } ren nLastSend m_last_send ren nLastRecv m_last_recv -END VERIFY SCRIPT-
2021-11-17Merge bitcoin/bitcoin#23525: doc: Pick better named args for ↵MarcoFalke
MutableTransactionSignatureCreator fa54a408096244ff83a3e60e5fb7bfa6aecabe6b doc: Pick better named args for MutableTransactionSignatureCreator (MarcoFalke) Pull request description: Argument names of `nInIn` are not helpful. ACKs for top commit: shaavan: ACK fa54a408096244ff83a3e60e5fb7bfa6aecabe6b achow101: ACK fa54a408096244ff83a3e60e5fb7bfa6aecabe6b Tree-SHA512: 53a38588fdee07d7896a66339c1c2c2355638db95a95cad9844b60cd34e935bb726ab64d0c42dc414beb35375e56440f8a9cb3fbf5aec55c1eed066b7acad8c8
2021-11-17Merge bitcoin/bitcoin#23496: fuzz: Add minisketch fuzz testMarcoFalke
fa74d4530615cfa02cf32a16fab6b13908266e6f fuzz: Add minisketch fuzz test (MarcoFalke) Pull request description: ACKs for top commit: mjdietzx: re-ACK fa74d45 sipa: utACK fa74d4530615cfa02cf32a16fab6b13908266e6f Tree-SHA512: 3d30095c85032139c37c7a2811dd417441a5105cb70af8250000d7b56aeda1e8fab5e65e683fb49d513ef40a81da3967a8a9a70caf40f56cef1dd96c6d4a05f6
2021-11-17Merge bitcoin/bitcoin#23522: Improve fs::PathToString documentationfanquake
9b575f1c734c052b695ce921fb6412b22c18fdb4 Improve fs::PathToString documentation (Russell Yanofsky) Pull request description: Add a developer note about avoiding `fs::PathToString` in RPCs, and improve some other `fs::PathToString` comments. Developer note might have been useful in two recent review comments: - https://github.com/bitcoin/bitcoin/pull/23398#discussion_r741585271 - https://github.com/bitcoin/bitcoin/pull/23155#discussion_r749824259 ACKs for top commit: laanwj: Documentation review ACK 9b575f1c734c052b695ce921fb6412b22c18fdb4 jamesob: ACK https://github.com/bitcoin/bitcoin/pull/23522/commits/9b575f1c734c052b695ce921fb6412b22c18fdb4 prayank23: ACK https://github.com/bitcoin/bitcoin/pull/23522/commits/9b575f1c734c052b695ce921fb6412b22c18fdb4 hebasto: ACK 9b575f1c734c052b695ce921fb6412b22c18fdb4 shaavan: ACK 9b575f1c734c052b695ce921fb6412b22c18fdb4 Tree-SHA512: b8b3ecb6208c3897241e4f24dcec64fe7cf091bc79388862cf5f4b315cb8e804939981c4bed4c81dbff99ec9f750bad99015d0f04890704ac9df63c2a6719b6d
2021-11-16fuzz: Add minisketch fuzz testMarcoFalke
2021-11-16doc: Pick better named args for MutableTransactionSignatureCreatorMarcoFalke
Argument names of "nInIn" are not helpful.
2021-11-16doc: Fix typos in endif header commentsMarcoFalke
2021-11-16Merge bitcoin/bitcoin#23491: scripted-diff: Move minisketchwrapper to src/nodefanquake
faba1abe469833b2dad01bac4e4d8a4ebb4bc97a Sort file list after rename (MarcoFalke) fa8f60e31102e1153ad1452fbced51e54487a3d4 scripted-diff: Move minisketchwrapper to src/node (MarcoFalke) Pull request description: The newly added wrapper is currently in the node library, but not placed in the node directory. While it is possible to use the wrapper outside of a node context (for example in a utility), it seems unlikely. Either way, I think the wrapper should either be moved to the util lib+dir or the node lib+dir, not something in-between. Also, fix incorrect comment `BITCOIN_DBWRAPPER_H`. ACKs for top commit: fanquake: ACK faba1abe469833b2dad01bac4e4d8a4ebb4bc97a. I saw the comment in #21515, however given there hasn't been any new activity there, I'm going to merge this now. Tree-SHA512: fccc0cfd1fee661152a1378587b96795ffb7a7eceb6d2c27ea5401993fd8b9c0a92579fdba61203917ae6565269cb28d0973464fb6201dabf72a5143495d3e77
2021-11-16Merge bitcoin/bitcoin#23499: multiprocess: Add ↵MarcoFalke
interfaces::Node::broadCastTransaction method 0e0f4fdd892223766db4a83194b6576847b757f7 multiprocess: Add interfaces::Node::broadCastTransaction method (Russell Yanofsky) Pull request description: This fixes a null pointer crash in the bitcoin-gui PSBT dialog. The bitcoin-gui interfaces::Node object has a null NodeContext pointer, and can't broadcast transactions directly. It needs to broadcast transactions through the bitcoin-node process instead. --- This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). ACKs for top commit: lsilva01: Code Review ACK 0e0f4fd Tree-SHA512: cd2c1fe8dc15e7cecf01a21d64319d6add1124995305a9ef9cb72f8492dc692c62d4f846182567d47a5048a533178a925419250941a47cb39932467c36bea3e1
2021-11-16Merge bitcoin/bitcoin#23349: util: Use FEATURE_LATEST for wallets created ↵Samuel Dobson
with bitcoin-wallet 5b6b5ef5d178bea3c1b2f21e3bd05186312ea191 util: Use FEATURE_LATEST for wallets created with bitcoin-wallet (Hennadii Stepanov) Pull request description: Since the 49d2374acf5845c5f760b5fd241482f292164147 commit was athored by **jonasschnelli** in 2016, the wallet version was bumped twice: in 2017 (bitcoin/bitcoin#11250) and in 2018 (bitcoin/bitcoin#12560). This PR bumps the version of wallets created with `bitcoin-wallet` offline tool. On master (04437ee721e66a7b76bef5ec2f88dd1efcd03b84) -- `"walletversion": 139900`: ``` $ src/bitcoin-wallet -signet -wallet=211025-test-master create Topping up keypool... Wallet info =========== Name: 211025-test-master Format: sqlite Descriptors: yes Encrypted: no HD (hd seed available): yes Keypool Size: 6000 Transactions: 0 Address Book: 0 $ src/bitcoin-cli -signet -rpcwallet=211025-test-master getwalletinfo { "walletname": "211025-test-master", "walletversion": 139900, "format": "sqlite", "balance": 0.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 0, "keypoolsize": 3000, "keypoolsize_hd_internal": 3000, "paytxfee": 0.00000000, "private_keys_enabled": true, "avoid_reuse": false, "scanning": false, "descriptors": true } ``` With this PR -- `"walletversion": 169900`: ``` $ src/bitcoin-wallet -signet -wallet=211025-test-pr create Topping up keypool... Wallet info =========== Name: 211025-test-pr Format: sqlite Descriptors: yes Encrypted: no HD (hd seed available): yes Keypool Size: 6000 Transactions: 0 Address Book: 0 $ src/bitcoin-cli -signet -rpcwallet=211025-test-pr getwalletinfo { "walletname": "211025-test-pr", "walletversion": 169900, "format": "sqlite", "balance": 0.00000000, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 0, "keypoolsize": 3000, "keypoolsize_hd_internal": 3000, "paytxfee": 0.00000000, "private_keys_enabled": true, "avoid_reuse": false, "scanning": false, "descriptors": true } ``` ACKs for top commit: lsilva01: Code Review ACK 5b6b5ef stratospher: ACK 5b6b5ef. rajarshimaitra: ACK https://github.com/bitcoin/bitcoin/pull/23349/commits/5b6b5ef5d178bea3c1b2f21e3bd05186312ea191 meshcollider: Code review ACK 5b6b5ef5d178bea3c1b2f21e3bd05186312ea191 Tree-SHA512: 0221e76fa8f29037920d0a483c742bf270ecaead45f30230943b78775aaea63ac052e43fe712d15c2326e515dea2d2ac82de0924882598421c1874f2e6f442a6
2021-11-15Merge bitcoin/bitcoin#23175: Add CJDNS network to -addrinfo and -netinfoW. J. van der Laan
7b6528746acf9c915d7157bb860ec899b58dded7 cli: hoist networks class data members to a constant (Jon Atack) 5bd40a3e84a35e0cdf802b132dac5725b9558f32 cli: add cjdns network to -addrinfo and -netinfo (Jon Atack) Pull request description: Follow-up to #23077 and #23324. ``` $ ./src/bitcoin-cli -addrinfo { "addresses_known": { "ipv4": 47782, "ipv6": 10307, "onion": 8030, "i2p": 41, "cjdns": 1, "total": 66161 } } $ ./src/bitcoin-cli -netinfo Bitcoin Core client v22.99.0-deb6223d4c55 - server 70016/Satoshi:22.99.0(jon)/ ipv4 ipv6 onion i2p cjdns total block manual in 0 5 12 5 1 23 out 2 2 9 5 2 20 2 10 total 2 7 21 10 3 43 ``` ``` $ ./src/bitcoin-cli -netinfo 1 ``` ![Screenshot from 2021-10-10 12-01-58](https://user-images.githubusercontent.com/2415484/136691258-8b3fa7aa-3edb-4428-854a-adadfef302e3.png) ACKs for top commit: laanwj: Code review ACK 7b6528746acf9c915d7157bb860ec899b58dded7 Tree-SHA512: 9c740d394d9842d38a1c01a824271b25277baac11ed090f0430daa15b580c2bf3d114ac6b8254b19d6aaee57cbe1ca6a414996e6994e0bf4a577bed771382eca
2021-11-15Merge bitcoin/bitcoin#23394: Taproot wallet test vectors (generation+tests)W. J. van der Laan
f1c33ee4ac1056289f2e67b75755388549ada4ca tests: implement BIP341 test vectors (Pieter Wuille) ac3037df1196b1d95ade2dfad4699ad3a6074903 tests: BIP341 test vector generation (Pieter Wuille) ca83ffc2ea5fe08f16fff7df71c040d067f2afb0 tests: add deterministic signing mode to ECDSA (Pieter Wuille) c98c53f20cadeda53f6a9323f72363593d174f68 tests: abstract out precomputed BIP341 signature hash elements (Pieter Wuille) a5bde018b42cd38979fee71d870e0140b10c73d6 tests: give feature_taproot access to sighash preimages (Pieter Wuille) 51408250969e7ed171378369a995c90d4f813189 tests: add more fields to TaprootInfo (Pieter Wuille) 2478c6730a81dda3c56cb99087caf6abe49c85f5 Make signing follow BIP340 exactly w.r.t. aux randomness (Pieter Wuille) Pull request description: This PR adds code to `test/functional/feature_taproot.py` which runs through a (deterministic) scenario covering several aspects of the wallet side of BIP341 (scriptPubKey computation from keys/scripts, control block computation, key path spending), with the ability to output test vectors in mediawiki format based on this scenario. The generated tests are then also included directly in `src/test/script_tests.cpp` and `src/test/script_standard_tests.cpp`. I intend to add these test vectors to BIP341 itself: https://github.com/bitcoin/bips/pull/1225 ACKs for top commit: laanwj: Code review ACK f1c33ee4ac1056289f2e67b75755388549ada4ca Tree-SHA512: fcf7109539cb214d3190516b205cd32d2b1b452f14aa66f4107acfaa8bfc7d368f626857f1935665a4342eabc0b9ee8aba608a7c0a2494bec0b498e723439c9d
2021-11-15Improve fs::PathToString documentationRussell Yanofsky
2021-11-15Merge bitcoin/bitcoin#23005: multiprocess: Delay wallet client constructionW. J. van der Laan
ad085f9ba15c131fc5cc77086a620f2e366aac7c multiprocess: Delay wallet client construction (Russell Yanofsky) Pull request description: Delay wallet client construction until after logging, thread and other init for two reasons: - More responsive multiprocess GUI startup. When bitcoin-gui is started this moves the call from bitcoin-gui to bitcoin-node that spawns bitcoin-wallet off of the GUI event thread and onto the background GUI init executor thread. - Avoids feature_logging.py test failures with bitcoin-node by making bitcoin-wallet logging start after bitcoin-node logging starts, because the tests are not written to handle the bitcoin-wallet logging init code running first. This partially reverts commit b266b3e0bf29d0f3d5deaeec62d57c5025b35525, moving wallet client creation back to the place it was located before. --- This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). ACKs for top commit: laanwj: code review ACK ad085f9ba15c131fc5cc77086a620f2e366aac7c hebasto: ACK ad085f9ba15c131fc5cc77086a620f2e366aac7c, I have reviewed the code and it looks OK. Tree-SHA512: 74d957ce2ee096db745c517124f60800185814b06c20db676090e10dce1b90311adbab02865a69731f8c39b9365f9ee14be0830ca1368cac9b474801ea92bad5
2021-11-15Merge bitcoin/bitcoin#23408: fuzz: Rework ConsumeScriptMarcoFalke
fa4baf0756c792630391ed456aaa15285ad6eb52 fuzz: Rework ConsumeScript (MarcoFalke) Pull request description: This should make it easier for the fuzz engine to explore multisig code paths. See discussion in https://github.com/bitcoin/bitcoin/issues/23105 The downside is that all fuzz inputs that use ConsumeScript are now invalidated and need to be re-generated. Another downside may be that most multisig scripts from ConsumeScript are using likely not fully valid pubkeys. ACKs for top commit: jamesob: ACK https://github.com/bitcoin/bitcoin/pull/23408/commits/fa4baf0756c792630391ed456aaa15285ad6eb52 Tree-SHA512: 15814afdee76b05ff7a71c0f07bbd1b3cff30d709d5c1e68fd230c5f5d16e673e42709a4fab84d4a896bc27f972f917fe7c1d1b32c2bf4209658b18da97e478b
2021-11-15Merge bitcoin/bitcoin#23004: multiprocess: add interfaces::ExternalSigner classW. J. van der Laan
a032fa30d282fa69c304e0afd1f95f67c55d22e3 multiprocess: add interfaces::ExternalSigner class (Russell Yanofsky) Pull request description: Add `interfaces::ExternalSigner` class to let signer objects be passed between processes and let signer code run in the original process where the object was created. --- This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). ACKs for top commit: laanwj: Concept and code review ACK a032fa30d282fa69c304e0afd1f95f67c55d22e3 hebasto: re-ACK a032fa30d282fa69c304e0afd1f95f67c55d22e3 Tree-SHA512: 99a729fb3a64d010e142cc778a9f1f358e58345b77faaf2664de7d2277715d59df3352326e8f0f2a6628038670eaa4556310a549079fb28af6d2eeb05aea1460
2021-11-15Merge bitcoin/bitcoin#22508: fuzz: replace every fuzzer-controlled while ↵MarcoFalke
loop with a macro 214d9055acdd72189a2f415477ce472ca8db4191 fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop (Andrew Poelstra) Pull request description: Limits the number of iterations to 1000 rather than letting the fuzzer do millions or billions of iterations on a single core. ACKs for top commit: MarcoFalke: cr ACK 214d9055acdd72189a2f415477ce472ca8db4191 Tree-SHA512: 9741c32ccd126ea656e5c93371b7136eaa2f92dc9a490dd4d39642503b1a41174f3368245153e508c3b608fe37ab89800b67ada97b740e3b5a3728bb506429d3
2021-11-15Merge bitcoin/bitcoin#23345: build: Drop unneeded dependencies for ↵W. J. van der Laan
bitcoin-wallet tool 4fe7cf167796015c0f24e740f81a2452e3996a92 build: Drop unneeded dependencies for bitcoin-wallet tool (Hennadii Stepanov) Pull request description: `bitcoin-wallet` is an offline tool, and its code does not depend on networking stuff (ZMQ, UPnP, NAT-PMP, and LIBBITCOIN_SERVER). Also `bitcoin-wallet` does not interacts with the chainstate, therefore dependency on LevelDB is not needed. ACKs for top commit: laanwj: Code review ACK 4fe7cf167796015c0f24e740f81a2452e3996a92 Tree-SHA512: 97342d9cdf8670806efe16dc7885a85ec92f3c1ae0819a4c3cc147938fc8642089e303c4432cb1395fc75b852c1af6a6a13fc58e29e027c23f75219fd3bd8cb4
2021-11-15Merge bitcoin/bitcoin#23462: test: Enable SC2046 and SC2086 shellcheck rulesW. J. van der Laan
fe0ff569ea6c353f88609c0f5f9b6fa80ff74f15 test: Enable SC2046 shellcheck rule (Hennadii Stepanov) 9a1ad7bc0dd8a0769738ca4dffbeb8d55438b0dc test: Enable SC2086 shellcheck rule (Hennadii Stepanov) Pull request description: Closes #20879. Replaces #22695. **Note for reviewers**. Some touched shell scripts are not being run in CI, therefore they require more thorough reviewing: - `contrib/devtools/gen-manpages.sh` - `contrib/macdeploy/detached-sig-apply.sh` - `contrib/windeploy/detached-sig-create.sh` - `src/qt/res/animation/makespinner.sh` ACKs for top commit: laanwj: Code review re-ACK fe0ff569ea6c353f88609c0f5f9b6fa80ff74f15 Tree-SHA512: 73619b9a7bcb6cf0dfc4189a753ef550d40c82a3432bb9d8d8a994310d42594576038daac7e0c2fc004d716976bb1413b9a77848ecf088b25b69ed0773b77e8e
2021-11-14Merge bitcoin/bitcoin#23500: doc: fix typosMarcoFalke
2de1ceb2e9180d40611a6d32b3a9470c242952e0 depends, wallet: fix typos (Dimitris Apostolou) Pull request description: ACKs for top commit: hebasto: ACK 2de1ceb2e9180d40611a6d32b3a9470c242952e0 Tree-SHA512: e33deef3ebd8cda69dd0f2c0e8d0fd5c39375eb014685318b2f131c7a700584d9b9e173e95ff290b1fe3b2dc88922583f2607750445baedf0c97a330a9ff35f2
2021-11-14Merge bitcoin/bitcoin#23493: Use c++17 in clang-formatfanquake
faeb748f5bd88b4de734fea40e94edbbaf8a79fd Use c++17 in clang-format (MarcoFalke) Pull request description: We currently use `Cpp11`, which "is a deprecated alias for `Latest`" according to https://clang.llvm.org/docs/ClangFormatStyleOptions.html . I doubt this has any effect, but I think for clarity setting to `c++17` make sense. Also, remove unneeded settings: * `ObjC*`, as we don't write objc code * `Penalty`, as there is currently no line limit, so this has no effect * `TabWidth`, as we don't use tabs ACKs for top commit: fanquake: ACK faeb748f5bd88b4de734fea40e94edbbaf8a79fd - we do have some Objc code, but it never changes. Tree-SHA512: 50215849b3992e5841b45b281e68d4c58184a365cbaeec0d7adad844ad21672ae1b6247262047e2d7427835ef98fa9d9f83335696448c77303dde9ab0a121639
2021-11-13build: Drop unneeded dependencies for bitcoin-wallet toolHennadii Stepanov
2021-11-13depends, wallet: fix typosDimitris Apostolou
2021-11-13test: Enable SC2086 shellcheck ruleHennadii Stepanov
2021-11-12multiprocess: Add interfaces::Node::broadCastTransaction methodRussell Yanofsky
This fixes a null pointer crash in the bitcoin-gui PSBT dialog. The bitcoin-gui interfaces::Node object has a null NodeContext pointer, and can't broadcast transactions directly. It needs to broadcast transactions through the bitcoin-node process instead.
2021-11-12fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loopAndrew Poelstra
Blindly chose a cap of 10000 iterations for every loop, except for the two in script_ops.cpp and scriptnum_ops.cpp which appeared to (sometimes) be deserializing individual bytes; capped those to one million to ensure that sometimes we try working with massive scripts. There was also one fuzzer-controlled loop in timedata.cpp which was already capped, so I left that alone. git grep 'while (fuzz' should now run clean except for timedata.cpp
2021-11-12tests: implement BIP341 test vectorsPieter Wuille
2021-11-12Make signing follow BIP340 exactly w.r.t. aux randomnessPieter Wuille
libsecp256k1's secp256k1_schnorrsig_sign only follows BIP340 exactly if an aux_rand32 argument is passed. When no randomness is used (as is the case in the current codebase here), there is no impact on security between not providing aux_rand32 at all, or providing an empty one. Yet, for repeatability/testability it is simpler to always use an all-zero one.
2021-11-12Use c++17 in clang-formatMarcoFalke
2021-11-12style: Use 4 spaces for indentation, not 5MarcoFalke
The wrong indentation breaks editor workflows. Can be reviewed with --ignore-all-space
2021-11-12test: Remove unused CDataStream copyMarcoFalke
2021-11-12Sort file list after renameMarcoFalke
2021-11-12scripted-diff: Move minisketchwrapper to src/nodeMarcoFalke
-BEGIN VERIFY SCRIPT- # Move module git mv src/minisketchwrapper.cpp src/node/ git mv src/minisketchwrapper.h src/node/ # Replacements sed -i 's:minisketchwrapper:node/minisketchwrapper:g' $(git grep -l minisketchwrapper) sed -i 's:MINISKETCHWRAPPER_H:NODE_MINISKETCHWRAPPER_H:g' $(git grep -l MINISKETCHWRAPPER_H) sed -i 's:DBWRAPPER_H:NODE_MINISKETCHWRAPPER_H:g' ./src/node/minisketchwrapper.h -END VERIFY SCRIPT-
2021-11-12Merge bitcoin/bitcoin#23477: addrman: tidy up unit testsMarcoFalke
36d3510303875c9f98eb00b28763c7c043d4dcee [addrman] [tests] Remove AddrManUncorrupted subclass (John Newbery) dfbd3a6d71f17bf3fbcf88e46e3fedd18a7068f1 [addrman] [tests] Remove AddrManCorrupted subclass (John Newbery) d02098d1f042ff91c2206c27c48b385418ece0cc [addrman] [tests] Tidy up unused arguments in addrman test functions (John Newbery) 7784a9a374ac34acb4656f740fecf4ae1743f73f [addrman] [tests] Remove deterministic argument and member from AddrManTest (John Newbery) a749fa539ae4330dd5d610286f418156e080e9dd [addrman] Remove AddrMan friends (John Newbery) Pull request description: Various tidy-ups to the addrman tests. ACKs for top commit: shaavan: crACK 36d3510303875c9f98eb00b28763c7c043d4dcee promag: Code review ACK 36d3510303875c9f98eb00b28763c7c043d4dcee. theStack: Code-review ACK 36d3510303875c9f98eb00b28763c7c043d4dcee Tree-SHA512: bbdb9d70863c15b023714ba3c73e816c635204f949c39678dd932a6e9a2e57b51b5d50332ec6843cf1b98a2fcbbdd5e6779f2e9c7e9cf90f4a6b3b4a7a1abe2f
2021-11-12Merge bitcoin/bitcoin#23114: Add minisketch subtree and integrate into ↵fanquake
build/test 29173d6c6ca0cc3be9fa6bf2409a509ffea1a02a ubsan: add minisketch exceptions (Cory Fields) 54b5e1aeab73953c1f12ec2c041572038f6f59da Add thin Minisketch wrapper to pick best implementation (Pieter Wuille) ee9dc71c1bc16205494f2a0aebe575a3c062ff52 Add basic minisketch tests (Pieter Wuille) 0659f12b131fc5915fe7a493306af197f4fb838b Add minisketch dependency (Gleb Naumenko) 0eb7928ab8d9dcb840e4965bfa81deb752b00dfa Add MSVC build configuration for libminisketch (Pieter Wuille) 8bc166d5b179205fc56855e2b462aa273a6f8661 build: add minisketch build file and include it (Cory Fields) b2904ceb85b4d440b1f4bbd716fcb601411cc2c9 build: add configure checks for minisketch (Cory Fields) b6487dc4ef47ec9ea894eceac25f37d0b806f8aa Squashed 'src/minisketch/' content from commit 89629eb2c7 (fanquake) Pull request description: This takes over #21859, which has [recently switched](https://github.com/bitcoin/bitcoin/pull/21859#issuecomment-921899200) to my integration branch. A few more build issues came up (and have been fixed) since, and after discussing with sipa it was decided I would open a PR to shepherd any final changes through. > This adds a `src/minisketch` subtree, taken from the master branch of https://github.com/sipa/minisketch, to prepare for Erlay implementation (see #21515). It gets configured for just supporting 32-bit fields (the only ones we're interested in in the context of Erlay), and some code on top is added: > * A very basic unit test (just to make sure compilation & running works; actual correctness checking is done through minisketch's own tests). > * A wrapper in `minisketchwrapper.{cpp,h}` that runs a benchmark to determine which field implementation to use. Only changes since my last update to the branch in the previous PR have been rebasing on master and fixing an issue with a header in an introduced file. ACKs for top commit: naumenkogs: ACK 29173d6c6ca0cc3be9fa6bf2409a509ffea1a02a Tree-SHA512: 1217d3228db1dd0de12c2919314e1c3626c18a416cf6291fec99d37e34fb6eec8e28d9e9fb935f8590273b8836cbadac313a15f05b4fd9f9d3024c8ce2c80d02
2021-11-11cli: hoist networks class data members to a constantJon Atack
2021-11-11cli: add cjdns network to -addrinfo and -netinfoJon Atack
2021-11-10Merge bitcoin/bitcoin#22928: refactor: Remove `gArgs` from `wallet.h` and ↵MarcoFalke
`wallet.cpp` (2) 2ec38bdebbdfd3f932eaa85c98b617d7b9326399 Remove `gArgs` from `wallet.h` and `wallet.cpp` (Kiminuo) Pull request description: This is a follow-up PR to #22183 and is related to #21005 issue. ACKs for top commit: ryanofsky: Code review ACK 2ec38bdebbdfd3f932eaa85c98b617d7b9326399. No changes since last review, just rebase Tree-SHA512: ae7fa1927b0a268f25697928ccaf1b3cf10ee1ccef3f9d2344001fbd7e11fe8ce768745c65e76bd7d1632c6c7650612b5b54eaf2be61093854f75a4c4dcb1784
2021-11-10Merge bitcoin/bitcoin#22805: refactor: use CWallet const shared pointers in ↵W. J. van der Laan
dump{privkey,wallet} d150fe3ad5ce181511f2d2fd035a10530eaa4203 refactor: use `CWallet` const shared pointers in dump{privkey,wallet} RPCs (Sebastian Falbesoner) ec2792d1dc3404d749a43556eeb4b63780ee6d94 refactor: use const `LegacyScriptPubKeyMan` references in dump{privkey,wallet} RPCs (Sebastian Falbesoner) 29905c092f15bbbc4d4964c2f99dcf12fefd4111 refactor: avoid multiple key->metadata lookups in dumpwallet RPC (Sebastian Falbesoner) Pull request description: ~~This PR is based on #22787 ("refactor: actual immutable pointing"), which should be reviewed first.~~ (merged by now) It aims to make the CWallet shared pointers actually immutable also for the `dumpprivkey` and `dumpwallet` RPC methods. For doing that, some more preparations are needed; we need a const-counterpart to the helper `EnsureLegacyScriptPubKeyMan` that accepts a const CWallet pointer and accordingly also returns a const `LegacyScriptPubKeyMan` instance. The metadata lookup in `dumpwallet` is changed to not need a mutable `ScriptPubKeyMan` instance by avoiding using the `operator[]` in its mapKeyMetadata map, which also avoids repeated lookups. ACKs for top commit: laanwj: Code review ACK d150fe3ad5ce181511f2d2fd035a10530eaa4203 Tree-SHA512: 90ac05e21f40c6d0ebb479a71c545da2fd89940b9ca3409d9f932abc983bf8830d34c45086e68880d0d1e994846fbefee7534eec142ff4268e0fa28a1a411d36
2021-11-10Merge bitcoin/bitcoin#22872: log: improve checkaddrman logging with duration ↵MarcoFalke
in milliseconds 22b44fc696dc1078c40d17e2d497c74c7b4ae750 p2p: improve checkaddrman logging with duration in milliseconds (Jon Atack) ec65bed00ee2e403e39b3c5977caf4abd31ccc87 log, timer: add LOG_TIME_MILLIS_WITH_CATEGORY_MSG_ONCE macro (Jon Atack) 325da75a5396f3161a6eade74b349105ed5722ab log, timer: allow not repeating log message on completion (Jon Atack) Pull request description: This patch: - updates the `logging/timer.h::Timer` class to allow not repeating the log message on completion - adds a `LOG_TIME_MILLIS_WITH_CATEGORY_MSG_ONCE` macro that prints the descriptive message when logging the start but not when logging the completion - updates the checkaddrman logging to log the duration, and renames the function like the `-checkaddrman` configuration option in order to prefix every log message with `CheckAddrman` instead of the longer, less pleasant, and different-from-checkaddrman `ForceCheckAddrman` (the Doxygen documentation on the function already makes clear that it is unaffected by `m_consistency_check_ratio`). before ``` 2021-09-21T18:42:50Z [opencon] Addrman checks started: new 64864, tried 1690, total 66554 2021-09-21T18:42:50Z [opencon] Addrman checks completed successfully ``` after ``` 2021-09-21T18:42:50Z [opencon] CheckAddrman: new 64864, tried 1690, total 66554 started 2021-09-21T18:42:50Z [opencon] CheckAddrman: completed (76.21ms) ``` To test, build and run bitcoind with `-debug=addrman -checkaddrman=<n>` for a value of `n` in the range of, say, 10 to 40. ACKs for top commit: laanwj: Code review ACK 22b44fc696dc1078c40d17e2d497c74c7b4ae750 Tree-SHA512: 658c0dfaaa9d07092e2418f2d05007c58cc35be6593f22b3c592ce793334a885dd92dacc46bdeddc9d37939cf11174660a094c07c0fa117fbb282953aa45a94d
2021-11-10refactor: use `CWallet` const shared pointers in dump{privkey,wallet} RPCsSebastian Falbesoner
2021-11-10refactor: use const `LegacyScriptPubKeyMan` references in ↵Sebastian Falbesoner
dump{privkey,wallet} RPCs
2021-11-10refactor: avoid multiple key->metadata lookups in dumpwallet RPCSebastian Falbesoner
This also enables working with a const ScriptPubKeyMan which was previously not possible due to std::map::operator[] not being const.
2021-11-10Merge bitcoin/bitcoin#23173: Add `ChainstateManager::ProcessTransaction`MarcoFalke
0fdb619aaf1d62598263361a6082d182be1af792 [validation] Always call mempool.check() after processing a new transaction (John Newbery) 2c64270bbe523ef87e7225c351464e7c716f0b3e [refactor] Don't call AcceptToMemoryPool() from outside validation.cpp (John Newbery) 92a3aeecf6a82e9cbc9fda11022b0548efd24d05 [validation] Add CChainState::ProcessTransaction() (John Newbery) 36167faea92c97ddea7403280a5074073c8e5f90 [logging/documentation] Remove reference to AcceptToMemoryPool from error string (John Newbery) 4c24142b1ec121623f81ba644d77341bc1bd88dd [validation] Remove comment about AcceptToMemoryPool() (John Newbery) 5759fd12b8d5937e9187fa33489a95b1d8e6d1e5 [test] Don't set bypass_limits to true in txvalidation_tests.cpp (John Newbery) 497c9e29640858bb3beb20089c2d4f9e133c7e42 [test] Don't set bypass_limits to true in txvalidationcache_tests.cpp (John Newbery) Pull request description: Similarly to how #18698 added `ProcessNewBlock()` and `ProcessNewBlockHeaders()` methods to the `ChainstateManager` class, this PR adds a new `ProcessTransaction()` method. Code outside validation no longer calls `AcceptToMemoryPool()` directly, but calls through the higher-level `ProcessTransaction()` method. Advantages: - The interface is simplified. Calling code no longer needs to know about the active chainstate or mempool object, since `AcceptToMemoryPool()` can only ever be called for the active chainstate, and that chainstate knows which mempool it's using. We can also remove the `bypass_limits` argument, since that can only be used internally in validation. - responsibility for calling `CTxMemPool::check()` is removed from the callers, and run automatically by `ChainstateManager` every time `ProcessTransaction()` is called. ACKs for top commit: lsilva01: tACK 0fdb619 on Ubuntu 20.04 theStack: Code-review ACK 0fdb619aaf1d62598263361a6082d182be1af792 ryanofsky: Code review ACK 0fdb619aaf1d62598263361a6082d182be1af792. Only changes since last review: splitting & joining commits, adding more explanations to commit messages, tweaking MEMPOOL_ERROR string, fixing up argument name comments. Tree-SHA512: 0b395c2e3ef242f0d41d47174b1646b0a73aeece38f1fe29349837e6fb832f4bf8d57e1a1eaed82a97c635cfd59015a7e07f824e0d7c00b2bee4144e80608172
2021-11-10Merge bitcoin/bitcoin#23398: rpc: add return message to savemempool RPCW. J. van der Laan
aa1a4c920495076ed5b5e3f05cb64d644bab6810 Add file validation to savemempool RPC test (lsilva01) 871e64d22f6db8f2e1b312227354aa172a0347c6 Add filename to savemempool RPC result (lsilva01) Pull request description: Currently, if the user calls the `savemempool` RPC method, there is no way to know where the file was created (unless the user knows internal implementation details). This PR adds a return message stating the file name and path where the mempool was saved and changes `mempool_persist.py` to validate this new return message. ACKs for top commit: laanwj: Code review ACK aa1a4c920495076ed5b5e3f05cb64d644bab6810 Tree-SHA512: e8b1dd0a8976e5eb15f7476c9651e492d2c621a67e0b726721fa7a2ae0ddd272ee28b87a2d0c650bd635e07fa96bdefe77bece4deb6486ef3ee9a4f83423a840
2021-11-09Merge bitcoin/bitcoin#23400: doc: fix `XOnlyPubKey::IsFullyValid` comment ↵MarcoFalke
reference 037c9ee79bae772ba951cdee6cb678a3264abe8b fix `XOnlyPubKey::IsFullyValid` comment reference (Sebastian Falbesoner) Pull request description: The method name `CreatePayToContract` doesn't exist, very likely it was a (local) working title that was renamed to `CreateTapTweak` later. ACKs for top commit: michaelfolkson: ACK 037c9ee79bae772ba951cdee6cb678a3264abe8b sipa: ACK 037c9ee79bae772ba951cdee6cb678a3264abe8b Tree-SHA512: ab2b6ca93b66aba83c725b62f39e9f9316f3bea6f75ef35f66a2ac18b22a0a69ff2069cadab0365b28b0af2d30ad5ee3d3022194ac2024a1cdbb81d106fca0bb
2021-11-09[addrman] [tests] Remove AddrManUncorrupted subclassJohn Newbery
It doesn't do anything different from the base AddrMan class.
2021-11-09[addrman] [tests] Remove AddrManCorrupted subclassJohn Newbery
It's only used to create a corrupted peers.dat file. We can do that directly in a pure function.
2021-11-09[addrman] [tests] Tidy up unused arguments in addrman test functionsJohn Newbery