aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-02-23Merge bitcoin/bitcoin#24381: test: Run symlink regression tests on Windowslaanwj
fad7ddf9e3710405d727f61d8200d5efed1e705b test: Run symlink regression tests on Windows (MarcoFalke) Pull request description: Seems odd to add tests, but not run them on the platform that needs them most. ACKs for top commit: laanwj: Code review ACK fad7ddf9e3710405d727f61d8200d5efed1e705b ryanofsky: Code review ACK fad7ddf9e3710405d727f61d8200d5efed1e705b, just removing new test. Would be nice if the test could be added later, of course. Tree-SHA512: 64b235967a38c2eb90657e8d7a0447bcc8ce81d1b75a275b6c48bd42efd9ea7e7939257e484f297ee84598def3738eaeb289561aeba1dd6a99b258d389995139
2022-02-23Merge bitcoin/bitcoin#24372: bench: Avoid deprecated use of volatile +=fanquake
9999f891d1c9093e552492cf8ccc3168370c7a39 bench: Avoid deprecated use of volatile += (MarcoFalke) Pull request description: Deprecated in C++20 according to https://eel.is/c++draft/expr.ass#6 . ``` bench/examples.cpp:16:13: warning: compound assignment with ‘volatile’-qualified left operand is deprecated [-Wvolatile] 16 | sum += sin(d); | ~~~~^~~~~~~~~ ``` While C++20 is currently unsupported, I don't see any downside to a minor fixup to an example benchmark. This will also make a hypothetical C++20 patch smaller. ACKs for top commit: fanquake: ACK 9999f891d1c9093e552492cf8ccc3168370c7a39 Tree-SHA512: ca7d660fa8eba347a4648408a8b97a0ecb8263a825da7abd59129d783058102581e05b273667989f95480436a66d5384bd1e92d9ae79408f5b30e2178935cc38
2022-02-23Merge bitcoin/bitcoin#24406: test: Fix Wambiguous-reversed-operator compiler ↵fanquake
warnings fafc4eb3637be0a85644c89c355fe68678a62c17 test: Fix Wambiguous-reversed-operator compiler warnings (MarcoFalke) Pull request description: Add a missing const to avoid the C++20 clang **compiler warning**: ``` test/fuzz/addrman.cpp:325:22: error: ISO C++20 considers use of overloaded operator '==' (with operand types 'AddrManDeterministic' and 'AddrManDeterministic') to be ambiguous despite there being a unique best viable function [-Werror,-Wambiguous-reversed-operator] assert(addr_man1 == addr_man2); ~~~~~~~~~ ^ ~~~~~~~~~ /usr/include/assert.h:93:27: note: expanded from macro 'assert' (static_cast <bool> (expr) \ ^~~~ test/fuzz/addrman.cpp:140:10: note: ambiguity is between a regular call to this operator and a call with the argument order reversed bool operator==(const AddrManDeterministic& other) ^ 1 error generated. ``` This patch also fixes the **compile error** if the first operand is `const`: ``` test/fuzz/addrman.cpp:326:23: error: invalid operands to binary expression ('const AddrManDeterministic' and 'AddrManDeterministic') assert(addr_man_1 == addr_man2); ~~~~~~~~~~ ^ ~~~~~~~~~ /usr/include/assert.h:90:27: note: expanded from macro 'assert' (static_cast <bool> (expr) \ ^~~~ test/fuzz/addrman.cpp:140:10: note: candidate function not viable: 'this' argument has type 'const AddrManDeterministic', but method is not marked const bool operator==(const AddrManDeterministic& other) ^ 1 error generated. ACKs for top commit: hebasto: ACK fafc4eb3637be0a85644c89c355fe68678a62c17, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 92cd62ae06ee1393a6dc2ea6f3f553595a8f8d66f51592d231b42122bfb71ed4801a016daafc85360040339c5ae59b76888265cec37449c4688d6c7768f4567e
2022-02-22Output license info when binaries are passed -versionfanquake
Consolidate to outputting the licensing info when we pass -version to a binary, i.e bitcoind -version: ```bash itcoin Core version v22.99.0-fc1f355913f6-dirty Copyright (C) 2009-2022 The Bitcoin Core developers Please contribute if you find Bitcoin Core useful. Visit <https://bitcoincore.org/> for further information about the software. The source code is available from <https://github.com/bitcoin/bitcoin>. This is experimental software. Distributed under the MIT software license, see the accompanying file COPYING or <https://opensource.org/licenses/MIT> ```
2022-02-22refactor: shift CopyrightHolders() and LicenseInfo() to clientversion.cppfanquake
2022-02-22qt: Update translation source fileHennadii Stepanov
2022-02-22Merge bitcoin/bitcoin#24367: User-facing content and codebase doc fixups ↵laanwj
from transifex translator feedback 48742693acc9de837735674057c9aae2fe90bd1d Replace "can not" with "cannot" in docs, user messages, and tests (Jon Atack) e670edd43441ecb6e5978d65348501c57d856030 User-facing content fixups from transifex translator feedback (Jon Atack) Pull request description: Closes #24366. ACKs for top commit: laanwj: Code review re-ACK 48742693acc9de837735674057c9aae2fe90bd1d hebasto: re-ACK 48742693acc9de837735674057c9aae2fe90bd1d, only suggested change since my previous [review](https://github.com/bitcoin/bitcoin/pull/24367#pullrequestreview-885938219). Tree-SHA512: 4dcdcb417251a413e65fab6070515e13a1267c8e0dbcf521386b842511391f24c84a0c2168fe13458c977682034466509bf2a3453719d4d94d3c568fd9f4adb4
2022-02-22Merge bitcoin/bitcoin#24305: Docs: [policy] Remove outdated confusing commentMarcoFalke
e50a9be1540c769a99fcdc1f7a109a6bf1c7516b Remove outdated comment on CFeeRate (Murch) Pull request description: This comment described how the constructor of CFeeRate was previously indirectly used to parse fee rate arguments from RPCs. The command line input was actually in sat/vB but due to the use of AmountFromValue() it got converted to BTC/vB which then got rectified in the constructor by creating a CFeeRate from that given value and COIN as the transaction size. Since this usage pattern was removed from the codebase some months ago, the comment is now obsolete. ACKs for top commit: michaelfolkson: ACK e50a9be1540c769a99fcdc1f7a109a6bf1c7516b jonatack: ACK e50a9be1540c769a99fcdc1f7a109a6bf1c7516b Tree-SHA512: f17bf0baeeca85a5c7883edadd407da845f6e3af1c949e93116bd67c02e601682a5f7f1ab2497172472e3acf1c4e3c234b01161a77e7d7f028e3551da34777f0
2022-02-22Merge bitcoin/bitcoin#24310: docs / fixups from RBF and packagesfanquake
77202f0554dcbbbb167d0ed3927cca0bf4609ce8 [doc] package deduplication (glozow) d35a3cb3968d7584c7d5c42b121a80f34ea656bf [doc] clarify inaccurate comment about replacements paying higher feerate (glozow) 5ae187f8761f5f85a1ef41d24f75afb7eecf366f [validation] look up transaction by txid (glozow) Pull request description: - Use txid, not wtxid, for `mempool.GetIter()`: https://github.com/bitcoin/bitcoin/pull/22674#discussion_r772934994 - Fix a historically inaccurate comment about RBF during the refactors: https://github.com/bitcoin/bitcoin/pull/22855#discussion_r777130441 - Add a section about package deduplication to policy/packages.md: https://github.com/bitcoin/bitcoin/pull/24152#discussion_r802955759 and https://github.com/bitcoin/bitcoin/pull/24152#discussion_r802723149 (I'm intending for this to be in v23 since it's fixups for things that are already merged, which is why I split it from #24152) ACKs for top commit: t-bast: LGTM, ACK https://github.com/bitcoin/bitcoin/pull/24310/commits/77202f0554dcbbbb167d0ed3927cca0bf4609ce8 darosior: ACK 77202f0554dcbbbb167d0ed3927cca0bf4609ce8 LarryRuane: ACK 77202f0554dcbbbb167d0ed3927cca0bf4609ce8 Tree-SHA512: a428e791dfa59c359d3ccc67e8d3a4c1239815d2f6b29898e129700079271c00b3a45f091f70b65a6e54aa00a3d5b678b6da29d2a76b6cd6f946eaa7082ea696
2022-02-22Merge bitcoin-core/gui#547: Override BitcoinApplication::event() to handle ↵Hennadii Stepanov
QEvent::Quit e7fc50681e99e3c726db2bc4d3d425ed8a0fc6b3 qt: Override BitcoinApplication::event() to handle QEvent::Quit (Hennadii Stepanov) Pull request description: bitcoin-core/gui#336 introduced a regression when termination requests from a platform are not handled properly. This PR fixes this regression. On macOS shutdown after clicking "Quit" in Dock icon menu, and during logout works again. Fixes bitcoin-core/gui#545. ACKs for top commit: RandyMcMillan: tACK e7fc50681e99e3c726db2bc4d3d425ed8a0fc6b3 Sjors: tACK e7fc50681e99e3c726db2bc4d3d425ed8a0fc6b3 (rebased on master) indeed fixes the crash described in #545 promag: Tested ACK e7fc50681e99e3c726db2bc4d3d425ed8a0fc6b3 on macOS 10.15 with Qt 5.15.2. Tree-SHA512: 236a483dc0828f22999469e133b8ac9f0b6267ec2a27004c3ebaa967689ddb972ea1fa90c1dd41f3bff3d17bf571a707babcef53bd79fd711fda98cfbf120131
2022-02-21Replace "can not" with "cannot" in docs, user messages, and testsJon Atack
2022-02-21Merge bitcoin/bitcoin#24370: rpc, cli: describe quality/recency filtering in ↵MarcoFalke
getnodeaddresses and -addrinfo ce690847b69eb80b0232f818152dbb1db7c4c61a cli: describe quality/recency filtering in -addrinfo (Jon Atack) 7c975614c0fc6ff2084a1708a4c1f0368a4bc98f rpc: describe quality/recency filtering in getnodeaddresses (Jon Atack) Pull request description: Addresses #24278. ``` $ bitcoin-cli help getnodeaddresses getnodeaddresses ( count "network" ) Return known addresses, after filtering for quality and recency. These can potentially be used to find new peers in the network. The total number of addresses known to the node may be higher. ``` ``` $ bitcoin-cli -help | grep -A3 addrinfo -addrinfo Get the number of addresses known to the node, per network and total, after filtering for quality and recency. The total number of addresses known to the node may be higher. ``` ACKs for top commit: mzumsande: Thanks, Code Review ACK ce690847b69eb80b0232f818152dbb1db7c4c61a prayank23: reACK https://github.com/bitcoin/bitcoin/pull/24370/commits/ce690847b69eb80b0232f818152dbb1db7c4c61a Tree-SHA512: 82d23b15e64a99411eb8e70d7267a1b4f23182fabe072e824277569d9677e392b466be63f00e3d157d7db94bbe032d53f12ad4ab30b55b7b8a629c37d80d1d8c
2022-02-21test: Fix Wambiguous-reversed-operator compiler warningsMarcoFalke
2022-02-21util: Add SaturatingAdd helperMarcoFalke
2022-02-21cli: describe quality/recency filtering in -addrinfoJon Atack
Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
2022-02-21rpc: describe quality/recency filtering in getnodeaddressesJon Atack
Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
2022-02-21Merge bitcoin/bitcoin#24339: rpc: Improve RPC help by explicitly mentioning ↵MarcoFalke
output types c821ab8be8dffb749853c05e05cb515c11e6328a Use `GetAllOutputTypes` in `getblock` RPC function (Kiminuo) d970a85d335202cc85f6604f794c43af6645673f Move `GetAllOutputTypes` function from `rpc/rawtransaction.cpp` to `rpc/util.{h|cpp}` (Kiminuo) Pull request description: This PR attempts to replicate https://github.com/bitcoin/bitcoin/blob/0ccf9b2e5594581deef2f60174c3651a57f93b64/src/rpc/rawtransaction.cpp#L547 to one other place (at the moment) so that users have better idea what RPC methods can actually return. I created this PR as a follow-up to the idea mentioned here https://github.com/bitcoin/bitcoin/pull/23320#discussion_r732458112 (resolved). ACKs for top commit: kristapsk: re-ACK c821ab8be8dffb749853c05e05cb515c11e6328a Tree-SHA512: 5ff66a41ad7c43ec769f4a99933d2d070feea7c617286d94b6f9bfa1a2547a42211915778210a89074ad4b14d99f34852cc6871efed5e6f1e2ffedd40d669386
2022-02-21Merge bitcoin/bitcoin#24137: doc: Rework generate* docfanquake
fa30e62cc609ff29f0acaa5047d3f437cb04a67b doc: Rework generate* doc (MarcoFalke) Pull request description: Hide the test-only calls and clarify the short description ACKs for top commit: 0xB10C: reACK fa30e62cc609ff29f0acaa5047d3f437cb04a67b. changes since fa3bb584dcc742a767b2141cd7324877e3cf5302 are: dropping the `immediately` + formatting the touched line and a rebase Tree-SHA512: 07439f39660bbf144c2cc406b6010b64dcdd27150d78654fe04a36a982a519f837a0cf0f030c9f30af69c451ccf7a3b7287a275637aa81904c202029b9efc661
2022-02-21Use `GetAllOutputTypes` in `getblock` RPC functionKiminuo
2022-02-21Merge bitcoin/bitcoin#24343: Add descriptor_tests covering tr(), and fix ↵fanquake
minor bugs 0683f377e1588758da86368f82efee765f89d890 Add tr() descriptor unit tests (Pieter Wuille) 4b2e31a7ae630e68735e9c8e32f1df422ef4aff0 Bugfix: make ToPrivateString work with x-only keys (Pieter Wuille) 18ad54c3b21804ad540631dd4527cbad6d6ccc75 Bugfix: set x-only flag when inferring pk() inside tr() (Pieter Wuille) Pull request description: This fixes two bugs in the current logic for `tr()` descriptors: * ToPrivateString does not always work, because the provided private key may mismatch the parity of the x-only public key. * The descriptors inferred for `pk()` inside `tr()` have the wrong x-only flag, leading to such descriptors generating the wrong scriptPubKey (roundtripping through ToString does fix it however, so this seems unobservable in the current code). These were discovered while adding unit tests to descriptor_tests that cover various aspects of `tr()` descriptors, which are now also added here. ACKs for top commit: achow101: ACK 0683f377e1588758da86368f82efee765f89d890 instagibbs: ACK https://github.com/bitcoin/bitcoin/pull/24343/commits/0683f377e1588758da86368f82efee765f89d890 jonatack: Code review ACK 0683f377e1588758da86368f82efee765f89d890 Tree-SHA512: fc0e11b45da53054a108effff2029d67b64e508b160a6e22e00c98b506c39ec12ccc95afd21ea68a6c691eb62930afc7af18908f2fa3a954d102afdc67bc355a
2022-02-21doc: Rework generate* docMarcoFalke
Can be reviewed with --word-diff-regex=. --ignore-all-space
2022-02-21Merge bitcoin/bitcoin#24072: doc: fix wording of alertnotify to match behaviourMarcoFalke
6981de4435573ad44ee53fd5efc10894866ed2f9 doc: fix wording of alertnotify (willcl-ark) Pull request description: The documentation of the `alertnotify` startup option no longer matches the implementation. Currently the alert is only triggered by `DoWarning` (as part of `CChainstate::UpdateTip` when blocks containing unknown versionbits are detected on the network, indicating that there may be an upcoming softfork which you don't know about), but not when we see a "really long fork": https://github.com/bitcoin/bitcoin/blob/2825c41a6121524bc647002cbb4258cbf701a14b/src/validation.cpp#L2418-L2433 I think it would be desirable in a follow-up PR to implement the logic to alert on a (really) long fork, but not to alert for "partition detection" (abnormally slow/fast blocks). `PartitionChecker` code was removed in ab8be98fdb25b678a8cd7e89adf06d1b1f6bdd62 ACKs for top commit: josibake: ACK https://github.com/bitcoin/bitcoin/pull/24072/commits/6981de4435573ad44ee53fd5efc10894866ed2f9 achow101: ACK 6981de4435573ad44ee53fd5efc10894866ed2f9 Tree-SHA512: ea124f53ca1db803ba93d649f4bc983484c47fb5fe7fa61a8eb32fcbc7425f67d8578e66a6ba70202e13868fe8add0103306dede3b1edd1d3261ffb9c1042b87
2022-02-21Merge bitcoin/bitcoin#24376: doc: bitcoin-wallet fixes (help output and code ↵MarcoFalke
comment) 62cc138ecb9cc7afcbe6fdb42b060a8f149826de Rename wallet-tool to bitcoin-wallet in code comment (Kristaps Kaupe) 0db3ad3ba41a76dff80bcb5f292e587da400ebf1 Mention -signet in bitcoin-wallet help output (Kristaps Kaupe) Pull request description: * Mention `-signet` in sentence where there is already `-testnet/-signet` in help output. * Rename `wallet-tool` to `bitcoin-wallet` in single remaining place in code comments (was already done in #17648 at other places). ACKs for top commit: RandyMcMillan: tACK 62cc138ecb Tree-SHA512: c5df7811b8200f61943908dcf3b2b788fe991bf00bef28f069ab8784924556ffd5d86fc0ba2ad0b3c3f9be2ba73a34bc67059d7c057bba646c1801ffa3cb2070
2022-02-21Merge bitcoin/bitcoin#24231: streams: Fix read-past-the-end and integer ↵MarcoFalke
overflows fa1b89a6bdbab50bdb0504782afd4bb3375d1b57 scripted-diff: Rename nReadPos to m_read_pos in streams.h (MarcoFalke) fa56c79df91e5d87533af38b64f4f4148a48a276 Make CDataStream work properly on 64-bit systems (MarcoFalke) fab02f799194c75af7def3a2ab45c443b75de230 streams: Fix read-past-the-end and integer overflows (MarcoFalke) Pull request description: This is a follow-up to commit e26b62093ae21e89ed7d36a24a6b863f38ec631d with the following fixes: * Fix unsigned integer overflow in `ignore()`, when `nReadPos` wraps. * Fix unsigned integer overflow in `read()`, when `nReadPos` wraps. * Fix read-past-the-end in `read()`, when `nReadPos` wraps. This shouldn't be remote-exploitable, because it requires a stream of more than 1GB of size. However, it might be exploitable if the attacker controls the datadir (I haven't checked). A unit test for the overflow in `ignore()` looks like following. It is left as an excercise to the reader to replace `foo.ignore(7)` with the appropriate call to `read()` to reproduce the overflow and read-error in `read()`. ```diff diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp index 922fd8e513..ec6ea93919 100644 --- a/src/test/coins_tests.cpp +++ b/src/test/coins_tests.cpp @@ -534,6 +534,20 @@ BOOST_AUTO_TEST_CASE(ccoins_serialization) } catch (const std::ios_base::failure&) { } + CDataStream foo{0, 0}; + auto size{std::numeric_limits<uint32_t>::max()}; + foo.resize(size); + BOOST_CHECK_EQUAL(foo.size(), size); + foo.ignore(std::numeric_limits<int32_t>::max()); + size -= std::numeric_limits<int32_t>::max(); + BOOST_CHECK_EQUAL(foo.size(), size); + foo.ignore(std::numeric_limits<int32_t>::max()); + size -= std::numeric_limits<int32_t>::max(); + BOOST_CHECK_EQUAL(foo.size(), size); + BOOST_CHECK_EQUAL(foo.size(), 1); + foo.ignore(7); // Should overflow, as the size is only 1 + BOOST_CHECK_EQUAL(foo.size(), uint32_t(1 - 7)); + // Very large scriptPubKey (3*10^9 bytes) past the end of the stream CDataStream tmp(SER_DISK, CLIENT_VERSION); uint64_t x = 3000000000ULL; ``` ACKs for top commit: klementtan: Code Review ACK fa1b89a6bdbab50bdb0504782afd4bb3375d1b57: Tree-SHA512: 67f0a1baafe88eaf1dc844ac55b638d5cf168a18c945e3bf7a2cb03c9a5976674a8e3af2487d8a2c3eae21e5c0e7a519c8b16ee7f104934442e2769d100660e9
2022-02-21Merge bitcoin/bitcoin#24347: rpc: Fix implicit-integer-sign-change in ↵MarcoFalke
verifychain fa8dad0e078c577d740a9667636733957586c035 rpc: Fix implicit-integer-sign-change in verifychain (MarcoFalke) Pull request description: It doesn't really make sense to treat `DEFAULT_CHECKLEVEL` as unsigned as long as `VerifyDB` accepts a signed integer. Making it signed also avoids a cast round trip from signed->unsigned->signed in the RPC. ACKs for top commit: luke-jr: utACK fa8dad0e078c577d740a9667636733957586c035 theStack: Code-review ACK fa8dad0e078c577d740a9667636733957586c035 Tree-SHA512: 75499dbe4ace2962792e5fbec7defb10c25fdbbfde951d5e542a91daa880cc50395da0287173e2c84a28e18267c74af7b44b9f38ce364bcb0216c402f65b7641
2022-02-20Merge bitcoin/bitcoin#24133: index: Improve robustness of coinstatsindex at ↵fanquake
restart 820c03aff5295fff68a4577aa51667198036e372 index: check muhash is in sync on coinstatsindex launch (Fabian Jahr) 38ed58b8503f2809e555036f4e98ff9b40a950c8 index: remove txindex references from base index (Fabian Jahr) Pull request description: This change lets the `coinstatsindex` fail loudly in case the internal `muhash` state differs from the last finalized output saved on disk, which would indicate that the `muhash` state somehow got out of sync. This should generally not happen since both are written to disk in a batch but #24076 seems to indicate that the might still be an issue. Since #24076 so far can not be reproduced reliably, the issue should not be closed yet. Further investigation and testing needs to be done. ACKs for top commit: Sjors: re-ACK 820c03aff5295fff68a4577aa51667198036e372 mzumsande: re-ACK 820c03aff5295fff68a4577aa51667198036e372 ryanofsky: Code review ACK 820c03aff5295fff68a4577aa51667198036e372. Good to catch the error earlier Tree-SHA512: 3c985d7152698d25bad95d4ad512ff87dff13fabef790589c5a6cf93ca4251ad599e12feb7251a084503e2a213b022eaacfbaaa601464114ad372b029f64f204
2022-02-20Merge bitcoin/bitcoin#24369: util: Add missing rseq to syscall sandboxfanquake
6c4fd36089d016447c8199d752a328979f0d56d5 util: Add missing rseq to syscall sandbox (laanwj) Pull request description: Fixes #24368. ACKs for top commit: prusnak: Approach ACK 6c4fd36 Tree-SHA512: fc01b99483581280fc5dcbd3367975677849eadf2aabb66850dd0fa40bba9c3979c67d96427c1f4feff948b68744797c4a3ec0a12fc983d91642da794fcea824
2022-02-20Merge bitcoin/bitcoin#23907: tracing: utxocache tracepoints follow up for #22902fanquake
799968e8b38833dc7fd7b6d488a66a14580ef674 tracing: misc follow-ups to 22902 (0xb10c) 36a65847033540cf2203252c7baf42bc5ec97579 tracing: correctly scope utxocache:flush tracepoint (Arnab Sen) Pull request description: This PR is a follow-up to the [#22902](https://github.com/bitcoin/bitcoin/pull/22902). Previously, the tracepoint `utxocache:flush` was called, even when it was not flushing. So, the tracepoint is now scoped to write only when coins cache to disk. ACKs for top commit: 0xB10C: ACK 799968e8b38833dc7fd7b6d488a66a14580ef674 Tree-SHA512: ebb096cbf991c551c81e4339821f10d9768c14cf3d8cb14d0ad851acff5980962228a1c746914c6aba3bdb27e8be53b33349c41efe8bab5542f639916e437b5f
2022-02-19Merge bitcoin/bitcoin#24350: Primitives: Correct CTransaction ↵MarcoFalke
deserialization docstring d4b3483cece9c27d58e4026df35725655ce06cf5 Primitives: Correct CTransaction deserialization docstring (TheCharlatan) Pull request description: Since https://github.com/bitcoin/bitcoin/pull/8589 CTxWitness was removed and instead replaced with CScriptWitness inside each CTxIn. ACKs for top commit: w0xlt: ACK d4b3483 Tree-SHA512: 02bb73e8a7d1fc449e4776a162009261baecc573837fade74ad7d76b3cd63200424e02fd0abd000c63706072f2ab3c95d3053139495b81347463f43e56192ca9
2022-02-18test: Run symlink regression tests on WindowsMarcoFalke
2022-02-18Merge bitcoin/bitcoin#24360: doc: improve -netinfo help based on feedback ↵MarcoFalke
from users and devs a4da16fbd43ea1fff344f1602f7a5ace3d4a8a95 Improve -netinfo help based on feedback from users and devs (Jon Atack) Pull request description: Clarify which networks are displayed by the peer counts table (*reachable* networks; follow-up to #23324) in response to questions received over the past months, and a few other improvements. ACKs for top commit: laanwj: Code review ACK a4da16fbd43ea1fff344f1602f7a5ace3d4a8a95 w0xlt: ACK a4da16f kristapsk: utACK a4da16fbd43ea1fff344f1602f7a5ace3d4a8a95 Tree-SHA512: e6522c08421aa7f10d50723156d0a8fc5ec82cad2f0bd931bbec603077fcd4921c6505ef743d57386fba81c95dcfc77df75abf3378319886368e4ae33f9a6d73
2022-02-18Rename wallet-tool to bitcoin-wallet in code commentKristaps Kaupe
2022-02-18Mention -signet in bitcoin-wallet help outputKristaps Kaupe
2022-02-17Merge bitcoin/bitcoin#24349: fuzz: Split script formatting from script fuzz ↵fanquake
target fae3f178238df96554dc2495e040f5580b55408a fuzz: Split script formatting from script fuzz target (MarcoFalke) Pull request description: This is a follow-up to commit 9237bdaac196951a437accaefa65638149b25978. The target was improved a bit, but is still taking enormously long. See for example 4096 seconds in https://cirrus-ci.com/task/5153886888525824?logs=ci#L4451. Most of the time is spent formatting the script. See the flamegraph: ![flame](https://user-images.githubusercontent.com/6399679/154052491-ad868078-42e6-4d85-9c77-c2e7e8291a9f.png) Thus, I suggest to split up the formatting into a new target. This will: * Allow more fuzz cycles in the `script` target when exploring the search space with the fuzz engine * Hopefully allow to reduce the fuzz inputs in `qa-assets` without losing coverage ACKs for top commit: fanquake: ACK fae3f178238df96554dc2495e040f5580b55408a Tree-SHA512: f86154b23019b7721e5dd10f54d11f4f7603d280471a396cb5256f4c460f48333318a60efe8b77fa8749a4abc67ad2631211b766fde5da70ded9fab8f904747b
2022-02-17Merge bitcoin/bitcoin#24338: util: Work around libstdc++ create_directories ↵fanquake
issue b223c3c21e89f6af76b5401413880923f7c444d6 test: Add functional test for symlinked blocks directory (laanwj) ddb75c2e87a60ed24065bdf0c3bfabf4e058cef1 test: Add fs_tests/create_directories unit test (Hennadii Stepanov) 1f46b6e46e1454b91ff7ceb31853bc440952f8eb util: Work around libstdc++ create_directories issue (laanwj) Pull request description: Work around libstdc++ issue [PR101510] with create_directories where the leaf already exists as a symlink. Fixes #24257, introduced by the switch to `std::filesystem`. It is meant to be more thorough than #24266, which worked around one instance of the problem. The issue was [fixed upstream](https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=124eaa50e0a34f5f89572c1aa812c50979da58fc), but unfortunately we'll have to carry a fix for it for a while. This introduces a function `fs::create_directories` which wraps `std::filesystem::create_directories`. This allows easiliy reverting the workaround when it is no longer necessary. ACKs for top commit: jonatack: re-ACK b223c3c21e89f6af76b5401413880923f7c444d6 per `git range-diff df08250 67019cd b223c3c` hebasto: re-ACK b223c3c21e89f6af76b5401413880923f7c444d6 w0xlt: re-ACK b223c3c vasild: ACK b223c3c21e89f6af76b5401413880923f7c444d6 Tree-SHA512: 028321717c8b10d16185c3711b35da6b05fb7aa31cee1c8c7e754e92bf5a0b02719a3785cd0f6f8bf052b3bd759f644af212320672baabc9e44e0b93ba464abc
2022-02-17bench: Avoid deprecated use of volatile +=MarcoFalke
2022-02-17util: Add missing rseq to syscall sandboxlaanwj
Fixes #24368.
2022-02-17Merge bitcoin/bitcoin#23819: ConnectBlock: don't serialize block hash twicelaanwj
eb8b22d5176d7abc6f93b4473df446105ca595e6 block_connected: re-use previous GetTimeMicros (William Casarin) 80e1c55687aae61767f1ade0826746cda00d6a24 block_connected: don't serialize block hash twice (William Casarin) Pull request description: In the validation:block_connected tracepoint, we call block->GetHash(), which ends up calling CBlockHeader::GetHash(), executing around 8000 serialization instructions. We don't need to do this extra work, because block->GetHash() is already called further up in the function. Let's save that value as a local variable and re-use it in our tracepoint so there is no unnecessary tracepoint overhead. Shave off an extra 100 or so instructions from the validation:block_connected tracepoint by reusing a nearby GetTimeMicros(). This brings the tracepoint down to 54 instructions. Still high, but much better than the previous ~154 and 8000 instructions which it was originally. Signed-off-by: William Casarin <jb55@jb55.com> ACKs for top commit: 0xB10C: ACK eb8b22d5176d7abc6f93b4473df446105ca595e6 laanwj: Code review ACK eb8b22d5176d7abc6f93b4473df446105ca595e6 theStack: re-ACK eb8b22d5176d7abc6f93b4473df446105ca595e6 Tree-SHA512: 92ae585e487554e0f73042a8abaa239f630502c1d198e010bd7c1de252d882bccb627bbf0e4faec09c1253e782b145bcf153f9fee78cdb8456188044a96f8267
2022-02-17User-facing content fixups from transifex translator feedbackJon Atack
2022-02-17test: Add fs_tests/create_directories unit testHennadii Stepanov
2022-02-17util: Work around libstdc++ create_directories issuelaanwj
Work around libstdc++ issue [PR101510] with create_directories where the leaf already exists as a symlink. Fixes #24257, introduced by the switch to `std::filesystem`. It is meant to be more thorough than #24266, which only worked around one instance of the problem. The issue was fixed upstream in https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=124eaa50e0a34f5f89572c1aa812c50979da58fc, but unfortunately we'll have to carry a fix for it for a while. This introduces a function `fs::create_directories` which wraps `std::filesystem::create_directories`. This allows easiliy reverting the workaround when it is no longer necessary.
2022-02-17Merge bitcoin/bitcoin#24331: util: Revert back `MoveFileExW` call for MinGW-w64laanwj
dc01cbc538765f64326bca30952c83e3862d0d54 test: Add fs_tests/rename unit test (Hennadii Stepanov) d4999d40b9bd04dc20111aaaa6ed2d3db1a5caf9 util: Revert back MoveFileExW call for MinGW-w64 (Hennadii Stepanov) Pull request description: Unfortunately, bitcoin/bitcoin#24308 introduced a [regression](https://github.com/bitcoin/bitcoin/pull/24308#issuecomment-1037259386) for mingw builds. The root of the problem is a broken implementation of [`std::filesystem::rename`](https://en.cppreference.com/w/cpp/filesystem/rename). In particular, the expected behavior > If `old_p` is a non-directory file, then `new_p` must be ... existing non-directory file: `new_p` _is first deleted_... fails with the "File exists" error. This PR reverts back the `MoveFileExW` call, and adds the [suggested](https://github.com/bitcoin/bitcoin/pull/24308#pullrequestreview-878832906) unit test. ACKs for top commit: vasild: ACK dc01cbc538765f64326bca30952c83e3862d0d54 Tree-SHA512: c8e5a98844cfa32bec0ad67a1aaa58fe2efd0c5474d3e83490211985b110f83245758a742dcaa0a933a192ab66a7f11807e0c53ae69260b7dd02fc99f6d03849
2022-02-17Merge bitcoin/bitcoin#24177: validation, refactor: add missing thread safety ↵MarcoFalke
lock assertions f485a0745455b46390f1c14260643ad69c8fe2ad Add missing thread safety lock assertions in validation.h (Jon Atack) 37af8a20cf39ed8ee4b3ba4e1d8d55178eaacb78 Add missing thread safety lock assertions in validation.cpp (Jon Atack) Pull request description: A number of functions in validation.{h,cpp} have a thread safety lock annotation in the declaration but are missing the corresponding run-time lock assertion in the definition. ACKs for top commit: hebasto: re-ACK f485a0745455b46390f1c14260643ad69c8fe2ad, only suggested change since my [previous](https://github.com/bitcoin/bitcoin/pull/24177#pullrequestreview-877810465) review. vasild: ACK f485a0745455b46390f1c14260643ad69c8fe2ad Tree-SHA512: c86c0c0e8fe6ec7ae9ed9890f1dd7d042aa482ecf99feb6679a670aa004f6e9a99f7bc047205a34968fab7f1f841898c59b48c3ed6245c166e3b5abbf0867445
2022-02-17index: check muhash is in sync on coinstatsindex launchFabian Jahr
2022-02-17index: remove txindex references from base indexFabian Jahr
2022-02-17doc: Fix typosTaeik Lim
2022-02-16Improve -netinfo help based on feedback from users and devsJon Atack
- clarify that the peer counts table is of reachable networks - a few other clarifications
2022-02-15Add tr() descriptor unit testsPieter Wuille
2022-02-15Merge bitcoin/bitcoin#24117: index: make indices robust against init abortsMarcoFalke
bfcd60f5d505334230013de4115483b22a7898ee test: activate all index types in feature_init.py (Martin Zumsande) 0243907faee0aa6af09974131d9a46a7f9c3ef38 index: Don't commit without valid m_best_block_index (Martin Zumsande) Pull request description: When an index thread receives an interrupt during init before it got to index anything (so `m_best_block_index == nullptr` still), it will still try to commit previous "work" before stopping the thread. That means that `BaseIndex::CommitInternal()` calls `GetLocator(nullptr)`, which returns an locator to the tip ([code](https://github.com/bitcoin/bitcoin/blob/06b6369766137756648b3cb62c8f385cca234e69/src/chain.cpp#L31-L32)), and saves it to the index DB. On the next startup, this locator will be read and it will be assumed that we have successfully synced the index to the tip, when in reality we have indexed nothing. In the case of coinstatsindex, this would lead to a shutdown of bitcoind without any indication what went wrong. For the other indexes, there would be no immediate shutdown, but the index would be corrupt. This PR fixes this by not committing when `m_best_block_index==nullptr`, and it also adds an error log message to the silent coinstatsindex shutdown path. This is another small bug found by `feature_init.py` - the second commit enables blockfilterindex and coinstatsindex for this test, enabling coinstatsindex without the first commit would have led to frequent failures. ACKs for top commit: fjahr: reACK bfcd60f5d505334230013de4115483b22a7898ee shaavan: reACK bfcd60f5d505334230013de4115483b22a7898ee Tree-SHA512: 8e2bac0fc40cde209518a9e59b597ae0a5a875a2a90898673987c91733718d40e528dada942bf552b58bc021bf46e59da2d0cc5a61045f48f9bae2b1baf6033b
2022-02-15Bugfix: make ToPrivateString work with x-only keysPieter Wuille