Commit Graph

32317 Commits

Author SHA1 Message Date
MarcoFalke
b60c477d54
Merge bitcoin/bitcoin#23629: refactor tests to fix ubsan suppressions
faedb111d2 refactor tests to fix ubsan suppressions (MarcoFalke)

Pull request description:

  The ubsan suppressions for test files have several issues:

  * They bloat the suppressions file, distracting from real bugs
  * They are file-wide, thus suppressing any other (newly introduced) issues in the same file
  * Some of them are causing compile issues with -Wimplicit-int-conversion

  Fix all issues by making the integer truncations or sign changes explicit.

  This is a refactor that shouldn't change the test binary unless compiled with sanitizers.

ACKs for top commit:
  jonatack:
    ACK faedb111d2 per `git range-diff 1824644a fa9bab0 faedb11` and clang 13 debug build sanity check

Tree-SHA512: a1a6aaf2cf52562a49220375deb10062b388c1ccb7ddcd9ef2a8e6b9873961c5b285704799589b7dd5579f3db8692ba72a9d622172b4e4d2423534cd550e8859
2022-01-20 18:10:56 +01:00
MarcoFalke
faedb111d2
refactor tests to fix ubsan suppressions 2022-01-20 15:25:23 +01:00
MarcoFalke
1824644a36
Merge bitcoin/bitcoin#24099: Replace RecursiveMutex cs_mapLocalHost with Mutex, and rename it
5e7e4c9f6e refactor: replace RecursiveMutex g_maplocalhost_mutex with Mutex (w0xlt)
a7da1409bc scripted-diff: rename cs_mapLocalHost -> g_maplocalhost_mutex (w0xlt)

Pull request description:

  This PR is related to #19303 and gets rid of the `RecursiveMutex cs_mapLocalHost`.

ACKs for top commit:
  shaavan:
    ACK 5e7e4c9f6e
  theStack:
    ACK 5e7e4c9f6e
  hebasto:
    ACK 5e7e4c9f6e, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 961171e346fe385e16db9830115a8096f4ca2499bbea11a08c02ca808638dfb63c434ab9d66392c71e85be6352c8a2b6a0054b5a61aaabd28d71581fed5beae7
2022-01-20 14:58:03 +01:00
fanquake
63fc2f5cce
Merge bitcoin/bitcoin#24065: build: explicitly disable support for external signing on Windows
e2ab9f83f8 build: disable external signer on Windows (fanquake)

Pull request description:

  This change explicitly disables support for external signing when targeting Windows and OpenBSD. The driver for this is that Boost Process uses boost::filesystem internally, when targeting Windows, which gets in the way of removing our usage of it (#20744). While we could adjust #20744 to still link against the Boost libs when building for Windows, that would be disappointing, as we wouldn't have cleanly removed the Boost usage we're trying too (including the build infrastructure), and, we'd be in a position where we would be building releases differently depending on the platform, which is something I want to avoid.

  After discussion with Sjors, Achow and Hebasto, this seemed like a reasonable step to move #20744 forward (as-is). Note that support for external signing ([while already being experimental](https://github.com/bitcoin/bitcoin/blob/master/doc/external-signer.md#example-usage)), could be considered even more experimental on Windows. Also, oddly, we have external-signing [explicitly disabled in our Windows (cross-compile) CI](807169e10b/ci/test/00_setup_env_win64.sh (L16)), it's not clear why this is the case, as, if it's a feature being built into releases, it should be being built and tested in the CI which is most-like the release process.

  There is an [issue open upstream](https://github.com/boostorg/process/issues/207), in regards to migrating Boost Process to std::filesystem, or having an option to use it. However there hasn't been much discussion since it was opened ~9 months ago. There is another related issue here: https://github.com/klemens-morgenstern/boost-process/issues/164.

  Resolves #24036.

ACKs for top commit:
  Sjors:
    utACK e2ab9f8
  achow101:
    ACK e2ab9f83f8
  kallewoof:
    utACK e2ab9f83f8
  hebasto:
    ACK e2ab9f83f8, tested on Linux Mint 20.2 (x86_64).

Tree-SHA512: 36fcfc0e1a008a8271dc76b8e12e93d3e1d1e528bf668e95a559e9f6fd7d5f031bd7a6a6bc8b9fa9d057b2cd56f9ec8838c7f74e87899bf9a6aeb787afbd112c
2022-01-20 13:13:30 +08:00
fanquake
a541e5d519
Merge bitcoin/bitcoin#24104: fs: Make compatible with boost 1.78
dc5d6b0d47 fs: Make compatible with boost 1.78 (Andrew Chow)

Pull request description:

  Boost 1.78 removed `operator+` in a way that breaks our usage of it in a subclass. A [proposed workaround](https://github.com/boostorg/filesystem/issues/223#issuecomment-1000230207) for this is to cast the argument to `boost::filesystem::path`, and this is backwards compatible with older versions of boost.

  Additionally, it appears that `fs::canonical` no longer removes trailing slashes. This was causing a test to fail. The solution is to explicitly remove the trailing separator in the one place that `fs::canonical` is used.

  Lastly, `fs::create_directories` now has an error message saying `create_directories` instead of `create_directory`. This caused wallet_multiwallet.py to fail. The error message check has been updated to be able accept either string.

  Fixes #23846

ACKs for top commit:
  ryanofsky:
    Code review ACK dc5d6b0d47
  vincenzopalazzo:
    ACK dc5d6b0d47

Tree-SHA512: d4d8e7b49b8dfbf0ced9bfe9a2b3827841227fc755fc799f19159076b0ccf882432cc8b6ad93cdeda98fb58b942b9ba50a9e0a6b4f6b1e0097e80f1074ae5682
2022-01-20 13:06:04 +08:00
fanquake
7102f7d6f3
Merge bitcoin/bitcoin#23956: build: use zeromq 4.3.4 in depends & fix NetBSD 10 build
6897c4bdf5 build: patch depends zeromq to fix building on NetBSD Current (fanquake)
ce6dd2f1a2 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 6897c4bdf5, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: d05d9753630faebe842e1ca70c8c4af660a38e7331a9d95e84df3a3b14564c5118ca41c4fc49fb71dfee563b63e1014e5a3f8874d652e26de59e8e188a12970e
2022-01-20 09:35:45 +08:00
Andrew Chow
dc5d6b0d47 fs: Make compatible with boost 1.78 2022-01-19 16:25:20 -05:00
MarcoFalke
06b6369766
Merge bitcoin/bitcoin#23976: document and clean up MaybeUpdateMempoolForReorg
e177fcab38 Replace `struct update_lock_points` with lambda (glozow)
c7cd98c717 document and clean up MaybeUpdateMempoolForReorg (glozow)

Pull request description:

  followup to #23683, addressing https://github.com/bitcoin/bitcoin/pull/23683#issuecomment-989741186

ACKs for top commit:
  hebasto:
    ACK e177fcab38, I have reviewed the code and it looks OK, I agree it can be merged.
  instagibbs:
    ACK e177fcab38
  MarcoFalke:
    Approach ACK e177fcab38 😶

Tree-SHA512: 8c2709dd5cab73cde41f3e5655d5f237bacfb341f78eac026169be579528695ca628c8777b7d89760d8677a4e6786913293681cfe16ab702b30c909703e1824c
2022-01-19 15:31:58 +01:00
fanquake
2d7ffce852
Merge bitcoin/bitcoin#24093: build: specify hosts for qrencode package
bf044ef9ec build: specify hosts for qrencode package (fanquake)

Pull request description:

  Similar to how we specify the OS's we build Qt for, specify which OS's
  we will build qrencode for (a qt dependency). This commit alone doesn't
  change anything, but when we start supporting other OS's, i.e #23948,
  where we wont support qt (or at least initially), it'll skip building
  the qrencode package, which would be unused.

  I'll rebase the other *BSD changes on top of this.

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

Tree-SHA512: 3f5f11f122704a664dd77d8da0b7e9b95d44b2f1514d0199deed9b8b8ad0d8883a1de1f444b796c5f4681f423a380c3905fce720d7d2b788130162c907c2ce3b
2022-01-19 20:37:30 +08:00
w0xlt
5e7e4c9f6e refactor: replace RecursiveMutex g_maplocalhost_mutex with Mutex 2022-01-19 07:06:36 -03:00
w0xlt
a7da1409bc scripted-diff: rename cs_mapLocalHost -> g_maplocalhost_mutex
-BEGIN VERIFY SCRIPT-
s() { sed -i 's/cs_mapLocalHost/g_maplocalhost_mutex/g' $1; }
s src/net.cpp
s src/net.h
s src/rpc/net.cpp
s src/test/net_tests.cpp
-END VERIFY SCRIPT-
2022-01-19 07:04:52 -03:00
MarcoFalke
5c3bfee46a
Merge bitcoin/bitcoin#24054: test: rest /tx with an invalid/unknown txid
bd52684508 test: rest /tx with an invalid/unknown txid (brunoerg)

Pull request description:

  This PR adds test coverage to the endpoint `/tx` (rest) passing an invalid and an unknown txid to test its return.
  Invalid -> should return status code 400 (bad request)
  Unknown -> should return status code 404 (not found)

ACKs for top commit:
  kallewoof:
    ACK bd52684508

Tree-SHA512: a7fbb63f30d06fc0855133a36e8317c7930ba13aa2b4a2dd1fc35079d59eacace72e1ffe7ae1b3e067066fe51792415940d72d923e83a659a0d5965e4110b32a
2022-01-19 08:42:42 +01:00
Andrew Chow
869c6e23c5
Merge bitcoin/bitcoin#22317: doc: Highlight DNS requests part in tor.md
86a4a15bdc Highlight DNS request part (Prayank)

Pull request description:

  _What?_

  Highlight DNS requests part in Proxy section

  _Why?_

  1. DNS requests are very important while considering privacy
  2. Lot of users might skip reading it because of the way it is mixed with everything else in the doc right now
  3. I have seen lot of users ignoring DNS requests or unaware of such things while using privacy tools

  _How?_

  Initially I had tried keeping these lines separate from code block but [Jonatack didn't agree with the changes](https://github.com/bitcoin/bitcoin/pull/21157#discussion_r618177116). Harding suggested using [bold/italic in `<pre></pre>`](https://github.com/bitcoin/bitcoin/pull/21157#discussion_r644364143). I have used the suggestions from previous PR and added `---`

  This is a part of alternative described in https://github.com/bitcoin/bitcoin/pull/22316

ACKs for top commit:
  jonatack:
    ACK 86a4a15bdc
  Rspigler:
    ACK 86a4a15bdc
  achow101:
    ACK 86a4a15bdc
  RiccardoMasutti:
    ACK 86a4a15
  lsilva01:
    ACK 86a4a15bdc
  kristapsk:
    ACK 86a4a15bdc
  theStack:
    ACK 86a4a15bdc

Tree-SHA512: a4fe0e8c08df330e5ca78ce19ce74be7034c653f4374469d928908847a6debf385283e3a6da66de600566c7bab6290ccd35df26864aef94cbb3f294123391437
2022-01-18 14:31:50 -05:00
MarcoFalke
b24aa9c8ef
Merge bitcoin/bitcoin#24095: util: Fix mis-swapped prettyIndent and indentLevel arguments
f251141483 util: Fix mis-swapped `prettyIndent` and `indentLevel` arguments (Hennadii Stepanov)

Pull request description:

  On master d0bf9bb6a5:
  ```
  $ cat settings.json
  {
      "wallet": [
       "210803d"
      ]
     }
  ```

  With this PR:
  ```
  $ cat settings.json
  {
      "wallet": [
          "210803d"
      ]
  }
  ```

ACKs for top commit:
  ryanofsky:
    Code review ACK f251141483. Nice catch!

Tree-SHA512: 1c315c807a070039c05a77f4e8855011d468b9aeb141e4fa3b1e1aaaab252e3831e8bdfe0caddf7704a00492799022f761f6d21a047c5bf75cdbcc96f04fc04e
2022-01-18 17:57:33 +01:00
Hennadii Stepanov
f251141483
util: Fix mis-swapped prettyIndent and indentLevel arguments 2022-01-18 15:47:46 +02:00
glozow
e177fcab38 Replace struct update_lock_points with lambda
No behavior change.
This code was introduced in 5add7a7 before we required C++11, which is
why the struct was needed. As we are now using more modern C++ and this
is the only place where lockpoints are updated for mempool entries, it
is more idiomatic to call `modify` with a lambda.

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2022-01-18 11:55:15 +00:00
glozow
c7cd98c717 document and clean up MaybeUpdateMempoolForReorg
Co-authored-by: John Newbery <john@johnnewbery.com>
2022-01-18 11:55:06 +00:00
fanquake
bf044ef9ec
build: specify hosts for qrencode package
Similar to how we specify the OS's we build Qt for, specify which OS's
we will build qrencode for (a qt dependency). This commit alone doesn't
change anything, but when we start supporting other OS's, i.e #23948,
where we wont support qt (or at least initially), it'll skip building
the qrencode package, which would be unused.
2022-01-18 15:30:31 +08:00
MarcoFalke
d0bf9bb6a5
Merge bitcoin/bitcoin#23373: test: Parse command line arguments from unit and fuzz tests, make addrman consistency check ratio easier to change
7f122a4188 fuzz: non-addrman fuzz tests: override-able check ratio (Vasil Dimov)
3bd83e273d fuzz: addrman fuzz tests: override-able check ratio (Vasil Dimov)
46b0fe7829 test: non-addrman unit tests: override-able check ratio (Vasil Dimov)
81e4d54d3a test: addrman unit tests: override-able check ratio (Vasil Dimov)
6dff6214be bench: put addrman check ratio in a variable (Vasil Dimov)
6f7c7567c5 fuzz: parse the command line arguments in fuzz tests (Vasil Dimov)
92a0f7e58d test: parse the command line arguments in unit tests (Vasil Dimov)

Pull request description:

  Previously command line arguments passed to unit and fuzz tests would be ignored by the tests themselves. They would be used by the boost test framework (e.g. `--run_test="addrman_tests/*"`) or by the fuzzer (e.g. `-runs=1`). However both provide ways to pass down the extra arguments to the test itself. Use that, parse the arguments and make them available to the tests via `gArgs`.

  This makes the tests more flexible as they can be run with any bitcoind config option specified on the command line.

  When creating `AddrMan` objects in tests, use `-checkaddrman=` (if provided) instead of hardcoding the check ratio in many different places. See https://github.com/bitcoin/bitcoin/pull/20233#issuecomment-889813074 for further motivation for this.

ACKs for top commit:
  mzumsande:
    re-ACK 7f122a4188
  josibake:
    reACK 7f122a4188

Tree-SHA512: 3a05e61e4d70a0569bb67594bcce3aad8fdef63cdcc54e2823a3bc9f18679571985004412b6c332a210f67849bab32d8467b4115fbff8f5fac9834982e60dcf3
2022-01-17 09:10:21 +01:00
MarcoFalke
427e9c9435
Merge bitcoin/bitcoin#24069: refactor: replace RecursiveMutex m_cs_callbacks_pending with Mutex (and rename)
5574e6ed52 refactor: replace RecursiveMutex `m_callbacks_mutex` with Mutex (Sebastian Falbesoner)
3aa258109e scripted-diff: rename `m_cs_callbacks_pending` -> `m_callbacks_mutex` (Sebastian Falbesoner)

Pull request description:

  This PR is related to #19303 and gets rid of the RecursiveMutex `m_cs_callbacks_pending`. All of the critical sections (6 in total) only directly access the guarded elements, i.e. it is not possible that within one section another one is called, and we can use a regular Mutex:

  807169e10b/src/scheduler.cpp (L138-L145)

  807169e10b/src/scheduler.cpp (L152-L160)

  807169e10b/src/scheduler.cpp (L169-L172)

  807169e10b/src/scheduler.cpp (L184-L187)

  807169e10b/src/scheduler.cpp (L197-L199)

  807169e10b/src/scheduler.cpp (L203-L206)

  Also, it is renamed to adapt to the (unwritten) naming convention to use the `_mutex` suffix rather than the `cs_` prefix.

ACKs for top commit:
  hebasto:
    ACK 5574e6ed52, I have reviewed the code and it looks OK, I agree it can be merged.
  w0xlt:
    crACK 5574e6e

Tree-SHA512: ba4b151d956582f4c7183a1d51702b269158fc5e2902c51e6a242aaeb1c72cfcdf398f9ffa42e3072f5aba21a8c493086a5fe7c450c271322da69bd54c37ed1f
2022-01-17 08:53:48 +01:00
MarcoFalke
dbf81a73e3
Merge bitcoin/bitcoin#24079: refactor: replace RecursiveMutex cs_SubVer with Mutex (and rename)
30927cb530 refactor: replace RecursiveMutex `m_subver_mutex` with Mutex (Sebastian Falbesoner)
0639aba42a scripted-diff: rename `cs_SubVer` -> `m_subver_mutex` (Sebastian Falbesoner)

Pull request description:

  This PR is related to #19303 and gets rid of the RecursiveMutex `cs_SubVer`. Both of the critical sections only directly access the guarded variable, i.e. it is not possible that within one section another one is called, and we can use a regular Mutex.

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

Tree-SHA512: 2faead792ea0b2f79f9f7fe99acde5cf2bfcd2f15c51fbb6cb1099d4f81276001a492f7d46a5139055f4366c2d58a36a8ba19f21d56df20e0ed93af3141dbe11
2022-01-17 08:50:40 +01:00
MarcoFalke
92a71f65be
Merge bitcoin/bitcoin#24059: Fix implicit-integer-sign-change in arith_uint256
fa99e108e7 Fix implicit-integer-sign-change in arith_uint256 (MarcoFalke)

Pull request description:

  This refactor doesn't change behaviour, but clarifies that the numbers being dealt with aren't supposed to be negative. This helps when reading the code and allows to remove a sanitizer suppression for the whole file.

ACKs for top commit:
  PastaPastaPasta:
    utACK fa99e108e7
  shaavan:
    ACK fa99e108e7

Tree-SHA512: f227e2fd22021e39f0445ec041f4a299d13477c23cef0fc06c53fb3313cbe550cec329336224a7e8775d9045b8009423052b394e83d42a1e40772085dfcdd471
2022-01-17 08:48:23 +01:00
MarcoFalke
dfe1341c57
Merge bitcoin/bitcoin#24033: log: Remove GetAdjustedTime from IBD header progress estimation
fac22fd36b log: Remove GetAdjustedTime from IBD header progress estimation (MarcoFalke)

Pull request description:

  This is a "refactor" that shouldn't change behaviour, because the two times are most likely equal. A minimum of 5 outbound peers are needed to adjust the time. And if the time is adjusted, it will be by at most 70 minutes (`DEFAULT_MAX_TIME_ADJUSTMENT`). Thus, the progress estimate should differ by at most 7 blocks.

ACKs for top commit:
  laanwj:
    Code review ACK fac22fd36b
  vincenzopalazzo:
    ACK fac22fd36b

Tree-SHA512: bf9f5eef66db0110dd268cf6dbfab64b9c11ba776924f5b386ceae3f2d005272cceb87ebcc96e0c8b854c051514854a2a5af39ae43bad008fac685b5aafaabd0
2022-01-17 08:46:47 +01:00
MarcoFalke
7de2cf9b25
Merge bitcoin/bitcoin#23992: fuzz: Limit fuzzed time to years 2000-2100
fa7238300c fuzz: Limit fuzzed time to years 2000-2100 (MarcoFalke)

Pull request description:

  It doesn't make sense to fuzz times in the past, as Bitcoin Core will refuse to start in the past.

  Fix that and also remove a sanitizer suppression, which would be hit in net_processing in `ProcessMessage`:

  ```cpp

               if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60)
                   addr.nTime = nNow - 5 * 24 * 60 * 60; // <-- Here
  ```

  This changes the format of fuzz inputs. Previously a time value was (de)serialized as 40 bytes, now it is 32 bytes.

ACKs for top commit:
  mzumsande:
    Code Review ACK fa7238300c

Tree-SHA512: ca6e7233beec2d9ef9fd481d8f1331942a4d2c8fe518b857629bebcc53a4f42ae123b994cf5d359384a0a8022098ff5a9c146600bc2593c6d88734e25bc240ad
2022-01-17 08:43:16 +01:00
fanquake
4a062508b7
Merge bitcoin/bitcoin#24068: doc: Rework 14707 release notes
fa4c72e706 doc: Rework 14707 release notes (MarcoFalke)
fa9377c746 doc: move-only release note snippets (MarcoFalke)

Pull request description:

  Requested by myself in https://github.com/bitcoin/bitcoin/pull/14707/files#r764313750

ACKs for top commit:
  andrewtoth:
    ACK fa4c72e706

Tree-SHA512: 091b9cb511ed3bef1e3d48ba5917ee23dd4bbb0f1daf999ca2b429fcff57b8876375b8579ac0a8ec438dc5c75d536d6d27074f325f51ffd38b0edc284d0c0155
2022-01-17 11:02:47 +08:00
Sebastian Falbesoner
30927cb530 refactor: replace RecursiveMutex m_subver_mutex with Mutex
In each of the critical sections, only the the guarded variable is
accessed, without any chance that within one section another one is
called.  Hence, we can use an ordinary Mutex instead of RecursiveMutex.
2022-01-16 16:49:13 +01:00
Sebastian Falbesoner
0639aba42a scripted-diff: rename cs_SubVer -> m_subver_mutex
-BEGIN VERIFY SCRIPT-
sed -i 's/cs_SubVer/m_subver_mutex/g' ./src/net.h ./src/net.cpp ./src/net_processing.cpp
-END VERIFY SCRIPT-
2022-01-16 16:47:11 +01:00
fanquake
e2ab9f83f8
build: disable external signer on Windows 2022-01-15 10:02:04 +08:00
Sebastian Falbesoner
5574e6ed52 refactor: replace RecursiveMutex m_callbacks_mutex with Mutex
In each of the critical sections, only the the guarded variables are
accessed, without any chance that within one section another one is
called.  Hence, we can use an ordinary Mutex instead of RecursiveMutex.
2022-01-14 13:27:41 +01:00
Sebastian Falbesoner
3aa258109e scripted-diff: rename m_cs_callbacks_pending -> m_callbacks_mutex
-BEGIN VERIFY SCRIPT-
sed -i 's/m_cs_callbacks_pending/m_callbacks_mutex/g' ./src/scheduler.h ./src/scheduler.cpp
-END VERIFY SCRIPT
2022-01-14 13:25:23 +01:00
MarcoFalke
fa4c72e706
doc: Rework 14707 release notes 2022-01-14 12:37:44 +01:00
MarcoFalke
fa9377c746
doc: move-only release note snippets
Can be reviewed with
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2022-01-14 12:36:42 +01:00
brunoerg
bd52684508 test: rest /tx with an invalid/unknown txid 2022-01-13 17:00:18 -03:00
MarcoFalke
807169e10b
Merge bitcoin/bitcoin#24035: test: use MiniWallet for mempool_accept.py
aa8a65e4a8 test: use MiniWallet for mempool_accept.py (Sebastian Falbesoner)
b24f6c6855 test: MiniWallet: support default `from_node` for creating txs (Sebastian Falbesoner)
f30041c914 test: create txs with current `nVersion` (2) by default (Sebastian Falbesoner)
2f79786822 test: refactor: add constant for sequence number `SEQUENCE_FINAL` (Sebastian Falbesoner)

Pull request description:

  This PR enables one more of the non-wallet functional tests (mempool_accept.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in #20078.

  It also includes some other minor changes that came up while working on the replacement:
  * [commit 1/4] replace magic number 0xffffffff for a tx's nSequence with a new constant `SEQUENCE_FINAL`
  * [commit 2/4] create `CTransaction` instances with the current nVersion=2 by default, in order to use BIP68 for tests
  * [commit 3/4] support default `from_node` parameter for creating txs (this is a stripped down version of PR #24025)

ACKs for top commit:
  MarcoFalke:
    re-ACK aa8a65e4a8 📊

Tree-SHA512: 34cd085ea4147ad5bd3f3321c84204064ceb95f382664c7fe29062c1bbc79d9d9465c5e46d35e11c416f2f3cd46030c90a09b518c829c73ae40d060be5e4c9cb
2022-01-13 18:42:24 +01:00
laanwj
767ee2e3a1
Merge bitcoin/bitcoin#23607: rpc: Pass const char* to evhttp_connection_get_peer for new libevent
c62d763fc3 Necessary improvements to make configure work without libevent installed (Perlover)
091ccc38c2 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 c62d763fc3
  luke-jr:
    tACK c62d763fc3

Tree-SHA512: d1c8062d90bd0d55c582dae2c3a7e5ee1b6c7ca872bf4aa7fe6f45a52ac4a8f59464215759d961f8efde0efbeeade31b08daf9387d7d50d7622baa1c06992d83
2022-01-13 18:35:25 +01:00
Sebastian Falbesoner
aa8a65e4a8 test: use MiniWallet for mempool_accept.py
This test can now be run even with the Bitcoin Core wallet disabled.
2022-01-13 18:32:07 +01:00
MarcoFalke
fa99e108e7
Fix implicit-integer-sign-change in arith_uint256 2022-01-13 15:56:59 +01:00
laanwj
31db3dd874
Merge bitcoin/bitcoin#24048: build: Improve error message when pkg-config is not installed
18f304d988 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 18f304d988
  jarolrod:
    ACK 18f304d988

Tree-SHA512: ba845f44c966fea6cf7cee0db9cacc431072e2005ad065c8f2bbe3cffd8415c3af6ed443cccf9606df7de4df2ff3e72636afb5f3776d2a96af8572aab7018549
2022-01-13 11:23:39 +01:00
MarcoFalke
290ff5ef6d
Merge bitcoin/bitcoin#24041: util: Restore GetIntArg saturating behavior
b5c9bb5cb9 util: Restore GetIntArg saturating behavior (James O'Beirne)

Pull request description:

  The new locale-independent atoi64 method introduced in #20452 parses large integer values higher than maximum representable value as 0 instead of the maximum value, which breaks backwards compatibility. This commit restores compatibility and adds test coverage for this case in terms of the related GetIntArg and strtoll functions.

  Specifically, command line or bitcoin.conf integer values greater than `9223372036854775807` (`2**63-1`) used to be parsed as `9223372036854775807` before #20452. Then #20452 caused them to be parsed as `0`. And after this PR they will be parsed as `9223372036854775807` again.

  This change is a stripped-down alternative version of #23841 by jamesob

ACKs for top commit:
  jamesob:
    Github ACK b5c9bb5cb9
  vincenzopalazzo:
    ACK b5c9bb5cb9
  MarcoFalke:
    review ACK b5c9bb5cb9 🌘

Tree-SHA512: 4e8abdbabf3cf4713cf5a7c5169539159f359ab4109a4e7e644cc2e9b2b0c3c532fad9f6b772daf015e1c5340ce59280cd9a41f2730afda6099cbf636b7d23ae
2022-01-12 18:28:07 +01:00
Hennadii Stepanov
18f304d988
build: Improve error message when pkg-config is not installed 2022-01-12 17:38:35 +02:00
Hennadii Stepanov
16781e1bc9
Merge bitcoin-core/gui#517: refactor, qt: Use std::chrono for parameters of QTimer methods
51250b0906 refactor, qt: Use std::chrono for input_filter_delay constant (Hennadii Stepanov)
f3bdc143b6 refactor, qt: Add SHUTDOWN_POLLING_DELAY constant (Hennadii Stepanov)
0e193deb52 refactor, qt: Use std::chrono for non-zero arguments in QTimer methods (Hennadii Stepanov)
6f0da95811 refactor, qt: Use std::chrono in ConfirmMessage parameter (Hennadii Stepanov)
33d520ac53 refactor, qt: Use std::chrono for MODEL_UPDATE_DELAY constant (Hennadii Stepanov)

Pull request description:

  Since Qt 5.8 `QTimer` methods have overloads that accept `std::chrono::milliseconds` arguments:
  - [`QTimer::singleShot`](https://doc.qt.io/archives/qt-5.9/qtimer.html#singleShot-8)
  - [`QTimer::start`](https://doc.qt.io/archives/qt-5.9/qtimer.html#start-2)

ACKs for top commit:
  promag:
    Code review ACK 51250b0906.
  shaavan:
    reACK 51250b0906

Tree-SHA512: aa843bb2322a84c0c2bb113d3b48d7bf02d7f09a770779dcde312c32887f973ef9445cdef42f39edaa599ff0f3d0457454f6153aa130efadd989e413d39c6062
2022-01-12 14:59:24 +02:00
Hennadii Stepanov
e0ae5418cb
Merge bitcoin-core/gui#523: scripted-diff: Rename functions to drop mention of boost
3c4f5d2a20 scripted-diff: Rename functions to drop mention of boost (Hennadii Stepanov)

Pull request description:

  Nothing specific to Boost is in `GUIUtil::qstringToBoostPath` and `GUIUtil::boostPathToQString` functions.

  Related to bitcoin/bitcoin#20744.

ACKs for top commit:
  laanwj:
    Concept and code review ACK 3c4f5d2a20
  promag:
    Code review ACK 3c4f5d2a20 👋

Tree-SHA512: 0c8790979783a067811f7699b4ce4c204f6e0818d5f32986ec24b2c71583b4496d7a0e0c0361dd77c7e641a75d983fee35cd51ef722bbca9a5f13194efb3b4c0
2022-01-12 14:31:50 +02:00
fanquake
318c79e809
Merge bitcoin/bitcoin#24042: build: Point Guix to the current top of the "version-1.4.0" branch
a229451590 build: Point Guix to the current top of the "version-1.4.0" branch (Hennadii Stepanov)

Pull request description:

  On master (c561f2f06e) the commit in Guix repo from bitcoin/bitcoin#23778 seems unavailable:
  ```
  $ git checkout fa17abf1af09570708daa28dd40ffbc932ebe25c
  fatal: reference is not a tree: fa17abf1af09570708daa28dd40ffbc932ebe25c
  ```

  This PR points Guix to the current top of the "version-1.4.0" branch.

  Fixes #24040.

ACKs for top commit:
  MarcoFalke:
    Approach ACK a229451590
  fanquake:
    ACK a229451590 - from what I've seen on the mailing list there shouldn't be any more force pushing.

Tree-SHA512: c58f846fb0afd51b5c2dd33034e9d593aec5d5b49e9f2232af70ae1224da8408ad4e05aa314609350d92a6400e354a816b988226e3572198c3f839ab33913164
2022-01-12 19:46:14 +08:00
Hennadii Stepanov
51250b0906
refactor, qt: Use std::chrono for input_filter_delay constant 2022-01-12 12:24:17 +02:00
MarcoFalke
1f7acfdcca
Merge bitcoin/bitcoin#24024: Remove cs_main lock annotation from ChainstateManager.m_blockman
ce95fb36af Remove cs_main lock annotation from ChainstateManager.m_blockman (Ryan Ofsky)

Pull request description:

  `BlockManager` is a large data structure, and `cs_main` is not required to take its address or access every part of it. Individual `BlockManager` fields and methods which do require `cs_main` like `m_block_index` and `LookupBlockIndex` are already annotated separately, and these other annotations describe locking requirements more accurately and do a better job enforcing thread safety.

  Since `cs_main` is not needed to access the address of the m_block object, this commit drops `cs_main` LOCK calls which were added pointlessly to satisfy this annotation in the past.

  Code changes were made by dongcarl, I just wrote the commit description

ACKs for top commit:
  MarcoFalke:
    cr ACK ce95fb36af
  dongcarl:
    crACK ce95fb36af
  jonatack:
    ACK ce95fb36af per `git range-diff db1f04f 5a1c413 ce95fb3` change since last push is rebase and dropping braces on the member initialization

Tree-SHA512: b18a6ebcc70bea750485f04d4feb7bb28450fea2176e513be9cc242e9f63b24254c5659e74eb6d6045c706a3aaeb94688937b25b7ca7653f8aa3cf8c18845d5a
2022-01-12 10:51:40 +01:00
MarcoFalke
db1f04fa8c
Merge bitcoin/bitcoin#24039: bug fix: prevent UnicodeDecodeError when opening log file in feature_init.py
9d3e95d77c [bugfix] prevent UnicodeDecodeError errors when opening log file in feature_init.py (sogoagain)

Pull request description:

  Should fix #23989

  To fix a bug, I modified `feature_init.py` to open the log file as a byte stream when opening it.
  thank you.

ACKs for top commit:
  MarcoFalke:
    review ACK 9d3e95d77c

Tree-SHA512: 6e3e57cac5f4865b3894ee4e9fcd9eb2690e824af20e34b4595722bd7043b0c3fe417cc1bfcff25fbab95c66418d3fce13434bd63d0244875a867d08853a5644
2022-01-12 09:29:29 +01:00
James O'Beirne
b5c9bb5cb9 util: Restore GetIntArg saturating behavior
The new locale-independent atoi64 method introduced in #20452 parses
large integer values higher than maximum representable value as 0
instead of the maximum value, which breaks backwards compatibility.
This commit restores compatibility and adds test coverage for this case
in terms of the related GetIntArg and strtoll functions.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2022-01-11 19:54:36 -05:00
Hennadii Stepanov
a229451590
build: Point Guix to the current top of the "version-1.4.0" branch 2022-01-11 19:21:05 +02:00
sogoagain
9d3e95d77c [bugfix] prevent UnicodeDecodeError errors when opening log file in feature_init.py
open log file as a raw byte stream in feature_init.py
(fixes #23989)
2022-01-12 02:06:15 +09:00
Hennadii Stepanov
3c4f5d2a20
scripted-diff: Rename functions to drop mention of boost
-BEGIN VERIFY SCRIPT-
FILES=$(git ls-files src/qt)
sed -i 's/boostPathToQString/PathToQString/g' -- $FILES
sed -i 's/qstringToBoostPath/QStringToPath/g' -- $FILES
-END VERIFY SCRIPT-
2022-01-11 18:32:11 +02:00