aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-07-20descriptor: InferScript, do not return top-level only func as sub descriptorfurszy
e.g. sh(addr(ADDR)) or sh(raw(HEX)) are invalid descriptors. Making sh and wsh top level functions to return addr/raw descriptors when the subscript inference fails.
2023-07-11wallet: loading, log descriptor parsing error detailsfurszy
The `UNKNOWN_DESCRIPTOR` error comes from the `WalletDescriptor::DeserializeDescriptor` std::ios_base exception, which contains further information about the parsing error.
2023-07-07Merge bitcoin/bitcoin#28039: wallet: don't include bdb files from our headersAndrew Chow
8b5397c00e821d7eaab22f512e9d71a1a0392ebf wallet: bdb: include bdb header from our implementation files only (Cory Fields) 6e010626af7ed51f1748323ece2f46335e145f2f wallet: bdb: don't use bdb define in header (Cory Fields) 004b184b027520a4f9019d1432a816e6ec891fe3 wallet: bdb: move BerkeleyDatabase constructor to cpp file (Cory Fields) b3582baa3a2f84db7d2fb5a681121a5f2d6de3a1 wallet: bdb: move SafeDbt to cpp file (Cory Fields) e5e5aa1da261633c8f73b97d5aefe5dc450a7db9 wallet: bdb: move SpanFromDbt to below SafeDbt's implementation (Cory Fields) 4216f69250937b1ca4650dc0c21678a8444c6650 wallet: bdb: move TxnBegin to cpp file since it uses a bdb function (Cory Fields) 43369f37060a1b4c987672707c500d35c9a27c1d wallet: bdb: drop default parameter (Cory Fields) Pull request description: Only `#include` upstream bdb headers from our cpp files. It's generally good practice to avoid including 3rd party deps in headers as otherwise they tend to sneak into new compilation units. IMO this makes for a nice cleanup. There's a good bit of code movement here, but each commit is small and _should_ be obviously correct. Note: in the future, the buildsystem can add the bdb include path for `bdb.cpp` and `salvage.cpp` only, rather than all wallet sources. ACKs for top commit: achow101: reACK 8b5397c00e821d7eaab22f512e9d71a1a0392ebf hebasto: ACK 8b5397c00e821d7eaab22f512e9d71a1a0392ebf Tree-SHA512: 0ef6e8a9c4c6e2d1e5d6a3534495f91900e4175143911a5848258c56da54535b85fad67b6d573da5f7b96e7881299b5a8ca2327e708f305b317b9a3e85038d66
2023-07-07Merge bitcoin/bitcoin#28038: wallet: address book migration bug fixesfanquake
7ecc29a0b7a23d8f5d3c1e6a0dad29b3ad839eb9 test: wallet, add coverage for addressbook migration (furszy) a277f8357ad8b0eb26f33fc36f919d868c06847b wallet: migration bugfix, persist empty labels (furszy) 1b64f6498c394a143df196172a14204fe3b8a744 wallet: migration bugfix, clone 'send' record label to all wallets (furszy) Pull request description: Addressing two specific bugs encountered during the wallet migration process, related to the address book, and improves the test coverage for it. Bug 1: Non-Cloning of External 'Send' Records The external 'send' records were not being correctly cloned to all wallets. Bug 2: Persistence of Empty Labels As address book entries without associated db label records can be treated as change (the `label` field inside the `CAddressBookData` class is optional, `nullopt` labels make `CAddressBookData ::IsChange()` return true), we must persist empty labels during the migration process. The user might have called `setlabel` with an "" string for an external address and that must be retained during migration. ACKs for top commit: achow101: ACK 7ecc29a0b7a23d8f5d3c1e6a0dad29b3ad839eb9 Tree-SHA512: b8a8483a4178a37c49af11eb7ba8a82ca95e54a6cd799e155e33f9fbe7f37b259e28372c77d6944d46b6765f9eaca6b8ca8d1cdd9d223120a3653e4e41d0b6b7
2023-07-07wallet: bdb: include bdb header from our implementation files onlyCory Fields
This way the dependency can't sneak into other files without being noticed. Forward-declare bdb classes as necessary.
2023-07-07wallet: bdb: don't use bdb define in headerCory Fields
2023-07-07wallet: bdb: move BerkeleyDatabase constructor to cpp fileCory Fields
Else some compilers/stdlibs may not be able to construct std::unique_ptr<Db> without Db defined.
2023-07-07wallet: bdb: move SafeDbt to cpp fileCory Fields
Dbt requires including bdb headers.
2023-07-07wallet: bdb: move SpanFromDbt to below SafeDbt's implementationCory Fields
No functional change, just simplifies the code move in the next commit.
2023-07-07Merge bitcoin/bitcoin#28012: util: Allow FastRandomContext::randbytes for ↵fanquake
std::byte, Allow std::byte serialization fac6af16f4a254458b8cb3522317422b40362f8d Allow std::byte serialization (MarcoFalke) fade43edc4405e7c51cec9325d8502f3786f7438 Allow FastRandomContext::randbytes for all byte types (MarcoFalke) Pull request description: I need this for some stuff, but it should also be useful by itself for other developers that need it. ACKs for top commit: sipa: utACK fac6af16f4a254458b8cb3522317422b40362f8d dergoegge: Code review ACK fac6af16f4a254458b8cb3522317422b40362f8d Tree-SHA512: db4b1bbd6bf6ef6503d59b0b4ed1681db8d935d2d10f8d89f071978ea59b49a1d319bccb4e9717c0c88a4908bbeca4fd0cbff6c655d8a443554fd14146fe16de
2023-07-07Merge bitcoin/bitcoin#28036: test: Restore unlimited timeout in IndexWaitSyncedfanquake
fabed7eb796637c02e3677ebbe183d90b258ba69 test: Restore unlimited timeout in IndexWaitSynced (MarcoFalke) Pull request description: The timeout was unlimited before, so just restore that value for now: https://github.com/bitcoin/bitcoin/pull/27988#issuecomment-1619218007 . (Strictly speaking, this is a behavior change for the blockfilterindex and txindex tests, because it only restores the coinstatsindex behavior.) ACKs for top commit: ajtowns: utACK fabed7eb796637c02e3677ebbe183d90b258ba69 mzumsande: ACK fabed7eb796637c02e3677ebbe183d90b258ba69 furszy: ACK fabed7eb Tree-SHA512: 66a878be58bbe53ad8e0c23f05569dd42df688be747551fbd202ada22d20a8285714e58fa2a71664deadb070ddf86cfad88c01042ff95ed26f6b40e4a10cec0a
2023-07-07Merge bitcoin/bitcoin#28040: wallet: sqlite: don't include sqlite files from ↵fanquake
our headers bea9fc2600635020fd28ec7a6613c92a6f349a86 wallet: sqlite: force sqlite3.h to be included by the cpp files (Cory Fields) Pull request description: Only `#include` upstream sqlite headers from our cpp files. Like #28039 but simpler :) ACKs for top commit: achow101: ACK bea9fc2600635020fd28ec7a6613c92a6f349a86 TheCharlatan: Nice, ACK bea9fc2600635020fd28ec7a6613c92a6f349a86 kristapsk: utACK bea9fc2600635020fd28ec7a6613c92a6f349a86 hebasto: ACK bea9fc2600635020fd28ec7a6613c92a6f349a86, I have reviewed the code and it looks OK. Tree-SHA512: cb83ac51eed7e0740f1c75ee87c7849fa7e535bc4836c499290041eb995ccfd82533e3babfe83a164257b62b180f206112d6a1bae7ea290ad0ec7f55d62432da
2023-07-06Merge bitcoin/bitcoin#27861: kernel: Rm ShutdownRequested and AbortNode from ↵Ryan Ofsky
validation code. 6eb33bd0c21b3e075fbab596351cacafdc947472 kernel: Add fatalError method to notifications (TheCharlatan) 7320db96f8d2aeff0bc5dc67d8b7b37f5f808990 kernel: Add flushError method to notifications (TheCharlatan) 3fa9094b92c5d37f486b0f8265062d3456796a50 scripted-diff: Rename FatalError to FatalErrorf (TheCharlatan) edb55e2777063dfeba0a52bbd0b92af8b4688501 kernel: Pass interrupt reference to chainman (TheCharlatan) e2d680a32d757de0ef8eb836047a0daa1d82e3c4 util: Add SignalInterrupt class and use in shutdown.cpp (TheCharlatan) Pull request description: Get rid of all `ShutdownRequested` calls in validation code by introducing an interrupt object that applications can use to cancel long-running kernel operations. Replace all `AbortNode` calls in validation code with new fatal error and flush error notifications so kernel applications can be notified about failures and choose how to handle them. --- This pull request is part of the `libbitcoinkernel` project https://github.com/bitcoin/bitcoin/issues/27587 https://github.com/orgs/bitcoin/projects/3 and more specifically its "Step 2: Decouple most non-consensus code from libbitcoinkernel". The pull request mostly allows dropping the kernel dependency on shutdown.cpp. The only dependency left after this is a `StartShutdown` call which will be removed in followup PR https://github.com/bitcoin/bitcoin/pull/27711. This PR also drops the last reference to the `uiInterface` global in kernel code. The process of moving the `uiInterface` out of the kernel was started in https://github.com/bitcoin/bitcoin/pull/27636. This pull request contains a subset of patches originally proposed in #27711. It will be part of a series of changes required to make handling of interrupts (or in other words the current shutdown procedure) in the kernel library more transparent and less reliable on global mutable state. The set of patches contained here was originally proposed by @ryanofsky [here](https://github.com/bitcoin/bitcoin/pull/27711#issuecomment-1580779869). ACKs for top commit: achow101: light ACK 6eb33bd0c21b3e075fbab596351cacafdc947472 hebasto: ACK 6eb33bd0c21b3e075fbab596351cacafdc947472, I have reviewed the code and it looks OK. ryanofsky: Code review ACK 6eb33bd0c21b3e075fbab596351cacafdc947472. No changes since last review other than rebase. Tree-SHA512: 7d2d05fa4805428a09466d43c11ae32946cbb25aa5e741b1eec9cd142e4de4bb311e13ebf1bb125ae490c9d08274f2d56c93314e10f3d69e7fec7445e504987c
2023-07-06wallet: bdb: move TxnBegin to cpp file since it uses a bdb functionCory Fields
2023-07-06wallet: bdb: drop default parameterCory Fields
2023-07-06wallet: sqlite: force sqlite3.h to be included by the cpp filesCory Fields
This way sqlite usage is explicit.
2023-07-06wallet: migration bugfix, persist empty labelsfurszy
addressbook records with no associated label could be treated as change. And we don't want that for external addresses.
2023-07-06wallet: migration bugfix, clone 'send' record label to all walletsfurszy
2023-07-06test: Restore unlimited timeout in IndexWaitSyncedMarcoFalke
The timeout was unlimited before, so just restore that value for now: https://github.com/bitcoin/bitcoin/pull/27988#issuecomment-1619218007
2023-07-06Merge bitcoin/bitcoin#27869: wallet: Give deprecation warning when loading a ↵glozow
legacy wallet 8fbb6e99bfc85a1b9003cae402a7335843a86abd wallet: Give deprecation warning when loading a legacy wallet (Andrew Chow) Pull request description: Next step in legacy wallet deprecation. ACKs for top commit: S3RK: reACK 8fbb6e99bfc85a1b9003cae402a7335843a86abd jonatack: re-ACK 8fbb6e99bfc85a1b9003cae402a7335843a86abd Tree-SHA512: 902984b09452926cf199f06e5fb56e4985325cdd5e0dcc829992158488f42d5fbc33e9a30a29303feac24c8315193e8d31712022e2a0503abd6b67169a0027f4
2023-07-04Merge bitcoin-core/gui#696: Switch RPCConsole wallet selection to the one ↵Hennadii Stepanov
most recently opened/restored/created 99c0eb9701e71f16aa360a420b7e4851d5b92510 Fix RPCConsole wallet selection (John Moffett) Pull request description: If a user opens multiple wallets in the GUI from the menu bar, the last one opened is the active one in the main window. However, For the RPC Console window, the _first_ one opened is active. This can be confusing, as wallet RPC commands may be sent to a wallet the user didn't intend. This PR makes the RPC Console switch to the wallet just opened / restored / created from the menu bar, which is how the main GUI now works. Similar to https://github.com/bitcoin-core/gui/pull/665 and specifically requested [in a comment](https://github.com/bitcoin-core/gui/pull/665#issuecomment-1270003660). ACKs for top commit: luke-jr: utACK 99c0eb9701e71f16aa360a420b7e4851d5b92510 hebasto: ACK 99c0eb9701e71f16aa360a420b7e4851d5b92510, tested on Ubuntu 23.04. Tree-SHA512: d5e5acdaa114130ad4d27fd3f25393bc8d02d92b5001cd39352601d04283cdad3bd62c4da6d369c69764e3b188e9cd3e83152c00b09bd42966082ad09037c328
2023-07-04Merge bitcoin-core/gui#719: Remove confusing "Dust" label from coincontrol / ↵Hennadii Stepanov
sendcoins dialog a582b4141f0756faa3793fb1c772898a984c83e4 gui: send, left alignment for "bytes" and "change" label (furszy) 210ef1e980e0887c5675b66bcd5cbccd00aceec6 qt: remove confusing "Dust" label from coincontrol / sendcoins dialog (Sebastian Falbesoner) Pull request description: In contrast to to all other labels on the coin selection dialog, the displayed dust information has nothing to do with the selected coins. All that this label shows is whether at least one of the _outputs_ qualify as dust, but the outputs are set in a different dialog. (Even worse, the dust check is currently simply wrong because it only looks at an output's nValue and just assumes a P2PKH script size.) As the label clearly doesn't help the user and is, quite the contrary, rather increasing confusion/misguidance, it seems sensible to remove it. The label from the sendcoins dialog is also removed with the same rationale. Additionally, the "bytes" and "change" labels are aligned to the left (second commit). Closes https://github.com/bitcoin-core/gui/issues/699. ACKs for top commit: furszy: ACK a582b41 hebasto: Looks good. ACK a582b4141f0756faa3793fb1c772898a984c83e4. Tree-SHA512: ebc00b68bdeab69f6ab643e4b89301a7e3d04a8a4027b50813314ddddb1387bc97a83313851e375dfbce97751c234686c82af7f4e55fa5ef29f4fed4e8fc11d9
2023-07-03Merge bitcoin/bitcoin#27920: wallet: bugfix, always use apostrophe for spkm ↵Andrew Chow
descriptor ID 5df988b534df842ddb658ad2a7ff0f12996c8478 test: add coverage for descriptor ID (furszy) 6a9510d2dabde1c9ee6c4226e3d16ca32eb48ac5 wallet: bugfix, always use apostrophe for spkm descriptor ID (furszy) 97a965d98f1582ea1b1377bd258c9088380e1b8b refactor: extract descriptor ID calculation from spkm GetID() (furszy) 1d207e3931cf076f69d4a8335cdd6c8ebb2a963f wallet: do not allow loading descriptor with an invalid ID (furszy) Pull request description: Aiming to fix #27915. As we re-write the descriptor's db record every time that the wallet is loaded (at `TopUp` time), if the spkm ID differs from the one in db, the wallet will enter in an unrecoverable corruption state (due to the storage of a descriptor with an ID that is not linked to any other descriptor record in DB), and no soft version will be able to open it anymore. Because we cannot change the past, to stay compatible between releases, we need to always use the apostrophe version for the spkm IDs. ACKs for top commit: achow101: ACK 5df988b534df842ddb658ad2a7ff0f12996c8478 Sjors: tACK 5df988b534df842ddb658ad2a7ff0f12996c8478 Tree-SHA512: f63fc4aac7d21a4e515657471758d28857575e751865bfa359298f8b89b2568970029ca487a873c1786a5716325f453f06cd417ed193f3366417f6e8c2987332
2023-07-03gui: send, left alignment for "bytes" and "change" labelfurszy
2023-07-03Fix RPCConsole wallet selectionJohn Moffett
If a user opens multiple wallets in the GUI from the menu bar, the last one opened is the active one in the main window. However, For the RPC Console window, the _first_ one opened is active. This can be confusing, as wallet RPC commands may be sent to a wallet the user didn't intend. This commit makes the RPC Console switch to the wallet opened from the menu bar.
2023-07-03qt: remove confusing "Dust" label from coincontrol / sendcoins dialogSebastian Falbesoner
In contrast to to all other labels on the coin selection dialog, the displayed dust information has nothing to do with the selected coins. All that this label shows is whether at least one of the _outputs_ qualify as dust, but the outputs are set in a different dialog. (Even worse, the dust check is currently simply wrong because it only looks at an output's nValue and just assumes a P2PKH script size.) As the label clearly doesn't help the user and is, quite the contrary, rather increasing confusion/misguidance, it seems sensible to remove it. Also, remove the label from the sendcoins dialog with the same rationale.
2023-06-30Merge bitcoin/bitcoin#27745: addrman: select addresses by network follow-upAndrew Chow
cd8ef5b3e66b3f766c9c883259b5feb44540d7df test: ensure addrman test is finite (Amiti Uttarwar) b9f1e86f129e46bb5770fb421d0ba164b5c7aaf8 addrman: change asserts to Assumes (Amiti Uttarwar) 768770771f7db60147943152b34a8dd485cdcc76 doc: update `Select` function description (Amiti Uttarwar) 2b6bd12eea0c970881753124ec3f0a67e2de8e17 refactor: de-duplicate lookups (Amiti Uttarwar) Pull request description: this PR addresses outstanding review comments from #27214 ACKs for top commit: achow101: ACK cd8ef5b3e66b3f766c9c883259b5feb44540d7df mzumsande: Code Review ACK cd8ef5b3e66b3f766c9c883259b5feb44540d7df brunoerg: crACK cd8ef5b3e66b3f766c9c883259b5feb44540d7df Tree-SHA512: 669f67904263e3f51c39b175eabf5fa1b1e7b6841e889656afec33d0bd93fb446de9403f0a91b186ddeaf29498c8938484a0547b1188256c4e7c90db6f30bb55
2023-06-30Merge bitcoin/bitcoin#28009: script, test: python typing and linter updatesfanquake
6c97757a480b6e71a0750330d69ff18ac7cc6127 script: appease spelling linter (Jon Atack) 1316119ce7ba3de4135bbf1e5ac28c9ea26f62e1 script: update ignored-words.txt (Jon Atack) 146c861da2e4236997bee3eed6110a5016a8b86b script: update linter dependencies (Jon Atack) 92408224a4cb2f454465d5ff8445c247f2c4318a test: fix PEP484 no implicit optional argument types errors (Jon Atack) f86a3014338de6a2204bbdda10795b75ef6654c0 script, test: add missing python type annotations (Jon Atack) Pull request description: With these updates, `./test/lint/lint-python.py` and `./test/lint/lint-spelling.py` should be green again for developers using relatively recent Python dependencies, in particular mypy 0.991 (released 11/2022) and later. Please see the commit messages for details. ACKs for top commit: fanquake: ACK 6c97757a480b6e71a0750330d69ff18ac7cc6127 Tree-SHA512: 8a46a4d36d5978affdcecf4f2ace20ca1b52d483e098304911a2169afe60ccb9b042fa90c04b762d94f3ce53d2cafe6f24476ae839867a770c7f31e7e7242d99
2023-06-30Allow std::byte serializationMarcoFalke
2023-06-30Allow FastRandomContext::randbytes for all byte typesMarcoFalke
2023-06-30Merge bitcoin/bitcoin#27988: test: Use same timeout for all index syncfanquake
fa086248e57b89cc549a090f727c0978082727c0 test: Use same timeout for all index sync (MarcoFalke) Pull request description: Seems odd to use different timeouts. Fix this by using the same timeout for all syncs. May also fix https://github.com/bitcoin/bitcoin/issues/27355 or at least make it less frequent? ACKs for top commit: mzumsande: code review ACK fa086248e57b89cc549a090f727c0978082727c0 Tree-SHA512: a61619247c97f3a88dd19eb3f200adedd120e6da8c4e4f2cf83621545b8c289dbad77e16f13cf7973a090f7b2c3391cb0297f09b0cc95fe4f55de21ae247670f
2023-06-30Merge bitcoin/bitcoin#28002: refactor: remove in-code warning suppressionfanquake
3210f224dbeaf0f9de09d4e83c3e6666128a6717 refactor: remove in-code warning suppression (fanquake) Pull request description: Should no-longer be needed post #27872. If it is, then suppress-external-warnings should be fixed. ACKs for top commit: hebasto: ACK 3210f224dbeaf0f9de09d4e83c3e6666128a6717 Tree-SHA512: 2405250b7308779d576f13ce9144944abd5b2293499a0c0fe940398dae951cb871246a55c0e644a038ee238f9510b5845c3e39f9658d9f10225a076d8122f078
2023-06-29Merge bitcoin/bitcoin#27863: net: do not `break` when `addr` is not from a ↵Andrew Chow
distinct network group 5fa4055452861ca1700008e1761815e88b29fae7 net: do not `break` when `addr` is not from a distinct network group (brunoerg) Pull request description: When the address is from a network group we already caught, do a `continue` and try to find another address until conditions are met or we reach the limit (`nTries`). ACKs for top commit: amitiuttarwar: utACK 5fa4055452861ca1700008e1761815e88b29fae7 achow101: ACK 5fa4055452861ca1700008e1761815e88b29fae7 mzumsande: utACK 5fa4055452861ca1700008e1761815e88b29fae7 Tree-SHA512: 225bb6df450b46960db934983c583e862d1a17bacfc46d3657a0eb25a0204e106e8cd18de36764e210e0a92489ab4b5773437e4a641c9b455bde74ff8a041787
2023-06-29script: appease spelling linterJon Atack
2023-06-29Merge bitcoin/bitcoin#27978: refactor: Drop unsafe AsBytePtr functionAndrew Chow
7c853619ee9ea17a79f1234b6c7871a45ceadcb9 refactor: Drop unsafe AsBytePtr function (Ryan Ofsky) Pull request description: Replace calls to `AsBytePtr` with calls to `AsBytes` or `reinterpret_cast`. `AsBytePtr` is just a wrapper around `reinterpret_cast`. It accepts any type of pointer as an argument and uses `reinterpret_cast` to cast the argument to a `std::byte` pointer. Despite taking any type of pointer as an argument, it is not useful to call `AsBytePtr` on most types of pointers, because byte representations of most types will be platform specific or undefined. Also, because it is named similarly to the `AsBytes` function, `AsBytePtr` looks safer than it actually is. Both `AsBytes` and `AsBytePtr` call reinterpret_cast internally and may be unsafe to use with certain types, but AsBytes at least has some type checking and can only be called on `Span` objects, while `AsBytePtr` can be called on any pointer argument. The change was motivated by discussion on #27973 and #27927 and is compatible with those PRs ACKs for top commit: jonatack: re-ACK 7c853619ee9ea17a79f1234b6c7871a45ceadcb9 sipa: utACK 7c853619ee9ea17a79f1234b6c7871a45ceadcb9 achow101: ACK 7c853619ee9ea17a79f1234b6c7871a45ceadcb9 Tree-SHA512: 200d858b1d4d579f081a7f9a14d488a99713b4918b4564ac3dd5c18578d927dbd6426e62e02f49f04a3fa73ca02ff7109c495cb0b92bec43c27d9b74e2f95757
2023-06-29refactor: remove in-code warning suppressionfanquake
Should no-longer be needed post #27872. If it is, then suppress-external-warnings should be fixed.
2023-06-29Merge bitcoin/bitcoin#27996: ci: filter all subtrees from tidy outputfanquake
62633b50461cb67dfb37d6485e604152e727559c ci: filter all subtrees from tidy output (fanquake) Pull request description: We are currently dumping output for some. i.e: ```bash diff --git a/src/minisketch/src/fields/clmul_1byte.cpp b/src/minisketch/src/fields/clmul_1byte.cpp index 8826af9..7fd6f2a 100644 --- a/src/minisketch/src/fields/clmul_1byte.cpp +++ b/src/minisketch/src/fields/clmul_1byte.cpp @@ -4,21 +4,16 @@ * file LICENSE or http://www.opensource.org/licenses/mit-license.php.* **********************************************************************/ -/* This file was substantially auto-generated by doc/gen_params.sage. */ -#include "../fielddefines.h" - +class Sketch; #if defined(ENABLE_FIELD_BYTES_INT_1) ``` ACKs for top commit: hebasto: re-ACK 62633b50461cb67dfb37d6485e604152e727559c Tree-SHA512: fd0a17af6b37fc7641547dab329c2d14ec784941c4d100db1e80d232aff39e45ad9c588982810a2cfc54b4fe820bfe0d50638b53209fec6774fd556b9b0ae180
2023-06-29Merge bitcoin/bitcoin#27932: test: Fuzz on macOSfanquake
fae7c50d201726f605938c3511dd9119efeea5ec test: Run fuzz tests on macOS (MarcoFalke) Pull request description: Any reason not to? ACKs for top commit: jamesob: Github ACK https://github.com/bitcoin/bitcoin/pull/27932/commits/fae7c50d201726f605938c3511dd9119efeea5ec dergoegge: utACK fae7c50d201726f605938c3511dd9119efeea5ec Tree-SHA512: e45122d73fafb17cea312258314b826cb0745e08daadd28465f687ec02d4c127d2f8cbe20179a9fff5712038850c02c968abb4838fa088b7555e28709317d3a3
2023-06-29ci: filter all subtrees from tidy outputfanquake
We are currently dumping output for some. i.e: ```bash diff --git a/src/minisketch/src/fields/clmul_1byte.cpp b/src/minisketch/src/fields/clmul_1byte.cpp index 8826af9..7fd6f2a 100644 --- a/src/minisketch/src/fields/clmul_1byte.cpp +++ b/src/minisketch/src/fields/clmul_1byte.cpp @@ -4,21 +4,16 @@ * file LICENSE or http://www.opensource.org/licenses/mit-license.php.* **********************************************************************/ -/* This file was substantially auto-generated by doc/gen_params.sage. */ -#include "../fielddefines.h" - +class Sketch; #if defined(ENABLE_FIELD_BYTES_INT_1) ```
2023-06-28Remove now-unnecessary poll, fcntl includes from net(base).cppBen Woosley
As far as I can tell, the code calling for these includes was removed in: 6e68ccbefea6509c61fc4405a391a517c6057bb0 #24356 82d360b5a88d9057b6c09b61cd69e426c7a2412d #21387
2023-06-28refactor: Drop unsafe AsBytePtr functionRyan Ofsky
Replace calls to AsBytePtr with direct calls to AsBytes or reinterpret_cast. AsBytePtr is just a wrapper around reinterpret_cast. It accepts any type of pointer as an argument and uses reinterpret_cast to cast the argument to a std::byte pointer. Despite taking any type of pointer as an argument, it is not useful to call AsBytePtr on most types of pointers, because byte representations of most types will be implmentation-specific. Also, because it is named similarly to the AsBytes function, AsBytePtr looks safer than it actually is. Both AsBytes and AsBytePtr call reinterpret_cast internally and may be unsafe to use with certain types, but AsBytes at least has some type checking and can only be called on Span objects, while AsBytePtr can be called on any pointer argument. Co-authored-by: Pieter Wuille <pieter@wuille.net>
2023-06-28Merge bitcoin/bitcoin#27927: util: Allow std::byte and char Span serializationAndrew Chow
fa38d862358b87219b12bf31236c52f28d9fc5d6 Use only Span{} constructor for byte-like types where possible (MarcoFalke) fa257bc8312b91c2d281f48ca2500d9cba353cc5 util: Allow std::byte and char Span serialization (MarcoFalke) Pull request description: Seems odd to require developers to cast all byte-like spans passed to serialization to `unsigned char`-spans. Fix that by passing and accepting byte-like spans as-is. Finally, add tests and update the code to use just `Span` where possible. ACKs for top commit: sipa: utACK fa38d862358b87219b12bf31236c52f28d9fc5d6 achow101: ACK fa38d862358b87219b12bf31236c52f28d9fc5d6 ryanofsky: Code review ACK fa38d862358b87219b12bf31236c52f28d9fc5d6. This looks great. The second commit really removes a lot of boilerplate and shows why the first commit is useful. Tree-SHA512: 788592d9ff515c3ebe73d48f9ecbb8d239f5b985af86f09974e508cafb0ca6d73a959350295246b4dfb496149bc56330a0b5d659fc434ba6723dbaba0b7a49e5
2023-06-28test: add coverage for descriptor IDfurszy
Tests vectors were calculated by running the same tests on v25. Which was the last release prior to introducing the diff in the descriptor's string representation ('h' format). Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
2023-06-28wallet: bugfix, always use apostrophe for spkm descriptor IDfurszy
As we update the descriptor's db record every time that the wallet is loaded (at `TopUp` time), if the spkm ID differs from the one in db, the wallet will enter in an unrecoverable corruption state, and no soft version will be able to open it anymore. Because we cannot change the past, to stay compatible between releases, we need to always use the apostrophe version for the spkm IDs.
2023-06-28refactor: extract descriptor ID calculation from spkm GetID()furszy
This allows us to verify the descriptor ID on the descriptors unit tests in different software versions without requiring to use the entire DescriptorScriptPubKeyMan machinery. Note: The unit test changes are introduced after the bugfix commit but this commit + the unit test commit can be cherry-picked on top of the v25 branch to verify IDs correctness. IDs must be the same for v25 and after the bugfix commit.
2023-06-28wallet: do not allow loading descriptor with an invalid IDfurszy
If the computed descriptor's ID doesn't match the wallet's DB spkm ID, return early from the loading process to prevent DB data from being modified in any post-loading procedure (e.g 'TopUp' updates the descriptor's data).
2023-06-28Merge bitcoin/bitcoin#27949: http: update libevent workaround to correct versionfanquake
79d343a642f985801da463b03a0627a59a095238 http: update libevent workaround to correct version (stickies-v) Pull request description: The libevent bug described in https://github.com/libevent/libevent/commit/5ff8eb26371c4dc56f384b2de35bea2d87814779 was already patched in [release-2.1.9-beta](https://github.com/libevent/libevent/releases/tag/release-2.1.9-beta), with cherry-picked commits [5b40744d1581447f5b4496ee8d4807383e468e7a](https://github.com/libevent/libevent/commit/5b40744d1581447f5b4496ee8d4807383e468e7a) and [b25813800f97179b2355a7b4b3557e6a7f568df2](https://github.com/libevent/libevent/commit/b25813800f97179b2355a7b4b3557e6a7f568df2). There should be no side-effects by re-applying the workaround on an already patched version of libevent (as is currently done in master for people running libevent between 2.1.9 and 2.1.12), but it is best to just set the correct version number to avoid confusion. This will prevent situations like e.g. in https://github.com/bitcoin/bitcoin/pull/27909#discussion_r1238858604, where a reverse workaround was incorrectly applied to the wrong version range. ACKs for top commit: fanquake: ACK 79d343a642f985801da463b03a0627a59a095238 Tree-SHA512: 56d2576411cf38e56d0976523fec951e032a48e35af293ed1ef3af820af940b26f779b9197baaed6d8b79bd1c7f7334646b9d73f80610d63cffbc955958ca8a0
2023-06-28test: Use same timeout for all index syncMarcoFalke
2023-06-28kernel: Add fatalError method to notificationsTheCharlatan
FatalError replaces what previously was the AbortNode function in shutdown.cpp. This commit is part of the libbitcoinkernel project and further removes the shutdown's and, more generally, the kernel library's dependency on interface_ui with a kernel notification method. By removing interface_ui from the kernel library, its dependency on boost is reduced to just boost::multi_index. At the same time it also takes a step towards de-globalising the interrupt infrastructure. Co-authored-by: Russell Yanofsky <russ@yanofsky.org> Co-authored-by: TheCharlatan <seb.kung@gmail.com>
2023-06-28kernel: Add flushError method to notificationsTheCharlatan
This is done in addition with the following commit. Both have the goal of getting rid of direct calls to AbortNode from kernel code. This extra flushError method is added to notify specifically about errors that arrise when flushing (syncing) block data to disk. Unlike other instances, the current calls to AbortNode in the blockstorage flush functions do not report an error to their callers. This commit is part of the libbitcoinkernel project and further removes the shutdown's and, more generally, the kernel library's dependency on interface_ui with a kernel notification method. By removing interface_ui from the kernel library, its dependency on boost is reduced to just boost::multi_index. At the same time it also takes a step towards de-globalising the interrupt infrastructure.