aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-10-20Merge bitcoin/bitcoin#28692: fuzz: Delete i2p fuzz testfanquake
dd4dcbd4cda31f67d014a93340a6d1ba1c245b0f [fuzz] Delete i2p target (dergoegge) Pull request description: closes #28665 The target is buggy and doesn't reach basic coverage. ACKs for top commit: maflcko: lgtm ACK dd4dcbd4cda31f67d014a93340a6d1ba1c245b0f glozow: ACK dd4dcbd4cda31f67d014a93340a6d1ba1c245b0f, agree it's better to delete this test until somebody wants to write a better one Tree-SHA512: b6ca6cad1773b1ceb6e5ac0fd501ea615f66507ef811745799deaaa4460f1700d96ae03cf55b740a96ed8cd2283b3d6738cd580ba97f2af619197d6c4414ca21
2023-10-20refactor: Remove CBlockFileInfo::SetNullMarcoFalke
2023-10-20build: Include `config/bitcoin-config.h` explicitly in `util/trace.h`Hennadii Stepanov
The `ENABLE_TRACING` macro is expected to be defined in the `config/bitcoin-config.h` header. Therefore, the current code is error-prone as it depends on whether the `config/bitcoin-config.h` header was included before or not.
2023-10-20Merge bitcoin/bitcoin#28569: log: Don't log cache rebalancing in absense of ↵fanquake
a snapshot chainstate ec84f999f1408b7f1ff4498f78c33b34c30e934c log: Don't log cache rebalancing in absense of a snapshot chainstate (Fabian Jahr) Pull request description: I have noticed that this log now is always printed, even if there is no snapshot chainstate present or even was present. I think this is confusing to users that have never even thought about using assumeutxo since in that case the rebalancing is just ensuring the normal environment with one chainstate. So I suggest we don't log in absence of a snapshot chainstate. We could also think about rewording the message instead but I think this is simpler. ACKs for top commit: stickies-v: utACK ec84f999f1408b7f1ff4498f78c33b34c30e934c glozow: concept ACK ec84f999f1408b7f1ff4498f78c33b34c30e934c, don't have opinions other than removing confusing log theStack: utACK ec84f999f1408b7f1ff4498f78c33b34c30e934c Tree-SHA512: 30bbfc648e7c788106f78d52e47a3aa1e1874f65d13743643dc50bcf7f450d8330711ff9fdeac361722542da6051533153829c6d49033227ed315e111afc899f
2023-10-20[fuzz] Delete i2p targetdergoegge
2023-10-20log: Don't log cache rebalancing in absense of a snapshot chainstateFabian Jahr
2023-10-20test: De-dublicate/optimize assumeutxo test for further extensionsFabian Jahr
2023-10-20test: check au file with changed outpoint indexFabian Jahr
2023-10-20Merge bitcoin/bitcoin#28643: ci: Add missing CI_RETRY_EXE before git clonefanquake
6889a807661cb570e1464ffdedb9ddb1ec970078 ci: Add missing CI_RETRY_EXE before git clone (MarcoFalke) b705bade44973e61655d5f847f49d97fb5bb8393 ci: Export `IN_GETOPT_BIN` on macOS (Hennadii Stepanov) 1c2132ddd97dbf8fc908b0d1113bbb70e1a6a64e Revert "ci: Upgrading pip version in macos environment" (Hennadii Stepanov) Pull request description: This PR is a resurrection of https://github.com/bitcoin/bitcoin/pull/28623: > This should fix [bitcoin/bitcoin/actions/runs/6457002476/job/17527598426#step:7:240](https://github.com/bitcoin/bitcoin/actions/runs/6457002476/job/17527598426#step:7:240): > > ``` > + git clone --depth=1 https://github.com/bitcoin-core/qa-assets /Users/runner/work/bitcoin/bitcoin/ci/scratch/qa-assets > Cloning into '/Users/runner/work/bitcoin/bitcoin/ci/scratch/qa-assets'... > error: RPC failed; curl 18 HTTP/2 stream 5 was reset > error: 54975 bytes of body are still expected > fetch-pack: unexpected disconnect while reading sideband packet > fatal: early EOF > fatal: fetch-pack: invalid index-pack output > Error: Process completed with exit code 128. > ``` ACKs for top commit: maflcko: lgtm ACK 6889a807661cb570e1464ffdedb9ddb1ec970078 Tree-SHA512: cd50102061a5c57fcf53ecbf552e7eae09995395e91651d00037e3f101c4906c0a994b2f6b1ccf984f2fc902ca59f0db66206ace56a2b6e2810dfa4167f3e115
2023-10-19test: Check tx metadata is migrated to watchonlyAndrew Chow
2023-10-19wallet: Reload watchonly and solvables wallets after migrationAndrew Chow
When migrating, create the watchonly and solvables wallets without a context. Then unload and reload them after migration completes, as we do for the actual wallet. There is also additional handling for a failed reload.
2023-10-19wallet: Copy all tx metadata to watchonly walletAndrew Chow
When moving a tx to the watchonly wallet during migration, make sure that all of the CWalletTx data follows it.
2023-10-19Merge bitcoin/bitcoin#28077: I2P: also sleep after errors in Accept() & ↵Andrew Chow
destroy the session if we get an unexpected error 5c8e15c451ec870b9dd4eb843ec6ca3ba64cda4f i2p: destroy the session if we get an unexpected error from the I2P router (Vasil Dimov) 762404a68c114e8831cdfae937627174544b55a7 i2p: also sleep after errors in Accept() (Vasil Dimov) Pull request description: ### Background In the `i2p::sam::Session` class: `Listen()` does: * if the session is not created yet * create the control socket and on it: * `HELLO` * `SESSION CREATE ID=sessid` * leave the control socked opened * create a new socket and on it: * `HELLO` * `STREAM ACCEPT ID=sessid` * read reply (`STREAM STATUS`), `Listen()` only succeeds if it contains `RESULT=OK` Then a wait starts, for a peer to connect. When connected, `Accept()` does: * on the socket from `STREAM ACCEPT` from `Listen()`: read the Base64 identification of the connecting peer ### Problem The I2P router may be in such a state that this happens in a quick succession (many times per second, see https://github.com/bitcoin/bitcoin/issues/22759#issuecomment-1609907115): `Listen()`-succeeds, `Accept()`-fails. `Accept()` fails because the I2P router sends something that is not Base64 on the socket: `STREAM STATUS RESULT=I2P_ERROR MESSAGE="Session was closed"` We only sleep after failed `Listen()` because the assumption was that if `Accept()` fails then the next `Listen()` will also fail. ### Solution Avoid filling the log with "Error accepting:" messages and sleep also after a failed `Accept()`. ### Extra changes * Reset the error waiting time after one successful connection. Otherwise the timer will remain high due to problems that have been solved long time in the past. * Increment the wait time less aggressively. * Handle the unexpected "Session was closed" message more gracefully (don't log stupid messages like `Cannot decode Base64: "STREAM STATUS...`) and destroy the session right way. ACKs for top commit: achow101: ACK 5c8e15c451ec870b9dd4eb843ec6ca3ba64cda4f jonatack: re-ACK 5c8e15c451ec870b9dd4eb843ec6ca3ba64cda4f Tree-SHA512: 1d47958c50eeae9eefcb668b8539fd092adead93328e4bf3355267819304b99ab41cbe1b5dbedbc3452c2bc389dc8330c0e27eb5ccb880e33dc46930a1592885
2023-10-19Merge bitcoin/bitcoin#27071: Handle CJDNS from LookupSubNet()Andrew Chow
0e6f6ebc064c5fb425fc3699efe760ec6cd4b6af net: remove unused CConnman::FindNode(const CSubNet&) (Vasil Dimov) 9482cb780fe04c1f1d9050edd1b8e549e52c86ce netbase: possibly change the result of LookupSubNet() to CJDNS (Vasil Dimov) 53afa68026ffa1313ae4aba3664de7791d23b1c8 net: move MaybeFlipIPv6toCJDNS() from net to netbase (Vasil Dimov) 6e308651c441cbf8763c67cc099c538c333c2872 net: move IsReachable() code to netbase and encapsulate it (Vasil Dimov) c42ded3d9bda8b273780a4a81490bbf1b9e9c261 fuzz: ConsumeNetAddr(): avoid IPv6 addresses that look like CJDNS (Vasil Dimov) 64d6f77907afd461d9b14ee10ab32335f4454734 net: put CJDNS prefix byte in a constant (Vasil Dimov) Pull request description: `LookupSubNet()` would treat addresses that start with `fc` as IPv6 even if `-cjdnsreachable` is set. This creates the following problems where it is called: * `NetWhitelistPermissions::TryParse()`: otherwise `-whitelist=` fails to white list CJDNS addresses: when a CJDNS peer connects to us, it will be matched against IPv6 `fc...` subnet and the match will never succeed. * `BanMapFromJson()`: CJDNS bans are stored as just IPv6 addresses in `banlist.json`. Upon reading from disk they have to be converted back to CJDNS, otherwise, after restart, a ban entry like (`fc00::1`, IPv6) would not match a peer (`fc00::1`, CJDNS). * `RPCConsole::unbanSelectedNode()`: in the GUI the ban entries go through `CSubNet::ToString()` and back via `LookupSubNet()`. Then it must match whatever is stored in `BanMan`, otherwise it is impossible to unban via the GUI. These were uncovered by https://github.com/bitcoin/bitcoin/pull/26859. Thus, flip the result of `LookupSubNet()` to CJDNS if the network base address starts with `fc` and `-cjdnsreachable` is set. Since subnetting/masking does not make sense for CJDNS (the address is "random" bytes, like Tor and I2P, there is no hierarchy) treat `fc.../mask` as an invalid `CSubNet`. To achieve that, `MaybeFlipIPv6toCJDNS()` has to be moved from `net` to `netbase` and thus also `IsReachable()`. In the process of moving `IsReachable()`, `SetReachable()` and `vfLimited[]` encapsulate those in a class. ACKs for top commit: jonatack: Code review ACK 0e6f6ebc064c5fb425fc3699efe760ec6cd4b6af achow101: ACK 0e6f6ebc064c5fb425fc3699efe760ec6cd4b6af mzumsande: re-ACK 0e6f6ebc064c5fb425fc3699efe760ec6cd4b6af Tree-SHA512: 4767a60dc882916de4c8b110ce8de208ff3f58daaa0b560e6547d72e604d07c4157e72cf98b237228310fc05c0a3922f446674492e2ba02e990a272d288bd566
2023-10-19Merge bitcoin/bitcoin#28667: doc: add historical release notes for 25.1fanquake
2338715506ab99b624ecaf995119d1ace8e4de45 doc: add historical release notes for 25.1 (fanquake) Pull request description: v25.1 has [been tagged](https://github.com/bitcoin/bitcoin/releases/tag/v25.1). For merge post-bin-availability. ACKs for top commit: stickies-v: ACK 2338715506ab99b624ecaf995119d1ace8e4de45 Tree-SHA512: 799937b8bacab7908d86c91855bfcdfd1f8f806d82df0d04cf984d957d9bf1bbdde6103975358360ef35b0cfeba3ce894bc7dce412ea6790d495b78b3cebee0d
2023-10-19Merge bitcoin/bitcoin#22764: build: Include qt sources for parsing with ↵fanquake
extract_strings.py b59b31ae0b04054c5cf225dad87046d3771707fc build: Drop redundant qt/bitcoin.cpp (Hennadii Stepanov) d90ad5a42ec6f48d0e504edc16d41c8ef266cc1d build: Include qt sources for parsing with extract_strings.py (Hennadii Stepanov) Pull request description: On master (4fc15d15667d9d9c4fb5515ce73c05b4596298ec) some strings are still untranslated. This PR fixes this issue. To verify: 1) `./autogen.sh && ./configure && make -C src translate` _before_ applying this change 2) apply this change 3) `./autogen.sh && ./configure && make -C src translate` _after_ applying this change The result of `git diff src/qt/bitcoinstrings.cpp`: ```diff --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -126,6 +126,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "" "You need to rebuild the database using -reindex to go back to unpruned " "mode. This will redownload the entire blockchain"), QT_TRANSLATE_NOOP("bitcoin-core", "%s is set very high!"), +QT_TRANSLATE_NOOP("bitcoin-core", "(press q to shutdown and continue later)"), QT_TRANSLATE_NOOP("bitcoin-core", "-maxmempool must be at least %d MB"), QT_TRANSLATE_NOOP("bitcoin-core", "A fatal internal error occurred, see debug.log for details"), QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -%s address: '%s'"), @@ -204,6 +205,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", "SQLiteDatabase: Failed to prepare statement t QT_TRANSLATE_NOOP("bitcoin-core", "SQLiteDatabase: Failed to read database verification error: %s"), QT_TRANSLATE_NOOP("bitcoin-core", "SQLiteDatabase: Unexpected application id. Expected %u, got %u"), QT_TRANSLATE_NOOP("bitcoin-core", "Section [%s] is not recognized."), +QT_TRANSLATE_NOOP("bitcoin-core", "Settings file could not be read"), +QT_TRANSLATE_NOOP("bitcoin-core", "Settings file could not be written"), QT_TRANSLATE_NOOP("bitcoin-core", "Signing transaction failed"), QT_TRANSLATE_NOOP("bitcoin-core", "Specified -walletdir \"%s\" does not exist"), QT_TRANSLATE_NOOP("bitcoin-core", "Specified -walletdir \"%s\" is a relative path"), @@ -242,4 +245,5 @@ QT_TRANSLATE_NOOP("bitcoin-core", "User Agent comment (%s) contains unsafe chara QT_TRANSLATE_NOOP("bitcoin-core", "Verifying blocks…"), QT_TRANSLATE_NOOP("bitcoin-core", "Verifying wallet(s)…"), QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart %s to complete"), +QT_TRANSLATE_NOOP("bitcoin-core", "press q to shutdown"), }; ``` ACKs for top commit: ryanofsky: Code review ACK b59b31ae0b04054c5cf225dad87046d3771707fc. Being able to use `_()` macro in qt would allow simplifying some code, for example replacing repetitive: TheCharlatan: ACK b59b31ae0b04054c5cf225dad87046d3771707fc Tree-SHA512: 13d9d86b487a1b6e718ae96c198a0a927c881bf33df318412793ec9efba3a7e59cfa836204f73f5b53ff4c99edce778c11bffaa88138b80e37b71e36df6b816f
2023-10-19Merge bitcoin/bitcoin#28673: docs: Add reference to total.coverage reportfanquake
2ce7e31d2d6bf0e4d831e35563bcf90c68c39650 docs: Add reference to total.coverage report (Greg Sanders) Pull request description: I couldn't get fuzz coverage to work, so couldn't verify what it would look like if made. ACKs for top commit: darosior: ACK 2ce7e31d2d6bf0e4d831e35563bcf90c68c39650 dergoegge: ACK 2ce7e31d2d6bf0e4d831e35563bcf90c68c39650 Tree-SHA512: c773ef28f7cc630cb094740805c0d235255e7b0559ac7fed4e8952ade4005335f3787bdd2f8786979e341e914b41c4f3eef02bb4773b15f92d618f1040f53c54
2023-10-19Merge bitcoin/bitcoin#28617: test: Add Wallet Unlock Context Managerfanquake
004903ebade38ba47c5ddc17b756d605b963528e test: Add Wallet Unlock Context Manager (Brandon Odiwuor) Pull request description: Fixes #28601, see https://github.com/bitcoin/bitcoin/pull/28403#discussion_r1325426430 Add Context Manager to manage the locking and unlocking of locked wallets with a passphrase during testing. ACKs for top commit: kevkevinpal: lgtm ACK [004903e](https://github.com/bitcoin/bitcoin/pull/28617/commits/004903ebade38ba47c5ddc17b756d605b963528e) maflcko: lgtm ACK 004903ebade38ba47c5ddc17b756d605b963528e Tree-SHA512: ab234c167e71531df0d974ff9a31d444f7ce2a1d05aba5ea868cc9452f139845eeb24ca058d88f058bc02482b762adf2d99e63a6640b872cc71a57a0068abfe8
2023-10-19Merge bitcoin/bitcoin#28672: build: move `-fstack-reuse=none` to CORE_CXXFLAGSfanquake
8cfa22a8464c07da3bb47e7db323ed1069b97457 build: move -fstack-reuse=none to CORE_CXXFLAGS (fanquake) Pull request description: This is not a hardening specific flag, it should be used at all times, regardless of if hardening is enabled or not. Note that this was still the case here, but having this exist in the hardening flags is confusing, and may lead someone to move it inside one of the `use_hardening` blocks, where it would become unused, with `--disable-hardening`. Noticed while reviewing https://github.com/hebasto/bitcoin/pull/32#discussion_r1363564161. ACKs for top commit: theuni: ACK 8cfa22a8464c07da3bb47e7db323ed1069b97457. Agree it's confusing as-is and this better matches the intent. hebasto: ACK 8cfa22a8464c07da3bb47e7db323ed1069b97457 luke-jr: utACK 8cfa22a8464c07da3bb47e7db323ed1069b97457 TheCharlatan: ACK 8cfa22a8464c07da3bb47e7db323ed1069b97457 Tree-SHA512: 74c3219301398361d06b1ef2257fc9ec18055b1661f8733ee909adefee61e458d70991c32adf0e0450905a7ffbddc99799f5fdac894f4896cfade19f961818df
2023-10-19Merge bitcoin/bitcoin#28671: test: Fix failing time check in rpc_net.pyfanquake
fa4c6836c9366c3cc575cb386a397840d5f1aa57 test: Fix failing time check in rpc_net.py (MarcoFalke) Pull request description: This check fails on slow runners, such as s390x qemu. Fix it by using mocktime. See https://github.com/bitcoin/bitcoin/pull/28523#discussion_r1357980527 ACKs for top commit: 0xB10C: ACK fa4c6836c9366c3cc575cb386a397840d5f1aa57 pinheadmz: ACK fa4c6836c9366c3cc575cb386a397840d5f1aa57 brunoerg: crACK fa4c6836c9366c3cc575cb386a397840d5f1aa57 Tree-SHA512: 83fb534682e11e97537dc89de8c16f206f38af1a892a2d5970c02684c05eaea8fc9adba3159f16b2440ca0b3871d513a0562a6f3a38f19a5574a47be0919e42f
2023-10-18build: move -fstack-reuse=none to CORE_CXXFLAGSfanquake
This is not a hardening specific flag, it should be used at all times, regardless of if hardening is enabled or not. Note that this was still the case here, but having this exist in the hardening flags is confusing, and may lead someone to move it inside one of the `use_hardening` blocks, where it would become unused, with `--disable-hardening`.
2023-10-18docs: Add reference to total.coverage reportGreg Sanders
2023-10-18Merge bitcoin/bitcoin#28666: test: assumeutxo file with unknown block hashRyan Ofsky
621db2f00486d8fd6f06dca91c1b95ce61f64bc4 test: assumeutxo file with unknown block hash (Fabian Jahr) Pull request description: Takes care of one of the open Todos in the assumeutxo functional test. Since an unknown block could be any hash, I simply chose one placeholder, it could also be a random string though. ACKs for top commit: maflcko: lgtm ACK 621db2f00486d8fd6f06dca91c1b95ce61f64bc4 pablomartin4btc: cr ACK 621db2f00486d8fd6f06dca91c1b95ce61f64bc4 theStack: ACK 621db2f00486d8fd6f06dca91c1b95ce61f64bc4 ryanofsky: Code review ACK 621db2f00486d8fd6f06dca91c1b95ce61f64bc4 Tree-SHA512: ee0438ce619f7348c6f88e39b0ea7ddddb8832956d9034ecc795c6033d5d905c09d11b7d0d5afc38231b2fd091ea7c1bd0a0be99d9c32c4e6357a25d76294142
2023-10-18Merge bitcoin/bitcoin#28637: doc: add release note for #27460 (new ↵glozow
`importmempool` RPC) 1b672eb7665cc032f2c285b1cad331dc92685265 doc: add release note for #27460 (new `importmempool` RPC) (Sebastian Falbesoner) Pull request description: This PR adds a missing release note for #27460. ACKs for top commit: glozow: ACK 1b672eb7665cc032f2c285b1cad331dc92685265 Tree-SHA512: 89deadbfd6779e6eb19801c9fe7459a9876b920d44e09df102774c1eb8b3c0716462613dc99d1711eda4bd959ea61595b33f4528424ac02cf1af6cb4e5f1f0e9
2023-10-18test: Fix failing time check in rpc_net.pyMarcoFalke
2023-10-17Merge bitcoin/bitcoin#28651: Make miniscript GetWitnessSize accurate for ↵Andrew Chow
tapscript b22810887b3840ad0fcb424ea7e16d2d195767d9 miniscript: make GetWitnessSize accurate for tapscript (Pieter Wuille) 8be98514080ab816fcb2498ea4bc6f211a2b05e0 test: add tests for miniscript GetWitnessSize (Pieter Wuille) 7ed2b2d430e4dc0d3ba62a30f814df2c7c0c0651 test: remove mutable global contexts in miniscript fuzzer/test (Pieter Wuille) Pull request description: So far, the same algorithm is used to compute an (upper bound on) the maximum witness size for both P2WSH and P2TR miniscript. That's unfortunate, because it means fee estimations for P2TR miniscript will miss out on the generic savings brought by P2TR witnesses (smaller signatures and public keys, specifically). Fix this by making the algorithm use script context specification calculations, and add tests for it. Also included is a cleanup for the tests to avoid mutable globals, as I found it hard to reason about what exactly was being tested. ACKs for top commit: achow101: ACK b22810887b3840ad0fcb424ea7e16d2d195767d9 darosior: ACK b22810887b3840ad0fcb424ea7e16d2d195767d9 Tree-SHA512: e4bda7376628f3e91cfc74917cefc554ca16eb5f2a0e1adddc33eb8717c4aaa071e56a40f85a2041ae74ec445a7bd0129bba48994c203e0e6e4d25af65954d9e
2023-10-17Merge bitcoin-core/gui#766: Fix coin control input size accounting for ↵Hennadii Stepanov
taproot spends 00a52e63946d5a90cdfb68204373d9c23d885161 gui: fix coin control input size accounting for taproot spends (Sebastian Falbesoner) Pull request description: If manual coin control is used in the GUI, the input size accounting for P2TR is currently overshooting, as it still assumes P2WPKH (segwitv0) spends which have a larger witness, as ECDSA signatures are longer and the pubkey also has to be provided. Fix that by adding sizes depending on the witness version. Note that the total accounting including outputs is still off and there is some weird logic involved depending on whether SFFO is used, but it's (hopefully) a first step into the right direction. ACKs for top commit: maflcko: lgtm ACK 00a52e63946d5a90cdfb68204373d9c23d885161 furszy: utACK 00a52e6394 Tree-SHA512: 9633642f8473247cc3d8e6e0ef502fd515e1dde0e2939d28d6754d0cececedd6a328df22a3d4c85eb2846fd0417cf224b92594613f6e84ada82d2d7d84fc455f
2023-10-17Merge bitcoin/bitcoin#28544: wallet: Add TxStateString function for ↵Andrew Chow
debugging and logging 8a553c94098c96cb3679468c2b460be145a0eabf wallet: Add TxStateString function for debugging and logging (Ryan Ofsky) Pull request description: I found this useful while debugging silent conflict between #10102 and #27469 recently ACKs for top commit: ishaanam: utACK 8a553c94098c96cb3679468c2b460be145a0eabf achow101: ACK 8a553c94098c96cb3679468c2b460be145a0eabf furszy: Code ACK 8a553c9 Tree-SHA512: 87965c66bcb59a21e7639878bb567e583a0e624735721ff7ad1104eed6bb9fba60607d0e3de7be3304232b3a55f48bab7039ea9c26b0e81963e59f9acd94f666
2023-10-17test: Check that a failed wallet migration is cleaned upAndrew Chow
2023-10-17Merge bitcoin/bitcoin#28647: test: Add assumeutxo test for wrong hashRyan Ofsky
fa685715663117955e9bb795cbf79ddbd3dfed19 test: Add assumeutxo test for wrong hash (MarcoFalke) Pull request description: Also: * Update test TODOs * Fix off-by-4 typo in test, remove `struct` import ACKs for top commit: fjahr: utACK fa685715663117955e9bb795cbf79ddbd3dfed19 theStack: Code-review re-ACK fa685715663117955e9bb795cbf79ddbd3dfed19 pablomartin4btc: re ACK fa685715663117955e9bb795cbf79ddbd3dfed19 ryanofsky: Code review ACK fa685715663117955e9bb795cbf79ddbd3dfed19 Tree-SHA512: 877653010efe4e20018827e8ec2801d036e1344457401f0c9e5d55907b817724201dd2e3f0f29505bbff619882c0c2cd731ecdcd209258bcefe11b86ff0205dd
2023-10-17doc: add historical release notes for 25.1fanquake
2023-10-17test: assumeutxo file with unknown block hashFabian Jahr
2023-10-17test: Add assumeutxo test for wrong hashMarcoFalke
2023-10-17Merge bitcoin/bitcoin#28652: assumeutxo: fail early if snapshot block hash ↵fanquake
doesn't match AssumeUTXO parameters 9620cb449374f234f72c1a9e1bae3d4b8c0ff171 assumeutxo: fail early if snapshot block hash doesn't match AssumeUTXO parameters (Sebastian Falbesoner) Pull request description: Right now the `loadtxoutset` RPC call treats literally all files with a minimum size of 40 bytes (=size of metadata) as potential valid snapshot candidates and the waiting loop for seeing the metadata block hash in the headers chain is always entered, e.g.: ``` $ ./src/bitcoin-cli loadtxoutset ~/.vimrc <wait> bitcoind log: ... 2023-10-15T14:55:45Z [snapshot] waiting to see blockheader 626174207465730a7265626d756e207465730a656c62616e65207861746e7973 in headers chain before snapshot activation ... ``` There is no point in doing any further action though if we already know from the start that the UTXO snapshot loading won't be successful. This PR adds an assumeutxo parameter check immediately after the metadata is read in, so we can fail immediately on a mismatch: ``` $ ./src/bitcoin-cli loadtxoutset ~/.vimrc error code: -32603 error message: Unable to load UTXO snapshot, assumeutxo block hash in snapshot metadata not recognized (626174207465730a7265626d756e207465730a656c62616e 65207861746e7973) ``` This way, users who mistakenly try to load files that are not snapshots don't have to wait 10 minutes (=the block header waiting timeout) anymore to get a negative response. If a file is loaded which is a valid snapshot (referencing to an existing block hash), but one which doesn't match the parameters, the feedback is also faster, as we don't have to wait anymore to see the hash in the headers chain before getting an error. This is also partially fixes #28621. ACKs for top commit: maflcko: lgtm ACK 9620cb449374f234f72c1a9e1bae3d4b8c0ff171 ryanofsky: Code review ACK 9620cb449374f234f72c1a9e1bae3d4b8c0ff171. This should fix an annoyance and bad UX. pablomartin4btc: tACK 9620cb449374f234f72c1a9e1bae3d4b8c0ff171 Tree-SHA512: f88b865e9d46254858e57c024463f389cd9d8760a7cb30c190aa1723a931e159987dfc2263a733825d700fa612e7416691e4d8aab64058f1aeb0a7fa9233ac9c
2023-10-17Merge bitcoin/bitcoin#28656: fuzz: Allow multiple --m_dir argsfanquake
faa5e061c2f63b868367015561fd376b6ef6052c fuzz: Allow multiple --m_dir args (MarcoFalke) Pull request description: This allows to merge the result from several servers (or just several folders) at the same time, instead of having to iterate over them. This should also allow the fuzz engine (libFuzzer) to optimize the final merge result more, because all fuzz inputs from all folders are available at the same time. ACKs for top commit: dergoegge: tACK faa5e061c2f63b868367015561fd376b6ef6052c Tree-SHA512: bf0da418b1f7b8a8af16bb7cc1e148b1ccd0f17062ce70758d1ca5b35c3eee77c0c30377d376befdd55480adfd1f1a1073cfc47118e7a710e6760e020abe24bb
2023-10-17Merge bitcoin/bitcoin#28628: lint: Include test_utxo_snapshots in ↵fanquake
lint_shell, fix linter errors 348e79f7c6030c9bcbec6bd25e246a779081152a lint: Include test_utxo_snapshots in lint_shell (Fabian Jahr) Pull request description: jamesob excluded `test_utxo_snapshots.sh` from the shell linter with this explanation: "Add the script to the shellcheck exception list since the quoted variables rule needs to be violated in order to get bitcoind to pick up on $EARLY_IBD_FLAGS." However, macrofake pointed out that single lines can be excluded from linting. This fixes one fixable rule violation, excludes the rest of the offending lines from the linter and then removes the exclusion of the `test_utxo_snapshots.sh` file. Also adds documentation. ACKs for top commit: Empact: ACK 348e79f7c6030c9bcbec6bd25e246a779081152a maflcko: lgtm ACK 348e79f7c6030c9bcbec6bd25e246a779081152a pablomartin4btc: tACK 348e79f7c6030c9bcbec6bd25e246a779081152a Tree-SHA512: a904cc1cc3c94488dfbd39ea69a3ef17259f991708a797009001669448fef81eed086ecbce1ec433988d88baef293849698e2e0eb86a969b949cc7ef93af7b4b
2023-10-16Merge bitcoin/bitcoin#28630: depends: update `LD64_VERSION` to 711Andrew Chow
092daa2f9524e371ee6b505519d9b722a2c6361a contrib: add test for macOS linker version to symbol-check (fanquake) cefbf0bc20dfe932240877b3096300c8c241ad61 depends: update LD64_VERSION to 711 (fanquake) Pull request description: I forgot to do this in https://github.com/bitcoin/bitcoin/commit/7d5815293ed8a3dea68b61a78944e410f02b147f. Add a test so it's impossible to forget. ACKs for top commit: TheCharlatan: utACK 092daa2f9524e371ee6b505519d9b722a2c6361a achow101: ACK 092daa2f9524e371ee6b505519d9b722a2c6361a jarolrod: ACK 092daa2f9524e371ee6b505519d9b722a2c6361a hebasto: ACK 092daa2f9524e371ee6b505519d9b722a2c6361a. laanwj: ACK 092daa2f9524e371ee6b505519d9b722a2c6361a Tree-SHA512: 37f0bdfd6607a7760eabe5efe279532ba0c59c0915161e08d5e3b9a0b7705839d62537d6e17406062f6a0a1db5407575da7cd671e9cb916e422e77f5649c6e2b
2023-10-16Merge bitcoin/bitcoin#28539: lib: add taproot support to libconsensusAndrew Chow
ff8e2fc2e2416f6f3b84cdb40db8ac168596b579 fuzz: add coverage for `bitcoinconsensus_verify_script_with_spent_outputs` (brunoerg) c5f2a757d736f14d27ac5256a9df887cd2f174f1 docs: add release notes for #28539 (brunoerg) de54882348502d860cf1e504100aa8fb1e52aa88 docs: add docs for additional libconsensus functions (Jake Rawsthorne) 70106e0689546fee497814c63a6a4747e0937b36 docs: link to rust-bitcoinconsensus (Jake Rawsthorne) fb0db07e414fec3318b3af683167ebef9c82fc84 lib: add Taproot support to libconsensus (Jake Rawsthorne) Pull request description: Grabbed from #21158. Closes #21133. ACKs for top commit: achow101: ACK ff8e2fc2e2416f6f3b84cdb40db8ac168596b579 theStack: ACK ff8e2fc2e2416f6f3b84cdb40db8ac168596b579 darosior: re-ACK ff8e2fc2e2416f6f3b84cdb40db8ac168596b579 Tree-SHA512: bf6f500c7e8c9ff6884137c2cd9b4522c586e52848dd639b774b94d998b0516b877498d24f3a6cc7425aedf81d18b0d30c1ccf19e2d527fdfdfa3955ca49b6e7
2023-10-16assumeutxo: fail early if snapshot block hash doesn't match AssumeUTXO ↵Sebastian Falbesoner
parameters
2023-10-16Merge bitcoin/bitcoin#28583: refactor: [tidy] modernize-use-emplacefanquake
fa05a726c225dc65dee79367bb67f099ae4f99e6 tidy: modernize-use-emplace (MarcoFalke) Pull request description: Constructing a temporary unnamed object only to copy or move it into a container seems both verbose in code and a strict performance penalty. Fix both issues via the `modernize-use-emplace` tidy check. ACKs for top commit: Sjors: re-utACK fa05a726c2 hebasto: ACK fa05a726c225dc65dee79367bb67f099ae4f99e6. TheCharlatan: ACK fa05a726c225dc65dee79367bb67f099ae4f99e6 Tree-SHA512: 4408a094f406e7bf6c1468c2b0798f68f4d952a1253cf5b20bdc648ad7eea4a2c070051fed46d66fd37bce2ce6f85962484a1d32826b7ab8c9baba431eaa2765
2023-10-16fuzz: Allow multiple --m_dir argsMarcoFalke
2023-10-16Merge bitcoin-core/gui#765: Fix wallet list hover crash on shutdownHennadii Stepanov
8b6470a90652fcffc45b8d7998af7c8ad6251332 gui: disable top bar menu actions during shutdown (furszy) 7066e8996d0ac090535cc97cdcb54a219986460f gui: provide wallet controller context to wallet actions (furszy) Pull request description: Small follow-up to #751. Fixes another crash cause during shutdown. Which occurs when the user hovers over the wallets list. Future Note: This surely happen in other places as well, we should re-work the way we connect signals. Register lambas without any precaution can leave dangling pointers. ACKs for top commit: hebasto: ACK 8b6470a90652fcffc45b8d7998af7c8ad6251332, I've tested each commit separately on macOS Sonoma 14.0 (Apple M1). Tree-SHA512: 6fbd1bcd6717a8c1633beb9371463ed22422f929cccf9b791ee292c5364134c501e099329cf77a06b74a84c64c1c3d22539199ec49ccd74b3950036316c0dab3
2023-10-16net: remove unused CConnman::FindNode(const CSubNet&)Vasil Dimov
2023-10-16netbase: possibly change the result of LookupSubNet() to CJDNSVasil Dimov
All callers of `LookupSubNet()` need the result to be of CJDNS type if `-cjdnsreachable` is set and the address begins with `fc`: * `NetWhitelistPermissions::TryParse()`: otherwise `-whitelist=` fails to white list CJDNS addresses: when a CJDNS peer connects to us, it will be matched against IPv6 `fc...` subnet and the match will never succeed. * `BanMapFromJson()`: CJDNS bans are stored as just IPv6 addresses in `banlist.json`. Upon reading from disk they have to be converted back to CJDNS, otherwise, after restart, a ban entry like (`fc00::1`, IPv6) would not match a peer (`fc00::1`, CJDNS). * `setban()` (in `rpc/net.cpp`): otherwise `setban fc.../mask add` would add an IPv6 entry to BanMan. Subnetting does not make sense for CJDNS addresses, thus treat `fc.../mask` as invalid `CSubNet`. The result of `LookupHost()` has to be converted for the case of banning a single host. * `InitHTTPAllowList()`: not necessary since before this change `-rpcallowip=fc...` would match IPv6 subnets against IPv6 peers even if they started with `fc`. But because it is necessary for the above, `HTTPRequest::GetPeer()` also has to be adjusted to return CJDNS peer, so that now CJDNS peers are matched against CJDNS subnets.
2023-10-16Merge bitcoin/bitcoin#28565: rpc: getaddrmaninfo followupsfanquake
e6e444c06cbf09380f9924dff3d21c1be15d1753 refactor: add and use EnsureAnyAddrman in rpc (stratospher) bf589a50a0d6a7b94f1ba1ddf24a1497fd35ad44 doc: add release notes for #27511 (stratospher) 3931e6abc39b8aee1472028dbf76eeb10708d2b4 rpc: `getaddrmaninfo` followups (stratospher) Pull request description: - make `getaddrmaninfo` RPC public since it's not for development purposes only and regular users might find it useful. [#26988 (comment)](https://github.com/bitcoin/bitcoin/pull/26988#issuecomment-1738371584) - add missing `all_networks` key to RPC help. [#27511 (comment)](https://github.com/bitcoin/bitcoin/pull/27511#discussion_r1335084087) - fix clang format spacing - add and use `EnsureAddrman` in RPC code. [#27511 (comment)](https://github.com/bitcoin/bitcoin/pull/27511#discussion_r1331501491) ACKs for top commit: 0xB10C: Code Review re-ACK e6e444c06cbf09380f9924dff3d21c1be15d1753 theStack: Code-review ACK e6e444c06cbf09380f9924dff3d21c1be15d1753 pablomartin4btc: tested ACK e6e444c06cbf09380f9924dff3d21c1be15d1753 Tree-SHA512: c14090d5c64ff15e92d252578de2437bb2ce2e1e431d6698580241a29190f0a3528ae5b013c0ddb76a9ae538507191295c37cab7fd93469941cadbde44587072
2023-10-15doc: add release note for #27460 (new `importmempool` RPC)Sebastian Falbesoner
Co-authored-by: glozow <gloriajzhao@gmail.com>
2023-10-15Merge bitcoin/bitcoin#28650: fuzz: Merge with -set_cover_merge=1fanquake
fa858d63a0a5d794aab38c26f60c593513fe08de fuzz: Merge with -set_cover_merge=1 (MarcoFalke) Pull request description: This should be less controversial than commit 151a2b189c3561dda2bb7de809306c1cfeb40e23. The overall size of the qa-assets repo is reduced further from 1.9GB to 1.6GB. Also, the runtime to iterate on the resulting folder is reduced further from ~1699s to ~1149s (N=1). ACKs for top commit: murchandamus: crACK fa858d63a0a5d794aab38c26f60c593513fe08de dergoegge: ACK fa858d63a0a5d794aab38c26f60c593513fe08de Tree-SHA512: e23fa93bd48f01d11c551b035004c678bd6d76bc24ac7d0d0a7883060804e6711763cbd0cd0ded3aad3e4c40da764decae81c2703388cc11961def3c89a4f9ba
2023-10-15Merge bitcoin/bitcoin#27793: ci: label docker images and prune dangling ↵fanquake
images selectively e44c574650827f18e12ac0ba378c0a19d23a07b4 ci: always prune all dangling bitcoin-ci-test images (stickies-v) ce1699706e98201db73209ee495051359b1d0703 ci: add label to docker images (stickies-v) Pull request description: Follow-up from https://github.com/bitcoin/bitcoin/pull/27777#discussion_r1210209382. Labeling the docker images produced by the CI allows us/the user to apply batch operations to all images (including dangling ones) produced by the ci without affecting other, non-bitcoin-ci images. With labeling, we can safely always prune dangling bitcoin-ci-test images without checking for `RESTART_CI_DOCKER_BEFORE_RUN`, which we enable on our persistent runners. ACKs for top commit: fanquake: utACK e44c574650827f18e12ac0ba378c0a19d23a07b4 Tree-SHA512: 1009fb1be78fbc80b5341ba92eac2991e77d050e1ab6048d1d9a65af73413a6be7afc1e1c764eb3f347f363af31245b93fdb38f6ac016d775aad4a0f36e4c98f
2023-10-13gui: disable top bar menu actions during shutdownfurszy
Opening the top bar menu when the app is being destroyed freezes the GUI shutdown process for no reason. No menu action can be executed. Note: This behavior is consistent with how the tray icon menu is cleared too.
2023-10-13gui: provide wallet controller context to wallet actionsfurszy
Addressing potential crashes during shutdown. The most noticeable one can be triggered by hovering over the wallet list as the app shuts down.