aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-08-01fuzz: improve scriptpubkeyman targetbrunoerg
The goal of this improvement is to reduce TopUp calls which can lead to timeouts.
2024-08-01qt: Replace deprecated LogPrintf with LogInfo in GUIUtil::LogQtInfo()Hennadii Stepanov
2024-08-01qt, build: Drop `QT_STATICPLUGIN` macroHennadii Stepanov
Our `QT_STATICPLUGIN` macro is effectively equivalent to the Qt's `QT_STATIC` macro. No need to handle both of them.
2024-08-01Merge bitcoin/bitcoin#30532: refactor: remove deprecated TxidFromString() in ↵glozow
favour of transaction_identifier::FromHex() f553e6d86fe114e90585ea6d4b8e345a209cae5d refactor: remove TxidFromString (stickies-v) 285ab50ace4c04209f331ccaf121152b977cc490 test: replace WtxidFromString with Wtxid::FromHex (stickies-v) 9a0b2a69c4d836d7382f6fe7703de40288fc7421 fuzz: increase FromHex() coverage (stickies-v) 526a87ba6b4f20592ad3c090b82e83ecff2107fc test: add uint256::FromHex unittest coverage (stickies-v) Pull request description: Since https://github.com/bitcoin/bitcoin/pull/30482/commits/fab6ddbee64e50d5e2f499aebca35b5911896ec4, `TxidFromString()` has been deprecated because it is less robust than the `transaction_identifier::FromHex()` introduced in [the same PR](https://github.com/bitcoin/bitcoin/pull/30482). Specifically, it tries to recover from length-mismatches, recover from untrimmed whitespace, 0x-prefix and garbage at the end, instead of simply requiring exactly 64 hex-only characters. In this PR, `TxidFromString` is removed completely to clean up the code and prevent further unsafe usage. Unit and fuzz test coverage on `uint256::FromHex()` and functions that wrap it is increased. Note: `TxidFromSring` allowed users to prefix strings with "0x", this is no longer allowed for `transaction_identifier::FromHex()`, so a helper function for input validation may prove helpful in the future _(this overlaps with the `uint256::uint256S()` vs `uint256::FromHex()` future cleanup)_. It is not relevant to this PR, though, besides the fact that this unused (except for in tests) functionality is removed. The only users of `TxidFromString` are: - `test`, where it is straightforward to drop in the new `FromHex()` methods without much further concern - `qt` coincontrol. There is no need for input validation here, but txids are not guaranteed to be 64 characters. This is already handled by the existing code, so again, using `FromHex()` here seems quite straightforward. Addresses @maflcko's suggestion: https://github.com/bitcoin/bitcoin/pull/30482#discussion_r1691826934 Also removes `WtxidFromString()`, which is a test-only helper function. ### Testing GUI changes To test the GUI coincontrol affected lines, `regtest` is probably the easiest way to quickly get some test coins, you can use e.g. ``` alias cli="./src/bitcoin-cli -regtest" cli createwallet "coincontrol" # generate 10 spendable outputs on 1 address cli generatetoaddress 10 $(cli -rpcwallet=coincontrol getnewaddress) # generate 10 spendable outputs on another address cli generatetoaddress 10 $(cli -rpcwallet=coincontrol getnewaddress) # make previous outputs spendable cli generatetoaddress 100 $(cli -rpcwallet=coincontrol getnewaddress) ``` ACKs for top commit: maflcko: re-ACK f553e6d86fe114e90585ea6d4b8e345a209cae5d 🔻 hodlinator: ACK f553e6d86fe114e90585ea6d4b8e345a209cae5d paplorinc: ACK f553e6d86fe114e90585ea6d4b8e345a209cae5d TheCharlatan: Nice, ACK f553e6d86fe114e90585ea6d4b8e345a209cae5d Tree-SHA512: c1c7e6ea4cbf05cf660ba178ffc4f35f0328f7aa6ad81872e2462fb91a6a22e4681ff64b3d0202a5a9abcb650c939561585cd309164a69ab6081c0765ee271ef
2024-08-01Merge bitcoin/bitcoin#30565: depends: Fix `zeromq` build on OpenBSDmerge-script
89b1d5c818a33440c0c497aa78721fb9b0af35a5 depends: Fix `zeromq` build on OpenBSD (Hennadii Stepanov) Pull request description: On the master branch @ 66e82dc90c598c9c42ff980693ef5367a845e1d0, the `zeromq` package fails to build on OpenBSD 7.5: ``` [ 19%] Building CXX object CMakeFiles/objects.dir/src/io_thread.cpp.o /home/hebasto/bitcoin/depends/work/build/amd64-unknown-openbsd7.5/zeromq/4.3.5-df5b1b9f936/src/io_thread.cpp:14:22: error: static_cast from 'std::nullptr_t' to 'poller_t::handle_t' (aka 'int') is not allowed _mailbox_handle (static_cast<poller_t::handle_t> (NULL)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ``` This [regression](https://github.com/bitcoin/bitcoin/pull/29723#issuecomment-2261513105) was overlooked by me in https://github.com/bitcoin/bitcoin/pull/29723. This PR fixes the issue by backporting an upstream commit from https://github.com/zeromq/libzmq/pull/4659. ACKs for top commit: theStack: tACK 89b1d5c818a33440c0c497aa78721fb9b0af35a5 Tree-SHA512: 48d22ea99dfd44c5adf858c74e64082390da27b8ccad8c0d5a91d4dabfa3d12267cef98e4bb8c088e4cd0ec477c242cb1d47aace5c88cd86f796715bba957ed8
2024-08-01Merge bitcoin/bitcoin#30413: p2p: Lazy init some bloom filters; fuzz version ↵glozow
handshake afd237bb5d85923273a69f7b45dc6aae6aa1680e [fuzz] Harness for version handshake (dergoegge) a90ab4aec9cccd44d867842d6a1161d5758fcb2c scripted-diff: Rename lazily initialized bloom filters (dergoegge) 82de1bc478d54bea6125b459febfb2fb23929c61 [net processing] Lazily initialize m_recent_confirmed_transactions (dergoegge) fa0c87f19c1eca47ee7052f3c988ff7273801ff3 [net processing] Lazily initialize m_recent_rejects_reconsiderable (dergoegge) 662e8db2d3efc651951315b295952a2eebb822cd [net processing] Lazily initialize m_recent_rejects (dergoegge) Pull request description: This adds a fuzzing harness dedicated to the version handshake. To avoid determinism issues, the harness creates necessary components each iteration (addrman, peerman, etc). A harness like this would have easily caught https://bitcoincore.org/en/2024/07/03/disclose-timestamp-overflow/. As a performance optimization, this PR includes a change to `PeerManager` to lazily initialize various filters (to avoid large unnecessary memory allocations each iteration). ACKs for top commit: brunoerg: ACK afd237bb5d85923273a69f7b45dc6aae6aa1680e marcofleon: Tested ACK afd237bb5d85923273a69f7b45dc6aae6aa1680e. I compared the coverage of `net_processing` from this harness to the `process_message` and `process_messages` harnesses to see the differences. This target hits more specific parts of the version handshake. The stability looks good as well, at about 94%. glozow: utACK afd237bb5d85923273a69f7b45dc6aae6aa1680e lazy blooms look ok mzumsande: Code Review ACK afd237bb5d85923273a69f7b45dc6aae6aa1680e Tree-SHA512: 62bba20aec0cd220e62368354891f9790b81ad75e8adf7b22a76a6d4663bd26aedc4cae8083658a75ea9043d60aad3f0e58ad36bd7bbbf93ff1d16e317bf15cc
2024-07-31depends: Fix `zeromq` build on OpenBSDHennadii Stepanov
2024-07-31Merge bitcoin/bitcoin#30556: doc: multisig-tutorial: remove obsolete mention ↵merge-script
and link to closed PR 3cd24aadb25c1fbdca725c906e0fca79d090ebdd doc: remove obsolete mention and link to closed PR (Marnix) Pull request description: Remove the mention and link as the PR (https://github.com/bitcoin/bitcoin/pull/22341) is closed and the description is wrong/outdated anyway. ACKs for top commit: BrandonOdiwuor: ACK 3cd24aadb25c1fbdca725c906e0fca79d090ebdd tdb3: ACK 3cd24aadb25c1fbdca725c906e0fca79d090ebdd Tree-SHA512: 5cd97029337f0cdfe81b6be9401adc4fe51ae2868f8fcadcb03828531a38380a587c32840850a924b6428f62df7d20a1e16ef7414d4078e7bb2c4e359b1fae40
2024-07-31refactor: remove TxidFromStringstickies-v
TxidFromString was deprecated due to missing 64-character length-check and hex-check, replace it with the more robust Txid::FromHex.
2024-07-31test: replace WtxidFromString with Wtxid::FromHexstickies-v
The newly introduced Wtxid::FromHex is more robust and removes the need for a WtxidFromString helper function
2024-07-31fuzz: increase FromHex() coveragestickies-v
2024-07-31test: add uint256::FromHex unittest coveragestickies-v
Simultaneously cover transaction_identifier::FromHex()
2024-07-31Merge bitcoin/bitcoin#30559: test: Try previously intermittently broken USDT ↵merge-script
test again fa2269dd65bac09f22c7cee8a2dfc46694e9a986 test: Try previously intermittently broken USDT test again (MarcoFalke) Pull request description: Seems fine to try it again, given that the infra changed in the meantime. Should be trivial to disable again, on the first failure. Ref: https://github.com/bitcoin/bitcoin/issues/27380#issuecomment-1637971779 ACKs for top commit: fanquake: ACK fa2269dd65bac09f22c7cee8a2dfc46694e9a986 - seems fine to re-try this now. Tree-SHA512: e203625b49019517def8e92cc465dd947d5aa85a080d370aabce7a45442efc3900b5c3783f6cc15720f81e5aaa3ff193a26be3d33048f20a73cd7b1fce320118
2024-07-31test: Avoid CScript() as default function argumentMarcoFalke
This does not cause any issues, because CScript in the tests are const. However, this change allows to enable the "function-call-in-default-argument (B008)" lint rule.
2024-07-31Merge bitcoin/bitcoin#30547: doc: Update work in progress section in ↵merge-script
`doc/design/libraries.md` f70eb0eeefcd69aa233af4259f42b85763b9ff9b doc: Remove reference to resolved issue (Daniela Brozzoni) b27ef8ec7f9a06318c7287e8cf245827a0731cc2 doc: Update issue reference for libbitcoinkernel (Daniela Brozzoni) Pull request description: - The discussion of libbitcoinkernel has moved from 24303 to 27587 - Issue 15732 has been resolved, removing it from the document ACKs for top commit: maflcko: ACK f70eb0eeefcd69aa233af4259f42b85763b9ff9b Tree-SHA512: 11b597d9710504010945aae66f7e488403895aa8e1e091f3a8f6737dc128a4fde185daff8d4709cbbb69f454d3a649c4217e82a6bfc8ee2b25c8a1c047b57f1b
2024-07-31[fuzz] Harness for version handshakedergoegge
2024-07-31scripted-diff: Rename lazily initialized bloom filtersdergoegge
-BEGIN VERIFY SCRIPT- sed -i 's/m_recent_confirmed_transactions/m_lazy_recent_confirmed_transactions/g' $(git grep -l 'm_recent_confirmed_transactions') sed -i 's/m_recent_rejects_reconsiderable/m_lazy_recent_rejects_reconsiderable/g' $(git grep -l 'm_recent_rejects_reconsiderable') sed -i 's/m_recent_rejects/m_lazy_recent_rejects/g' $(git grep -l 'm_recent_rejects') -END VERIFY SCRIPT-
2024-07-31doc: Remove reference to resolved issueDaniela Brozzoni
Issue #15732 has been resolved, this commit removes it from the WIP section of the libraries document.
2024-07-31[net processing] Lazily initialize m_recent_confirmed_transactionsdergoegge
2024-07-31[net processing] Lazily initialize m_recent_rejects_reconsiderabledergoegge
2024-07-31[net processing] Lazily initialize m_recent_rejectsdergoegge
2024-07-31test: Try previously intermittently broken USDT test againMarcoFalke
This reverts commit faf8be7c32be00f660eba90d3f07313fb25d5d1c.
2024-07-31Merge bitcoin/bitcoin#30537: kernel: Only setup kernel context globals oncemerge-script
93fb0e7897000072ea790a91816aea876718ad27 kernel: Only setup kernel context globals once (TheCharlatan) Pull request description: The globals setup by the function calls when creating a new kernel context only need to be setup once. Calling them multiple times may be wasteful and has no apparent benefit. Besides kernel users potentially creating multiple contexts, this change may also be useful for tests creating multiple setups. ACKs for top commit: stickies-v: re-ACK 93fb0e7897000072ea790a91816aea876718ad27 maflcko: ACK 93fb0e7897000072ea790a91816aea876718ad27 👝 tdb3: re ACK 93fb0e7897000072ea790a91816aea876718ad27 Tree-SHA512: c8418c23b34883b9b6af2b93c48760a931c246c9190fae372fb808f573408d332f53ca43b9c783eef561c4a6681e2fb63f215c939b40a87d597c0518dabea22a
2024-07-31Merge bitcoin/bitcoin#30545: test: fix intermittent failures in feature_proxy.pymerge-script
a6efc7e16ed23377705a0a6a3445cab0acfd7ccc test: fix intermittent failures in feature_proxy.py (Martin Zumsande) Pull request description: Fixes #29871 If addnode connections are made with v2transport and the peer immediately disconnects us, reconnections with v1 are scheduled. This could interfere with later checks depending on timing. Avoid this by using `v2transport=False` in the addnode rpc - this test isn't about the message layer anyway, so running it with v2 would add no value. ACKs for top commit: maflcko: ACK a6efc7e16ed23377705a0a6a3445cab0acfd7ccc tdb3: cr re ACK a6efc7e16ed23377705a0a6a3445cab0acfd7ccc Tree-SHA512: 39353a392e75e4c6257d971ceecb65fb76ec6d3b121a087869831c24b767a18f57e2ae2968da445c7fa731cb03053c90df37dd2cd6e86f786ad4121bc68ca235
2024-07-31Merge bitcoin/bitcoin#30552: test: fix constructor of msg_txmerge-script
ec5e294e4b830766dcc4a80add0613d3705c1794 test: fix constructor of msg_tx (Martin Zumsande) Pull request description: In python, if the default value is a mutable object (here: a class) it is shared over all instances, so that one instance being changed would affect others to be changed as well. This was the source of #30543, and possibly various other intermittent bugs in the functional tests, see https://github.com/bitcoin/bitcoin/issues/29621#issuecomment-1999298224. Fixes #30543 Fixes #29621 Fixes #25128 ACKs for top commit: sipa: utACK ec5e294e4b830766dcc4a80add0613d3705c1794. I believe some linters even warn about doing this. maflcko: ACK ec5e294e4b830766dcc4a80add0613d3705c1794 vasild: ACK ec5e294e4b830766dcc4a80add0613d3705c1794 :heart: theStack: ACK ec5e294e4b830766dcc4a80add0613d3705c1794 Tree-SHA512: a6204fb1a326de3f9aa965f345fd658f6a4dcf78731db25cc905ff6eb8d4eeb65d14cc316305eebd89387aec8748c57c3a4f4ca62408f8e5ee53f535b88b1411
2024-07-31doc: remove obsolete mention and link to closed PRMarnix
2024-07-31doc: add release notes for #22729Vasil Dimov
2024-07-31Merge bitcoin/bitcoin#30551: doc: mention optional dependencies (qrencode, ↵merge-script
zmq) in OpenBSD build docs 903def1ffd2903615de509d5869cadf5315f04e2 doc: mention optional dependencies (qrencode, zmq) in OpenBSD build docs (Sebastian Falbesoner) Pull request description: The wording is taken from the FreeBSD build docs. Tested on OpenBSD 7.5. See the following links for the package names: - https://openbsd.app/?search=libqrencode - https://openbsd.app/?search=zeromq Thanks to hebasto for noticing that this was missing. ACKs for top commit: maflcko: review ACK 903def1ffd2903615de509d5869cadf5315f04e2 hebasto: ACK 903def1ffd2903615de509d5869cadf5315f04e2, I can successfully build with the `libqrencode` and `zeromq` packages on my OpenBSD 7.5 installation. Tree-SHA512: 955e4892948a7703627d304a41a774f7cca0e4c672bdfa0edf531587d6970444aa49195b0f6f531ce375c8e7c2af6bbfa1a12e0612ae7a65f3e454fb17958672
2024-07-31Merge bitcoin/bitcoin#30452: guix: bump time-machine to ↵merge-script
efc26826400762207cde9f23802cfe75a737963c 6ee000e56f7ceba82791bc9f6fca59328a2eb0ad guix: bump time-machine to efc26826400762207cde9f23802cfe75a737963c (fanquake) cbeb2c20e1f8076a9789436816ccb72b59a471c3 guix: patch /gnu/store paths out of winpthreads (fanquake) Pull request description: Needed for https://github.com/bitcoin/bitcoin/issues/30210. This doesn't switch runtimes, because upstream is still configured to use the old runtime. See: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=17188be0f723e00377b21b767f5447d7938a116e. git-mimimal `2.45.1` -> `2.45.2` Kernel Headers `6.1.92` -> `6.1.100` LLVM `18.1.6` -> `18.1.8` mingw-w64 `11.0.1` -> `12.0.0` NSIS `3.09` -> `3.10` patch `2.7.6` -> `2.7.6-0.f144b35` ACKs for top commit: TheCharlatan: ACK 6ee000e56f7ceba82791bc9f6fca59328a2eb0ad Tree-SHA512: f4f99d16dd8cab5b2b7c5d82111af86de20e1669cc3b4054d72ab4a67b2956757df170f0df28c96d18653c1c9d2ebdd0ecc441005726a20cd963d98513b4a851
2024-07-31test: Make leaf_script mandatory when scriptpath is set in TaprootSignatureMsgMarcoFalke
This removes the default value, because there should not be a use-case to fall back to a an empty leaf_script by default. (If there was, it could trivially be added back)
2024-07-30test: fix constructor of msg_txMartin Zumsande
In python, if the default value is a mutable object (here: a class) its shared over all instances, so that one instance being changed would affect others to be changed as well. This was likely the source of various intermittent bugs in the functional tests.
2024-07-30doc: mention optional dependencies (qrencode, zmq) in OpenBSD build docsSebastian Falbesoner
The wording is taken from the FreeBSD build docs. See the following links for the package names: - https://openbsd.app/?search=libqrencode - https://openbsd.app/?search=zeromq Thanks to hebasto for noticing that this was missing.
2024-07-30test: add P2A ProduceSignature coverageGreg Sanders
2024-07-30Add release note for P2A output featureGreg Sanders
2024-07-30test: add P2A coverage for decodescriptGreg Sanders
2024-07-30test: Add anchor mempool acceptance testGreg Sanders
2024-07-30policy: stop 3rd party wtxid malleability of anchor spendGreg Sanders
2024-07-30policy: make anchor spend standardGreg Sanders
Only standard when non-nested.
2024-07-30policy: Add OP_1 <0x4e73> as a standard output typeGreg Sanders
These outputs are called anchors, and allow key-less anchor spends which are vsize-minimized versus keyed anchors which require larger outputs when creating and inputs when spending.
2024-07-30Merge bitcoin-core/gui#505: Hide peers detailsHennadii Stepanov
41a1a8615dd48fdd9811b9824c49ceb934c6375e gui: Hide peers details (@RandyMcMillan) Pull request description: Add a close (X) button to the Peers Detail panel. Reuse the same icon used in the Console Tab. The close button deselects the peer highlighted in the PeerTableView and hides the detail panel. fixes #485 Co-authored-by: @w0xlt <w0xlt@users.noreply.github.com> ACKs for top commit: pablomartin4btc: re ACK 41a1a8615dd48fdd9811b9824c49ceb934c6375e hebasto: ACK 41a1a8615dd48fdd9811b9824c49ceb934c6375e, tested on Ubuntu 23.10. Tree-SHA512: fc692891eec61bd1e6878f2433b478de3c69bf0b3ce3471f2faafda6f63d371e2cc125ae8290fd2ac3e4d8659031b79d85665318cfc5a9481e967ef99d245f9c
2024-07-30kernel: Only setup kernel context globals onceTheCharlatan
The globals setup by the function calls when creating a new kernel context only need to be setup once. Calling them multiple times may be wasteful and has no apparent benefit. Besides kernel users potentially creating multiple contexts, this change may also be useful for tests creating multiple setups. Co-authored-by: stickies-v <stickies-v@protonmail.com>
2024-07-30qt: Update translation source fileHennadii Stepanov
The diff is generated by executing `make -C src translate`.
2024-07-30qt: Bump Transifex slug for 28.xHennadii Stepanov
2024-07-30qt: Pull recent translations from TransifexHennadii Stepanov
The diff is generated by executing the `update-translations.py` script. Removals of translation files have been discarded.
2024-07-30test: fix intermittent failures in feature_proxy.pyMartin Zumsande
If addnode connections are made with v2transport and the peer immediately disconnects us, reconnections with v1 are scheduled. This could interfere with later checks depending on timing. Avoid this by using `v2transport=False` in the addnode rpc - this test isn't about the message layer anyway, so running it with v2 would add no value.
2024-07-30doc: Update issue reference for libbitcoinkernelDaniela Brozzoni
The discussion of libbitcoinkernel has moved from #24303 to #27587, this commit updates the documentation accordingly.
2024-07-30Merge bitcoin/bitcoin#30451: depends: remove Darwin ENV unsettingmerge-script
bda537f7c484d61a55a72c5856f2d4420664db8f depends: remove ENV unsetting for darwin (fanquake) 1807760f094b600fdebe4ebd0018e4fd5d506ce9 guix: improve ENV unsetting for macOS (fanquake) 0b2aeee21d24645394d70086e992408948952952 depends: patch explicit -lm usage out of Qt tools (fanquake) Pull request description: Now that we use the native compiler, and have fixed Qt, and these vars are (almost) unset in Guix, we can remove the unsetting from our compiler command here. I couldn't manage to make a darwin-clang-cross only exclusion of `-lm` work properly for Qt, so opted for just removing the explicit link entirely. I do not think this should have any other unwanted side-effects. Fixes #21552. ACKs for top commit: TheCharlatan: ACK bda537f7c484d61a55a72c5856f2d4420664db8f Tree-SHA512: 97a2d85de7d4b1d65717ecb521399ecba5f53863b8aef21af62ede5ceee59ee1a9392663da3a3852cad1b6d8b420dd4b0b5f0eea38d30a81785d8b2718620b5f
2024-07-29rpc: fix maybe-uninitialized compile warning in getchaintxstatsMichael Dietz
This resolves the compiler warning about potential uninitialized use of window_tx_count introduced in fa2dada.
2024-07-29Merge bitcoin/bitcoin#30542: ci: enable berkley db on test each commit jobglozow
93ee17c1d610f811e86fcf17db00df24f7de8c1b ci: enable berkley db on test each commit job (Max Edwards) Pull request description: As the "test each commit" job installs `libdb++-dev` it looks like it was intended that it would compile with Berkeley DB support. This PR enables it. CI run log with the change: https://github.com/m3dwards/bitcoin/actions/runs/10142921800/job/28043223197?pr=1 ACKs for top commit: maflcko: ACK 93ee17c1d610f811e86fcf17db00df24f7de8c1b danielabrozzoni: ACK 93ee17c1d610f811e86fcf17db00df24f7de8c1b hebasto: ACK 93ee17c1d610f811e86fcf17db00df24f7de8c1b. Tree-SHA512: b6c2a7cea104a84221814fd121fd4fef2d7c0c3717f8c3fe35ec3c42e850e72085e9e6407b61ca1f9e86571346fa33a2cdd924210b26155956835011775320b2
2024-07-29ci: enable berkley db on test each commit jobMax Edwards