Commit Graph

31630 Commits

Author SHA1 Message Date
Douglas Chimento
41b9f7d062
test: Use byte unit 'M' for -maxuploadtarget functional test 2021-12-10 20:41:34 +02:00
W. J. van der Laan
6acda4b00b
Merge bitcoin/bitcoin#23155: rpc: various fixups for dumptxoutset
ffd09281fe rpc: various fixups for dumptxoutset (James O'Beirne)

Pull request description:

  This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11) (parent PR: #15606)

  ---

  A few fixes to make this RPC actually useful when generating snapshots.

  - Generate an assumeutxo hash and display it (sort of a bugfix)
  - Add nchaintx to output (necessary for use in chainparams entry)
  - Add path of serialized UTXO file to output

ACKs for top commit:
  laanwj:
    Code review ACK ffd09281fe

Tree-SHA512: b0b5fd5138dea0e21258b1b18ab75bf3fd1628522cc1dbafa81af9cb9fa96562a1c39124fdb31057f256bfc560f462f907e9fe5e209b577b3f57afae2b7be826
2021-12-02 10:35:02 +01:00
fanquake
282cc0cda7
Merge bitcoin/bitcoin#23626: refactor: Fix implicit-signed-integer-truncation in cuckoocache.h
fa7da227da refactor: Fix implicit-signed-integer-truncation in cuckoocache.h (MarcoFalke)

Pull request description:

  Using a file-wide suppression for this implicit truncation has several issues:

  * It is file-wide, thus suppressing any other (newly introduced) issues
  * The file doesn't compile with `-Wimplicit-int-conversion`

  Fix both issues by making the truncation explicit.

ACKs for top commit:
  fanquake:
    ACK fa7da227da

Tree-SHA512: bf2076ed94c4e80d0d29ff883080edc7a73144c73d6d3e872ec87966177ee3160f4760fc4c774aaa6fb591f4acee450a24b0f7c82291e0bef96582a6d134046e
2021-12-02 16:25:54 +08:00
MarcoFalke
af1067c4b7
Merge bitcoin/bitcoin#23640: MOVEONLY: Move helper functions from rpcwallet to wallet/rpc/util
ff945e553a MOVEONLY: Move utility functions from rpcwallet to wallet/rpc/util (Samuel Dobson)
7b04a064f6 Introduce wallet/rpc/util (Samuel Dobson)

Pull request description:

  This is part one of multiple to split up rpcwallet.cpp into smaller, more logical units.

  See #23622 for context and overall plan. I'll open PRs in stages to hopefully minimise conflicts.

  Can be reviewed with `--color-moved=dimmed-zebra`

  The end goal can be seen here: https://github.com/meshcollider/bitcoin/tree/202111_split_walletrpc

ACKs for top commit:
  MarcoFalke:
    nice, ACK ff945e553a šŸ°
  shaavan:
    ACK ff945e553a

Tree-SHA512: 6e3d1de6db770fe2fca540c8c4f30183ab8258c26e3a1fb46937714d28818a52933eafbfcafe2995f6a6e2551a3f3dd3ec93363b81de7912c0d81f5749d1c86d
2021-12-02 08:38:32 +01:00
MarcoFalke
a377510e3a
Merge bitcoin/bitcoin#23643: rpc: remove info about mallocinfo needing glibc 2.10+
9a09d307e9 rpc: remove info about mallocinfo needing glibc 2.10+ (fanquake)

Pull request description:

  We require glibc 2.18+.

ACKs for top commit:
  jarolrod:
    ACK 9a09d307e9
  shaavan:
    ACK 9a09d307e9

Tree-SHA512: 61312e48fda4cb4c788d44be0f0c626e753b0a18a8f36bca813ce838f8e619e73c00306bb716e9863a077c09b5bcdec7dec134d75c5ace719a5c0a05cf75ed8a
2021-12-02 08:31:51 +01:00
fanquake
df562d698a
Merge bitcoin/bitcoin#23637: miner: Remove uncompiled MTP code
fa46ac4d9d miner: Remove uncompiled MTP code (MarcoFalke)
fa6b7adf96 style: Add {} to if-bodies in node/miner (MarcoFalke)

Pull request description:

  This removes uncompiled code.

  Can be checked by inserting `static_assert(STANDARD_LOCKTIME_VERIFY_FLAGS & LOCKTIME_MEDIAN_TIME_PAST)` and compiling or by reading the source code.

  Even if the code was compiled, it would be unsafe to execute, since it is not allowed to include transactions that are locked until some time after the current MTP.

  Also, rename the member to cause explicit merge conflicts in case there is a patch out there referencing the variable.

ACKs for top commit:
  shaavan:
    ACK fa46ac4d9d
  theStack:
    Code-review ACK fa46ac4d9d

Tree-SHA512: 0288f45918996b58d0c0060773aa3cb15c828a649439f3d589c5d6b4854d6da1d8c2ea11d5ca06c654532453ab5ce1892de7ca820e284e96e78b959ef87cac5c
2021-12-02 10:09:42 +08:00
MarcoFalke
4633199cc8
Merge bitcoin/bitcoin#22677: cut the validation <-> txmempool circular dependency 2/2
a64078e385 Break validation <-> txmempool circular dependency (glozow)
64e4963c63 [mempool] always assert coin spent (glozow)
bb9078ed51 [refactor] put finality and maturity checking into a lambda (glozow)
bedf246f1e [mempool] only update lockpoints for non-removed entries (glozow)
1b3a11e126 MOVEONLY: TestLockPointValidity to txmempool (glozow)

Pull request description:

  Remove 2 circular dependencies: validation - txmempool and validation - policy/rbf - txmempool

  Validation should depend on txmempool (e.g. `CChainstateManager` has a mempool and we often need to know what's in our mempool to validate transactions), but txmempool is a data structure that shouldn't really need to know about chain state.

  - Changes `removeForReorg()` to be parameterized by a callable that returns true/false (i.e. whether the transaction should be removed due to being now immature or nonfinal) instead of a `CChainState`. The mempool really shouldn't need to know about coinbase maturity or lockpoints, it just needs to know which entries to remove.

ACKs for top commit:
  laanwj:
    Code review ACK a64078e385
  mjdietzx:
    reACK a64078e385
  theStack:
    re-ACK a64078e385

Tree-SHA512: f75995200569c09dfb8ddc09729da66ddb32167ff1e8a7e72f105ec062d2d6a9a390e6b4a2a115e7ad8ad3525f891ee1503f3cd2bed11773abcaf7c3230b1136
2021-12-01 17:56:08 +01:00
MarcoFalke
1c06e1a7b6
Merge bitcoin/bitcoin#23437: refactor: AcceptToMemoryPool
123f5de826 Remove calls to global Params() in tx_pool test (lsilva01)
9360778d6e Remove AcceptToMemoryPoolWithTime (lsilva01)

Pull request description:

  This PR refactors AcceptToMemoryPool.

  . Remove `AcceptToMemoryPoolWithTime` (after #23173, this function is no longer needed).
  . Remove the `CChainParams chainparams` parameter from ATMP as they can be inferred from the current chain state.
  . Update the `tx_pool` test with new function signature.

ACKs for top commit:
  jnewbery:
    reACK 123f5de826
  glozow:
    light code review ACK 123f5de826
  theStack:
    re-ACK 123f5de826

Tree-SHA512: b672d9f091f5fcb4d163c0a443aa469b2ce6f37201136803201c620c3fa329ffb41abd50c5b528787fd1c47e8e09af5ec20ddaa0a4235352c9c619e5691dddb6
2021-12-01 17:44:25 +01:00
lsilva01
123f5de826 Remove calls to global Params() in tx_pool test 2021-12-01 10:48:55 -03:00
lsilva01
9360778d6e Remove AcceptToMemoryPoolWithTime 2021-12-01 10:44:24 -03:00
MarcoFalke
e7507f333b
Merge bitcoin/bitcoin#23639: doc: Extract CreateTxDoc in rawtransaction
c771ee8571 doc: use BIP125-replaceable (fanquake)
36dc5bb8cb doc: Extract CreateTxDoc in rawtransaction (fanquake)

Pull request description:

  For the fields: inputs, outputs, locktime, replaceable. Similar to #23172.

  Can be reviewed with `--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space`.

ACKs for top commit:
  MarcoFalke:
    ACK c771ee8571 šŸ˜ø

Tree-SHA512: e6e4211b89bedec472f8381b3cbea5670f82b728955888c794f694164b8d8bdd51a99c64762b625357ac2171005712b82f81ee7c1b8f5c5620bdedeeefa2b9da
2021-12-01 12:42:47 +01:00
fanquake
c771ee8571
doc: use BIP125-replaceable 2021-12-01 19:24:38 +08:00
fanquake
36dc5bb8cb
doc: Extract CreateTxDoc in rawtransaction
For the fields: inputs, outputs, locktime, replaceable
2021-12-01 19:24:03 +08:00
fanquake
9a09d307e9
rpc: remove info about mallocinfo needing glibc 2.10+
We require glibc 2.18+.
2021-12-01 19:18:26 +08:00
fanquake
205877e55f
Merge bitcoin/bitcoin#23546: scripted-diff: Use clang-tidy syntax for C++ named arguments (tests only)
fa00447442 scripted-diff: Use clang-tidy syntax for C++ named arguments (MarcoFalke)
fae13c3989 doc: Use clang-tidy comments in crypto_tests (MarcoFalke)

Pull request description:

  Incorrect named args are source of bugs, like #22979.

  To allow them being checked by `clang-tidy`, use a format it can understand.

ACKs for top commit:
  shaavan:
    ACK fa00447442
  rajarshimaitra:
    ACK fa00447442
  jonatack:
    ACK fa00447442
  fanquake:
    ACK fa00447442

Tree-SHA512: 4d23a8363da81dfea21a4cd8516ab5e0dc70119e4d503f3f240f38573218b2c2e84083b97e956c62942d78b2f17490f8b3b2e8077d257644fda1d901e2b80507
2021-12-01 18:44:54 +08:00
MarcoFalke
f2074eeb2d
Merge bitcoin/bitcoin#23601: Don't check if the listening socket is valid
6c9ee92ffe net: don't check if the listening socket is valid (Vasil Dimov)

Pull request description:

  _This is a piece of #21878, chopped off to ease review._

  Listening sockets in `CConnman::vhListenSocket` are always valid
  (underlying file descriptor is not `INVALID_SOCKET`).

ACKs for top commit:
  theStack:
    Code-review ACK 6c9ee92ffe šŸ”Œ

Tree-SHA512: b2e29711c6a0c7c85467ca61cfd7fb734eb06bd83a41f88735901caf90aec095ca80707ce5bb897d39c80fdec16819dbf5a84979c9b1ab3dc3fb8b08cebe7c61
2021-12-01 09:34:31 +01:00
MarcoFalke
fa46ac4d9d
miner: Remove uncompiled MTP code 2021-12-01 09:32:03 +01:00
MarcoFalke
fa6b7adf96
style: Add {} to if-bodies in node/miner
Can be reviewed with --word-diff-regex=. --ignore-all-space
2021-12-01 09:30:27 +01:00
MarcoFalke
9174bcf7da
Merge bitcoin/bitcoin#23590: Crash debug builds when mempool ConsensusScriptChecks fails
faad05c6d2 Crash debug builds when mempool ConsensusScriptChecks fails (MarcoFalke)

Pull request description:

  Currently a bug in the function might sneak around our testing infrastructure.

  Fix that by turning bugs into crashes during tests.

ACKs for top commit:
  glozow:
    utACK faad05c6d2, there's something seriously wrong with the code if this returns false, good to throw in debug mode

Tree-SHA512: dfea1cd9ce3f1c303f49cca1417cd5c77c6ed12849aaff7b6ab1b6060f2f0c9cf5d4689017355d11f66639bab35823f65f848e6979042fa875181509dfd5d3d7
2021-12-01 08:44:12 +01:00
Samuel Dobson
ff945e553a MOVEONLY: Move utility functions from rpcwallet to wallet/rpc/util 2021-12-01 19:22:38 +13:00
Samuel Dobson
7b04a064f6 Introduce wallet/rpc/util 2021-12-01 19:07:49 +13:00
fanquake
c9d7d0a653
Merge bitcoin/bitcoin#23635: test: Bump shellcheck version to 0.8.0
5202bd1dc0 test: Bump shellcheck version to 0.8.0 (Hennadii Stepanov)

Pull request description:

  Among [added](https://github.com/koalaman/shellcheck/blob/master/CHANGELOG.md#v080---2021-11-06) rules, SC2295 could be [useful](https://github.com/bitcoin/bitcoin/pull/23506#issuecomment-982201468) for us.

ACKs for top commit:
  dongcarl:
    Code Review ACK 5202bd1dc0
  fanquake:
    ACK 5202bd1dc0 - would have rather this just been a part of #23506 to avoid another PR and pointless rebasing.

Tree-SHA512: fd7ff801c71af03c5a5b2823b7daba25a430b3ead5e5e50a3663961ee2223e55d322aec91d79999814cd35bd7ed6e9415a0b797718ceb8c0b1dbdbb40c336b82
2021-12-01 10:44:59 +08:00
W. J. van der Laan
aef8c7cf82
Merge bitcoin/bitcoin#23289: test: add stress tests for initialization
d9803f7a0a test: add stress tests for initialization (James O'Beirne)
23f85616a8 test: add node.chain_path and node.debug_log_path (James O'Beirne)

Pull request description:

  In the course of coming up with a test plan for #23280, I thought it would be neat to include a Python snippet showing how I tested the initialization process. I quickly realized I was reinventing the functional test framework... so here's a new test.

  This change bangs init around like the Fonz hitting a jukebox. It adds some interesting (read: lazy and random) coverage for the initialization process by
  - interrupting init with SIGTERM after certain log statements,
  - interrupting init at random points, and
  - starting init with some essential data missing (block files, block indices, etc.) to test init error paths.

  As far as I can tell, some of these code paths are uncovered otherwise (namely the startup errors).

  ---

  Incidentally, I think I may have uncovered some kind of a bug or race condition with indexing initialization based on an intermittent failure in this testcase. This test sometimes fails after shutting down immediately after `loadblk` thread start:
  ```
  2021-10-15T21:14:51.295000Z TestFramework (INFO): Starting node and will exit after line 'loadblk thread start'
    36   ā”‚ 2021-10-15T21:14:51.296000Z TestFramework.node0 (DEBUG): bitcoind started, waiting for RPC to come up
    37   ā”‚ 2021-10-15T21:14:51.493000Z TestFramework (INFO): terminating node after 110 log lines seen
    38   ā”‚ 2021-10-15T21:14:51.625000Z TestFramework (INFO): Starting node and will exit after line 'txindex thread start'
    39   ā”‚ 2021-10-15T21:14:51.625000Z TestFramework.node0 (DEBUG): bitcoind started, waiting for RPC to come up
    ------> [[ FAILURE HERE ]] 2021-10-15T21:15:21.626000Z TestFramework (WARNING): missed line {bail_line}; bailing now after {num_lines} lines
  ```
  and then fails to start up afterwards. Combined logs showing `Error: txindex best block of the index goes beyond pruned data`, when the node under test is not pruned:

  ```
    node0 2021-10-15T21:16:51.848439Z [shutoff] [validationinterface.cpp:244] [ChainStateFlushed] Enqueuing ChainStateFlushed: block hash=1014bc4ff4917602ae53d10e9dfe230af4b7d52a6cdaa8a47798b9c288180907
     node0 2021-10-15T21:16:51.848954Z [shutoff] [init.cpp:302] [Shutdown] Shutdown: done
     test  2021-10-15T21:16:51.882000Z TestFramework (ERROR): Unexpected exception caught during testing
       Traceback (most recent call last):
         File "/home/james/src/bitcoin/test/functional/test_framework/test_framework.py", line 132, in main
   self.run_test()
         File "/home/james/src/bitcoin/./test/functional/stress_init.py", line 87, in run_test
   check_clean_start()
         File "/home/james/src/bitcoin/./test/functional/stress_init.py", line 60, in check_clean_start
   node.wait_for_rpc_connection()
         File "/home/james/src/bitcoin/test/functional/test_framework/test_node.py", line 224, in wait_for_rpc_connection
   raise FailedToStartError(self._node_msg(
       test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 1 during initialization
     test  2021-10-15T21:16:51.882000Z TestFramework (DEBUG): Closing down network thread
     test  2021-10-15T21:16:51.933000Z TestFramework (INFO): Stopping nodes
     test  2021-10-15T21:16:51.933000Z TestFramework.node0 (DEBUG): Stopping node

     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
  ```

ACKs for top commit:
  laanwj:
    Code review ACK d9803f7a0a

Tree-SHA512: 4d80dc399daf199a6222e81e47d12d830dc7af07355eddbb7f52479a676a645b8d3d45093ff54a9295f01a163b2f4fe0e038e83fc269969e03d4cfda69eaf111
2021-11-30 20:50:11 +01:00
Hennadii Stepanov
5202bd1dc0
test: Bump shellcheck version to 0.8.0 2021-11-30 21:15:40 +02:00
W. J. van der Laan
c5712d172e
Merge bitcoin/bitcoin#23506: test: Make more shell scripts verifiable by the shellcheck tool
a3f61676e8 test: Make more shell scripts verifiable by the `shellcheck` tool (Hennadii Stepanov)

Pull request description:

  Some shell scripts from `contrib/guix` and `contrib/shell` are not verifiable by the `shellcheck` tool for the following reasons:
  - they have no extension (see 4eccf063b2 from bitcoin/bitcoin#21375)
  - they have the `.bash` extension while `.sh` is expected

  This PR adds these scripts to the input for the `shellcheck` tool, and it fixes discovered `shellcheck` warnings.

ACKs for top commit:
  dongcarl:
    Code Review ACK a3f61676e8, this is a good robustness improvement for our shell scripts.
  jamesob:
    crACK a3f61676e8

Tree-SHA512: 6703f5369d9c04c1a174491f381afa5ec2cc4d37321c1b93615abcdde4dfd3caae82868b699c25b72132d8c8c6f2e9cf24d38eb180ed4d0f0584d8c282e58935
2021-11-30 20:05:44 +01:00
W. J. van der Laan
63c0d0e937
Merge bitcoin/bitcoin#21327: net_processing: ignore transactions while in IBD
6aed8b7e9b [test] tx processing before and after ibd (glozow)
b9e105b664 [net_processing] ignore all transactions during ibd (glozow)

Pull request description:

  This is basically a mini, IBD-only version of #21224

  Incoming transactions aren't really relevant until we're caught up. That's why we send a giant feefilter and don't send tx getdatas, but we also shouldn't process them if peers send them anyway. Simply ignore them.

ACKs for top commit:
  jnewbery:
    reACK 6aed8b7e9b
  laanwj:
    Code review ACK 6aed8b7e9b

Tree-SHA512: 8e1616bf355f9d0b180bdbc5461f24c757dc5d7bc7bf651470f3b0bffcca5d5e68287106255b5cede2d96b42bce448a0f8c0649de35a530c5e079f7c89c70a35
2021-11-30 19:09:15 +01:00
James O'Beirne
ffd09281fe
rpc: various fixups for dumptxoutset
- Actually generate an assumeutxo hash and display it
- Add nchaintx to output (necessary for use in chainparams entry)
- Add path of serialized UTXO file to output
2021-11-30 11:19:26 -05:00
glozow
a64078e385 Break validation <-> txmempool circular dependency
No behavior change.

Parameterize removeForReorg using a CChain and callable that
encapsulates validation logic.  The mempool shouldn't need to know a
bunch of details about coinbase maturity and lock finality. Instead,
just pass in a callable function that says true/false. Breaks circular
dependency by removing txmempool's dependency on validation.
2021-11-30 12:21:56 +00:00
glozow
64e4963c63 [mempool] always assert coin spent
This is an extremely cheap function (just checks that the coin CTxOut
isn't null) that doesn't need to be gated on check_ratio.
2021-11-30 12:21:56 +00:00
glozow
bb9078ed51 [refactor] put finality and maturity checking into a lambda
No behavior change.
2021-11-30 12:21:39 +00:00
glozow
bedf246f1e [mempool] only update lockpoints for non-removed entries
Each entry's lockpoints are independent of one another, so there isn't
any reason to update lockpoints for entries that will be removed.
Separating the loops also allows us to move validation logic out and
leave lockpoints in txmempool.
2021-11-30 12:10:19 +00:00
MarcoFalke
ffdf8ee43e
Merge bitcoin/bitcoin#23602: wallet: Split stuff from rpcwallet
fae239208d wallet: Split signmessage from rpcwallet (MarcoFalke)

Pull request description:

  rpcwallet is the file that takes longest to compile, especially with sanitizers enabled it can take several 10s of seconds.

  Allow faster incremental and parallel builds by starting to split it up. First, split off `signmessage`, which is unrelated to other stuff such as wallet file handling, wallet encryption, tx creation, or wallet status/info.

ACKs for top commit:
  ryanofsky:
    Code review ACK fae239208d. Confirmed move only
  meshcollider:
    Code review ACK fae239208d

Tree-SHA512: 250445cd544e39376f225871270cdcae462f16cfd9d25ede4b148e915642bfac9ee7ef3e8eccdd2443dc74dbf794d3bcd5fe5c58b1d05a2dcec70b8e03b37dff
2021-11-30 13:09:20 +01:00
glozow
1b3a11e126 MOVEONLY: TestLockPointValidity to txmempool 2021-11-30 11:56:46 +00:00
fanquake
29074ba836
Merge bitcoin/bitcoin#23618: build, qt: Ditch no_sdk_version_check.patch
855bd75503 build, qt: Ditch `no_sdk_version_check.patch` (Hennadii Stepanov)

Pull request description:

  Since Qt 5.12.2 (see 5d181961ea) it is possible to control whether to check macOS SDK with the `QT_MAC_SDK_NO_VERSION_CHECK` variable.

ACKs for top commit:
  fanquake:
    ACK 855bd75503

Tree-SHA512: e490f22da9c37d25b58418ca62e65d2303cfbd83139f4abea4b67c37fa97e9a882ccc9d484b49cd2bb3a8851ea35e63123d3c6db7f804d6b50f41b10bd10c10b
2021-11-30 16:50:50 +08:00
fanquake
8b07145796
Merge bitcoin/bitcoin#23597: ci: Revamp SDK caches
6c7b8837d3 ci: Always run merge_base_script first for consistency (Hennadii Stepanov)
3ad5ace351 ci: Revamp Android SDK cache, and update it timely (Hennadii Stepanov)
e988bc7f2e ci: Make macOS SDK cache independent, and update it timely (Hennadii Stepanov)

Pull request description:

  On master (681b25e3cd) SDK (macOS and Android) are not invalidated timely.
  For instance, during updating macOS SDK in #21851 it is not possible to run a related CI task successfully.

  Another flaw is related to Android SDK -- the following commands 681b25e3cd/ci/test/05_before_script.sh (L25-L32) run regardless of cache state. See CI task [log](https://api.cirrus-ci.com/v1/task/5962074015662080/logs/ci.log) for details.

  This PR:
  - drops caching of `depends/sdk-sources` in favor of separated caching of `depends/SDKs/$MACOS_SDK` and `depends/SDKs/android`
  - establishes conditions for cache invalidation
  - bypass unneeded commands when a cache is populated

ACKs for top commit:
  fanquake:
    ACK 6c7b8837d3

Tree-SHA512: e5a5ebefd47fad495f08b8f821573977c1b8a906b3424396973bdf41da255446edbcbd43ea4f4f837f77ac95380f32e436eb75944f3457ec995057445b3b215e
2021-11-30 10:35:47 +08:00
W. J. van der Laan
383d350bd5
Merge bitcoin/bitcoin#22513: rpc: Allow walletprocesspsbt to sign without finalizing
a99ed89865 psbt: sign without finalizing (Andrew Chow)

Pull request description:

  It can be useful to sign an input with `walletprocesspsbt` but not finalize that input if it is complete. This PR adds another option to `walletprocesspsbt` to be able to do that. We will still finalize by default.

  This does not materially change the PSBT workflow since `finalizepsbt` needs to be called in order to extract the tx for broadcast.

ACKs for top commit:
  meshcollider:
    utACK a99ed89865
  Sjors:
    utACK a99ed89

Tree-SHA512: c88e5d3222109c5f4e763b1b9d97ce4655f68f2985a4509caab2d4e7f5bac5047328fd69696e82a330f5c5a333e0312568ae293515689b77a4747ca2f17caca6
2021-11-29 17:20:20 +01:00
W. J. van der Laan
913b7148a2
Merge bitcoin/bitcoin#22902: tracing: utxocache tracepoints
2bc51c5c32 [tracing] tracepoints to utxocache add, spent and uncache (Arnab Sen)
a26e8eef43 [tracing] tracepoint for utxocache flushes (Arnab Sen)

Pull request description:

  This PR adds some of the UTXO set cache tracepoints proposed in https://github.com/bitcoin/bitcoin/issues/20981#issuecomment-802688809. The first tracepoints were added in bitcoin#22006.

  tracepoint | description
  -- | --
  `utxocache:flush` | Is calledĀ afterĀ the caches and indexes are flushed
  `utxocache:add` | when a new coin is added to the UTXO cache
  `utxocache:spent` | when a coin is spent
  `utxocache:uncache` | when coin is removed from the UTXO cache

  The tracepoints are further documented in `docs/tracing.md` and the usage is shown via the two newly added example scripts in `contrib/tracing/`.

ACKs for top commit:
  laanwj:
    Code and documentation review ACK 2bc51c5c32

Tree-SHA512: d6b4f435d3260de4c48b36956f9311f65ab3b52cd03b1e0a4ba9cf47a774d8c4b31878e222b11e0ba5d233a68f7567f8a367b12a6392f688c10c11529341e837
2021-11-29 16:39:05 +01:00
MarcoFalke
fa7da227da
refactor: Fix implicit-signed-integer-truncation in cuckoocache.h 2021-11-29 14:32:51 +01:00
W. J. van der Laan
a574f4ad39
Merge bitcoin/bitcoin#23392: test: move check_node_connections to util
988024fe37 test: add check_node_connections in util (brunoerg)

Pull request description:

  This function (`check_node_connections`) exists in `feature_anchors.py` and `p2p_add_connections.py` and does the same thing in both, this PR moves this function to util to avoid repetition and facilitate maintenance.

ACKs for top commit:
  laanwj:
    Code review ACK 988024fe37

Tree-SHA512: bf86c5659933539c72cb91ad587552b45c918be74d36fb429e78f3b954f01ed0855a85dd49aea35b432fbd18227c05eb3fec8b99c139c3509c39b19bccf6b7fd
2021-11-29 13:51:27 +01:00
W. J. van der Laan
014cae2ee8
Merge bitcoin/bitcoin#23591: refactor: Use underlying type of isminetype for isminefilter
fa2c991ec9 refactor: Use underlying type of isminetype for isminefilter (MarcoFalke)

Pull request description:

  This does not change behavior, but it would be good for code clarity and to avoid `-Wimplicit-int-conversion` compiler warnings to use the an int of the same width for both `isminetype` and `isminefilter`.

ACKs for top commit:
  laanwj:
    Code review ACK fa2c991ec9
  shaavan:
    crACK fa2c991ec9
  promag:
    Code review ACK fa2c991ec9.

Tree-SHA512: b3e255de7c9b1dea272bc8cb9386b339fe701f18580e03e997c270cac6453088ca2032e26e39f536d66cd1b6fda3e96bdbdc6e960879030e635338d0916277e6
2021-11-29 13:14:10 +01:00
MarcoFalke
b4f647fa36
Merge bitcoin/bitcoin#23397: Avoid excessive lock contention in CCheckQueue::Add
459e208276 Exit early for an empty vChecks in CCheckQueue::Add (Hennadii Stepanov)
c43aa62343 Avoid excessive lock contention in CCheckQueue::Add (Hennadii Stepanov)

Pull request description:

  This PR significantly reduces lock contention in the `CCheckQueue` class by releasing a mutex before calling `std::condition_variable::notify_one` and `std::condition_variable::notify_all`.

  From C++ [docs](https://en.cppreference.com/w/cpp/thread/condition_variable/notify_one):
  > The notifying thread does not need to hold the lock on the same mutex as the one held by the waiting thread(s); in fact doing so is a pessimization, since the notified thread would immediately block again, waiting for the notifying thread to release the lock.

  Related to:
  - #23167
  - #23223

ACKs for top commit:
  martinus:
    ACK 459e208, codereview and tested. I first thought this introduced a segfault in `psbt_wallet_tests/psbt_updater_test` because that test failed for me, but thats a different issue fixed in #23403.
  vasild:
    ACK 459e208276
  theStack:
    Code-review ACK 459e208276

Tree-SHA512: c197858656392ba3ebcd638d713cf93c9fb48b7b3bad193209490d2828f9c7e3ae4dee6f84674f2f34dceed894139562e29579ee7299e06756c8c990caddc5ed
2021-11-29 11:02:48 +01:00
fanquake
e521c5589e
Merge bitcoin/bitcoin#23617: doc: Fix typos in packages.md
83c08ba0c9 doc: Fix typos in packages.md (Hennadii Stepanov)

Pull request description:

ACKs for top commit:
  theStack:
    ACK 83c08ba0c9
  Zero-1729:
    ACK 83c08ba0c9
  brunoerg:
    ACK 83c08ba0c9

Tree-SHA512: d6b192ecf10254943c6be0762a512258642862992d28834b0429d5b95601192da60058cf1d72fd1a4e5834b56e11776aa8b994b7947d3d29d6592617b9d875ef
2021-11-29 09:06:12 +08:00
Hennadii Stepanov
855bd75503
build, qt: Ditch no_sdk_version_check.patch 2021-11-28 20:56:54 +02:00
Hennadii Stepanov
83c08ba0c9
doc: Fix typos in packages.md 2021-11-28 18:13:52 +02:00
Hennadii Stepanov
a3f61676e8
test: Make more shell scripts verifiable by the shellcheck tool 2021-11-28 14:08:54 +02:00
Arnab Sen
2bc51c5c32 [tracing] tracepoints to utxocache add, spent and uncache
Signed-off-by: Arnab Sen <arnabsen1729@gmail.com>
2021-11-28 11:51:21 +05:30
Arnab Sen
a26e8eef43 [tracing] tracepoint for utxocache flushes
Signed-off-by: Arnab Sen <arnabsen1729@gmail.com>
2021-11-28 11:34:44 +05:30
fanquake
4f8b1f8759
Merge bitcoin/bitcoin#23608: test: fix feature_rbf.py --descriptors and add to test runner
b79dbe86a9 test: add feature_rbf.py --descriptors to test_runner.py (Sebastian Falbesoner)
166f8ec28e test: always rescan after importing private keys in `init_wallet` helper (Sebastian Falbesoner)

Pull request description:

  The functional test feature_rbf.py currently fails on master branch, if descriptor wallets are used (argument `--descriptors`). This is due to the fact that in this case, a call to the helper `init_wallet`

  111c3e06b3/test/functional/test_framework/test_framework.py (L428-L434)

  creates a wallet without rescanning the blockchain; the test framework maps the importprivkey RPC calls to the importdescriptors RPC without rescanning by default (timestamp='now'). Fix this by always calling with `rescan=True`, which calls importdescriptors with timestamp=0. Also add `feature_rbf.py --descriptors` to the list of the test runner's calls.

  Fixes #23563.

ACKs for top commit:
  mjdietzx:
    ACK b79dbe86a9

Tree-SHA512: a3f3f7a4077066e3c910919d3b5e04bc6b580c1e0a06e9a2fc258950eaea5e59c0f805c8f00432aea722609f2f7e41eebfab653471b76729c5a316825a3d8c86
2021-11-28 09:51:45 +08:00
fanquake
4aa06f9447
Merge bitcoin/bitcoin#23600: doc: Tidy up nMinDiskSpace comment
fa5a886fa3 doc: Tidy up nMinDiskSpace comment (MarcoFalke)

Pull request description:

  nMinDiskSpace was removed in commit 04cca33

  Also, remove incorrect doxygen comment. See https://doxygen.bitcoincore.org/class_c_chain.html#aeb563751f7362d4308c7c2cb35b834a5

ACKs for top commit:
  theStack:
    ACK fa5a886fa3

Tree-SHA512: d57a6a0f0a66615bebb3cca19dc831cca38be0f18a580bb88e774384c55ccc545279b6d115b86fda70528a86630065393fb692fc2997ef87f97eec2d162808bb
2021-11-28 09:42:52 +08:00
Samuel Dobson
200d97faf2
Merge bitcoin/bitcoin#22868: wallet: Call load handlers without cs_wallet locked
f13a22a631 wallet: Call load handlers without cs_wallet locked (JoĆ£o Barbosa)

Pull request description:

  Don't have `cs_wallet` locked while calling each `context.wallet_load_fns`. A load handler can always lock `cs_wallet` if needed.

  The lock was added in 1c7e25db0c to satisfy TSAN. With 44c430ffac most of the code requiring the lock is in `CWallet::AttachChain`. A comment is added to warn about wallets_mutex and cs_wallet lock ordering.

ACKs for top commit:
  meshcollider:
    re-utACK f13a22a631
  ryanofsky:
    Code review ACK f13a22a631. Only change since last review is adding a lock order comment
  jonatack:
    ACK f13a22a631

Tree-SHA512: d51976c3aae4bebc2d1997c88edff712d21fc5523801f5614062a10f826e164579973aeb1981bb1cbc243ecff6af3250362f544c02a79e5d135cbbca1704be62
2021-11-27 22:30:46 +13:00