aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-04-07refactor: fixup named args in txpackage testsfanquake
Regression in #24152.
2022-04-07lint: codespell 2.1.0fanquake
2022-04-07Merge bitcoin/bitcoin#24784: refactor: deduplicate integer serialization in ↵MarcoFalke
RollingBloom benchmark fff91418ffa4911f7262e824418af664b25d4026 refactor: Remove deduplication of data in rollingbloom bench (phyBrackets) Pull request description: Fixed up #24088. ACKs for top commit: vincenzopalazzo: ACK https://github.com/bitcoin/bitcoin/pull/24784/commits/fff91418ffa4911f7262e824418af664b25d4026 Tree-SHA512: 9fef617bceb74a1aec4f4a1e7c4732c4764af3e8ac2fc02b84ce370e8b97431957ca17ee8f44fb96765f7304f8d7e5bfb951440db98ba40f240612f2232d215e
2022-04-07Merge bitcoin/bitcoin#24790: lint: remove qt SIGNAL/SLOT lintfanquake
b72925e7cea11522aca65580c136dbacb2753e83 lint: remove qt SIGNAL/SLOT lint (fanquake) Pull request description: I think we are past the point where we need to lint for this, the CPU can probably be better utilized. ACKs for top commit: laanwj: ACK b72925e7cea11522aca65580c136dbacb2753e83 Tree-SHA512: 3da6e4811cdd16ff64c7e26f641f7b24f0405cc86cec36666de58691d447eca8662c924df31c6c60b3523c13590bdc62205a3237b1b1794dd8cdef35519309b3
2022-04-07Merge bitcoin/bitcoin#24152: policy / validation: CPFP fee bumping within ↵fanquake
packages 9bebf35e269b2a918df27708565ecd0c5bd3f116 [validation] don't package validate if not policy or missing inputs (glozow) 51edcffa0e156dba06191a8d5c636ba01fa5b65f [unit test] package feerate and package cpfp (glozow) 1b93748c937e870e7574a8e120a85bee6f9013ff [validation] try individual validation before package validation (glozow) 17a8ffd8020375d60428695858558f2be264aa36 [packages/policy] use package feerate in package validation (glozow) 09f32cffa6c3e8b2d77281a5983ffe8f482a5945 [docs] package feerate (glozow) Pull request description: Part of #22290, aka [Package Mempool Accept](https://gist.github.com/glozow/dc4e9d5c5b14ade7cdfac40f43adb18a). This enables CPFP fee bumping in child-with-unconfirmed-parents packages by introducing [package feerate](https://gist.github.com/glozow/dc4e9d5c5b14ade7cdfac40f43adb18a#fee-related-checks-use-package-feerate) (total modified fees divided by total virtual size) and using it in place of individual feerate. We also always [validate individual transactions first](https://gist.github.com/glozow/dc4e9d5c5b14ade7cdfac40f43adb18a#always-try-individual-submission-first) to avoid incentive-incompatible policies like "parents pay for children" or "siblings pay for siblings" behavior. ACKs for top commit: instagibbs: reACK https://github.com/bitcoin/bitcoin/pull/24152/commits/9bebf35e269b2a918df27708565ecd0c5bd3f116 mzumsande: Code review ACK 9bebf35e269b2a918df27708565ecd0c5bd3f116 t-bast: ACK https://github.com/bitcoin/bitcoin/pull/24152/commits/9bebf35e269b2a918df27708565ecd0c5bd3f116 Tree-SHA512: 5117cfcc3ce55c00384d9e8003a0589ceac1e6f738b1c299007d9cd9cdd2d7c530d31cfd23658b041a6604d39073bcc6e81f0639a300082a92097682a6ea8c8f
2022-04-06lint: remove qt SIGNAL/SLOT lintfanquake
I think we are past the point where we need to lint for this, the CPU can probably be better utilized.
2022-04-06doc: Convert remaining comments to clang-tidy formatMarcoFalke
2022-04-06refactor: Remove deduplication of data in rollingbloom benchphyBrackets
2022-04-06Merge bitcoin/bitcoin#24681: build: Bump libevent minimum version up to 2.1.8fanquake
e40779a4fee03c6c455149bd8e9d1a7ccd991450 refactor: Remove outdated libevent logging code (Fabian Jahr) 0598f36852199d0cee8fe9e676a2e0bec3ebf624 refactor: account for requiring libevent 2.1.8+ (fanquake) aaf72d62c18f9cb325c150cf0cc21abb201607c8 build: Bump libevent minimum version up to 2.1.8 (Hennadii Stepanov) Pull request description: Required to support new functionality in bitcoin/bitcoin#19420. `libevent` availability: https://repology.org/project/libevent/versions ACKs for top commit: laanwj: Code review ACK e40779a4fee03c6c455149bd8e9d1a7ccd991450 fanquake: ACK e40779a4fee03c6c455149bd8e9d1a7ccd991450 Tree-SHA512: ccb14ea2f591484a3df5bc4a19f4f5400ef6b1cfb7dc45dd99f96cb948748215ed3b5debc34869763c91b8c7a26993fdb9b870950c0743c4d01038ab27c5e4e2
2022-04-06Merge bitcoin/bitcoin#24145: mempool: Clear vTxHashes when mapTx is clearedlaanwj
9d65ad365c539557e969a35d22723d92e0b422fe Clear vTxHashes when mapTx is cleared (Peter Bushnell) Pull request description: vTxHashes is a vector of all entries in mapTx, if you clear one you should clear the other, lest someone try to use the txiter in vTxHashes which would result in a segfault. ACKs for top commit: laanwj: Code review ACK 9d65ad365c539557e969a35d22723d92e0b422fe Tree-SHA512: 6832755e43ab7f528b46817aeadcb6ffdc965b97f59ab96bb053dedbb7e68155ba3db52286355dca33b509237f80eda249760b26db493762bc50d8e2cef16d8f
2022-04-06Merge bitcoin/bitcoin#24758: Disable the syscall sandbox for bitcoin-qt and ↵laanwj
remove gui-related syscalls fabdf9f870a4c07cb3548c3b385438f02179ea88 Remove gui-only syscalls (MarcoFalke) fa0c2aa826282fe40d2ce7becb4eb6d4814447a3 init: Disable syscall sandbox in the bitcoin-qt process (MarcoFalke) Pull request description: It is basically impossible (and a bit out of scope) for us to maintain a sandbox for the qt library. I am not sure if it is possible to only sandbox a few threads in a process, but I doubt this will add no practical benefit anyway, so I am disabling the sandbox for the whole bitcoin-qt process. See also https://github.com/bitcoin/bitcoin/pull/24690#issuecomment-1084372400 ACKs for top commit: laanwj: Code review ACK fabdf9f870a4c07cb3548c3b385438f02179ea88 Tree-SHA512: 944ded03ee25f7dfd0bfeea9c3f97f575f2d470aa03b387b07f3e3bec5cb886e4aaa17e4a9fb359d3e670e6da69adc9111673d13e6561ec55b3161bb67dfe760
2022-04-06Merge bitcoin/bitcoin#24732: Remove buggy and confusing IncrementExtraNonceMarcoFalke
cccc4e879a8cb9d858a88ea46b28ea27ab79ca55 Remove nHeightEnd and nHeight in generateBlocks helper (MarcoFalke) fa38b1c8bd29e2c792737f6481ab928e46396b7e Remove buggy and confusing IncrementExtraNonce (MarcoFalke) Pull request description: IncrementExtraNonce has many issues: * It is test-only code, but part of bitcoind * It is using the block height of the tip, as opposed to the block's previous block as reference for the new height. See https://github.com/bitcoin/bitcoin/issues/24730#issuecomment-1085586193 * It has no use case in regtest testing. With a low difficulty the extra nonce won't be incremented. With a high difficulty the test-only functions are clumsy to handle anyway. For example, the generate* RPCs will return an empty array once they reached `maxtries`, as opposed to an error. Also the calls can't be aborted early unless the node shuts down completely. So I think it is fine to just remove the extra nonce functionality and leave it to the outside to implement, if needed. For example, a wrapper script can call the `generate*` RPCs once every second, to use the timestamp as extra nonce. ACKs for top commit: ajtowns: ACK cccc4e879a8cb9d858a88ea46b28ea27ab79ca55 Tree-SHA512: d8a3989ad280ebd4b1b574159b3a396b8a42134347e6be3c88445162d86624d221c416456f45ae75aea62ed8c8a1a9bb3a2532924abca2ef7a879cb8e6b15654
2022-04-06Merge bitcoin/bitcoin#24098: rest: Use query parameters to control resource ↵MarcoFalke
loading 54b39cfb342d10a448d49299c715e3a25c2aca4a Add release notes (stickies-v) f959fc0397c3f3615e99bc28d2df549d9d52f277 Update /<count>/ endpoints to use a '?count=' query parameter instead (stickies-v) a09497614e9bb603fff36286d9611a25b23eeb02 Add GetQueryParameter helper function (stickies-v) fff771ee864975cee8c831651239bac95503c37a Handle query string when parsing data format (stickies-v) c1aad1b3b95b7c6bdf05e0c2095aba2f2db8310b scripted-diff: rename RetFormat to RESTResponseFormat (stickies-v) 9f1c54787c81177dd56a31c881a9ad2834a122dc Refactoring: move declarations to rest.h (stickies-v) Pull request description: In RESTful APIs, [typically](https://rapidapi.com/blog/api-glossary/parameters/query/) path parameters (e.g. `/some/unique/resource/`) are used to represent resources, and query parameters (e.g. `?sort=asc`) are used to control how these resources are being loaded through e.g. sorting, pagination, filtering, ... As first [discussed in #17631](https://github.com/bitcoin/bitcoin/pull/17631#discussion_r733031180), the [current REST api](https://github.com/bitcoin/bitcoin/blob/master/doc/REST-interface.md) contains two endpoints `/headers/` and `/blockfilterheaders/` that rather unexpectedly use path parameters to control how many (filter) headers are returned in the response. While this is no critical issue, it is unintuitive and we are still early enough to easily phase this behaviour out and ensure new endpoints (if any) do not have to stick to non-standard behaviour just for internal consistency. In this PR, a new `HTTPRequest::GetQueryParameter` method is introduced to easily parse query parameters, as well as two new `/headers/` and `/blockfilterheaders/` endpoints that use a count query parameter are introduced. The old path parameter-based endpoints are kept without too much overhead, but the documentation now points to the new query parameter-based endpoints as the default interface to encourage standardness. ## Behaviour change ### New endpoints and default values `/headers/` and `/blockfilterheaders/` now have 2 new endpoints that contain query parameters (`?count=<count>`) instead of path parameters (`/<count>/`), as described in REST-interface.md. Since query parameters can easily have default values, I have set this at 5 for both endpoints. **headers** `GET /rest/headers/<BLOCK-HASH>.<bin|hex|json>?count=<COUNT=5>` should now be used instead of `GET /rest/headers/<COUNT>/<BLOCK-HASH>.<bin|hex|json>` **blockfilterheaders** `GET /rest/blockfilterheaders/<FILTERTYPE>/<BLOCK-HASH>.<bin|hex|json>?count=<COUNT=5>` should now be used instead of `GET /rest/blockfilterheaders/<FILTERTYPE>/<COUNT>/<BLOCK-HASH>.<bin|hex|json>` ### Some previously invalid API calls are now valid API calls that contained query strings in the URI could not be parsed prior to this PR. This PR changes behaviour in that previously invalid calls (e.g. `GET /rest/headers/5/somehash.json?someunusedparam=foo`) would now become valid, as the query parameters are properly parsed, and discarded if unused. For example, prior to this PR, adding an irrelevant `someparam` parameter would be illegal: ``` GET /rest/headers/5/0000004c6aad0c89c1c060e8e116dcd849e0554935cd78ff9c6a398abeac6eda.json?someparam=true -> Invalid hash: 0000004c6aad0c89c1c060e8e116dcd849e0554935cd78ff9c6a398abeac6eda.json?someparam=true ``` **This behaviour change affects all rest endpoints, not just the 2 new ones introduced here.** *(Note: I'd be open to implementing additional logic to refuse requests containing unrecognized query parameters to minimize behaviour change, but for the endpoints that we currently have I don't really see the point for that added complexity. E.g. I don't see any scenarios where misspelling a parameter could lead to harmful outcomes)* ## Using the REST API To run the API HTTP server, start a bitcoind instance with the `-rest` flag enabled. To use the `blockfilterheaders` endpoint, you'll also need to set `-blockfilterindex=1`: ``` ./bitcoind -signet -rest -blockfilterindex=1 ``` As soon as bitcoind is fully up and running, you should be able to query the API, for example by using curl on the command line: ```curl "127.0.0.1:38332/rest/chaininfo.json"```. To more easily parse the JSON output, you can also use tools like 'jq' or `json_pp`, e.g.: ``` curl -s "localhost:38332/rest/blockfilterheaders/basic/0000004c6aad0c89c1c060e8e116dcd849e0554935cd78ff9c6a398abeac6eda.json?count=2" | json_pp . ``` ## To do - [x] update `doc/release-notes` ## Feedback This is my first PR (hooray!). Please don't hold back on any feedback/comments/nits/... you may have, big or small, whether they are code, process, language, ... related. I welcome private messages too if there's anything you don't want to clutter the PR with. I'm here to learn and am grateful for everyone's input. ACKs for top commit: stickies-v: I've had to push a tiny doc update to `REST-interface.md` (`git range-diff 219d728 9aac438 54b39cf`) since this was not merged for v23, but since there are no significant changes beyond theStack and jnewbery's ACKs I think this PR is now ready to be considered for merging? @MarcoFalke jnewbery: ACK 54b39cfb342d10a448d49299c715e3a25c2aca4a theStack: re-ACK 54b39cfb342d10a448d49299c715e3a25c2aca4a Tree-SHA512: 3b393ffde34f25605ca12c0b1300799a19684b816a1d03aed38b0f5439df47bfe6a589ffbcd7b83fd2def6c9d00a1bae5e45b1d18df4ae998c617c709990f83f
2022-04-05[validation] don't package validate if not policy or missing inputsglozow
Package validation policy only differs from individual policy in its evaluation of feerate. Minimize DoS surface; don't validate all over again if we know the result will be the same.
2022-04-05[unit test] package feerate and package cpfpglozow
2022-04-05[validation] try individual validation before package validationglozow
This avoids "parents pay for children" and "siblings pay for siblings" behavior, since package feerate is calculated with totals and is topology-unaware. It also ensures that package validation never causes us to reject a transaction that we would have otherwise accepted in single-tx validation.
2022-04-05[packages/policy] use package feerate in package validationglozow
This allows CPFP within a package prior to submission to mempool.
2022-04-05Update /<count>/ endpoints to use a '?count=' query parameter insteadstickies-v
In most RESTful APIs, path parameters are used to represent resources, and query parameters are used to control how these resources are being filtered/sorted/... The old /<count>/ functionality is kept alive to maintain backwards compatibility, but new paths with query parameters are introduced and documented as the default interface so future API methods don't break consistency by using query parameters.
2022-04-05Merge bitcoin/bitcoin#24216: validation: improve connect bench logginglaanwj
304ef73c83900a5439cdf8e6f0519471f59444d3 validation: improve connect bench logging (Sjors Provoost) Pull request description: * mention when we're using a cached block rather than actually loading it from disk * add ms/blk to load block from disk * log writing of Undo data, so it's tracked separate from writing indexes Example outputs from `src/bitcoind -debug=bench` during IBD. When the pass the block in memory: ``` 2022-01-31T14:21:35Z - Connect block: 251.79ms [59.59s (419.65ms/blk)] 2022-01-31T14:21:35Z - Using cached block 2022-01-31T14:21:35Z - Load block from disk: 0.07ms [9.67s (68.12ms/blk)] 2022-01-31T14:21:35Z - Sanity checks: 0.00ms [0.27s (1.87ms/blk)] 2022-01-31T14:21:35Z - Fork checks: 0.02ms [0.26s (1.84ms/blk)] 2022-01-31T14:21:35Z - Connect 597 transactions: 154.84ms (0.259ms/tx, 0.022ms/txin) [34.89s (243.96ms/blk)] 2022-01-31T14:21:35Z - Verify 7043 txins: 169.60ms (0.024ms/txin) [35.67s (249.46ms/blk)] 2022-01-31T14:21:35Z - Write undo data: 19.72ms [10.68s (74.68ms/blk)] 2022-01-31T14:21:35Z - Index writing: 0.05ms [0.73s (5.12ms/blk)] 2022-01-31T14:21:35Z - Connect total: 189.66ms [48.18s (336.93ms/blk)] 2022-01-31T14:21:35Z - Flush: 5.23ms [1.19s (8.30ms/blk)] 2022-01-31T14:21:35Z - Writing chainstate: 0.04ms [0.58s (4.03ms/blk)] 2022-01-31T14:21:35Z UpdateTip: new best=0000000000000000000b94a079a58d64f640f66b0cc338b5831b94c8739439a6 height=660135 version=0x20a00000 log2_work=92.494955 tx=593512887 date='2020-12-06T01:43:07Z' progress=0.850804 cache=138.8MiB(1031560txo) 2022-01-31T14:21:35Z - Connect postprocess: 0.26ms [0.17s (1.17ms/blk)] ``` When we have to load the block from disk (when blocks are received out of order, they are saved after initial validation steps and then loaded again for the final validation steps and connecting to tip): ``` 2022-01-31T14:21:35Z - Connect block: 195.27ms [59.79s (418.08ms/blk)] 2022-01-31T14:21:38Z - Load block from disk: 23.35ms [9.70s (67.80ms/blk)] 2022-01-31T14:21:38Z - Sanity checks: 1.96ms [0.27s (1.87ms/blk)] 2022-01-31T14:21:38Z - Fork checks: 0.05ms [0.26s (1.83ms/blk)] 2022-01-31T14:21:38Z - Connect 404 transactions: 116.03ms (0.287ms/tx, 0.017ms/txin) [35.00s (243.07ms/blk)] 2022-01-31T14:21:38Z - Verify 7031 txins: 119.58ms (0.017ms/txin) [35.79s (248.56ms/blk)] 2022-01-31T14:21:38Z - Write undo data: 23.54ms [10.70s (74.33ms/blk)] 2022-01-31T14:21:38Z - Index writing: 1.42ms [0.73s (5.09ms/blk)] 2022-01-31T14:21:38Z - Connect total: 146.84ms [48.33s (335.61ms/blk)] 2022-01-31T14:21:38Z - Flush: 4.84ms [1.19s (8.28ms/blk)] 2022-01-31T14:21:38Z - Writing chainstate: 0.04ms [0.58s (4.00ms/blk)] 2022-01-31T14:21:38Z UpdateTip: new best=00000000000000000004c2cad14fec645807ce236f8e1cc43fe106ee4f27692e height=660136 version=0x2000e000 log2_work=92.494972 tx=593513291 date='2020-12-06T01:46:08Z' progress=0.850804 cache=139.4MiB(1036010txo) 2022-01-31T14:21:38Z - Connect postprocess: 0.16ms [0.17s (1.16ms/blk)] ``` ACKs for top commit: laanwj: Code review ACK 304ef73c83900a5439cdf8e6f0519471f59444d3 theStack: Concept and code-review ACK 304ef73c83900a5439cdf8e6f0519471f59444d3 jonatack: re-ACK 304ef73c83900a5439cdf8e6f0519471f59444d3 per `git range-diff 4faf7a1d8 cfb027d 304ef7` rebase only since my last review Tree-SHA512: 2009e1db3c30eacd15c11629903334eda4f016da614afe2a1275d00c2a80d42e37edb10e79ceb58b3bd8855e7c6915e67d455aec15f73a25f48f48f64aa51a29
2022-04-05Merge bitcoin/bitcoin#24236: Remove utxo db upgrade codelaanwj
fa9112aac07dc371bfda437d40eb1b841f36f392 Remove utxo db upgrade code (MarcoFalke) Pull request description: It is not possible to upgrade Bitcoin Core pre-segwit (pre-0.13.1) to a recent version without a full IBD from scratch after commit 19a56d1519fb493c3e1bd5cad55360b6b80fa52b (released in version 22.0). Any Bitcoin Core version with the new database format after commit 1088b02f0ccd7358d2b7076bb9e122d59d502d02 (released in version 0.15), can upgrade to any version that is supported as of today. This leaves the versions 0.13.1-0.14.x. Even though those versions are unsupported, some users with an existing datadir may want to upgrade to a recent version. However, it seems reasonable to simply ask them to `-reindex` to run a full IBD from scratch. This allows us to remove the utxo db upgrade code. ACKs for top commit: Sjors: re-ACK fa9112aac07dc371bfda437d40eb1b841f36f392 laanwj: Code review ACK fa9112aac07dc371bfda437d40eb1b841f36f392 Tree-SHA512: 4243bb35df9ac4892f9fad30fe486d338745952bcff4160bcb0937c772d57b13b800647da14695e21e3655e85ee0d95fa3dc7789ee309d59ad84f422297fecb8
2022-04-05Remove gui-only syscallsMarcoFalke
* Revert "util: Add inotify_rm_watch to syscall sandbox (AllowFileSystem)" This reverts commit f05a4cdf5a0363e1c12f00c034afb60e7ea0c775. * Revert "util: add linkat to syscall sandbox (AllowFileSystem)" This reverts commit 9809db3577f0fa618bea42635b1581e628a30395.
2022-04-05init: Disable syscall sandbox in the bitcoin-qt processMarcoFalke
2022-04-05Merge bitcoin/bitcoin#24147: Miniscript integrationlaanwj
2da94a4c6f55f7a3621f4a6f70902c52f735c868 fuzz: add a fuzz target for Miniscript decoding from Script (Antoine Poinsot) f8369996e76dbc41a12f7b7eea14a7e7990a81c1 Miniscript: ops limit and stack size computation (Pieter Wuille) 2e55e88f86d0dd49b35d04af3f57e863498aabae Miniscript: conversion from script (Pieter Wuille) 1ddaa66eae67b102f5e37d212d366a5dcad4aa26 Miniscript: type system, script creation, text notation, tests (Pieter Wuille) 4fe29368c0ded0e62f437cab3a7c904f7fd3ad67 script: expose getter for CScriptNum, add a BuildScript helper (Antoine Poinsot) f4e289f384efdda6c3f56e1e1c30820a91ac2612 script: move CheckMinimalPush from interpreter to script.h (Antoine Poinsot) 31ec6ae92a5d9910a26d90a6ff20bab27dee5826 script: make IsPushdataOp non-static (Antoine Poinsot) Pull request description: Miniscript is a language for writing (a subset of) Bitcoin Scripts in a structured way. Miniscript permits: - To safely extend the Output Descriptor language to many more scripting features thanks to the typing system (composition). - Statical analysis of spending conditions, maximum spending cost of each branch, security properties, third-party malleability. - General satisfaction of any correctly typed ("valid" [0]) Miniscript. The satisfaction itself is also analyzable. - To extend the possibilities of external signers, because of all of the above and since it carries enough metadata. Miniscript guarantees: - That for any statically-analyzed as "safe" [0] Script, a witness can be constructed in the bounds of the consensus and standardness rules (standardness complete). - That unless the conditions of the Miniscript are met, no witness can be created for the Script (consensus sound). - Third-party malleability protection for the satisfaction of a sane Miniscript, which is too complex to summarize here. For more details around Miniscript (including the specifications), please refer to the [website](https://bitcoin.sipa.be/miniscript/). Miniscript was designed by Pieter Wuille, Andrew Poelstra and Sanket Kanjalkar. This PR is an updated and rebased version of #16800. See [the commit history of the Miniscript repository](https://github.com/sipa/miniscript/commits/master) for details about the changes made since September 2019 (TL;DR: bugfixes, introduction of timelock conflicts in the type system, `pk()` and `pkh()` aliases, `thresh_m` renamed to `multi`, all recursive algorithms were made non-recursive). This PR is also the first in a series of 3: - The first one (here) integrates the backbone of Miniscript. - The second one (#24148) introduces support for Miniscript in Output Descriptors, allowing for watch-only support of Miniscript Descriptors in the wallet. - The third one (#24149) implements signing for these Miniscript Descriptors, using Miniscript's satisfaction algorithm. Note to reviewers: - Miniscript is currently defined only for P2WSH. No Taproot yet. - Miniscript is different from the policy language (a high-level logical representation of a spending policy). A policy->Miniscript compiler is not included here. - The fuzz target included here is more interestingly extended in the 3rd PR to check a script's satisfaction against `VerifyScript`. I think it could be further improved by having custom mutators as we now have for multisig (see https://github.com/bitcoin/bitcoin/issues/23105). A minified corpus of Miniscript Scripts is available at https://github.com/bitcoin-core/qa-assets/pull/85. [0] We call "valid" any correctly-typed Miniscript. And "safe" any sane Miniscript, ie one whose satisfaction isn't malleable, which requires a key for any spending path, etc.. ACKs for top commit: jb55: ACK 2da94a4c6f55f7a3621f4a6f70902c52f735c868 laanwj: Light code review ACK 2da94a4c6f55f7a3621f4a6f70902c52f735c868 (mostly reviewed the changes to the existing code and build system) Tree-SHA512: d3ef558436cfcc699a50ad13caf1e776f7d0addddb433ee28ef38f66ea5c3e581382d8c748ccac9b51768e4b95712ed7a6112b0e3281a6551e0f325331de9167
2022-04-05Remove nHeightEnd and nHeight in generateBlocks helperMarcoFalke
2022-04-05Merge bitcoin/bitcoin#24391: build: stop overriding user autoconf flagsfanquake
7b00595d335915dc2bf856e3569115996381a402 build: stop overriding user CXXFLAGS (fanquake) 3e2ef23c3e838acbc2cba7d26a36a4c6008faa24 build: stop overriding user LDFLAGS (fanquake) 35c3fd43c3d5a1c7e1b32865ddc2b046ad448986 build: stop overriding user CPPFLAGS (fanquake) bc7cc576072703e4521844b949af5ce7d7e4722a doc: explain why we clear CXXFLAGS with enable-debug (fanquake) Pull request description: Historically our build system has hijacked `CXXFLAGS` and friends, and this has always been a source of complaints from users and developers. With this PR, we move away from using `CXXFLAGS`, `CPPFLAGS` and `LDFLAGS`, and instead use `CORE_*FLAGS` variables for our flags / options, leaving autoconfs `FLAG` vars to the user. Note that there are currently two cases where we will at least clear `CXXFLAGS` (if not alreaddy overridden by the user), when doing debugging or when coverage is enabled, to avoid Autoconfs `-g -O2` CXXFLAG default. ACKs for top commit: hebasto: ACK 7b00595d335915dc2bf856e3569115996381a402 Tree-SHA512: bda936a7aa8f98a1bf1552306845cb4bbab54e19a7a0b9ce3210e10fef70db146e9fe42a0cc8c50b2908506771b5b96f39c334e41323b70ec878e4010373096c
2022-04-04Merge bitcoin-core/gui#569: test: add regression test for #567Hennadii Stepanov
4d4dca43fc591bf8fae7af74670f6e96650ef34b test: add regression test for bitcoin-core/gui/issues/567 (Vasil Dimov) 3b82608dd11d35fa393ee0501c206d74c748248a options: add a comment for -listenonion and dedup a long expression (Vasil Dimov) Pull request description: Add a test that would fail, should https://github.com/bitcoin-core/gui/issues/567 resurface. Also, add a comment and dedup a long expression. ACKs for top commit: jarolrod: reACK 4d4dca43fc jonatack: ACK 4d4dca43fc591bf8fae7af74670f6e96650ef34b hebasto: ACK 4d4dca43fc591bf8fae7af74670f6e96650ef34b, tested with reverting changes from bitcoin-core/gui#568, and getting an expected test failure. shaavan: ACK 4d4dca43fc591bf8fae7af74670f6e96650ef34b Tree-SHA512: 59f069bdaa84586bb599e9372f89e4e66a3cafcbf58677fdf913d685c17dfa9c3d5b118829d81021a9a33b4fd8e46d4c7eb68c1dd902cf1c44a41b8e66e2967b
2022-04-04Merge bitcoin/bitcoin#24729: util/check: avoid unused parameter warningsMarcoFalke
0add4dbadbc972933b0c99813a155a4ed4852975 util/check: avoid unused parameter warnings (Anthony Towns) Pull request description: Add `[[maybe_unused]]` annotations to avoid warnings from gcc 9.4 and earlier which don't analyse `if constexpr` properly. ACKs for top commit: MarcoFalke: review ACK 0add4dbadbc972933b0c99813a155a4ed4852975 jonatack: ACK 0add4dbadbc972933b0c99813a155a4ed4852975 review and debug build on clang 15 shaavan: ACK 0add4dbadbc972933b0c99813a155a4ed4852975 Tree-SHA512: 3ba490d74d91692c1d22b927da43a130c92cd6a20ed168573e4fbe1f4675fef7e05ebf0b11f2bbd15da3c606fea1f8e6403cfca347009b8b6acc1e77bbee9963
2022-04-04Merge bitcoin/bitcoin#24746: refactor: remove macOS MAP_ANONYMOUS work aroundlaanwj
112a7ab9a8e4c96f5750ac3b929b433d8507354c refactor: remove macOS MAP_ANONYMOUS work around (fanquake) Pull request description: This was added to support compilation on macOS 10.10, our minimum required macOS is now 10.15. macOS has also supported it since 10.11. See https://github.com/bitcoin/bitcoin/pull/9063. macOS 12.3 manpage for mmap: ```bash MAP_ANONYMOUS Synonym for MAP_ANON. MAP_ANON Map anonymous memory not associated with any specific file. ``` ACKs for top commit: laanwj: Code review ACK 112a7ab9a8e4c96f5750ac3b929b433d8507354c jarolrod: ACK 112a7ab9a8e4c96f5750ac3b929b433d8507354c Tree-SHA512: 920744c755d05d813ab312ff27e42eacb27b1297972800e6fb64bbaad1ea14258751a7dd80c07bfa554a172f36960b26a07505f67e82885253c8bf551073c38e
2022-04-04refactor: fix clang-tidy named args usagefanquake
2022-04-03build: stop overriding user CXXFLAGSfanquake
Let users have the final say in regards to CXXFLAGS.
2022-04-03build: stop overriding user LDFLAGSfanquake
Let the user have the final say in regards to LDFLAGS.
2022-04-03build: stop overriding user CPPFLAGSfanquake
Let the user have the final say in regards to CPPFLAGS
2022-04-03refactor: remove macOS MAP_ANONYMOUS work aroundfanquake
This was added to support compilation on macOS 10.10, our minimum required macOS is now 10.15. macOS has also supported it since 10.11. See https://github.com/bitcoin/bitcoin/pull/9063.
2022-04-03Merge bitcoin-core/gui#557: Revert "qt: Do not use QObject::tr plural syntax ↵Hennadii Stepanov
for numbers with a unit symbol" 0c64401324b03f5576149bf27138cdb103dae934 Revert "qt: Do not use QObject::tr plural syntax for numbers with a unit symbol" (Luke Dashjr) Pull request description: Apparently this got forgotten. Maybe too late for 23.x (it's a bugfix, but changes translation strings). This reverts commit 3adde72bc99215062c8dabd38f8c34ad093452b5 (#296) per [GChuf](https://github.com/bitcoin-core/gui/pull/296#issuecomment-962516055) >I can confirm for slovenian and other slavic languages that we do have 3 or 4 different ways of saying "%n GB needed%, depending on the actual number of gigabytes. Similar to english "is/are". There's no way to cover all cases ... this is exactly why transifex allows you to have more than 2 options. ACKs for top commit: hebasto: ACK 0c64401324b03f5576149bf27138cdb103dae934, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: c01bae44a32b3ec324f2f9b8e4923bbb2e83bbd1460b745c5c911b98a9b2806fcbf815cfb19a1f1a7038c5c14312e102e7df8744c9002ef784b36d158e08eb14
2022-04-02refactor: Remove outdated libevent logging codeFabian Jahr
The removed code was intended to catch issues with event_enable_debug_logging which was not available prior to libevent 2.1.1. This is not necessary since the minimum libevent version was bumped to 2.1.8.
2022-04-01refactor: add missing std:: includes to threadnames.cppfanquake
2022-04-01doc: remove incorrect mention of PR_GET_NAMEfanquake
By removing the whole comment. These #include // For comments are near impossible to maintain, pollute diffs, and generally don't add a lot of value.
2022-04-01Remove buggy and confusing IncrementExtraNonceMarcoFalke
2022-04-01test: add regression test for bitcoin-core/gui/issues/567Vasil Dimov
2022-04-01Merge bitcoin/bitcoin#24724: test: fix incorrect named args in txpackage testsMarcoFalke
bf77fea3c154f3df6f05fcdcc9b89d560470c940 test: fix incorrect named args in txpackage tests (fanquake) Pull request description: Final non-scripted-diff commit split from #24661. Could be tested with: `./autogen.sh && ./configure CC=clang-12 CXX=clang++-12 && make clean && bear make -j9 && ( cd ./src/ && run-clang-tidy-12 -j9 )`. Motivation: > Incorrect named args are source of bugs, like https://github.com/bitcoin/bitcoin/pull/22979. > To allow them being checked by clang-tidy, use a format it can understand. ACKs for top commit: ajtowns: ACK bf77fea3c154f3df6f05fcdcc9b89d560470c940 Tree-SHA512: a13bfb5fc70424b13fbeec7f164d7a0d3b72b27ebec11dfd4115b7782a0037f26e9349e06eef8a6b17b8f529e0c7f43ae37a9c252bde65706dd164704d207d5f
2022-04-01util/check: avoid unused parameter warningsAnthony Towns
2022-03-31Merge bitcoin/bitcoin#24602: fuzz: add target for coinselection algorithmsAndrew Chow
21520b95515676d45145df624f430cdd39db7515 fuzz: add target for coinselection (Martin Zumsande) Pull request description: This adds a fuzz target for the coinselection algorithms by creating random `OutputGroup`s and running all three coin selection algorithms for them. It does not fuzz higher-level wallet logic for selecting eligible coins (as in `SelectCoins()`), thought it probably would make sense to have a fuzz target for that too. ACKs for top commit: achow101: ACK 21520b95515676d45145df624f430cdd39db7515 vasild: ACK 21520b95515676d45145df624f430cdd39db7515 Tree-SHA512: c763003cf5ff5317f929d3d0b2f06fa739ae41dd642042d9a5c5c96e6cb9b349a6c7aeabc77bc2b846d12c8bcb60e07ee20a9f38539429c65723ab76aeee6b2e
2022-03-31Merge bitcoin/bitcoin#24711: wallet: Postpone wallet loading notification ↵Andrew Chow
for encrypted wallets 0c12f0116ca802f55f5ab43e6c4842ac403b9889 wallet: Postpone NotifyWalletLoaded() for encrypted wallets (Hennadii Stepanov) aeee419c6aae085cacd75343c1ce23486b2b8916 wallet, refactor: Add wallet::NotifyWalletLoaded() function (Hennadii Stepanov) Pull request description: Fixes bitcoin-core/gui#571. `CWallet::Create()` notifies about wallet loading too early, that results the notification goes before `DescriptorScriptPubKeyMan`s were created and added to an encrypted wallet. And `interfaces::Wallet::taprootEnabled()` in https://github.com/bitcoin/bitcoin/blob/ecf692b466860f44334a1da967fc2559da913bec/src/qt/receivecoinsdialog.cpp#L100-L102 erroneously returns `false` for just created encrypted descriptor wallets. ACKs for top commit: Sjors: utACK 0c12f0116ca802f55f5ab43e6c4842ac403b9889 achow101: ACK 0c12f0116ca802f55f5ab43e6c4842ac403b9889 Tree-SHA512: 2694bacd12748cd5f6c95d9d3bf8bcf4502ee67fecd8d057f33236b72069c61401b08f49deb013fc71c3f1e51ae16bdfd827ddcbc2a083d7044589be7a78982e
2022-03-31test: fix incorrect named args in txpackage testsfanquake
2022-03-31options: add a comment for -listenonion and dedup a long expressionVasil Dimov
A followup to https://github.com/bitcoin-core/gui/pull/568 Co-authored-by: Jon Atack <jon@atack.com>
2022-03-31doc: Use DecodeTxDoc helperMarcoFalke
Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2022-03-31Merge bitcoin/bitcoin#24716: rpc: Fix documentation assertion for ↵MarcoFalke
`getrawtransaction` 71038a151e3136c22449e1a5cb1f386e8474c32d rpc: Fix documentation assertion for `getrawtransaction` (laanwj) Pull request description: When `getrawtransaction` is successfully used on a coinbase transaction, there is an assertion error. This is very unlikely but happens in the `interface_usdt_utxocache.py` test in #24358. This does the following: - Add missing "coinbase" documentation. - Synchronize documentation between `getrawtransaction` and `decoderawtransaction`, the two users of `TxToUniv` that have detailed documentation. `decodepsbt` and `getblock` also uses it but fortunately elides this block. - Change "vout[].amount" to `STR_AMOUNT` for consistency. - Add maintainer comment to keep the two places synchronized. It might be possible to get smarter with deduplication, but there are some extra fields that prevent the obvious way. ACKs for top commit: jonatack: ACK 71038a151e3136c22449e1a5cb1f386e8474c32d Tree-SHA512: 962236130455d805190ff9a5c971e4e25c17db35614a90ce340264ec953b0ad7fb814eb33ae430b5073955a8a350f72bdd67ba93e35f9c70e5175b836a767a35
2022-03-31Merge bitcoin/bitcoin#24673: refactor: followup of remove ↵MarcoFalke
-deprecatedrpc=addresses flag 9563a645c22a455da3d2d305ed0eef4266b1d322 refactor: add stdd:: includes to core_write (fanquake) 8b9efebb0a1a1e6b3a6de88cef57454f1a79eb04 refactor: use named args when ScriptToUniv or TxToUniv are invoked (Michael Dietz) 22f25a61168f261dff06fb66737be55eab290c5b refactor: prefer snake case, TxToUniv arg hashBlock renamed block_hash (Michael Dietz) 828a094ecfbf93ad9e4bb83b85a519f7416ff3fb refactor: merge ScriptPubKeyToUniv & ScriptToUniv into one function (Michael Dietz) Pull request description: I've cherry-picked some of the commits out of #22924, and made minor changes (like fixing named args). ACKs for top commit: MarcoFalke: re-ACK 9563a645c22a455da3d2d305ed0eef4266b1d322 🕓 Tree-SHA512: 4f0e5b45c14cbf68b9e389bbe1211c125d95cbd3da5205b1cff6a4c44f15b15039ba2a5b25cd7e2580d9169404f1b7ff620d8a7e01f6112e3cb153ecfaef8916
2022-03-31Merge bitcoin/bitcoin#24715: build, test: Fix test logfile nameMarcoFalke
8b517fae7eb229911a5d41bbe26fbf6cc7de46df build, refactor: Replace tabs with spaces (Hennadii Stepanov) dc0774cbdfaee5b81085596dbc686036ca9a2d51 build, test: Fix test logfile name (Hennadii Stepanov) Pull request description: Recently merged bitcoin/bitcoin#19385 was flawed as it tries to `cat` a non-existed logfile: - https://github.com/bitcoin/bitcoin/pull/19385#discussion_r835300701 - https://github.com/bitcoin/bitcoin/pull/19385#issuecomment-1082748549 Closes bitcoin/bitcoin#17224. ACKs for top commit: luke-jr: utACK 8b517fae7eb229911a5d41bbe26fbf6cc7de46df Tree-SHA512: 6c6dab6d7d38b5e949f1159ddff8e431f26d7254157f8308d63383c0642154271107e384c77722b7cf77f0be204bd21d69f3a9e93a8d19cf48954ac673df6c7a
2022-03-31Merge bitcoin/bitcoin#24714: util/check: Don't use a lambda for Assert/AssumeMarcoFalke
2ef47ba6c57a12840499a13908ab61aefca6cb55 util/check: stop using lambda for Assert/Assume (Anthony Towns) 7c9fe25c16d48b53a61fa2f6ff77eaf8820cb1f6 wallet: move Assert() check into constructor (Anthony Towns) Pull request description: Using a lambda creates a couple of odd namespacing issues, in particular making clang's thread safety analysis less helpful, and confusing gcc when calling member functions. Fix this by not using a lambda. Fixes #21596 Fixes #24654 ACKs for top commit: MarcoFalke: ACK 2ef47ba6c57a12840499a13908ab61aefca6cb55 🚢 jonatack: Tested re-ACK 2ef47ba6c57a12840499a13908ab61aefca6cb55 Tree-SHA512: 4bdbf3215f3d14472df0552362c5eebe8b7eea2d0928a8a41109edd4e0c5f95de6f8220eb2fee8506874e352c003907faf5ef344174795939306a618157b1bae