Commit Graph

24903 Commits

Author SHA1 Message Date
PastaPastaPasta
9d464558eb
Merge pull request #5818 from knst/bp-v21-p10
backport: bitcoin#20211, #20380, #20884, #20941, #20944, #21028, #21064, #21110, #21117, bitcon-core/gui#204
2024-01-16 09:30:40 -06:00
MarcoFalke
ff9bb6792b
Merge bitcoin-core/gui#204: Drop buggy TableViewLastColumnResizingFixer class
3913d1e8c1f604bdd622d5e81e5077ef52b30466 qt: Drop buggy TableViewLastColumnResizingFixer class (Hennadii Stepanov)

Pull request description:

  In Qt 5 the last column resizing with dragging its left edge works out-of-the-box.

  The current `TableViewLastColumnResizingFixer` implementation could put the last column content out of the view port and confuse a user:
  ![Screenshot from 2021-01-31 18-04-32](https://user-images.githubusercontent.com/32963518/106390022-fd6bd180-63ee-11eb-9216-6e5117f8dc96.png)

  Historical context:
  - https://github.com/bitcoin/bitcoin/pull/2862
  - https://github.com/bitcoin/bitcoin/pull/3626
  - https://github.com/bitcoin/bitcoin/pull/3738
  - https://github.com/bitcoin/bitcoin/pull/3920

  #205 is a nice addition.

ACKs for top commit:
  jarolrod:
    ACK 3913d1e8c1f604bdd622d5e81e5077ef52b30466, tested on macOS 11.1 Qt 5.15.2
  Talkless:
    tACK 3913d1e8c1f604bdd622d5e81e5077ef52b30466, tested on Debian Sid. Can confirm that behavior in previous commit does not produce scroll bar, last column gets "hidden". This PR makes clear that there's more to see in the view.
  promag:
    Tested ACK 3913d1e8c1f604bdd622d5e81e5077ef52b30466 on macos.

Tree-SHA512: 12582dfce54bb1db3d9934ae092e305d32e9760cc99b0265322e161fa7f54b7d6fb6cefedf700783f767d5c3a56a8545c8d2f5ade66596c4e67b8a5287063e8a
2024-01-16 09:29:53 -06:00
Wladimir J. van der Laan
07975065fa
Merge #21110: util: remove Boost posix_time usage from GetTime*
9266f7497f256d780178829e0f3a29ddaeb794ba util: Use std::chrono for time getters (MarcoFalke)
3c2e16be22ae04bf56663ee5ec1554d0d569741b time: add runtime sanity check (Cory Fields)

Pull request description:

  I have a followup that should remove the last of our `boost:posix_time` usage in `ParseISO8601DateTime`, but that will likely need more cross-platform testing/discussion, so have just split them up as this change is straight forward.

ACKs for top commit:
  practicalswift:
    Tested ACK 9266f7497f256d780178829e0f3a29ddaeb794ba
  laanwj:
    Code review ACK 9266f7497f256d780178829e0f3a29ddaeb794ba

Tree-SHA512: 5471a60e65e9fa8ef48320743ef637f1d162724e717e0f5509118e1e5732fc0844656a9c09d3d1300eb657dcc7a1e1e67305d8c9ef959c63be67393607dd4ceb
2024-01-16 09:29:53 -06:00
Wladimir J. van der Laan
baed3cddfc
Merge #21028: doc/bips: Add BIPs 43, 44, 49, and 84
c943326d3c06e481c142b112c7e7a0c6ff5a76b3 doc/bips: Add BIPs 43, 44, 49, and 84 (Luke Dashjr)

Pull request description:

  If you don't like what they say, please suggest alternatives ;)

ACKs for top commit:
  prusnak:
    ACK c943326

Tree-SHA512: 7db93f8491289657ec45df30e557eb8572b35201eb29aed1b11bf3949924fce56b4e2d71e1f0acf5d24a01278c0dec99790d632f04c15117010c4ac564368d6b
2024-01-16 09:29:52 -06:00
Wladimir J. van der Laan
0e8a4d54a4
Merge #21064: refactor: use std::shared_mutex & remove Boost Thread
060a2a64d40d75fecb60b7d2b9946a67e46aa6fc ci: remove boost thread installation (fanquake)
06e1d7d81d5a56d136c6fc88f09a2b0654a164f9 build: don't build or use Boost Thread (fanquake)
7097add83c8596f81be9edd66971ffd2486357eb refactor: replace Boost shared_mutex with std shared_mutex in sigcache (fanquake)
8e55981ef834490c438436719f95cbaf888c4914 refactor: replace Boost shared_mutex with std shared_mutex in cuckoocache tests (fanquake)

Pull request description:

  This replaces `boost::shared_mutex` and `boost::unique_lock` with [`std::shared_mutex`](https://en.cppreference.com/w/cpp/thread/shared_mutex) & [`std::unique_lock`](https://en.cppreference.com/w/cpp/thread/unique_lock).

  Even though [some concerns were raised](https://github.com/bitcoin/bitcoin/issues/16684#issuecomment-726214696) in #16684 with regard to `std::shared_mutex` being unsafe to use across some glibc versions, I still think this change is an improvement. As I mentioned in #21022, I also think trying to restrict standard library feature usage based on bugs in glibc is not only hard to do, but it's not currently clear exactly how we do that in practice (does it also extend to patching out use in our dependencies, should we be implementing more runtime checks for features we are using, when do we consider an affected glibc "old enough" not to worry about? etc). If you take a look through the [glibc bug tracker](https://sourceware.org/bugzilla/describecomponents.cgi?product=glibc) you'll no doubt find plenty of (active) bug reports for standard library code we already using. Obviously not to say we shouldn't try and avoid buggy code where possible.

  Two other points:

  [Cory mentioned in #21022](https://github.com/bitcoin/bitcoin/pull/21022#issuecomment-769274179):
  > It also seems reasonable to me to worry that boost hits the same underlying glibc bug, and we've just not happened to trigger the right conditions yet.

  Moving away from Boost to the standard library also removes the potential for differences related to Boosts configuration. Boost has multiple versions of `shared_mutex`, and what you end up using, and what it's backed by depends on:
  * The version of Boost.
  * The platform you're building for.
  * Which version of `BOOST_THREAD_VERSION` is defined: (2,3,4 or 5) default=2. (see [here](https://www.boost.org/doc/libs/1_70_0/doc/html/thread/build.html#thread.build.configuration) for some of the differences).
  * Is `BOOST_THREAD_V2_SHARED_MUTEX` defined? (not by default). If so, you might get the ["less performant, but more robust"](https://github.com/boostorg/thread/issues/230#issuecomment-475937761) version of `shared_mutex`.

  A lot of these factors are eliminated by our use of depends, but users will have varying configurations. It's also not inconceivable to think that a distro, or some package manager might start defining something like `BOOST_THREAD_VERSION=3`. Boost tried to change the default from 2 to 3 at one point.

  With this change, we no longer use Boost Thread, so this PR also removes it from depends, the build system, CI etc.

  Previous similar PRs were #19183 & #20922. The authors are included in the commits here.
  Also related to #21022 - pthread sanity checking.

ACKs for top commit:
  laanwj:
    Code review ACK 060a2a64d40d75fecb60b7d2b9946a67e46aa6fc
  vasild:
    ACK 060a2a64d40d75fecb60b7d2b9946a67e46aa6fc

Tree-SHA512: 572d14d8c9de20bc434511f20d3f431836393ff915b2fe9de5a47a02dca76805ad5c3fc4cceecb4cd43f3ba939a0508178c4e60e62abdbaaa6b3e8db20b75b03
2024-01-16 09:29:52 -06:00
MarcoFalke
163a3567a1
Merge #20380: doc: Add instructions on how to fuzz the P2P layer using Honggfuzz NetDriver
fd0be92cff6a4b5e343e6ddae7481868354b9869 doc: Add instructions on how to fuzz the P2P layer using Honggfuzz NetDriver (practicalswift)

Pull request description:

  Add instructions on how to fuzz the P2P layer using [Honggfuzz NetDriver](http://blog.swiecki.net/2018/01/fuzzing-tcp-servers.html).

  Honggfuzz NetDriver allows for very easy fuzzing of TCP servers such as Bitcoin Core without having to write any custom fuzzing harness. The `bitcoind` server process is largely fuzzed without modification.

  This makes the fuzzing highly realistic: a bug reachable by the fuzzer is likely also remotely triggerable by an untrusted peer.

Top commit has no ACKs.

Tree-SHA512: 9e98cb30f00664c00c8ff9fd224ff9822bff3fd849652172df48dbaeade1dd1a5fc67ae53203f1966a1d4210671b35656009a2d8b84affccf3ddf1fd86124f6e
2024-01-16 09:29:51 -06:00
MarcoFalke
66745821b4
Merge #20211: Use -Wswitch for TxoutType where possible
fa650ca7f19307a9237e64ac311488c8947fc12a Use -Wswitch for TxoutType where possible (MarcoFalke)
fa59e0b5bd2aed8380cc9b9e52791f662aecd6a6 test: Add missing script_standard_Solver_success cases (MarcoFalke)

Pull request description:

  This removes unused `default:` cases for all `switch` statements on `TxoutType` and adds the cases (`MULTISIG`, `NULL_DATA`, `NONSTANDARD`) to `ExtractDestination` for clarity.

  Also, the compiler is now able to use `-Wswitch`.

ACKs for top commit:
  practicalswift:
    cr ACK fa650ca7f19307a9237e64ac311488c8947fc12a: patch looks correct and `assert(false);` is better than UB :)
  hebasto:
    ACK fa650ca7f19307a9237e64ac311488c8947fc12a, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 282458b6523bd8923a0c0f5c423d1db2dce2a2d1b1d1dae455415c6fc995bb41ce82c1f9b0a1c0dcc6d874d171e04c30eca585f147582f52c7048c140358630a
2024-01-16 09:29:50 -06:00
MarcoFalke
5d42d044df
Merge #21117: test: remove assert_blockchain_height
fa0a4d6c605b8ed47796f68068d6273bef7fcaef test: remove assert_blockchain_height (MarcoFalke)

Pull request description:

  This simplifies the code and solves intermittent timeouts caused by commit 0d39b5848a7a341cd2b958336861cdd4098e2616.

  E.g. https://cirrus-ci.com/task/5196092369272832?command=ci#L3126

  ```
   test  2021-02-08T12:27:56.275000Z TestFramework (ERROR): Assertion failed
                                     Traceback (most recent call last):
                                       File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 127, in main
                                         self.run_test()
                                       File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/feature_assumevalid.py", line 180, in run_test
                                         self.assert_blockchain_height(self.nodes[0], 101)
                                       File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/feature_assumevalid.py", line 92, in assert_blockchain_height
                                         assert False, "blockchain too short after timeout: %d" % current_height
                                     AssertionError: blockchain too short after timeout: 101

ACKs for top commit:
  glozow:
    ACK fa0a4d6c60

Tree-SHA512: 3859b0c1581c21f03c775f119204cc3a219e5d86346883634886f6da46feaf254b9c6c49c1ec4581ffe409cdf05f6e91ec38c3976c3daf4a9e67f96ddc1e0dce
2024-01-16 09:29:49 -06:00
MarcoFalke
63885189ae
Merge #20944: rpc: Return total fee in getmempoolinfo
fa362064e383163a2585ffbc71ac1ea3bcc92663 rpc: Return total fee in mempool (MarcoFalke)

Pull request description:

  This avoids having to loop over the whole mempool to query each entry's fee

ACKs for top commit:
  achow101:
    ACK fa362064e383163a2585ffbc71ac1ea3bcc92663
  glozow:
    ACK fa362064e3 🧸
  jnewbery:
    ACK fa362064e383163a2585ffbc71ac1ea3bcc92663

Tree-SHA512: e2fa1664df39c9e187f9229fc35764ccf436f6f75889c5a206d34fff473fc21efbf2bb143f4ca7895c27659218c22884d0ec4195e7a536a5a96973fc9dd82d08
2024-01-16 09:29:49 -06:00
MarcoFalke
03d743466b
Merge #20941: rpc: document RPC_TRANSACTION_ALREADY_IN_CHAIN exception
74d23bf7fbb6169ec658c36af57cd1f937823d9c rpc: document RPC_TRANSACTION_ALREADY_IN_CHAIN exception (Jarol Rodriguez)

Pull request description:

  It is not documented in the `RPCHelpMan` of `sendrawtransaction` that if you attempt to send a transaction which already exists in a block, an `RPC_TRANSACTION_ALREADY_IN_CHAIN` exception will be raised. It is best to make developers aware of this so that it can be properly caught and avoid any headaches.

  Closes #5638

ACKs for top commit:
  jonatack:
    ACK 74d23bf7fbb6169ec658c36af57cd1f937823d9c

Tree-SHA512: d1d5fc242574377c8a76b4ef7b12239996424d8bee186533b5a8fe337bbeb3186e51dbdd28c5eafb982601e44e17b68a7f52db5dd7bc647429f6f95e2de289f6
2024-01-16 09:29:49 -06:00
Wladimir J. van der Laan
bf702f7c78
Merge #20884: script: Improve robustness of bitcoind.service on startup
9d026546778629472574b26fa73338efc63d02da doc: Fix systemd spelling and link to doc/init.md (Hennadii Stepanov)
601778c3107adbd8d96eb0bb5c16a9d0a4b81594 script: Add Documentation key to bitcoind.service (Hennadii Stepanov)
d9392b724cae53b7a16fa5f84ebe152eea496502 script: Improve robustness of bitcoind.service on startup (Hennadii Stepanov)

Pull request description:

  If network interfaces are not properly up the following happens:
  ```
  ...
  2021-01-08T10:17:11Z scheduler thread start
  2021-01-08T10:17:11Z libevent: getaddrinfo: address family for nodename not supported
  2021-01-08T10:17:11Z Binding RPC on address 127.0.0.1 port 8332 failed.
  2021-01-08T10:17:11Z HTTP: creating work queue of depth 16
  2021-01-08T10:17:11Z Using random cookie authentication.
  2021-01-08T10:17:11Z Generated RPC authentication cookie /var/lib/bitcoind/.cookie
  2021-01-08T10:17:11Z HTTP: starting 2 worker threads
  2021-01-08T10:17:11Z init message: Loading banlist...
  2021-01-08T10:17:11Z SetNetworkActive: true
  2021-01-08T10:17:11Z Error: Cannot resolve -externalip address: <EDITED>
  2021-01-08T10:17:11Z Shutdown: In progress...
  2021-01-08T10:17:11Z scheduler thread exit
  2021-01-08T10:17:11Z Shutdown: done
  ```

  This PR improves robustness on startup in such cases in documented way:
  https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

  Also minor doc improvements are added.

ACKs for top commit:
  Sjors:
    ACK 9d02654
  practicalswift:
    ACK 9d026546778629472574b26fa73338efc63d02da: patch looks correct
  darosior:
    ACK 9d026546778629472574b26fa73338efc63d02da -- been using the first patch too

Tree-SHA512: 38294f5682c09e6ea9008de7d7459098c920cf1b98ad8ef8a5d2ca01f2f781c0fec5591dc40ef36eeb19d94991b0c7fb7cb38c4e716bc7219875c9bcd0a55e1b
2024-01-16 09:29:46 -06:00
PastaPastaPasta
787d61ad4f
Merge pull request #5817 from knst/bp-v21-p9
backport: bitcoin#20346, #20495, #20577, #20787, #20890, bitcoin-core/gui#109, gui#116, gui#138, gui#148
2024-01-16 07:57:59 -06:00
MarcoFalke
996614383c
Merge bitcoin-core/gui#148: Bugfix: GUI: Restore SendConfirmationDialog button default to "Yes"
8775691383ff394b998232ac8e63fac3a214d18b Bugfix: GUI: Restore SendConfirmationDialog button default to "Yes" (Luke Dashjr)

Pull request description:

  The SendConfirmationDialog is used for bumping the fee, where "Send" doesn't really make sense

  Originally https://github.com/bitcoin/bitcoin/pull/17463, but rewritten here much simpler based on other merged changes.

ACKs for top commit:
  hebasto:
    ACK 8775691383ff394b998232ac8e63fac3a214d18b, tested on Linux Mint 20.1 (x86_64, Qt 5.12.8):

Tree-SHA512: 3953cc9c09613c9a629def8b4dc061b537f148ddcb378430645602e0be0f3a9f1cff083aa685b94b2e9372300d02ec97e0d9ea89db6e3c6feec86795090f0f77
2024-01-16 07:57:35 -06:00
fanquake
ba2ec3dcdc
Merge #20495: sync: Use decltype(auto) return type for WITH_LOCK
3eb94ec81b72b14f72a1f6ce5c9aa24476df755a sync: Use decltype(auto) return type for WITH_LOCK (Carl Dong)

Pull request description:

  > Now that we're using C++17, we can use the decltype(auto) return type
  > for functions and lambda expressions.
  >
  > As demonstrated in this commit, this can simplify cases where previously
  > the compiler failed to deduce the correct return type.
  >
  > Just for reference, for the "assign to ref" cases fixed here, there are
  > 3 possible solutions:
  >
  > - Return a pointer and immediately deref as used before this commit
  > - Make sure the function/lambda returns declspec(auto) as used after
  >   this commit
  > - Class& i = WITH_LOCK(..., return std::ref(...));
  >
  > -----
  >
  > References:
  > 1. https://en.cppreference.com/w/cpp/language/function#Return_type_deduction
  > 2. https://en.cppreference.com/w/cpp/language/template_argument_deduction#Other_contexts
  > 3. https://en.cppreference.com/w/cpp/language/auto
  > 4. https://en.cppreference.com/w/cpp/language/decltype
  >
  > Explanations:
  > 1. https://stackoverflow.com/a/21369192
  > 2. https://stackoverflow.com/a/21369170

  Thanks to sipa and ryanofsky for helping me understand this

ACKs for top commit:
  jnewbery:
    utACK 3eb94ec81b72b14f72a1f6ce5c9aa24476df755a
  hebasto:
    ACK 3eb94ec81b72b14f72a1f6ce5c9aa24476df755a, I have reviewed the code and it looks OK, I agree it can be merged. I have verified possible warnings:
  ryanofsky:
    Code review ACK 3eb94ec81b72b14f72a1f6ce5c9aa24476df755a

Tree-SHA512: 5f55c7722aeca8ea70e5c1a8db93e93ba0e356e8967e7f607ada38003df4b153d73c29bd2cea8d7ec1344720d37d857ea7dbfd2a88da1d92e0e9cbb9abd287df
2024-01-16 07:57:35 -06:00
fanquake
d6fdca6207
Merge #20787: Use C++17 std::array deduction for OUTPUT_TYPES, ALL_FEE_ESTIMATE_HORIZONS
aaaa9878405f3f38f4f61c00feca110d7f9ca481 refactor: Use C++17 std::array deduction for ALL_FEE_ESTIMATE_HORIZONS (MarcoFalke)
fa39cdd072c91eac70cda04b8b26681611f94cb7 refactor: Use C++17 std::array deduction for OUTPUT_TYPES (MarcoFalke)

Pull request description:

  With the new C++17 array deduction rules, an array encompassing all values in an enum can be specified in the same header file that specifies the enum. This is useful to avoid having to repeatedly enumerate all enum values in the code. E.g. the RPC code, but also the fuzz code.

ACKs for top commit:
  theStack:
    cr ACK aaaa9878405f3f38f4f61c00feca110d7f9ca481 ⚙️
  fanquake:
    ACK aaaa9878405f3f38f4f61c00feca110d7f9ca481

Tree-SHA512: b71bd98f3ca07ddfec385735538ce89a4952e418b52dc990fb160187ccef1fc7ebc139d42988b6f7b48df24823af61f803b83d47fb7a3b82475f0c0b109bffb7
2024-01-16 07:57:34 -06:00
fanquake
8a44cb5eb4
Merge #20890: doc: Add explicit macdeployqtplus dependencies install step
3e61b8c800180d350621cedda7ec46a48047ff04 doc: Add explicit macdeployqtplus dependencies install step (Hennadii Stepanov)

Pull request description:

  This PR adds to macOS docs an explicit step to install `macdeployqtplus` script dependencies that are not part of the [Python Standard Library](https://docs.python.org/3/library/index.html):
  - https://pypi.org/project/ds-store/
  - https://pypi.org/project/mac-alias/

  This change is required on macOS 11 Big Sur:

  -  #20371
  - #20878

  Close #20878.

ACKs for top commit:
  fanquake:
    ACK 3e61b8c800180d350621cedda7ec46a48047ff04

Tree-SHA512: d177139ee142d47cb27ad878d721cafcd03403ef861965ff532d712da461416380ec5878f70accf223a552a1f1e65eedb1e0ad72cb7a96791f8a55536ce28645
2024-01-16 07:57:34 -06:00
fanquake
1904ed51d1
Merge #20577: doc: libconsensus: add missing error code description, fix NBitcoin link
cb0b7125c14bf97394bd8b43bf2abfb943bb1cf9 doc: libbitcoinconsensus: add missing error code description, fix NBitcoin link (Sebastian Falbesoner)

Pull request description:

  This PR improves the libbitcoinconsensus description in `shared-libraries.md` in two ways:
  * adds the missing error code description for `bitcoinconsensus_ERR_INVALID_FLAGS` (introduced by commit 5ca8ef299a, PR #8976)
  * updates and fixes the link to the NBitcoin implementation (introduced by commit 3361edd010, PR #6430)
      * the owner of the `NBitcoin` github repository changed from `NicolasDorier` to `MetacoSA` (redirection still worked though)
      * instead of dynamically referring to a file in master with a fixed line number (which is obviously always quickly outdated), use a permalink with a file numbers area

ACKs for top commit:
  MarcoFalke:
    cr ACK cb0b7125c14bf97394bd8b43bf2abfb943bb1cf9
  harding:
    Code (documentation) review ACK cb0b7125c14bf97394bd8b43bf2abfb943bb1cf9.  Text is clear and seems accurate, and the link checks out.

Tree-SHA512: 9840458db6fb40e71c9852104aefcec5abbaf5054c6123701181dd477cea8c81d3647f376b67692159adf577c9b6305b05b784728bf9f14a753fab5898075a4e
2024-01-16 07:57:33 -06:00
MarcoFalke
5761c00501
Merge bitcoin-core/gui#138: unlock encrypted wallet "OK" button bugfix
8008ef770f3d0b14d03e22371314500373732143 qt: unlock wallet "OK" button bugfix (Michael Dietz)

Pull request description:

  When trying to send a transaction from an encrypted wallet, the ask
  passphrase dialog would not allow the user to click the "OK" button
  and proceed. Therefore it was impossible to send a transaction
  through the gui. It was not enabling the "OK" button after the
  passphrase was entered by the user, because it was using the same
  form validation logic as the "Change passphrase" flow.

  I reported this in a comment in https://github.com/bitcoin-core/gui/issues/136. But then I realized this seems to be a flat out bug.

ACKs for top commit:
  MarcoFalke:
    review ACK 8008ef770f3d0b14d03e22371314500373732143
  hebasto:
    ACK 8008ef770f3d0b14d03e22371314500373732143, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: cc09b34c7f3aea09729e1c7ccccff05dc11fec56fee2ad369f2d862979572b1edd8b7e738ffe6e91d35d071b819b0c3e0f5d48bf5e27427a80af4a28893f8aaf
2024-01-16 07:57:33 -06:00
MarcoFalke
0cc5f0f3a7
Merge bitcoin-core/gui#109: wallet: Remove unused AskPassphraseDialog::Decrypt
4146a31ccbb012ff552f303113979b48c086532b qt, wallet: Drop unused parameter in WalletModel::setWalletEncrypted (Hennadii Stepanov)
f886a20b02094d657ddb3d792d561d50f2107f07 qt, wallet: Drop unused parameter in Wallet{Frame|View}::encryptWallet (Hennadii Stepanov)
6e950118a31fd6a85026d934fc6adb6255e47e23 qt, wallet: Remove unused AskPassphraseDialog::Decrypt (Hennadii Stepanov)

Pull request description:

  Grabbed from #42 with an additional commit.

  Fix #1.

ACKs for top commit:
  MarcoFalke:
    ACK 4146a31ccbb012ff552f303113979b48c086532b
  promag:
    Code review ACK 4146a31ccbb012ff552f303113979b48c086532b.

Tree-SHA512: 6070d8995525af826ad972cf1b8988ff98af0528eef285a07ec7ba0e2e92a7a6173a19dc371de94d4b437fa10f7921166e45a081de6ed2f4306e6502aafc94ee
2024-01-16 07:57:33 -06:00
fanquake
55d78e8b07
Merge #20346: script: modify security-check.py to use "==" instead of "is" for literal comparison
b6121edf70a8d50fd16ddbba0c3168e5e49bfc2e swapped "is" for "==" in literal comparison (Tyler Chambers)

Pull request description:

  In Python 3.8+ literal comparisons using "is" instead of "==" produce a SyntaxWarning [source](https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-python-behavior).

  I checked the entire devtools directory, this seems to be the only occurrence.

  This is a small fix, but removes the SyntaxWarning.
  Fixes: #20338

ACKs for top commit:
  hebasto:
    re-ACK b6121edf70a8d50fd16ddbba0c3168e5e49bfc2e, only squashed since my [previous](https://github.com/bitcoin/bitcoin/pull/20346#pullrequestreview-525934568) review.
  practicalswift:
    re-ACK b6121edf70a8d50fd16ddbba0c3168e5e49bfc2e: patch still looks correct
  theStack:
    utACK b6121edf70a8d50fd16ddbba0c3168e5e49bfc2e

Tree-SHA512: 82a43495d6552fbaa3b02b58f0930b049d27aa937fe44b47714e3c059f844cc494de20674557371cbccf24fb8873ecb7376fb965ae326847eed2b855ed2d59c6
2024-01-16 07:57:32 -06:00
Jonas Schnelli
822a818331
Merge bitcoin-core/gui#116: Fix unreasonable default size of the main window without loaded wallets
7b2e42ecc4bddb5504665d6932dc5ffdbd3b593e qt: Add WalletFrame::sizeHint (Hennadii Stepanov)

Pull request description:

  This PR fixes a bug in master (d67883d01e507dd22d1281f4a4860e79d6a46a47) and in 0.20.1 that could be easily reproduced with
  ```
  $ src/qt/bitcoin-qt -regtest -resetguisettings -nowallet
  ```

  ![Screenshot from 2020-10-25 21-21-27](https://user-images.githubusercontent.com/32963518/97117179-b1800100-170a-11eb-87c9-3120d39b9455.png)
  ![Screenshot from 2020-10-25 21-23-32](https://user-images.githubusercontent.com/32963518/97117186-b644b500-170a-11eb-8b5d-234ff7205003.png)

  **With this PR:**

  ![Screenshot from 2020-10-25 21-20-35](https://user-images.githubusercontent.com/32963518/97117226-f441d900-170a-11eb-8d66-98b7718a2bb1.png)
  ![Screenshot from 2020-10-25 21-23-03](https://user-images.githubusercontent.com/32963518/97117232-f99f2380-170a-11eb-85ed-c7b5ece926b2.png)

  ---

  Fix #104
  Fix #113

  This PR is an alternative to #107 without [hard-coding a size in pixels](https://github.com/bitcoin-core/gui/pull/107#discussion_r511474021).

ACKs for top commit:
  jonasschnelli:
    Tested ACK 7b2e42ecc4bddb5504665d6932dc5ffdbd3b593e - I can confirm this fixes #104 (Ubuntu 20.04 - HiDPI 200%).

Tree-SHA512: eb0692dbeb3befdeecca0e41534c9783eab6637c14cc4f170ee42619235884f9354f8d22a10c20c08cc89dc5340a60b7dfa2523c12e64b3386b3fd2c6d5f934e
2024-01-16 07:57:30 -06:00
PastaPastaPasta
d0a6284817
Merge pull request #5821 from PastaPastaPasta/develop-trivial-2024-01-13
backport: trivial 2024 01 13
2024-01-15 10:46:53 -06:00
laanwj
2ce8f7716f
Merge bitcoin/bitcoin#25197: contrib: Remove keys that are no longer used for merging
d4b3dc5b0a726cc4cc7a8467be43126e78f841cf contrib: Remove keys that are no longer used for merging (Hennadii Stepanov)

Pull request description:

  See:
  - https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-21#726591
  - https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-12-09#750000

  Also updated `trusted-git-root` to be right after **meshcollider**'s last merge.

  The latest similar change was bitcoin/bitcoin#7713.

  A related discussion on [IRC](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727090):
  > [12:28](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727090) \<MarcoFalke> jonasschnelli: I was about to ask you whether you planned to remove your fingerprint from the "trusted-keys" for merging, but it looks like this will break verify-commits ...
  > [12:31](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727091) \<laanwj> you would also have a add all his merge commits to exceptions, i guess
  > [12:32](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727092) \<laanwj> or patch the script to allow different key for different ranges of commits
  > [13:15](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727118) \<jonasschnelli> MarcoFalke: I had no plan to remove my keyid,… would that make sense and how would you fix verify commits?
  > [13:16](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727119) \<jonasschnelli> Ideally, we should set en expiration date next to those keyid

ACKs for top commit:
  laanwj:
    ACK d4b3dc5b0a726cc4cc7a8467be43126e78f841cf

Tree-SHA512: 6c23c932288b56b546a9ba45288205fae063e3f98ff308393acffd5d79eb5097417de1c3d8e865a3f66734740ca2388b2452c3c810e45cdf3b15ccfa215f574e
2024-01-14 11:05:37 -06:00
fanquake
f714a57158
Merge bitcoin/bitcoin#25166: doc: Add link to NetBSD release
174f58c1857468252a8b9214abd187fa296e883c Add link to NetBSD release (Marnix)

Pull request description:

  For consistency with other Build Guides, like `doc/build-freebsd.md` & `doc/build-openbsd.md`

ACKs for top commit:
  theStack:
    Code-review ACK 174f58c1857468252a8b9214abd187fa296e883c
  vincenzopalazzo:
    ACK 174f58c185

Tree-SHA512: 08297aac82ee8fab2bbcb486b13b9c6ca12fb4fba573e9979e94204bd7340c2d13f1e54e07b314498603c291c25e29f2e89141ee150478951f699772538b709c
2024-01-14 11:05:37 -06:00
MacroFake
736d2bc23c
Merge bitcoin/bitcoin#25126: test: add BIP157 message parsing support (via MESSAGEMAP)
5dc6d9207778c51c10c16fac4b3663bc7905bafc test: make BIP157 messages default-constructible (MESSAGEMAP compatibility) (Sebastian Falbesoner)
71e4cfefe765c58937b3fd3125782ca8407315d2 test: p2p: add missing BIP157 message types to MESSAGEMAP (Sebastian Falbesoner)

Pull request description:

  The script [message-capture-parser.py](https://github.com/bitcoin/bitcoin/blob/master/contrib/message-capture/message-capture-parser.py) currently doesn't support parsing the BIP157 messages `getcfilters`, `getcfheaders` and `getcfcheckpt`, e.g.
  ```
  $ ./contrib/message-capture/message-capture-parser.py msgs_recv.dat
  ...
      WARNING - Unrecognized message type b'getcfcheckpt' in /home/thestack/bitcoin/msgs_recv.dat
  ...
  ```

  This PR fixes this by adding the missing message type mappings to the [`MESSAGEMAP`](225e5b57b2/test/functional/test_framework/p2p.py (L95-L127)) in the test framework and add default-constructors for the corresponding `msg_`... classes.

  Without the second commit, the following error message would occur:
  ```
    File "/home/thestack/bitcoin/./contrib/message-capture/message-capture-parser.py", line 141, in process_file
      msg = MESSAGEMAP[msgtype]()
  TypeError: __init__() missing 2 required positional arguments: 'filter_type' and 'stop_hash'
  ```

ACKs for top commit:
  dunxen:
    tACK [5dc6d92](5dc6d92077)

Tree-SHA512: d656c4d38a856373f01d7c293ae7d2b27378a9fc248048ebf2a64725ef8b498b3ddf4f420704abdb20d0c68ca548f1777602c5e73b66821a20c97ae618f1d63f
2024-01-14 11:05:37 -06:00
MacroFake
b3343d73ab
Merge bitcoin/bitcoin#25124: test: Fix intermittent race in p2p_unrequested_blocks.py
faac67cab02a755b0ce67716c5e5889432b13b83 test: Fix intermittent race in p2p_unrequested_blocks.py (MacroFake)

Pull request description:

  Disconnect may also result in an `OSError`, not only an `AssertionError`. Instead of maintaining a dead code path and enumerating disconnect reasons, just assume disconnection happens every time.

ACKs for top commit:
  jamesob:
    Code review ACK faac67cab0

Tree-SHA512: d2cec003168e421a5faed275cb2e1ef9fc63f9e8514f41d21da17e8964c79e5b453ccd72cd7ec62805f45293cf877be5bc8124ae98a515c0aa42d6e053409653
2024-01-14 11:05:37 -06:00
MacroFake
49d4c56cd5
Merge bitcoin/bitcoin#24962: prevector: enforce is_trivially_copyable_v
11e79084845a78e2421ea3abafe0de5a54ca2bde prevector: only allow trivially copyable types (Martin Leitner-Ankerl)

Pull request description:

  prevector uses `memmove` to move around data, that means it can only be used with types that are trivially copyable. That implies that the types are trivially destructible, thus the checks for `is_trivially_destructible` are not needed.

ACKs for top commit:
  w0xlt:
    ACK 11e7908484
  MarcoFalke:
    review ACK 11e79084845a78e2421ea3abafe0de5a54ca2bde 🏯
  ajtowns:
    ACK 11e79084845a78e2421ea3abafe0de5a54ca2bde -- code review only

Tree-SHA512: cbb4d8bfa095100677874b552d92c324c7d6354fcf7adab2ed52f57bd1793762871798b5288064ed1af2d2903a0ec9dbfec48d99955fc428f18cc28d6840dccc
2024-01-14 11:05:36 -06:00
MacroFake
431c1e3458
Merge bitcoin/bitcoin#25121: test: compare /mempool/info response with getmempoolinfo RPC
1df42bc262d994c30d390ea73b232b8d2548899e test: compare `/mempool/info` response with `getmempoolinfo` RPC (brunoerg)

Pull request description:

  This PRs compares `/mempool/info` REST response with `getmempoolinfo` RPC in `interface_rest.py`.
  Similar to #24936 and #24797.

ACKs for top commit:
  theStack:
    ACK 1df42bc262d994c30d390ea73b232b8d2548899e

Tree-SHA512: 2de36d70fa61612e7976f875e55f98e78b1cdb909b48cff18e6a70c55eda34b799e210bcd55361ea947388b7778d867290a73be4f799bb36afd65423ad49c487
2024-01-14 11:05:36 -06:00
laanwj
0b53b8f332
Merge bitcoin/bitcoin#25051: Bugfix: configure: Define defaults for enable_arm_{crc,shani}
7fd0860d12da723a228ddd3c9fb905380eb8b379 Bugfix: configure: Define defaults for enable_arm_{crc,shani} (Luke Dashjr)

Pull request description:

  Fix for #17398 and #24115

  Trivial, mostly for consistency (you'd have to *try* to break this)

ACKs for top commit:
  pk-b2:
    ACK 7fd0860d12
  seejee:
    ACK 7fd0860d12
  vincenzopalazzo:
    ACK 7fd0860d12

Tree-SHA512: 51c389787c369f431ca57071f03392438bff9fd41f128c63ce74ca30d2257213f8be225efcb5c1329ad80b714f44427d721215d4f848cc8e63060fa5bc8f1f2e
2024-01-14 11:05:36 -06:00
MacroFake
a5e73ffa20
Merge bitcoin/bitcoin#25104: wallet: Change log interval to use steady_clock
bdc6881e2f796f4a9a5873826219e24f17a96a7c wallet: Change log interval to use `steady_clock` (w0xlt)

Pull request description:

  This refactors the log interval variables to use `steady_clock` as it is best suitable for measuring intervals.

ACKs for top commit:
  laanwj:
    This makes sense. Code review ACK bdc6881e2f796f4a9a5873826219e24f17a96a7c
  dunxen:
    Code review ACK bdc6881

Tree-SHA512: 738b4aa45cef01df77102320f83096a0a7d0c63d7fcf098a8c0ab16b29453a87dc789c110105590e1e215d03499db1d889a94f336dcb385b6883c8364c9d39b7
2024-01-14 11:05:36 -06:00
laanwj
a245e52f55
Merge bitcoin/bitcoin#24793: test: Change color of skipped functional tests
3258bad996262792ba77573d6080dafa3952929c changes color of skipped functional tests (Jacob P. Fickes)

Pull request description:

  changes the color of skipped functional tests (currently grey and can be hard to read/invisible on dark backgrounds) to yellow.

  resolves #24791

ACKs for top commit:
  theStack:
    Tested ACK 3258bad996262792ba77573d6080dafa3952929c
  jarolrod:
    Tested ACK 3258bad996

Tree-SHA512: 3fe5ae0d3b4902b2b6bda6e89ab780feb8bf4b7cb1ce7e8467057b94a1e0a26ddeaf3cac0bc19b06ef10d8bccaac9c495029d42740fbedab8fb0d5fdd7d02eaf
2024-01-14 11:05:35 -06:00
MacroFake
bc6f3046f8
Merge bitcoin/bitcoin#25040: refactor: Pass lifetimebound reference to SingleThreadedSchedulerClient
fa4652ce5995ace831b6a4d3125bfcac9563ff6f Pass lifetimebound reference to SingleThreadedSchedulerClient (MacroFake)

Pull request description:

  Currently a pointer is passed, which is confusing and requires run-time asserts to avoid nullptr dereference.

  All call sites can pass a reference, so do that. Also mark it LIFETIMEBOUND to avoid call sites passing a temporary. Also, unrelated cleanup in touched lines.

ACKs for top commit:
  pk-b2:
    ACK fa4652ce59
  jonatack:
    Code review ACK fa4652ce5995ace831b6a4d3125bfcac9563ff6f rebased to master, debug build, unit tests
  vincenzopalazzo:
    ACK fa4652ce59

Tree-SHA512: cd7ec77347e195d659b8892d34c1e9644d4f88552a4d5fa310dc1756eb27050a99d3098b0b0d27f8474230f82c178fd9e22e7018d8248d5e47a7f4caad395e25
2024-01-13 23:09:41 -06:00
PastaPastaPasta
dfc978adcc
Merge pull request #5816 from PastaPastaPasta/develop-trivial-2024-01-10
backport: trivial 2024 01 10
2024-01-13 19:32:54 -06:00
MacroFake
1b1badff8f
Merge bitcoin/bitcoin#25017: validation: make CScriptCheck and prevector swap members noexcept
e5485e8e4be7f2ee0671f58c3dcce35c68ba0ee0 test, bench: make prevector and checkqueue swap member functions noexcept (Jon Atack)
abc1ee509025d92db5311c3f5df3b61c09cad24f validation: make CScriptCheck and prevector swap member functions noexcept (Jon Atack)

Pull request description:

  along with those seen elsewhere in the codebase (prevector and checkqueue units/fuzz/bench).

  A swap must not fail; when a class has a swap member function, it should be declared noexcept.
  https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c84-a-swap-function-must-not-fail

ACKs for top commit:
  pk-b2:
    ACK e5485e8e4b
  w0xlt:
    ACK e5485e8e4b

Tree-SHA512: c82359d5e13f9262ce45efdae9baf71e41ed26568e0aff620e2bfb0ab37a62b6d56ae9340a28a0332c902cc1fa87da3fb72d6f6d6f53a8b7e695a5011f71f7f1
2024-01-13 19:32:32 -06:00
laanwj
89c1e775c5
Merge bitcoin/bitcoin#24815: lint: convert lint-tests.sh to python
ae0e06a439e09a7e24dd6198591a588c8df2d529 Converted lint-tests.sh to python (TakeshiMusgrave)

Pull request description:

  Reference issue: https://github.com/bitcoin/bitcoin/issues/24783

ACKs for top commit:
  laanwj:
    Tested ACK ae0e06a439e09a7e24dd6198591a588c8df2d529

Tree-SHA512: a118295b5b6b5199b52d46b54de871d88dd544112e7dd5001a9575d65b093af0aea390f9ad223462a4fc6a201bd8c4debe5e26bfa4860a90c97cfe300477c04a
2024-01-13 19:32:31 -06:00
MarcoFalke
710ea6e114
Merge bitcoin/bitcoin#24936: test: compare /mempool/contents response with getrawmempool RPC
bef61496ab5e12e38ac5794cd0836723af070ab5 test: compare `/mempool/contents` response with `getrawmempool` RPC (brunoerg)
5bc5cbaf310f60e89c72e8ecf3f6187c85499027 doc: add reference to `getrawmempool` RPC in `/mempool/contents` REST doc (brunoerg)

Pull request description:

  This PR is similar to #24797, it compares `/mempool/contents` REST response with `getrawmempool` RPC (verbose=True) since they use the same `MempoolToJSON` function.

  Also, adds a reference to `getrawmempool` RPC help to get details about the fields from `/mempool/contents`.

ACKs for top commit:
  0xB10C:
    ACK bef6149

Tree-SHA512: b7e9e9c765ee837986ba167b9234a9b95c9ef0a9ebcc2a03d50f6be6d3aba1480bd77c78111d95df1e4023cde6dfc64bf1e7908d9e5b6f96ca46b76611a4a9b4
2024-01-13 19:32:31 -06:00
laanwj
af73dd4723
Merge bitcoin/bitcoin#24854: Remove not needed ArithToUint256 roundtrips in tests
fad6d4f952373690ef16ce27b0926c0ab762066a Remove not needed ArithToUint256 roundtrips in tests (MarcoFalke)
fa456ccb2287b2a1a4eb7224b424f12fe59302e9 Remove duplicate static_asserts (MarcoFalke)

Pull request description:

  No need to go from `arith_uint256`->`uint256` when a `uint256` can be constructed right away.

ACKs for top commit:
  laanwj:
    Code review ACK fad6d4f952373690ef16ce27b0926c0ab762066a

Tree-SHA512: bea901ea5904bf61a0dadf7168c6b126f7e62ff1180d4aa72063c28930a01a8baa57ab0d324226bd4de72fb59559455c29c049d90061f888044198aae1426dcb
2024-01-13 19:32:31 -06:00
laanwj
31fae25f68
Merge bitcoin/bitcoin#24803: lint: convert submodule linter test to Python
4a9e36dbaf96f83d0829f8442114a2fa36641776 lint: convert submodule linter test to Python (Eunoia)

Pull request description:

  Refs #24783

ACKs for top commit:
  laanwj:
    Tested ACK 4a9e36dbaf96f83d0829f8442114a2fa36641776

Tree-SHA512: ca25b59acf75cebc79588a6c51dc5c313c8d0bd1d492127815d7b81b36aaffd02815a515d97b355582002f71efc33d46435d0b28fce24497bb99799d9ba57228
2024-01-13 19:32:31 -06:00
Hennadii Stepanov
f66b80bed5
Merge bitcoin-core/gui#584: Getting ready to Qt 6 (5/n). Do not assume qDBusRegisterMetaType return type
6cf4dc7f64b42cbbff6a2ce7616ee625a87a29f5 qt: Do not assume `qDBusRegisterMetaType` return type (Hennadii Stepanov)

Pull request description:

  `qDBusRegisterMetaType` returns:
  - [`int`](https://doc.qt.io/qt-5/qdbusargument.html#qDBusRegisterMetaType) in Qt 5
  - [`QMetaType`](https://doc.qt.io/qt-6/qdbusargument.html#qDBusRegisterMetaType) in Qt 6

ACKs for top commit:
  laanwj:
    Anyhow code review ACK 6cf4dc7f64b42cbbff6a2ce7616ee625a87a29f5
  w0xlt:
    tACK 6cf4dc7f64 on Ubuntu 21.10, Qt 5.15.2.

Tree-SHA512: 17d43e191d31a6f927d19550c52471ed3b9222f492a23cee2e553f2c679cf37125e00637b00ea9f4ee3e37dfcf5278171be9a5e1e2e899592516291c7b5cd942
2024-01-13 19:32:30 -06:00
Hennadii Stepanov
6a21035941
Merge bitcoin-core/gui#580: Getting ready to Qt 6 (3/n). Do not use QKeyEvent copy constructor
3ec6504a2e5b4afb7a2719a82191e0b96fe23214 qt: Do not use `QKeyEvent` copy constructor (Hennadii Stepanov)

Pull request description:

  This PR is preparation for [Qt 6](https://github.com/bitcoin/bitcoin/pull/24798), and it fixes an experimental build with Qt 6.2.4 as copying of `QEvent` has been [disabled](19f9b0d5f5) in Qt 6.0.0.

ACKs for top commit:
  w0xlt:
    tACK 3ec6504a2e on Ubuntu 21.10, Qt 5.15.2
  shaavan:
    reACK 3ec6504a2e5b4afb7a2719a82191e0b96fe23214

Tree-SHA512: 583a9dad0c621d9f02f77ccaa9f55ee79e12e3c47f418911ef2dfe0de357d772d1928ae3ec19b6f0c0674da858bab9d4542a26cc14b06ed921370dfeabd1c194
2024-01-13 19:32:30 -06:00
MarcoFalke
50287e2403
Merge bitcoin/bitcoin#24168: Fix some race conditions in BanMan::DumpBanlist()
99a6b699cd650f13d7200d344bf5e2d4b45b20ac Fix race condition for SetBannedSetDirty() calls (Hennadii Stepanov)
83c76467157bbca023bffda0f0bc2f01eb76a040 Avoid calling BanMan::SweepBanned() twice in a row (Hennadii Stepanov)
33bda6ab87cc1b569e96da337296eb3e9ce6db1a Fix data race condition in BanMan::DumpBanlist() (Hennadii Stepanov)
5e20e9ec3859205c220867ca49efb752b8edaacc Prevent possible concurrent CBanDB::Write() calls (Hennadii Stepanov)

Pull request description:

  This PR split from bitcoin/bitcoin#24097 with some additions. This makes the following switch from `RecursiveMutex` to `Mutex` a pure refactoring.

  See details in commit messages.

ACKs for top commit:
  w0xlt:
    reACK 99a6b69
  shaavan:
    ACK 99a6b699cd650f13d7200d344bf5e2d4b45b20ac

Tree-SHA512: da4e7268c7bd3424491f446145f18af4ccfc804023d0a7fe70e1462baab550a5e44f9159f8b9f9c7820d2c6cb6447b63883616199e4d9d439ab9ab1b67c7201b
2024-01-13 19:32:30 -06:00
fanquake
595a1b3a8e
Merge bitcoin/bitcoin#24134: build: Fix zeromq package when cross-compiling
f13e642c831c5689cb2bb7f5c4f9cb4c0c03ef21 build: Disable valgrind when building zeromq package in depends (Hennadii Stepanov)
b970f03beae0f3ae6a796f0e3b97732fc579f6aa build: Disable libbsd when building zeromq package in depends (Hennadii Stepanov)
77899991b1e29a45bc377b21330148cb7cc08923 build: Update netbsd_kevent_void.patch (Hennadii Stepanov)

Pull request description:

  Since v4.3.3 (068385c951) `libzmq` uses `libbsd` by default.

  This PR disables `libbsd` explicitly, as it's not a part of our depends. Zeromq will fallback to its internal `strlcpy` implementation.

  Otherwise, on systems with installed `libbsd-dev` package the `zeromq` package build system erroneously detects `libbsd` package from the host system:

  ```diff
  --- a/libzmq.pc
  +++ b/libzmq.pc
  @@ -8,5 +8,5 @@
   Version: 4.3.4
   Libs: -L${libdir} -lzmq
   Libs.private:  -lpthread
  -Requires.private:
  +Requires.private:  libbsd
   Cflags: -I${includedir}
  ```

  This causes the `configure` fails to detect the `zeromq` package:
  ```
  configure: WARNING: libzmq version 4.x or greater not found, disabling
  ```

  ---

  Other minor improvements:
  - fixed `netbsd_kevent_void.patch` offset
  - disabled valgrind as it's used in unit tests which we do not run:
  ```diff
  --- a/zmq-configure-output
  +++ b/zmq-configure-output
  @@ -119,11 +119,6 @@
   checking whether the g++ -m64 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
   checking dynamic linker characteristics... (cached) GNU/Linux ld.so
   checking how to hardcode library paths into programs... immediate
  -checking for valgrind... valgrind
  -checking for Valgrind tool memcheck... memcheck
  -checking for Valgrind tool helgrind... helgrind
  -checking for Valgrind tool drd... drd
  -checking for Valgrind tool exp-sgcheck... exp-sgcheck
   checking linker version script flag... --version-script
   checking if version scripts can use complex wildcards... yes
   checking for working posix_memalign... yes
  ```

ACKs for top commit:
  fanquake:
    ACK f13e642c831c5689cb2bb7f5c4f9cb4c0c03ef21

Tree-SHA512: d4c86d4a841eb6e7c32157e84972243072f905496c2a4c14ec6f6ab4216df6695cbf29baa2233ce27eaede35d1e250ad2f9975b16f570d01509f0c5da4597cad
2024-01-13 19:32:29 -06:00
fanquake
53b1557187
Merge bitcoin/bitcoin#23956: build: use zeromq 4.3.4 in depends & fix NetBSD 10 build
6897c4bdf51a4aa74320ebfffa9467db14670109 build: patch depends zeromq to fix building on NetBSD Current (fanquake)
ce6dd2f1a2e2c56d86d00e0eeec34c9982017416 zeromq 4.3.4 (fanquake)

Pull request description:

  This is a prerequisite for #23955. It updates zeromq to the latest available version, and adds a patch, [that I've sent upstream](https://github.com/zeromq/libzmq/pull/4326), to fix building on NetBSD Current (10).

ACKs for top commit:
  hebasto:
    ACK 6897c4bdf51a4aa74320ebfffa9467db14670109, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: d05d9753630faebe842e1ca70c8c4af660a38e7331a9d95e84df3a3b14564c5118ca41c4fc49fb71dfee563b63e1014e5a3f8874d652e26de59e8e188a12970e
2024-01-13 19:32:29 -06:00
laanwj
cac2ae924a
Merge bitcoin/bitcoin#23607: rpc: Pass const char* to evhttp_connection_get_peer for new libevent
c62d763fc313585d79ad833c9d729f6acf2652aa Necessary improvements to make configure work without libevent installed (Perlover)
091ccc38c2e589b649648cbcc99aca4802f98775 The evhttp_connection_get_peer function from libevent changes the type of the second parameter. Fixing the problem. (Perlover)

Pull request description:

  The second parameter of evhttp_connection_get_peer in libevent already has type as `const char **`
  The compilation of bitcoind with the fresh libevent occurs errors

  Details: https://github.com/bitcoin/bitcoin/issues/23606

ACKs for top commit:
  laanwj:
    Code review ACK c62d763fc313585d79ad833c9d729f6acf2652aa
  luke-jr:
    tACK c62d763fc313585d79ad833c9d729f6acf2652aa

Tree-SHA512: d1c8062d90bd0d55c582dae2c3a7e5ee1b6c7ca872bf4aa7fe6f45a52ac4a8f59464215759d961f8efde0efbeeade31b08daf9387d7d50d7622baa1c06992d83
2024-01-13 19:32:29 -06:00
laanwj
187b3c49fc
Merge bitcoin/bitcoin#24048: build: Improve error message when pkg-config is not installed
18f304d988117f2675e7393adda9f960fbf3cb3a build: Improve error message when pkg-config is not installed (Hennadii Stepanov)

Pull request description:

  Fixes bitcoin/bitcoin#24037.

  With this PR:
  ```
  # ./autogen.sh
  configure.ac:16: error: PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh
  configure.ac:16: the top level
  autom4te: /usr/bin/m4 failed with exit status: 1
  aclocal: error: /usr/bin/autom4te failed with exit status: 1
  autoreconf: aclocal failed with exit status: 1
  ```

ACKs for top commit:
  laanwj:
    Tested ACK 18f304d988117f2675e7393adda9f960fbf3cb3a
  jarolrod:
    ACK 18f304d988117f2675e7393adda9f960fbf3cb3a

Tree-SHA512: ba845f44c966fea6cf7cee0db9cacc431072e2005ad065c8f2bbe3cffd8415c3af6ed443cccf9606df7de4df2ff3e72636afb5f3776d2a96af8572aab7018549
2024-01-13 19:32:29 -06:00
W. J. van der Laan
7d2e98d4fe
Merge bitcoin/bitcoin#23057: log: Consolidate timedata logging
64e1ddd255771e57a88a20f07dbde04a83bf0c75 log: call LogPrint only once with time data samples (Martin Zumsande)

Pull request description:

  When timedata samples are logged, `LogPrint()` is currently invoked multiple times on the same log entry.
  This can lead to chaos in the log when other threads log concurrently, as in this example which motivated this PR:
  ```
  2021-09-20T00:28:57Z -48  -26  -11  -8  -6  Addrman checks started: new 37053, tried 83, total 37136
  2021-09-20T00:28:57Z -3  -1  -1  -1  -1  +0  |  nTimeOffset = -3  (+0 minutes)
  ```
  Fix this by building the log message in a string and logging it one `LogPrint()` call. I also changed the wording slightly so that it becomes understandable what is being logged, example:

  ```
  2021-09-21T21:03:24Z time data samples: -43  -18  -12  -4  -1  -1  +0  +0  +268  |  median offset = -1  (+0 minutes)
  ```

ACKs for top commit:
  jnewbery:
    Tested ACK 64e1ddd255
  laanwj:
    Tested ACK 64e1ddd255771e57a88a20f07dbde04a83bf0c75, new message lgtm

Tree-SHA512: ffb7a93166cc8fd6a39200b9e03a9d1e8e975b7ded822ccddd015f553258b991162a5cb867501f426d3ebcfef4f32f0e06e17b18e6b01486b967595d102f8379
2024-01-13 19:32:28 -06:00
MarcoFalke
d11c14807a
Merge bitcoin/bitcoin#21802: refactor: Avoid UB in util/asmap (advance a dereferenceable iterator outside its valid range)
fa098713201a6999ec4c12d0a8bde0adcf47b095 refactor: Avoid sign-compare compiler warning in util/asmap (MarcoFalke)

Pull request description:

  Can be reproduced on current master with `D_GLIBCXX_DEBUG`:

  ```
  /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/safe_iterator.h:883:
  In function:
      __gnu_debug::_Safe_iterator<type-parameter-0-0, type-parameter-0-1,
      std::random_access_iterator_tag>::_Self __gnu_debug::operator+(const
      __gnu_debug::_Safe_iterator<type-parameter-0-0, type-parameter-0-1,
      std::random_access_iterator_tag>::_Self &,
      __gnu_debug::_Safe_iterator<type-parameter-0-0, type-parameter-0-1,
      std::random_access_iterator_tag>::difference_type)

  Error: attempt to advance a dereferenceable iterator 369 steps, which falls
  outside its valid range.

  Objects involved in the operation:
      iterator @ 0x0x7ffd3d613138 {
        type = std::__cxx1998::_Bit_const_iterator (constant iterator);
        state = dereferenceable;
        references sequence with type 'std::__debug::vector<bool, std::allocator<bool> >' @ 0x0x7ffd3d663590
      }
  ==65050== ERROR: libFuzzer: deadly signal
      #0 0x559ab9787690 in __sanitizer_print_stack_trace (/bitcoin/src/test/fuzz/fuzz+0x5a1690)
      #1 0x559ab9733998 in fuzzer::PrintStackTrace() (/bitcoin/src/test/fuzz/fuzz+0x54d998)
      #2 0x559ab9718ae3 in fuzzer::Fuzzer::CrashCallback() (/bitcoin/src/test/fuzz/fuzz+0x532ae3)
      #3 0x7f70a0e723bf  (/lib/x86_64-linux-gnu/libpthread.so.0+0x153bf)
      #4 0x7f70a0b3418a in raise (/lib/x86_64-linux-gnu/libc.so.6+0x4618a)
      #5 0x7f70a0b13858 in abort (/lib/x86_64-linux-gnu/libc.so.6+0x25858)
      #6 0x7f70a0f21148  (/lib/x86_64-linux-gnu/libstdc++.so.6+0xa1148)
      #7 0x559ab9f60a96 in __gnu_debug::operator+(__gnu_debug::_Safe_iterator<std::__cxx1998::_Bit_const_iterator, std::__debug::vector<bool, std::allocator<bool> >, std::random_access_iterator_tag> const&, long) /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/safe_iterator.h:881:2
      #8 0x559ab9f61062 in SanityCheckASMap(std::__debug::vector<bool, std::allocator<bool> > const&, int) util/asmap.cpp:159:21
      #9 0x559ab9e4fdfa in SanityCheckASMap(std::__debug::vector<bool, std::allocator<bool> > const&) netaddress.cpp:1242:12
      #10 0x559ab9793fcb in addrman_fuzz_target(Span<unsigned char const>) test/fuzz/addrman.cpp:43:14
      #11 0x559ab978a03c in std::_Function_handler<void (Span<unsigned char const>), void (*)(Span<unsigned char const>)>::_M_invoke(std::_Any_data const&, Span<unsigned char const>&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:300:2
      #12 0x559aba2692c7 in std::function<void (Span<unsigned char const>)>::operator()(Span<unsigned char const>) const /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_function.h:688:14
      #13 0x559aba269132 in LLVMFuzzerTestOneInput test/fuzz/fuzz.cpp:63:5
      #14 0x559ab971a1a1 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/bitcoin/src/test/fuzz/fuzz+0x5341a1)
      #15 0x559ab97198e5 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) (/bitcoin/src/test/fuzz/fuzz+0x5338e5)
      #16 0x559ab971bb87 in fuzzer::Fuzzer::MutateAndTestOne() (/bitcoin/src/test/fuzz/fuzz+0x535b87)
      #17 0x559ab971c885 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) (/bitcoin/src/test/fuzz/fuzz+0x536885)
      #18 0x559ab970b23e in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/bitcoin/src/test/fuzz/fuzz+0x52523e)
      #19 0x559ab9734082 in main (/bitcoin/src/test/fuzz/fuzz+0x54e082)
      #20 0x7f70a0b150b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
      #21 0x559ab96dffdd in _start (/bitcoin/src/test/fuzz/fuzz+0x4f9fdd)

ACKs for top commit:
  sipa:
    utACK fa098713201a6999ec4c12d0a8bde0adcf47b095
  vasild:
    ACK fa098713201a6999ec4c12d0a8bde0adcf47b095

Tree-SHA512: 802fda33bda40fe2521f1e3be075ceddc5fd9ba185bd494286e50019931dfd688da7a6513601138b1dc7bb8e80ae47c8572902406eb59f68990619ddb2656748
2024-01-13 19:32:28 -06:00
Wladimir J. van der Laan
d2b05201da
Merge #20635: fix misleading comment about call to non-existing function
cc3044ccdbefa9fae58d1762477e377883b39c5e fix misleading comment about call to non-existing function (pox)

Pull request description:

  The comment seems to be describing the subsequent call to `SyncTransaction` but refers to it as `SyncNotifications`, which is not any function currently in the codebase.

  It's best to just remove the "what" aspect of the comment and focus on the "why", which also reduces the risk of similar documentation errors in the future, in case the function ever gets renamed, for example.

ACKs for top commit:
  laanwj:
    ACK cc3044ccdbefa9fae58d1762477e377883b39c5e

Tree-SHA512: 882ff17836ef585a603dc504f3dd21f56f682e49b28a0998f23fd16025826fbb083b7978db3ee70d0e0ff2c86fd6c3fd99a2361e5d45c765fdc5822c5f14c0a7
2024-01-13 19:32:28 -06:00
MarcoFalke
64f0c3dc0b
Merge bitcoin-core/gui#153: Define MAX_DIGITS_BTC for magic number in BitcoinUnits::format
198fff88f385e090b57a0ee902719bcc22a6b86b GUI: Define MAX_DIGITS_BTC for magic number in BitcoinUnits::format (Luke Dashjr)

Pull request description:

  A magic number snuck in with https://github.com/bitcoin/bitcoin/pull/16432

ACKs for top commit:
  hebasto:
    ACK 198fff88f385e090b57a0ee902719bcc22a6b86b, I have reviewed the code and it looks OK, I agree it can be merged.
  kristapsk:
    utACK 198fff88f385e090b57a0ee902719bcc22a6b86b

Tree-SHA512: 78dc23c2ae61bac41e5e34eebf57274599cb2ebb0b18d46e8a3228d42b256a1bc9bb17091c748f0f692ef1c4c241cfbd3e30a12bcd12222a234c1a9547ebe786
2024-01-13 19:32:28 -06:00
fanquake
51fa0ed1a3
Merge #19958: doc: Better document features of feelers
2ea62cae483b764e30f61c06d8ac65755bbd864c Improve docs about feeler connections (Gleb Naumenko)

Pull request description:

  "feeler" and "test-before-evict" are two different strategies suggest in [Eclipse Attacks on Bitcoin’s Peer-to-Peer Network](https://www.usenix.org/system/files/conference/usenixsecurity15/sec15-paper-heilman.pdf). In our codebase, we use `ConnType::FEELER` to implement both.

  It is confusing, up to the point that our documentation was just incorrect.

  This PR:
  - ~clarifies this aspect by renaming "ConnType::FEELER" to "ConnType::PROBE", meaning that this connections only probes that the node is operational, and then disconnects.~
  - fixes the documentation

ACKs for top commit:
  amitiuttarwar:
    ACK 2ea62cae48. thank you!
  practicalswift:
    ACK 2ea62cae483b764e30f61c06d8ac65755bbd864c

Tree-SHA512: c9c03c09eefeacec28ea199cc3f697b0a98723f2f849f7a8115edc43791f8165e296e0e25a82f0b5a4a781a7de38c8954b48bf74c714eba02cdc21f7460673e5
2024-01-13 19:32:25 -06:00