aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-06-29Merge bitcoin/bitcoin#22361: refactor: Make httpserver work queue a unique_ptrMarcoFalke
fa92e60f38cb109fe5a3c7acfe1017ffebc388cc refactor: Make httpserver work queue a unique_ptr (MarcoFalke) Pull request description: This simplifies the code a bit because `if (p) { delete p; p = nullptr; }` can be replaced by a call to the `reset()` member. ACKs for top commit: promag: Core review ACK fa92e60f38cb109fe5a3c7acfe1017ffebc388cc. jonatack: ACK fa92e60f38cb109fe5a3c7acfe1017ffebc388cc code review, debug build clean, ran test/functional/interface*.py tests locally as a sanity check hebasto: ACK fa92e60f38cb109fe5a3c7acfe1017ffebc388cc, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 6b122162317dd4ad6889341745c7ac1903a3ee510f6548f46dc356308442a6eff13eb8dc604c38ba18783e7a66d2b836d641a8594ff980a010c12c97f3856684
2021-06-29Merge bitcoin/bitcoin#22358: Remove unused wallet pointer from wallet signalsfanquake
8888cf45f5e45b38cb830f9c94cafbf622e1fe5f Remove unused wallet pointer from NotifyAddressBookChanged (MarcoFalke) faf36403038afb3df3ddd963bd6c352d3eff4da8 Remove unused wallet pointer from NotifyTransactionChanged signal (MarcoFalke) Pull request description: The signals are members of the wallet, so passing the pointer would be redundant even if it was used. Also, fix `with` -> `without`, which was forgotten in commit ca4cf5cff6f. ACKs for top commit: jonatack: Code review ACK 8888cf45f5e45b38cb830f9c94cafbf622e1fe5f also verified with/without lock cs_wallet status for each of the two functions and debian clang 11 debug build clean promag: Code review ACK 8888cf45f5e45b38cb830f9c94cafbf622e1fe5f. theStack: Code review ACK 8888cf45f5e45b38cb830f9c94cafbf622e1fe5f Tree-SHA512: e3b80931ce9bcb05213619f5435ac7c21d3c7848643950a70db610902bd1803c92bb75e501d46b0e519bc576901f160e088e8882c4f1adce892a80df565f897b
2021-06-29Merge bitcoin/bitcoin#21789: refactor: Remove ::Params() global from CChainStatefanquake
fa0d9211ef87a682573aaae932c0c440acbcb8a8 refactor: Remove chainparams arg from CChainState member functions (MarcoFalke) fa389471251f043ec25e7b01e59b37d3b921ce54 refactor: Remove ::Params() global from inside CChainState member functions (MarcoFalke) Pull request description: The `::Params()` global is verbose and confusing. Also it makes tests a bit harder to write because they'd have to mock a global. Fix all issues by simply using a member variable that points to the right params. (Can be reviewed with `--word-diff-regex=.`) ACKs for top commit: jnewbery: ACK fa0d9211ef87a682573aaae932c0c440acbcb8a8 kiminuo: utACK fa0d9211 theStack: ACK fa0d9211ef87a682573aaae932c0c440acbcb8a8 🍉 Tree-SHA512: 44676b19c9ed471ccb536331d3029bad192d7d50f394fd7b8527ec431452aeec8c4494164b9cf8e16e0123c4463b16be864366c6b599370032c17262625a0356
2021-06-28Merge bitcoin/bitcoin#22146: Reject invalid coin height and output index ↵MarcoFalke
when loading assumeutxo fa9ebedec3f982bb5bb459ea33d74c94d9b5cec4 Reject invalid coin height and output index when loading assumeutxo (MarcoFalke) Pull request description: It should be impossible to have a coin at a height higher than the height of the snapshot block, so reject those early to avoid integer wraparounds and hash collisions later on. Same for the outpoint index. Both issues were found by fuzzing: * The height issue by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34793 * The outpoint issue by my fuzz server: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34793#c2 ACKs for top commit: practicalswift: cr ACK fa9ebedec3f982bb5bb459ea33d74c94d9b5cec4: patch looks correct jamesob: crACK https://github.com/bitcoin/bitcoin/pull/22146/commits/fa9ebedec3f982bb5bb459ea33d74c94d9b5cec4 theStack: Code review ACK fa9ebedec3f982bb5bb459ea33d74c94d9b5cec4 benthecarman: crACK fa9ebedec3f982bb5bb459ea33d74c94d9b5cec4 Tree-SHA512: dae7caee4b3862b23ebdf2acb7edec4baf75b0dbf1409b370b1a73aa6b632b317ebfac596dcbaf4edfb1301b513f45465ea75328962460f35e2af0d7e547c9ac
2021-06-28refactor: Make httpserver work queue a unique_ptrMarcoFalke
2021-06-28Remove unused wallet pointer from NotifyAddressBookChangedMarcoFalke
2021-06-28Remove unused wallet pointer from NotifyTransactionChanged signalMarcoFalke
2021-06-25Avoid the use of P0083R3 std::set::mergePieter Wuille
2021-06-25Merge bitcoin/bitcoin#19362: rpc/blockchain: Reset scantxoutset progress ↵MarcoFalke
before inferring descriptors 8c4129b4540f4f739413ed9a6fbfc78afc252f42 rpc: reset scantxoutset progress on finish (Pavol Rusnak) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/19361 by moving resetting the `g_scan_progress` variable **before** inferring the descriptors ACKs for top commit: achow101: Code review ACK 8c4129b4540f4f739413ed9a6fbfc78afc252f42 Tree-SHA512: 2b81e5c930b9c201a1b9cc742c37e0617582326acd9adbd6b14991d33c05d51b1d5ff6a26f3accab7d274dc8c6a48bc8cbccf0811b60c1f76dd805f9b31482c0
2021-06-25Merge bitcoin/bitcoin#22322: fuzz: Check banman roundtripMarcoFalke
fa485d06ec10acd9a791f8d29689e1e82591fb70 fuzz: Check banman roundtrip (MarcoFalke) Pull request description: ACKs for top commit: practicalswift: cr ACK fa485d06ec10acd9a791f8d29689e1e82591fb70 vasild: ACK fa485d06ec10acd9a791f8d29689e1e82591fb70 Tree-SHA512: 84e297c0b90ef68d72afd2053bfda2888496c1b180233516a8caaf76d6c03403f1e4ed59f1eb32d799873fc34009634b4ce372244b9d546d04626af41ac4d1d7
2021-06-24Merge bitcoin/bitcoin#22327: cli: Avoid truncating -rpcwaittimeoutMarcoFalke
fa34cb80248cc39a73fc393f65c3cfc62e849556 cli: Avoid truncating -rpcwaittimeout (MarcoFalke) Pull request description: `seconds` is not enough precision to "exactly" store a timestamp n seconds into the future. Improve the precision by using `microseconds`. Fixes #22325 Also, use chrono literals. ACKs for top commit: jonatack: ACK fa34cb80248cc39a73fc393f65c3cfc62e849556 review, debug-built, tested theStack: Tested ACK fa34cb80248cc39a73fc393f65c3cfc62e849556 Tree-SHA512: 7158da8545f9998a82bcc8636e04564efdb1e1be43b4288298c151b4df29ad47a2760259eefadd4a01db92ea18a1e017f3febc1cd8c69a4b28c86180229d8c90
2021-06-24fuzz: Check banman roundtripMarcoFalke
2021-06-24Merge bitcoin/bitcoin#22154: Add OutputType::BECH32M and related wallet ↵W. J. van der Laan
support for fetching bech32m addresses 754f134a50cc56cdf0baf996d909c992770fcc97 wallet: Add error message to GetReservedDestination (Andrew Chow) 87a0e7a3b7c0ffd545e537bd497cdc3e67d045f6 Disallow bech32m addresses for legacy wallet things (Andrew Chow) 6dbe4d10728f882986ed0d9ed77bc736f051c662 Use BECH32M for tr() desc, WitV1Taproot, and WitUnknown CTxDests (Andrew Chow) 699dfcd8ad9487a4e04c1ffc68211e84e126b3d2 Opportunistically use bech32m change addresses if available (Andrew Chow) 0262536c34567743e527dad46912c9ba493252cd Add OutputType::BECH32M (Andrew Chow) 177c15d2f7cd5406ddbce8217fc023057539b828 Limit LegacyScriptPubKeyMan address types (Andrew Chow) Pull request description: Currently bech32m addresses are classfied as bech32. Because bech32m is incompatible with bech32, we need to define a new `OutputType` for it so that it can be handled correctly. This PR adds `OutputType::BECH32M`, updates all of the relevant `OutputType` classifications, and handle requests for bech32m addresses. There is now a `bech32m` address type string that can be used. * `tr()` descriptors now report their output type as `OutputType::BECH32M`. `WtinessV1Taproot` and `WitnessUnknown` are also classified as `OutputType::BECH32M`. * Bech32m addresses are completely disabled for legacy wallets. They cannot be imported (explicitly disallowed in `importaddress` and `importmulti`), will not be created when getting all destinations for a pubkey, and will not be added with `addmultisigaddress`. Additional protections have been added to `LegacyScriptPubKeyMan` to disallow attempting to retrieve bech32m addresses. * Since Taproot multisigs are not implemented yet, `createmultisig` will also disallow the bech32m address type. * As Taproot is not yet active, `DescriptorScriptPubKeyMan` cannot and will not create a `tr()` descriptor. Protections have been added to make sure this cannot occur. * The change address type detection algorithm has been updated to return `bech32m` when there is a segwit v1+ output script and the wallet has a bech32m `ScriptPubKeyMan`, falling back to bech32 if one is not available. ACKs for top commit: laanwj: re-review ACK 754f134a50cc56cdf0baf996d909c992770fcc97 Sjors: re-utACK 754f134: only change is switching to `bech32m` in two `wallet_taproot.py` test cases. fjahr: re-ACK 754f134a50cc56cdf0baf996d909c992770fcc97 jonatack: ACK 754f134a50cc56cdf0baf996d909c992770fcc97 Tree-SHA512: 6ea90867d3631d0d438e2b08ce6ed930f37d01323224661e8e38f183ea5ee2ab65b5891394a3612c7382a1aff907b457616c6725665a10c320174017b998ca9f
2021-06-24Merge bitcoin/bitcoin#22270: test: Add bitcoin-util tests (+refactors)MarcoFalke
fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce refactor: Pass grind args vector as const reference (MarcoFalke) fa08bc288f81dd42a482e2bfef37d21a1e5fddd2 Remove gArgs from AppInitUtil (MarcoFalke) fa751a47ff4253f58518d7f43d33ec1227ea0dbc Remove unused OptionsCategory arg from AddCommand (MarcoFalke) fa3c1eee7ff2646e78540d53b4f8eaf095a8c27d Remove unused includes from bitcoin-util (MarcoFalke) fa304929e2c3583bc3e6b05eaa6e0df6cdac6ec8 test: Add bitcoin-util tests (MarcoFalke) fa831e709a4d605a18e5de1627b48d670bb326fb build_msvc: Add bitcoin-util.exe (MarcoFalke) Pull request description: bitcoin-util has no tests See https://marcofalke.github.io/btc_cov/total.coverage/src/bitcoin-util.cpp.gcov.html (Coverage report showing 0%) ACKs for top commit: klementtan: Code review and tested ACK fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce theStack: Tested ACK fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce jamesob: reACK fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce ([`jamesob/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te`](https://github.com/jamesob/bitcoin/tree/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te)) Tree-SHA512: 68e2791239bc48d28fbb6394155c39ea0357a96ec7e4896ca579feeef1a803657165a0ef9fa3cf6e2a381e5b0ca0dafa1b594158303a04997db784201d8dd66d
2021-06-23Merge bitcoin/bitcoin#22263: refactor: wrap CCoinsViewCursor in unique_ptrMarcoFalke
7ad414f4bfa74595ee5726e66f3527045c02a977 doc: add comment about CCoinsViewDBCursor constructor (James O'Beirne) 0f8a5a4dd530549d37c43da52c923ac3b2af1a03 move-only(ish): don't expose CCoinsViewDBCursor (James O'Beirne) 615c1adfb07b9b466173166dc2e53ace540e4b32 refactor: wrap CCoinsViewCursor in unique_ptr (James O'Beirne) Pull request description: I tripped over this one for a few hours at the beginning of the week, so I've sort of got a personal vendetta against `CCoinsView::Cursor()` returning a raw pointer. Specifically in the case of CCoinsViewDB, if a raw cursor is allocated and not freed, a cryptic leveldb assertion failure occurs on CCoinsViewDB destruction (`Assertion 'dummy_versions_.next_ == &dummy_versions_' failed.`). This is a pretty simple change. Related to: https://github.com/bitcoin/bitcoin/issues/21766 See also: https://github.com/google/leveldb/issues/142#issuecomment-414418135 ACKs for top commit: MarcoFalke: review ACK 7ad414f4bfa74595ee5726e66f3527045c02a977 🔎 jonatack: re-ACK 7ad414f4bfa74595ee5726e66f3527045c02a977 modulo suggestion ryanofsky: Code review ACK 7ad414f4bfa74595ee5726e66f3527045c02a977. Two new commits look good and thanks for clarifying constructor comment Tree-SHA512: 6471d03e2de674d84b1ea0d31e25f433d52aa1aa4996f7b4aab1bd02b6bc340b15e64cc8ea07bbefefa3b5da35384ca5400cc230434e787c30931b8574c672f9
2021-06-23cli: Avoid truncating -rpcwaittimeoutMarcoFalke
2021-06-23script, doc: spelling updateJon Atack
2021-06-23Merge bitcoin/bitcoin#22166: Add support for inferring tr() descriptorsSamuel Dobson
d637a9b397816e34652d0c4d383308e39770737a Taproot descriptor inference (Pieter Wuille) c7388e5ada394b7fe94d6263fb02e9dd28ab367e Report address as solvable based on inferred descriptor (Pieter Wuille) 29e5dd1a5b9a1879e6c3c7e153b2e6f33a79e905 consensus refactor: extract ComputeTapleafHash, ComputeTaprootMerkleRoot (Pieter Wuille) Pull request description: Includes: * First commit from #21365, adding TaprootSpendData in SigningProvider * A refactor to expose ComputeTapleafHash and ComputeTaprootMerkleRoot from script/interpreter * A tiny change to make `getaddressinfo` report tr() descriptors as solvable (so that inferred descriptors are shown), despite not having signing code for them. * Logic to infer the script tree back from TaprootSpendData, and then use that to infer descriptors. ACKs for top commit: achow101: re-ACK d637a9b397816e34652d0c4d383308e39770737a Sjors: re-utACK d637a9b meshcollider: Code review ACK d637a9b397816e34652d0c4d383308e39770737a Tree-SHA512: 5ab9b95da662382d8549004be4a1297a577d7caca6b068f875c7c9343723931d03fa9cbf133de11f83b74e4851490ce820fb80413c77b9e8495a5f812e505d86
2021-06-23Merge bitcoin/bitcoin#20966: banman: save the banlist in a JSON format on diskMarcoFalke
bb719a08db173a753984a04534de6f148b87b17a style: remove () from assert in rpc_setban.py (Vasil Dimov) 24b10ebda301548b8ff4b0c73fefc367ad5dc22b doc: fix grammar in doc/files.md (Vasil Dimov) dd4e957dcdfc971a4a971995ff2db9fb787d23c3 test: ensure banlist can be read from disk after restart (Vasil Dimov) d197977ae2076903ed12ab7616a7f93e88be02e1 banman: save the banlist in a JSON format on disk (Vasil Dimov) Pull request description: Save the banlist in `banlist.json` instead of `banlist.dat`. This makes it possible to store Tor v3 entries in the banlist on disk (and any other addresses that cannot be serialized in addrv1 format). Only read `banlist.dat` if it exists and `banlist.json` does not exist (first start after an upgrade). Supersedes https://github.com/bitcoin/bitcoin/pull/20904 Resolves https://github.com/bitcoin/bitcoin/issues/19748 ACKs for top commit: jonatack: Code review re-ACK bb719a08db173a753984a04534de6f148b87b17a per `git range-diff 6a67366 4b52c72 bb719a0` achow101: Code Review ACK bb719a08db173a753984a04534de6f148b87b17a Tree-SHA512: fc135c3a1fe20bcf5d008ce6bea251b4135e56c78bf8f750b4bd8144c095b81ffe165133cdc7e4715875eec7e7c4e13ad9f5d2450b21102af063d7c8abf716b6
2021-06-22wallet: Add error message to GetReservedDestinationAndrew Chow
Adds an error output parameter to all GetReservedDestination functions so that callers can get the actual reason that a change address could not be fetched. This more closely matches GetNewDestination. This allows for more granular error messages, such as one that indicates that bech32m addresses cannot be generated yet.
2021-06-22Disallow bech32m addresses for legacy wallet thingsAndrew Chow
We don't want the legacy wallet to ever have bech32m addresses so don't allow importing them. This includes addmultisigaddress as that is a legacy wallet only RPC Additionally, bech32m multisigs are not available yet, so disallow them in createmultisig.
2021-06-22Use BECH32M for tr() desc, WitV1Taproot, and WitUnknown CTxDestsAndrew Chow
The tr() descriptor, WitnessV1Taproot CTxDestination, and WitnessUnknown CTxDestination are OutputType::BECH32M so they should report as such.
2021-06-22Opportunistically use bech32m change addresses if availableAndrew Chow
If a transaction as a segwit output, use a bech32m change address if they are available. If not, fallback to bech32. If bech32 change addresses are unavailable, fallback to the default address type.
2021-06-22Add OutputType::BECH32MAndrew Chow
Bech32m addresses need their own OutputType We are not ready to create DescriptorScriptPubKeyMans which produce bech32m addresses. So don't allow generating them.
2021-06-22Limit LegacyScriptPubKeyMan address typesAndrew Chow
Make sure that LegacyScriptPubKeyMan can only be used for legacy, p2sh-segwit, and bech32 address types.
2021-06-22Merge bitcoin/bitcoin#22308: wallet: Add missing BlockUntilSyncedToCurrentChainMarcoFalke
fa27baa9c8a13239625e5a7b6c472d236fe5b9fa Revert "test: Add temporary logging to debug #20975" (MarcoFalke) fadb55085a02c9e355617bcb5f84b6335e4f8c9d wallet: Add missing BlockUntilSyncedToCurrentChain (MarcoFalke) Pull request description: Fixes #20975 Also replace the wallet pointer by a reference ACKs for top commit: achow101: ACK fa27baa9c8a13239625e5a7b6c472d236fe5b9fa Tree-SHA512: 79047a30998104a12c2ff84a8e3cc5207151410bbe92b74cfedbe1c1aca3ffa5909391607fc597f3a3cf0725fa827528a4c57edaeacc8360536b1965e166be6a
2021-06-22add missing atomic includeMarcoFalke
2021-06-22wallet: Add missing BlockUntilSyncedToCurrentChainMarcoFalke
2021-06-21Merge bitcoin/bitcoin#21056: rpc: Add a `-rpcwaittimeout` parameter to limit ↵W. J. van der Laan
time spent waiting b9e76f1bf08c52fcd402b2314e00db4ad247ebc8 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10d7dc9a7b0c55d28011161606399417664 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17ef698a1695050f82ef6567b3b87a21861 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8eb59fe51473571661316214156fbdbdcae rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: https://github.com/ElementsProject/lightning/issues/4355 [comment]: https://github.com/ElementsProject/lightning/issues/4355#issuecomment-768288261 ACKs for top commit: laanwj: Code review ACK b9e76f1bf08c52fcd402b2314e00db4ad247ebc8 promag: ACK b9e76f1bf08c52fcd402b2314e00db4ad247ebc8. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
2021-06-21banman: save the banlist in a JSON format on diskVasil Dimov
Save the banlist in `banlist.json` instead of `banlist.dat`. This makes it possible to store Tor v3 entries in the banlist on disk (and any other addresses that cannot be serialized in addrv1 format). Only read `banlist.dat` if it exists and `banlist.json` does not exist (first start after an upgrade). Supersedes https://github.com/bitcoin/bitcoin/pull/20904 Resolves https://github.com/bitcoin/bitcoin/issues/19748
2021-06-21Merge bitcoin/bitcoin#19033: http: Release work queue after event base finishW. J. van der Laan
4e353cb618745cdb5d98e58e7dcd400ded01299a http: Release work queue after event base finish (João Barbosa) Pull request description: This fixes a race between `http_request_cb` and `StopHTTPServer` where the work queue is used after release. Fixes #18856. ACKs for top commit: fjahr: Code review ACK 4e353cb618745cdb5d98e58e7dcd400ded01299a achow101: ACK 4e353cb618745cdb5d98e58e7dcd400ded01299a LarryRuane: ACK 4e353cb618745cdb5d98e58e7dcd400ded01299a hebasto: ACK 4e353cb618745cdb5d98e58e7dcd400ded01299a, tested (rebased on top of master 9313c4e6aa4b707c06a86b33d5d2753cd8383340) on Linux Mint 20.1 (x86_64) using MarcoFalke's [patch](https://github.com/bitcoin/bitcoin/pull/19033#issuecomment-640106647), including different `-rpcthreads`/`-rpcworkqueue` cases. The bug is fixed. The code is correct. Tree-SHA512: 185d2a9744d0d5134d782bf321ac9958ba17b11a5b3d70b4897c8243e6b146dfd3f23c57aef8e10ae9484374120b64389c1949a9cf0a21dccc47ffc934c20930
2021-06-21Merge bitcoin/bitcoin#22147: p2p: Protect last outbound HB compact block peerW. J. van der Laan
30aee2dfe671b347438c1c327c6f79edfacff1ce tests: Add test for compact block HB selection (Pieter Wuille) 6efbcec4ded6116a42d2783c96c60ef0f255a1b2 Protect last outbound HB compact block peer (Suhas Daftuar) Pull request description: If all our high-bandwidth compact block serving peers (BIP 152) stall block download, then we can be denied a block for (potentially) a long time. As inbound connections are much more likely to be adversarial than outbound connections, mitigate this risk by never removing our last outbound HB peer if it would be replaced by an inbound. ACKs for top commit: achow101: ACK 30aee2dfe671b347438c1c327c6f79edfacff1ce ariard: Code ACK 30aee2dfe jonatack: ACK 30aee2dfe671b347438c1c327c6f79edfacff1ce Tree-SHA512: 5c6c9326e3667b97e0864c371ae2174d2be9054dad479f4366127b9cd3ac60ffa01ec9707b16ef29cac122db6916cf56fd9985733390017134ace483278921d5
2021-06-18fuzz: add missing ECCVerifyHandle to base_encode_decodeAndrew Poelstra
2021-06-18Taproot descriptor inferencePieter Wuille
2021-06-18Report address as solvable based on inferred descriptorPieter Wuille
2021-06-18consensus refactor: extract ComputeTapleafHash, ComputeTaprootMerkleRootPieter Wuille
2021-06-18doc: add comment about CCoinsViewDBCursor constructorJames O'Beirne
2021-06-18move-only(ish): don't expose CCoinsViewDBCursorJames O'Beirne
No need for this to be a part of the header anymore. Includes a small reference type style change.
2021-06-18refactor: Pass grind args vector as const referenceMarcoFalke
2021-06-18Remove gArgs from AppInitUtilMarcoFalke
Also fix incorrect {}
2021-06-18Remove unused OptionsCategory arg from AddCommandMarcoFalke
2021-06-18Remove unused includes from bitcoin-utilMarcoFalke
2021-06-18Merge bitcoin/bitcoin#20923: signet miner followupsW. J. van der Laan
b3c712cb2871e0034898b37454fb6a4e1fc78f84 contrib/signet/miner: remove debug code (Anthony Towns) 297e35159f99d4caa995de29d419aefa4b87630c bitcoin-util: use AddCommand / GetCommand (Anthony Towns) b6d493fd4d602a67d16d2566466e18091e272fa0 contrib/signet/README.md: Update miner description (Anthony Towns) e66543827cd4ae9b76ff4c5c6e414c1942c7d727 contrib/signet/miner: Automatic timestamp for first block (Anthony Towns) a383ce5b4add6cdf4e9974527b609a1147a0d972 contrib/signet/miner: --grind-cmd is required for calibrate (Anthony Towns) 1a45cd2e51214f81442a5f9bf16612100adaf5b8 contrib/signet: Fix typos (Anthony Towns) Pull request description: Followups from #19937 ACKs for top commit: laanwj: Code review ACK b3c712cb2871e0034898b37454fb6a4e1fc78f84 Tree-SHA512: a1003f9ee3697438114b60872b50f4300c8b52f0d58551566eb61c421d787525807ae75be205dcab2c24358cd568f53260120880109a9d728773405ff987596f
2021-06-18Merge bitcoin/bitcoin#21365: Basic Taproot signing support for descriptor ↵Samuel Dobson
wallets 458a345b0590fd2fa04c7d8d70beb8d57e34bbc8 Add support for SIGHASH_DEFAULT in RPCs, and make it default (Pieter Wuille) c0f0c8eccb04f90940007e0c6aaff56bf2ab35b5 tests: check spending of P2TR (Pieter Wuille) a2380127e905e5849f90acc7c69832859d8336aa Basic Taproot signing logic in script/sign.cpp (Pieter Wuille) 49487bc3b6038393c1b9c2dbdc04a78ae1178f1a Make GetInputUTXO safer: verify non-witness UTXO match (Pieter Wuille) fd3f6890f3dfd683f6f13db912caf5c4288adf08 Construct and use PrecomputedTransactionData in PSBT signing (Pieter Wuille) 5cb6502ac5730ea453edbec4c46027ac2ada97e0 Construct and use PrecomputedTransactionData in SignTransaction (Pieter Wuille) 5d2e22437b22e7465ae4be64069443bcc1769dc9 Don't nuke witness data when signing fails (Pieter Wuille) ce9353164bdb6215a62b2b6dcb2121d331796f60 Permit full precomputation in PrecomputedTransactionData (Pieter Wuille) e841fb503d7a662bde01ec2e4794faa989265950 Add precomputed txdata support to MutableTransactionSignatureCreator (Pieter Wuille) a91d532338ecb66ec5bed164929d878dd55d63a4 Add CKey::SignSchnorr function for BIP 340/341 signing (Pieter Wuille) e77a2839b54fa2039bba468e8c09dbbbf19b150a Use HandleMissingData also in CheckSchnorrSignature (Pieter Wuille) dbb0ce9fbff01ffe4dd29da465f43ecaddc2854c Add TaprootSpendData data structure, equivalent to script map for P2[W]SH (Pieter Wuille) Pull request description: Builds on top of #22051, adding signing support after derivation support. Nothing is changed in descriptor features. Signing works for key path and script path spending, through the normal sending functions, and PSBT-based RPCs. However, PSBT usability is rather low as no extensions have been defined to convey Taproot-specific information, so all script information must be known to the signing wallet. ACKs for top commit: achow101: re-ACK 458a345b0590fd2fa04c7d8d70beb8d57e34bbc8 fjahr: Code review ACK 458a345b0590fd2fa04c7d8d70beb8d57e34bbc8 Sjors: ACK 458a345b0590fd2fa04c7d8d70beb8d57e34bbc8 Tree-SHA512: 30ed212cf7754763a4a81624ebc084c51727b8322711ac0b390369213c1a891d367ed8b123882ac08c99595320c11ec57ee42304ff22a69afdc3d1a0d55cc711
2021-06-17Merge bitcoin/bitcoin#22271: fuzz: Assert roundtrip equality for `CPubKey`MarcoFalke
9550dffa0c61df6d1591c62d09629b4c5731e1b7 fuzz: Assert roundtrip equality for `CPubKey` (Sebastian Falbesoner) Pull request description: This PR is a (quite late) follow-up to #19237 (https://github.com/bitcoin/bitcoin/pull/19237#issuecomment-642203251). Looking at `CPubKey::Serialize` and `CPubKey::Unserialize` I can't think of a scenario where the roundtrip (serialization/deserialization) equality wouldn't hold. ACKs for top commit: jamesob: crACK https://github.com/bitcoin/bitcoin/pull/22271/commits/9550dffa0c61df6d1591c62d09629b4c5731e1b7 pending CI Tree-SHA512: 640fb9e777d249769b22ee52c0b15a68ff0645b16c986e1c0bce9742155d14f1be601e591833e1dc8dcffebf271966c6b861b90888a44aae1feae2e0248e2c55
2021-06-17Merge bitcoin/bitcoin#20516: Well-defined CAddress disk serialization, and ↵W. J. van der Laan
addrv2 anchors.dat f8866e8c324be3322fa507c2ceb1de35d148d0f1 Add roundtrip fuzz tests for CAddress serialization (Pieter Wuille) e2f0548b52a4b2ba3edf77e3f21365f1e8f270a4 Use addrv2 serialization in anchors.dat (Pieter Wuille) 8cd8f37dfe3ffb73a09f3ad773603d9d89452245 Introduce well-defined CAddress disk serialization (Pieter Wuille) Pull request description: Alternative to #20509. This makes the `CAddress` disk serialization format well defined, and uses it to enable addrv2 support in anchors.dat (in a way that's compatible with older software). The new format is: - The first 4 bytes store a format version number. Its low 19 bits are ignored (as those historically stored the `CLIENT_VERSION`), but its high 13 bits specify the actual serialization: - 0x00000000: LE64 encoding for `nServices`, V1 encoding for `CService` (like pre-BIP155 network serialization). - 0x20000000: CompactSize encoding for `nServices`, V2 encoding for `CService` (like BIP155 network serialization). - Any other value triggers an unsupported format error on deserialization, and can be used for future format changes. - The `ADDRV2_FORMAT` flag in the stream's version does not determine the actual serialization format; it only sets whether or not V2 encoding is permitted. ACKs for top commit: achow101: ACK f8866e8c324be3322fa507c2ceb1de35d148d0f1 laanwj: Code review ACK f8866e8c324be3322fa507c2ceb1de35d148d0f1 vasild: ACK f8866e8c324be3322fa507c2ceb1de35d148d0f1 jonatack: ACK f8866e8c324be3322fa507c2ceb1de35d148d0f1 tested rebased to master and built/run/restarted with DEBUG_ADDRMAN, peers.dat and anchors ser/deser seems fine hebasto: ACK f8866e8c324be3322fa507c2ceb1de35d148d0f1, tested on Linux Mint 20.1 (x86_64). Tree-SHA512: 3898f8a8c51783a46dd0aae03fa10060521f5dd6e79315fe95ba807689e78f202388ffa28c40bf156c6f7b1fc2ce806b155dcbe56027df73d039a55331723796
2021-06-17fuzz: Assert roundtrip equality for `CPubKey`Sebastian Falbesoner
2021-06-17refactor: wrap CCoinsViewCursor in unique_ptrJames O'Beirne
Specifically with CCoinsViewDB, if a raw cursor is allocated and not freed, a cryptic leveldb assertion failure occurs on CCoinsViewDB destruction. See: https://github.com/google/leveldb/issues/142#issuecomment-414418135
2021-06-17Merge bitcoin/bitcoin#22268: fuzz: Add temporary debug assert for oss-fuzz issueMarcoFalke
faf1af58f85da74f94c6b5f6910c7faf7b47cc88 fuzz: Add Temporary debug assert for oss-fuzz issue (MarcoFalke) Pull request description: oss-fuzz is acting weird, so add an earlier assert to help troubleshooting ACKs for top commit: practicalswift: cr ACK faf1af58f85da74f94c6b5f6910c7faf7b47cc88 Tree-SHA512: 85830d7d47cf6b4edfe91a07bd5aa8f7110db0bade8df93868cf276ed04d5dd17e671f769e6a0fb5092012b86aa82bb411fb171411f15746981104ce634c88c1
2021-06-17fuzz: Add Temporary debug assert for oss-fuzz issueMarcoFalke