Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport: trivial 2024 10 23 pr9 #6352

Merged

Conversation

PastaPastaPasta
Copy link
Member

Issue being fixed or feature implemented

Batch of trivial backports

What was done?

See commits

How Has This Been Tested?

built locally; large combined merge passed tests locally

Breaking Changes

Should be none

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@PastaPastaPasta PastaPastaPasta added this to the 22 milestone Oct 24, 2024
MacroFake and others added 2 commits October 24, 2024 11:21
…ViewCache::AddCoin`

f8e2284 tracing: do not use `coin` after move in `CCoinsViewCache::AddCoin` (Seibart Nedor)

Pull request description:

  This is fix for bitcoin#25640.

ACKs for top commit:
  0xB10C:
    ACK f8e2284

Tree-SHA512: e7643ac8e6b6247aaf250f44572c4b458da4aea030ac0268227564e6857200e9c23efe325cfc535f46498cbeccaf46301551efeeb54b062f71d2dcf1ffe71fb8
fae5bd9 test: Fix wallet_balance intermittent issue (MacroFake)

Pull request description:

  Diff to reproduce:

  ```diff
  index d2ed97ca76..25cc2d5734 100755
  --- a/test/functional/wallet_balance.py
  +++ b/test/functional/wallet_balance.py
  @@ -265,7 +265,7 @@ class WalletTest(BitcoinTestFramework):
           self.nodes[0].invalidateblock(block_reorg)
           self.nodes[1].invalidateblock(block_reorg)
           assert_equal(self.nodes[0].getbalance(minconf=0), 0)  # wallet txs not in the mempool are untrusted
  -        self.generatetoaddress(self.nodes[0], 1, ADDRESS_WATCHONLY, sync_fun=self.no_op)
  +        self.generatetoaddress(self.nodes[0], 1, ADDRESS_WATCHONLY)
           assert_equal(self.nodes[0].getbalance(minconf=0), 0)  # wallet txs not in the mempool are untrusted

           # Now confirm tx_orig
  ```

  Example in CI:

  ```
   test  2022-08-24T10:09:22.486000Z TestFramework (ERROR): Assertion failed
                                     Traceback (most recent call last):
                                       File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-i686-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 133, in main
                                         self.run_test()
                                       File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-i686-pc-linux-gnu/test/functional/wallet_balance.py", line 269, in run_test
                                         assert_equal(self.nodes[0].getbalance(minconf=0), 0)  # wallet txs not in the mempool are untrusted
                                       File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-i686-pc-linux-gnu/test/functional/test_framework/util.py", line 56, in assert_equal
                                         raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
                                     AssertionError: not(98.85983340 == 0)
  ```

  https://cirrus-ci.com/task/4981266251513856?logs=ci#L3269

ACKs for top commit:
  achow101:
    ACK fae5bd9
  w0xlt:
    ACK bitcoin@fae5bd9

Tree-SHA512: 470f366720615c4a9326ec4c581fff569ecce9877f9134bb1975ec3d6f1d13a6403051418a91a80b2a86de617f43e539ec11bbf4f1713d0354d5b0ab98d22437
doc/build-osx.md Outdated Show resolved Hide resolved
MacroFake and others added 19 commits October 25, 2024 09:08
5c9a27a test: Use proper Boost macros instead of assertions (Hennadii Stepanov)

Pull request description:

  On the master branch:
  ```
  $ src/test/test_bitcoin -l test_suite -t banman_tests
  Running 1 test case...
  ...
  Test case banman_tests/file did not check any assertions
  ...
  ```

  This PR suggests to use proper Boost [macros](https://www.boost.org/doc/libs/1_80_0/libs/test/doc/html/boost_test/utf_reference/testing_tool_ref.html).

Top commit has no ACKs.

Tree-SHA512: e0c8e5e6371acd0e0a80070fffdf1445f264c62499f8d9811822994c89735a913c18c8ed730495578400abdd93d2d500345504f2a9246401d53fb2f9f71be8c5
…Assert()

fa3ea81 refactor: Add LIFETIMEBOUND / -Wdangling-gsl to Assert() (MacroFake)

Pull request description:

  Currently compiles clean, but I think it may still be useful.

  Can be tested by adding an `&`:

  ```diff
  diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
  index 5766fff92d..300c1ec60f 100644
  --- a/src/test/util_tests.cpp
  +++ b/src/test/util_tests.cpp
  @@ -125,7 +125,7 @@ BOOST_AUTO_TEST_CASE(util_check)

       // Check -Wdangling-gsl does not trigger when copying the int. (It would
       // trigger on "const int&")
  -    const int nine{*Assert(std::optional<int>{9})};
  +    const int& nine{*Assert(std::optional<int>{9})};
       BOOST_CHECK_EQUAL(9, nine);
   }

  ```

  Output:
  ```
  test/util_tests.cpp:128:29: warning: object backing the pointer will be destroyed at the end of the full-expression [-Wdangling-gsl]
      const int& nine{*Assert(std::optional<int>{9})};
                              ^~~~~~~~~~~~~~~~~~~~~
  ./util/check.h:75:50: note: expanded from macro 'Assert'
  #define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
                                                   ^~~
  1 warning generated.

ACKs for top commit:
  jonatack:
    ACK fa3ea81
  theuni:
    ACK fa3ea81

Tree-SHA512: 17dea4d75f2ee2bf6e1b6a6f6d8f439711c777df0390574e8d8edb6ac9ee807a135341e4439050bd6a15ecc4097a1ba9a7ab15d27541ebf70a4e081fa6871877
…ions

31d0067 doc: test: update/fix TestShell example instructions (Sebastian Falbesoner)

Pull request description:

  This PR tackles two issues in the TestShell documentation:
  - add missing instruction for creating a wallet prior to the `getnewaddress` call (needed as there is no default wallet created anymore since v0.21)
  - fix `generatetoaddress` call syntax (the scripted-diff in commit fa0b916 only worked for tests using `BitcoinTestFramework`)

ACKs for top commit:
  fanquake:
    ACK 31d0067 - current instructions don't work. These do.

Tree-SHA512: d2b7808a06892ad16728cb2b6d4a72b255ad711d27fe98b1de562f80444e7bb25d73296abdde4308162fe3be702864e2f7b7dbbbb000fe54c709951c09e6c730
…`$(package)_*_cmds`

affbf58 build: Move environment variables into `$(package)_config_env` (Hennadii Stepanov)
d44fcd3 build: Make $(package)_*_env available to all $(package)_*_cmds (Hennadii Stepanov)

Pull request description:

  On master (1e7564e) the depends build system, which is based on pure GNU Make, works, but it lacks robustness, and in some corner cases it fails. For example, see bitcoin#22552.

  Another [bug](bitcoin#22719) in the depends build system has already become a problem at least two times in the past (bitcoin#16883 (comment) and bitcoin#24134). Each time the problem was solved with other means.

  The initial [solution](bitcoin#19882) had some discussion. Also it was discussed on the IRC meeting in #bitcoin-core-builds channel. This PR, actually, is a resurrection of it, as the bug silently struck pretty [recently](bitcoin#24134).

  The bug is well described in bitcoin#22719.

  Here is another, a bit simpler description, which requires only basic shell (bash, dash etc) experience.
  After creating targets by this code:https://github.com/bitcoin/bitcoin/blob/1e7564eca8a688f39c75540877ec3bdfdde766b1/depends/funcs.mk#L280 a "draft" line of recipe like `$($(1)_config_env) $(call $(1)_config_cmds, $(1))` becomes a shell command sequence `VAR1=foo VAR2=bar command1 && command2` which is supposed to be executed in a [new sub-shell](https://www.gnu.org/software/make/manual/html_node/Execution.html#Execution).

  Please note that `VAR1=foo VAR2=bar` part is visible for the first `command1` only (for details see shell docs). Example:
  ```sh
  $ VAR1="foo" VAR2="bar" echo "begin" && printenv VAR1 && printenv VAR2 && echo "end"
  begin
  $ echo $?
  1
  ```

  Using the `export` command is a trivial solution:
  ```sh
  $ export VAR1="foo" VAR2="bar"; echo "begin" && printenv VAR1 && printenv VAR2 && echo "end"
  begin
  foo
  bar
  end
  $ echo $?
  0
  ```

  As a [new sub-shell](https://www.gnu.org/software/make/manual/html_node/Execution.html#Execution) is invoked for each line of the recipe, there are no side effects of using `export`. It means this solution should not be considered invasive.

  Fixes bitcoin#22719.

  ---

  Also this PR removes no longer needed crutch from `qt.mk`.

ACKs for top commit:
  fanquake:
    ACK affbf58

Tree-SHA512: 0ce2cf82870a7774bdf1592fac50857126ae47da902e349f1092d50109223be9d6a8efd5e92ec08c2ca775b17516482aabaf232378950ade36484a883acc177b
…r multiple test instances

c6119f4 tests: Use unique port for ZMQ tests (Andrew Chow)

Pull request description:

  The ZMQ interface tests should use unique ports as we do for the p2p and rpc ports so that multiple instances of the test can be run at the same time.

  Without this, the test may hang until killed, or fail.

ACKs for top commit:
  MarcoFalke:
    ACK c6119f4

Tree-SHA512: 2ca3ed2f35e5a83d7ab83740674fed362a8d146dc751156cfe100133a591347cd1ac9d164046f1744d65451a57c52cb22d3bb2161105f421f8f655c4a2512c59
…non-string parameters

6d0ab07 refactor: use convenience fn to auto parse non-string parameters (stickies-v)

Pull request description:

  Minimizes code duplication and improves function naming by having a single (overloaded) convenience function `ParseIfNonString` that both checks if the parameter is a non-string parameter and automatically parses the value if so.

ACKs for top commit:
  aureleoules:
    ACK 6d0ab07

Tree-SHA512: 8cbf68a17cfbdce1e31a19916f447a2965c139fdef00c19e32a9b679f4a4015dfe69ceea0bbe1723711e1c5033ea8d4005d1f4485dfbeea22226140f8cbe8aa3
…ite deps

376e01b doc: add databases/py-sqlite3 to FreeBSD test suite deps (fanquake)

Pull request description:

  Adds missing documentation. See also https://cirrus-ci.com/task/5639240319500288.

ACKs for top commit:
  john-moffett:
    ACK 376e01b

Tree-SHA512: a7b8d0bae00c3538934d23eae207b7927a64e748eb228ac6c5754aee0e9b6796c0f39066c7d81cc009bf442c8b1a0c31739adde87d1ebc3445aed54dda47c9ce
9ab62d7 [fuzz] Actually use mocked mempool in tx_pool target (dergoegge)

Pull request description:

  The current tx_pool target uses the default mempool, making the target non-deterministic. This PR replaces the active chainstate's mempool (i.e. the node's default mempool) with the already present mocked mempool in the target.

ACKs for top commit:
  fanquake:
    ACK 9ab62d7

Tree-SHA512: fe9af3dbdd13cb569fdc2ddbb4290b5ce94206ae83d94267c6365ed0ee9bbe072fcfe7fd632a1a8522dce44608e89aba2f398c1e20bd250484bbadb78143320c
…h subtargets

978852a build: Fix depends build system when working with subtargets (Hennadii Stepanov)

Pull request description:

  On master (f3e0ace), the depends build system does _not_ guarantee that dependencies packages are available for `$(package)_built` target because these dependencies being prepared in `$(host_prefix)` at `$(package)_configured` target can be wiped out during building other package.

  Please consider:
  ```
  $ cd depends
  $ make clean
  $ make fontconfig_configured
  $ make
  ...
    CC       fcdir.lo
  In file included from fcftint.h:26,
                   from fcdir.c:26:
  ../fontconfig/fcfreetype.h:27:10: fatal error: ft2build.h: No such file or directory
     27 | #include <ft2build.h>
        |          ^~~~~~~~~~~~
  compilation terminated.
  make[4]: *** [Makefile:642: fcdir.lo] Error 1
  make[4]: *** Waiting for unfinished jobs....
  make[4]: Leaving directory '/home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-pc-linux-gnu/fontconfig/2.12.6-7daa5620c94/src'
  make[3]: *** [Makefile:503: all] Error 2
  make[3]: Leaving directory '/home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-pc-linux-gnu/fontconfig/2.12.6-7daa5620c94/src'
  make[2]: *** [Makefile:581: all-recursive] Error 1
  make[2]: Leaving directory '/home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-pc-linux-gnu/fontconfig/2.12.6-7daa5620c94'
  make[1]: *** [Makefile:465: all] Error 2
  make[1]: Leaving directory '/home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-pc-linux-gnu/fontconfig/2.12.6-7daa5620c94'
  make: *** [funcs.mk:288: /home/hebasto/GitHub/bitcoin/depends/work/build/x86_64-pc-linux-gnu/fontconfig/2.12.6-7daa5620c94/./.stamp_built] Error 2
  ```

  The following commands:
  ```
  $ cd depends
  $ make clean
  $ make qt_configured
  $ make
  ```
  also fail.

  The similar issue was reported earlier: bitcoin#21381.

  This PR guarantees that dependencies packages are available for `$(package)_built` target.

  Guix builds:
  ```
  accef9ffccfe280fec1114c0440092ed5d792e9c53d95abc7fe65435aa136656  guix-build-978852aad8e2/output/aarch64-linux-gnu/SHA256SUMS.part
  a75f1250975525a21d2e213e23f1f0dab516d2b28d0c7d747de292fe5c906013  guix-build-978852aad8e2/output/aarch64-linux-gnu/bitcoin-978852aad8e2-aarch64-linux-gnu-debug.tar.gz
  d20787af2e7a14a3b7b1d21e0d8784aa6ebad1e916f02aebfa25afe9229ba43c  guix-build-978852aad8e2/output/aarch64-linux-gnu/bitcoin-978852aad8e2-aarch64-linux-gnu.tar.gz
  11c94a39c084763858c6de31b221868e52554f5500c0dc5589def429bb6b54c8  guix-build-978852aad8e2/output/arm-linux-gnueabihf/SHA256SUMS.part
  3935b0e14d78800977dc813a3824215797096b6fb29c84b5996f48338908a65f  guix-build-978852aad8e2/output/arm-linux-gnueabihf/bitcoin-978852aad8e2-arm-linux-gnueabihf-debug.tar.gz
  c828c3f87a453db443a385a266331661f623f8f4684d88eb006290c83bfa8150  guix-build-978852aad8e2/output/arm-linux-gnueabihf/bitcoin-978852aad8e2-arm-linux-gnueabihf.tar.gz
  b6ff14e1cc36e568fc726b50300f77498560322b3582738eb70e7144784f7e63  guix-build-978852aad8e2/output/arm64-apple-darwin/SHA256SUMS.part
  2a3e6ba5843eaf9562e9dcfdb4595024a71738079cea00e391558feca4d5bde1  guix-build-978852aad8e2/output/arm64-apple-darwin/bitcoin-978852aad8e2-arm64-apple-darwin-unsigned.dmg
  ffd2ad39e8b9f95dd714513ba1e1c77666b0f3cc4b67be4ab763ebd431fe9276  guix-build-978852aad8e2/output/arm64-apple-darwin/bitcoin-978852aad8e2-arm64-apple-darwin-unsigned.tar.gz
  5c9f8acd1777effc1e860b64143ba9d06ba5e3d0330e7341529eeae5cc6b3c5e  guix-build-978852aad8e2/output/arm64-apple-darwin/bitcoin-978852aad8e2-arm64-apple-darwin.tar.gz
  e34c693ecef6159c57fdedabff9dc3d69ec20387966083b828532c58e1e6e30b  guix-build-978852aad8e2/output/dist-archive/bitcoin-978852aad8e2.tar.gz
  8de4681114d96425bf9b0ccc47d49f696293ead514faa3fa83ddcccfdca2eeb2  guix-build-978852aad8e2/output/powerpc64-linux-gnu/SHA256SUMS.part
  d780330a105931eb4c66a536c332eb09e4b6d8c288832bb5a74b931c4600c0b3  guix-build-978852aad8e2/output/powerpc64-linux-gnu/bitcoin-978852aad8e2-powerpc64-linux-gnu-debug.tar.gz
  af036a6d714ef362a2facfe4e5c63deaa9dfa391d20542ead9ffb4a43b2b7ca2  guix-build-978852aad8e2/output/powerpc64-linux-gnu/bitcoin-978852aad8e2-powerpc64-linux-gnu.tar.gz
  dc6b4365632e7de386ead512b1cdcdd3c985623f63cff8b62974bd9ed8c05d5d  guix-build-978852aad8e2/output/powerpc64le-linux-gnu/SHA256SUMS.part
  5543a6dec58515186b71139a4a5c603d85638672f205e7c9fabb281c98018461  guix-build-978852aad8e2/output/powerpc64le-linux-gnu/bitcoin-978852aad8e2-powerpc64le-linux-gnu-debug.tar.gz
  dd791be2e61ce6cbd3e14c165ce2f8c2d22881992e0df72bd338423d092cc467  guix-build-978852aad8e2/output/powerpc64le-linux-gnu/bitcoin-978852aad8e2-powerpc64le-linux-gnu.tar.gz
  2b740db8e5b9c435be3e7b186c3b4a40885302243326ec990e24fe4ba4f777da  guix-build-978852aad8e2/output/riscv64-linux-gnu/SHA256SUMS.part
  de899c89874d4f34afeca179a6c7c8f49b0a975983ab2b31afd9f2d365674578  guix-build-978852aad8e2/output/riscv64-linux-gnu/bitcoin-978852aad8e2-riscv64-linux-gnu-debug.tar.gz
  9052b1db22c56692d99a61c3783b36c6f76537d9aec14f17d87a155beac82532  guix-build-978852aad8e2/output/riscv64-linux-gnu/bitcoin-978852aad8e2-riscv64-linux-gnu.tar.gz
  5e79ddf57a94c5978ad819896786107f735d5742bbd042c2c64ae2d0681ce53a  guix-build-978852aad8e2/output/x86_64-apple-darwin/SHA256SUMS.part
  96443ad839f87c723db1c0a96d8ead0afc69e9d96ad45b5814344866da2dae73  guix-build-978852aad8e2/output/x86_64-apple-darwin/bitcoin-978852aad8e2-x86_64-apple-darwin-unsigned.dmg
  14b0a3081772e81a463398a2702aca039d2f276e301dee9f5a0ccffbb09e2749  guix-build-978852aad8e2/output/x86_64-apple-darwin/bitcoin-978852aad8e2-x86_64-apple-darwin-unsigned.tar.gz
  6bfb8252524202028308267f5e96bc30f284052f5feaa58ed3697dde27a3130f  guix-build-978852aad8e2/output/x86_64-apple-darwin/bitcoin-978852aad8e2-x86_64-apple-darwin.tar.gz
  5f8ea6297e246b08ffd806913897cc863feeec6522fcfb4456a59c5f154e0c2d  guix-build-978852aad8e2/output/x86_64-linux-gnu/SHA256SUMS.part
  40d1bcf491660d54fe20b2db24828ebf61be848eefdc38fba09ed43f6bdba4b1  guix-build-978852aad8e2/output/x86_64-linux-gnu/bitcoin-978852aad8e2-x86_64-linux-gnu-debug.tar.gz
  3200e67a4dea115e8e341b4d71d84dc5e8bd2ae35e550cde6aef88d120c65eae  guix-build-978852aad8e2/output/x86_64-linux-gnu/bitcoin-978852aad8e2-x86_64-linux-gnu.tar.gz
  0b0bf7effc493ecc68398f23fc81647f64fdee115e8ccd7ae91e7881804ec328  guix-build-978852aad8e2/output/x86_64-w64-mingw32/SHA256SUMS.part
  e2064c9ddeb4af18468f37ba8cf70004062c31e1387b4cc0fe4b445fae518e8d  guix-build-978852aad8e2/output/x86_64-w64-mingw32/bitcoin-978852aad8e2-win64-debug.zip
  be347a901b896e0a1dc2f0f5a7f84614075805cccf1f2af8ec8df678d086fdbc  guix-build-978852aad8e2/output/x86_64-w64-mingw32/bitcoin-978852aad8e2-win64-setup-unsigned.exe
  bab8700e9e266970e8c7cad494902058ad12d1f2a6462e0039daa637b1a0ce0d  guix-build-978852aad8e2/output/x86_64-w64-mingw32/bitcoin-978852aad8e2-win64-unsigned.tar.gz
  c8e55e64b248fd7c9056fe811a1eba992bbb92e44857204e3024416d9ba6307d  guix-build-978852aad8e2/output/x86_64-w64-mingw32/bitcoin-978852aad8e2-win64.zip
  ```

ACKs for top commit:
  TheCharlatan:
    tACK 978852a

Tree-SHA512: c195484274433039e327d44b1949afa296e09e7470a2b138b7a8476c8bf9c1302bc21284cd5436f09aa97824aae9f362b7932ff2937b78f79df0b43e50f3dfaa
…alculations

87f11ef refactor: use `Hash` helper for double-SHA256 calculations (Sebastian Falbesoner)

Pull request description:

  We have two helper templates `Hash(const T& in1)` and `Hash(const T& in1, const T& in2)` available for calculating the double-SHA256 hash of one object or two concatenated objects, respectively:

  https://github.com/bitcoin/bitcoin/blob/b5868f4b1f884e8d6612f34ca4005fe3a992053d/src/hash.h#L74-L89

  This PR uses them in order to increase readability and simplify the code. As in bitcoin#15294 (which inspired this PR, doing the same for RIPEMD160), the helper is not utilized in validation.cpp and  script/interpreter.cpp to avoid touching consensus-relevant code.

ACKs for top commit:
  john-moffett:
    ACK 87f11ef
  stickies-v:
    ACK 87f11ef
  MarcoFalke:
    review ACK 87f11ef  😬

Tree-SHA512: 11d7e3d00c89685107784010fbffb33ccafb4d1b6a76c4dceb937b29bb234ef4d54581b16bd0737c8d2994a90cf4fe10a9738c7cc5b6d085c6a819f06176dab9
…coins_tests

fab9f7d test: Use std::unique_ptr over manual delete in coins_tests (MarcoFalke)

Pull request description:

  Makes the code smaller and easier to read

ACKs for top commit:
  stickies-v:
    ACK fab9f7d
  john-moffett:
    ACK fab9f7d

Tree-SHA512: 30d2d2097906e61fdef47a52fc6a0c5ce2417bc41c3c82dafc1b216c655f31dabf9c1c13759575a696f61bbdfdba3f442be032d5e5145b7a54fae2a927824621
… sorted

c497a19 Fix comment about how wallet txs are sorted (John Moffett)

Pull request description:

  The wallet transactions in the node are not sorted by txid (or any hash) since bitcoin#24699.

  This is how they're stored in memory now:

  https://github.com/bitcoin-core/gui/blob/835212cd1d8f8fc7f19775f5ff8cc21c099122b2/src/wallet/wallet.h#L397-L399

ACKs for top commit:
  achow101:
    ACK c497a19
  jarolrod:
    ACK c497a19

Tree-SHA512: e72559991688452ef254474d4235dc75fac655bce04909c3a0eece907360f4c6f57707db9b4373a4bd2271b23c57e863684c33e0728adf48e477c5499cdfdad7
82f895d Update nanobench to version v4.3.10 (Martin Leitner-Ankerl)

Pull request description:

  Nothing has changed that would affect Bitcoin's usage of nanobench.

   Here is a detailed list of the changes
  * Plenty of clang-tidy updates
  * documentation updates
  * faster Rng::shuffle
  * Enable perf counters on older kernels
  * Raise default minimum epoch time to 1ms (doesn't effect bitcoin's usage)
  * Add support for custom information per benchmark

ACKs for top commit:
  hebasto:
    ACK 82f895d, I've reviewed the code, all related changes from bitcoin#26642 have been implemented.

Tree-SHA512: 942518398809a2794617a347ab8182b784a8e822e84de5af078b2531eabb438412d687cac22a21936585e60e07138a89b41c28c9750744c05a3d1053f55cad01
…s deterministic

6ebe576 build: Make dependency package archive timestamps deterministic (Hennadii Stepanov)

Pull request description:

  This PR makes testing changes like bitcoin#20641, bitcoin#21593, bitcoin#22142, bitcoin#24279, bitcoin#24285 as easy as comparing hashes.

  With this PR:
  ```
  $ make -C depends clean
  $ make -C depends HOST=x86_64-w64-mingw32
  $ find depends/built/x86_64-w64-mingw32 -name '*.hash' | sort | xargs cat
  1f685a61cbf205f81977ecf88cba91fa1ccdfbe77ab4ec3405dcd33ceb778af4  bdb-4.8.30-ca950bd6d13.tar.gz
  08a9acde276e6e5e5c8913e3ad07eeecda184a996882ae226b3ed056c7ec1b01  boost-1.80.0-b537c466dcb.tar.gz
  144c6d92e4108fcc90740bee27007db58a88336a97be6367f9c8ba4cc208af27  libevent-2.1.12-stable-e13b2bdd8b8.tar.gz
  e3c9c9609bf32bfd460432c6ab99a64e9f8750ed775a193925ff4f5aed363e4c  libnatpmp-07004b97cf691774efebe70404cf22201e4d330d-82255b84667.tar.gz
  62c6a089a4b24a413eccd2f389bf4c8b0716423b0ace5e87e984069635da9f83  miniupnpc-2.2.2-c43fc4cf2f6.tar.gz
  78762700066273e597698a78479a506b33532ea565d18ef561614b9fc3820cf5  qrencode-3.4.4-663de0dc628.tar.gz
  5e2183faf91838510a48e6dbb4b65ae74a7d48ba1abc070b82767c4076582360  qt-5.15.5-986926343e2.tar.gz
  9f8459f8d27fc3af9146712be6ba6577f15741429936504a950cc51c17da1ba8  sqlite-3380500-bec6a4d3299.tar.gz
  0eca5d01d427de50be4bd57c8bb100ab69b017792c32b8733e2b20443f4c9c28  zeromq-4.3.4-8ae81bab6f4.tar.gz
  ```

  As an example, here is an evidence that bitcoin#24279 is a strict refactoring change:
  ```
  $ git fetch origin pull/24279/head
  $ git cherry-pick 7060268
  $ git cherry-pick 3f90dde
  $ make -C depends clean
  $ make -C depends HOST=x86_64-w64-mingw32
  $ find depends/built/x86_64-w64-mingw32 -name '*.hash' | sort | xargs cat
  1f685a61cbf205f81977ecf88cba91fa1ccdfbe77ab4ec3405dcd33ceb778af4  bdb-4.8.30-c7faf31d5ca.tar.gz
  08a9acde276e6e5e5c8913e3ad07eeecda184a996882ae226b3ed056c7ec1b01  boost-1.80.0-1af3dd1d99e.tar.gz
  144c6d92e4108fcc90740bee27007db58a88336a97be6367f9c8ba4cc208af27  libevent-2.1.12-stable-6228a9f8534.tar.gz
  e3c9c9609bf32bfd460432c6ab99a64e9f8750ed775a193925ff4f5aed363e4c  libnatpmp-07004b97cf691774efebe70404cf22201e4d330d-41aa6194ecc.tar.gz
  62c6a089a4b24a413eccd2f389bf4c8b0716423b0ace5e87e984069635da9f83  miniupnpc-2.2.2-6a93027769c.tar.gz
  78762700066273e597698a78479a506b33532ea565d18ef561614b9fc3820cf5  qrencode-3.4.4-d40cb2d45c9.tar.gz
  5e2183faf91838510a48e6dbb4b65ae74a7d48ba1abc070b82767c4076582360  qt-5.15.5-120c3cb745d.tar.gz
  9f8459f8d27fc3af9146712be6ba6577f15741429936504a950cc51c17da1ba8  sqlite-3380500-bbd4d813c69.tar.gz
  0eca5d01d427de50be4bd57c8bb100ab69b017792c32b8733e2b20443f4c9c28  zeromq-4.3.4-df0858a19d2.tar.gz
  ```

ACKs for top commit:
  TheCharlatan:
    Code review ACK 6ebe576

Tree-SHA512: 20e0222781f5dcb50126c11677d0671bcdd7be144b2e528c75a02983acc494206552fb35039697ccd094de27a21b3fb439e9965c34feb8a6d74627fa20a9a5e7
… (macOS)

b49e19c doc: use arch agnostic clang path in fuzzing doc (macOS) (fanquake)

Pull request description:

  The current path will only work for clang installed via brew on x86_64 macOS.

ACKs for top commit:
  hebasto:
    ACK b49e19c, similar to 7028365.

Tree-SHA512: 8ae4845e1953d5a7178f2b422e2241af1057d8cce1ab79da65df0cd068456dbf85da3489355f81fc4ee09ba602a4b53e989e2dc02476b4abf6c5b3bc3e96473b
…reuse=none workaround

fa83005 doc: Document affected gcc versions for -fstack-reuse=none workaround (MarcoFalke)

Pull request description:

  gcc version(s) 11 and prior won't be fixed, looking at the activity in the bug report. So it seems best to just document gcc 12.1+ as fixed, so that in the future the workaround can be removed once the minimum compiler is gcc12.1.

ACKs for top commit:
  fanquake:
    ACK fa83005
  hebasto:
    re-ACK fa83005

Tree-SHA512: a19723457eb1925196828a5fafd4e7f75a04f86ffae63cb86679d732c662fd1a22e17fe3c69195a97438ff189ba3ff681be3650cf99aa195d7a3e89cd8ee137c
ab4efad test: fix immediate tx relay in wallet_groups.py (Sebastian Falbesoner)

Pull request description:

  In the functional test wallet_groups.py we whitelist peers on all nodes (`[email protected]`) to enable immediate tx relay for fast mempool synchronization. However, considering that this setting only applies to inbound peers and the default test topology looks like this:
  ```
      node0 <--- node1 <---- node2 <--- ... <-- nodeN
  ```

  txs propagate fast only from lower- to higher-numbered nodes (i.e. "left to right" in the above diagram) and take long from higher- to lower-numbered nodes ("right to left") since in the latter direction we only have outbound peers, where the trickle relay is still active. As a consequence, if a tx is submitted from any node other than node0, the mempool synchronization can take quite long.

  This PR fixes this by simply adding another connection from node0 to the last node, leading to a ~2-3x speedup (5 runs measured via `time ./test/functional/wallet_groups.py` are shown):

  ```
  master:
      0m53.31s real     0m08.22s user     0m05.60s system
      0m32.85s real     0m07.44s user     0m04.08s system
      0m46.40s real     0m09.18s user     0m04.23s system
      0m46.96s real     0m11.10s user     0m05.74s system
      0m57.23s real     0m10.53s user     0m05.59s system

  PR:
      0m19.64s real     0m09.58s user     0m05.50s system
      0m18.05s real     0m07.77s user     0m04.03s system
      0m18.99s real     0m07.90s user     0m04.25s system
      0m17.49s real     0m07.56s user     0m03.92s system
      0m18.11s real     0m07.74s user     0m03.88s system
  ```
  Note that in most tests this is not a problem since txs very often originate from node0.

ACKs for top commit:
  brunoerg:
    utACK ab4efad

Tree-SHA512: 12675357e6eb5a18383f2bfe719a184c0790863b37a98749d8e757dd5dc3a36212e16a81f0a192340c11b793eda00db359c7011f46f7c27e3a093af4f5b62147
…n all versions of GCC

fabb419 doc: Clarify that -fstack-reuse=all bugs exist on all versions of GCC (MarcoFalke)

Pull request description:

  This is a follow-up to commit 7b850bc. While the test case no longer reproduces, the general class of `-fstack-reuse` bugs still exists in all versions of GCC. The workaround can never be removed, unless the whole class of bugs is fixed.

ACKs for top commit:
  fanquake:
    ACK fabb419

Tree-SHA512: 566e14fe82d13dda4f7b8cca90c6de75006d14828906b936780716d5b5b31de9b36a904aa7cfc9820ccdfb4d3224a8437f502f25f7230da5abe87c927123f0c8
fe434a4 bench: Update nanobench to 4.3.11 (TheCharlatan)

Pull request description:

  The newest version fixes the false positive `* Turbo is enabled, CPU frequency will fluctuate` warning on AMD CPUs. The file was directly taken from the release page: https://github.com/martinus/nanobench/releases/tag/v4.3.11.

  Other changes from the release notes:

  * Check for failures in parseFile(), perf events tweaks by tommi-cujo in martinus/nanobench#84
  * Workaround missing noexcept for std::string move assignment by tommi-cujo in martinus/nanobench#87
  * removed the link by martinus in martinus/nanobench#89
  * Lots of minor cleanups by martinus in martinus/nanobench#85
  * Add linter for version & clang-format. Updated version by martinus in martinus/nanobench#90

ACKs for top commit:
  fanquake:
    ACK fe434a4 - have not tested.

Tree-SHA512: a8f15e1db1d993673e4b295a3bab22e67ee3c9f3c0bcbef28974fe9ff37dbb741967a526088d5b148c8d25c9d57cd3b844238100c17b23038638787461805678
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 168e5e4

Copy link
Collaborator

@knst knst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall LGTM but see interfase_zmq{,_dash}.py

@@ -177,7 +179,7 @@ def test_basic(self):
self.restart_node(0, ["-zmqpubrawtx=foo", "-zmqpubhashtx=bar"])
self.zmq_context = zmq.Context()

address = 'tcp://127.0.0.1:28332'
address = f"tcp://127.0.0.1:{self.zmq_port_base}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

26805: we should apply same changes to interface_zmq_dash.py

class DashZMQTest (DashTestFramework):
    def set_test_params(self):
        # That's where the zmq publisher will listen for subscriber
        self.address = "tcp://127.0.0.1:28331"

Otherwise backport 26805 is not done

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to do it in another PR I think. I'm gonna merge this one

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change title to partial?

@kwvg kwvg self-requested a review October 25, 2024 14:38
@PastaPastaPasta PastaPastaPasta merged commit e43d75b into dashpay:develop Oct 25, 2024
25 of 32 checks passed
@PastaPastaPasta PastaPastaPasta deleted the develop-trivial-2024-10-23-pr9 branch October 25, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants