Commit Graph

28988 Commits

Author SHA1 Message Date
MarcoFalke
fa8a88849c
bench: Remove duplicate constants 2021-05-03 11:50:30 +02:00
MarcoFalke
000098f964
test: Use throwing variant accessor
It does not matter if the tests fail due to a BOOST_CHECK failure or
due to a thrown exception. Prefer the exception because it is less
code.

Example fail with the throwing accessor:

unknown location(0): fatal error: in "script_standard_tests/script_standard_ExtractDestinations": std::bad_variant_access: std::get: wrong index for variant
test/script_standard_tests.cpp(314): last checkpoint

*** 1 failure is detected in the test module "Bitcoin Core Test Suite"
2021-05-03 11:50:29 +02:00
MarcoFalke
fa2197c8b3
test: Use loop to register RPCs
The same loop is used by the server, so no need for
the tests to do this differently.
2021-05-03 11:50:05 +02:00
MarcoFalke
b8593616dc
Merge bitcoin/bitcoin#21775: p2p: Limit m_block_inv_mutex
fac96d0265 p2p: Limit m_block_inv_mutex (MarcoFalke)

Pull request description:

  Keeping the lock longer than needed is confusing to reviewers and thread analysis. For example, keeping the lock while appending tx-invs, which requires the mempool lock, will tell thread analysis tools an incorrect lock order of `(1) m_block_inv_mutex, (2) pool.cs`.

ACKs for top commit:
  Crypt-iQ:
    crACK fac96d0265
  jnewbery:
    utACK fac96d0265
  theStack:
    Code-Review ACK fac96d0265

Tree-SHA512: fcfac0f1f8b16df7522513abf716b2eed3d2fc9153f231c8cb61f451e342f29c984a5c872deca6bab3e601e5d651874cc229146c9370e46811b4520747a21f2b
2021-05-03 11:13:41 +02:00
MarcoFalke
320e518b90
Merge bitcoin/bitcoin#21750: net: remove unnecessary check of CNode::cs_vSend
9096b13a47 net: remove unnecessary check of CNode::cs_vSend (Vasil Dimov)

Pull request description:

  It is not possible to have a node in `CConnman::vNodesDisconnected` and
  its reference count to be incremented - all `CNode::AddRef()` are done
  either before the node is added to `CConnman::vNodes` or while holding
  `CConnman::cs_vNodes` and the object being in `CConnman::vNodes`.

  So, the object being in `CConnman::vNodesDisconnected` and its reference
  count being zero means that it is not and will not start to be used by
  other threads.

  So, the lock of `CNode::cs_vSend` in `CConnman::DisconnectNodes()` will
  always succeed and is not necessary.

  Indeed all locks of `CNode::cs_vSend` are done either when the reference
  count is >0 or under the protection of `CConnman::cs_vNodes` and the
  node being in `CConnman::vNodes`.

ACKs for top commit:
  MarcoFalke:
    review ACK 9096b13a47 🏧
  jnewbery:
    utACK 9096b13a47

Tree-SHA512: 910899cdcdc8934642eb0c40fcece8c3b01b7e20a0b023966b9d6972db6a885cb3a9a04e9562bae14d5833967e45e2ecb3687b94d495060c3da4b1f2afb0ac8f
2021-05-03 08:13:53 +02:00
fanquake
77d569ccb5
Merge bitcoin/bitcoin#19817: build: macOS toolchain bump
a5550f877a build: use -stdlib++-isystem with Clang 10 (fanquake)
51d9d1607f guix: use Clang 10 for the macOS cross compile (fanquake)
b80a6af9e5 build: no longer patch threading out of ld64 (fanquake)
c29cba44b3 build: Xcode 12.1, macOS SDK 10.15.6 (fanquake)
9ed2f19d38 build: native cctools 973.0.1, ld64 609 (fanquake)
f48f187cce build: Clang 10.0.1 (Hennadii Stepanov)
9b193cd2a3 build: libtapi 1100.0.11 (fanquake)

Pull request description:

  Bumps our macOS toolchain to be using the following:
  * Clang 10.0.1 (gitian) & Clang 10.0.0 (Guix)
  * ld64 609
  * libtapi 1100.0.11
  * cctools  973.0.1
  * Xcode 12.1
  * macOS SDK 10.15.6

  which are currently the most recent releases available as open source. See upstream [`cctools`](https://github.com/tpoechtrager/cctools-port/commits/973.0.1-ld64-609) and [`libtapi`](https://github.com/tpoechtrager/apple-libtapi/tree/1100.0.11).

  This should improve the possibility of Apple ARM cross-compilation in depends.

  This also removes our [patching out of pthreads usage](https://github.com/bitcoin/bitcoin/blob/master/depends/patches/native_cctools/ld64_disable_threading.patch) in `ld64`. There have been multiple changes since `ld64 450.3`, which have likely fixed the non-determinism we were working around. i.e from [InputFiles.cpp](https://opensource.apple.com/source/ld64/ld64-609/src/ld/InputFiles.cpp.auto.html):
  ```cpp
  // <rdar://problem/15002251> make implicit dylib order be deterministic by sorting by install_name
  std::sort(implicitDylibs.begin(), implicitDylibs.end(), DylibByInstallNameSorter());
  ```

  ```cpp
  // <rdar://problem/42675402> ld64 output is not deterministic due to dylib processing order
  std::sort(unprocessedDylibs.begin(), unprocessedDylibs.end(), [](const ld::dylib::File* lhs, const ld::dylib::File* rhs) {
  return strcmp(lhs->path(), rhs->path()) < 0;
  });
  ```

  Guix Build:
  ```bash
  find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  f6c3817b8fe5f7370299d1ae2533e4a3acd313ba9f9aa8d423a8956117e52dd5  guix-build-a5550f877a2c/output/dist-archive/bitcoin-a5550f877a2c.tar.gz
  4954dcf563c2d496b8d9fecd48f8e3f7fba2f319ffa254a5bc8ee12cfee6acf0  guix-build-a5550f877a2c/output/x86_64-apple-darwin18/bitcoin-a5550f877a2c-osx-unsigned.dmg
  8f6095b445c7f1a8e6accd86bb7f0696d5849402084927d2b726b7d557831c3a  guix-build-a5550f877a2c/output/x86_64-apple-darwin18/bitcoin-a5550f877a2c-osx-unsigned.tar.gz
  cc40f25477b4defc1617ae694313d80f307ddf6742fe6cc85c6bc0e215ef8be0  guix-build-a5550f877a2c/output/x86_64-apple-darwin18/bitcoin-a5550f877a2c-osx64.tar.gz
  ```

  Gitian Build:
  ```bash
  Generating report
  506a8abdefe559999b43dd9f14905b9b2b5a3363b1cd013d45ae47acc1f7ef6c  bitcoin-a5550f877a2c-osx-unsigned.dmg
  f606997f74026dd12d110d683c6f116b40df324836904ef507dd7ac787e6ebe2  bitcoin-a5550f877a2c-osx-unsigned.tar.gz
  5b495ef15f2c3260c2950921b61326912a9bf533cccd51e13818809fd225489e  bitcoin-a5550f877a2c-osx64.tar.gz
  f6c3817b8fe5f7370299d1ae2533e4a3acd313ba9f9aa8d423a8956117e52dd5  src/bitcoin-a5550f877a2c.tar.gz
  9eb0221e962d2839770963bd03c6c9e98e8bf3078566bee2ae42f06233a710fa  bitcoin-core-osx-22-res.yml
  Done.
  ```

ACKs for top commit:
  hebasto:
    ACK a5550f877a

Tree-SHA512: 504c4b0f9cd3b939714a322298320c5bde07e9356a48a9a000060b36f8dce4d6134ed60c3a5188810476a28ec5b108733eabbc6fb8053231b9ea8a494cc91b12
2021-05-03 14:07:58 +08:00
fanquake
60132382a7
Merge bitcoin/bitcoin#20867: Support up to 20 keys for multisig under Segwit context
ebd4be43cc doc: add release notes for 20867 (Antoine Poinsot)
5aa50ab9cc rpc/util: multisig: only check redeemScript size is <= 520 for P2SH (Antoine Poinsot)
063df9e897 test/functional: standardness sanity checks for P2(W)SH multisig (Antoine Poinsot)
ae0429d3af script: allow up to 20 keys in wsh() descriptors (Antoine Poinsot)
9fc68faf35 script: match multisigs with up to MAX_PUBKEYS_PER_MULTISIG keys (Antoine Poinsot)

Pull request description:

  As described in https://github.com/bitcoin/bitcoin/issues/20620 multisigs are currently limited to 16 keys in descriptors and RPC helpers, even for P2WSH and P2SH-P2WSH.

  This adds support for multisig with up to 20 keys (which are already standard) for Segwit v0 context for descriptors (`wsh()`, `sh(wsh())`) and RPC helpers.

  Fixes https://github.com/bitcoin/bitcoin/issues/20620

ACKs for top commit:
  meshcollider:
    re-utACK ebd4be43cc
  instagibbs:
    re-ACK ebd4be43cc

Tree-SHA512: 36141f10a8288010d17d5c4fe8d24878bcd4533b88a8aba3a44fa8f74ceb3182d70fee01427e0ab7f53ce7fab46c88c1cd3ac3b18ab8a10bd4a6b8b74ed79e46
2021-05-03 12:44:23 +08:00
Hennadii Stepanov
d66f283ac0
scripted-diff: Replace three dots with ellipsis in the UI strings
-BEGIN VERIFY SCRIPT-
sed -i -E -e 's/\.\.\."\)(\.|,|\)| )/…"\)\1/' -- $(git ls-files -- 'src' ':(exclude)src/qt/bitcoinstrings.cpp')
sed -i -e 's/\.\.\.\\"/…\\"/' src/qt/sendcoinsdialog.cpp
sed -i -e 's|\.\.\.</string>|…</string>|' src/qt/forms/*.ui
sed -i -e 's|\.\.\.)</string>|…)</string>|' src/qt/forms/sendcoinsdialog.ui
-END VERIFY SCRIPT-
2021-05-02 22:17:16 +03:00
Jon Atack
142e2da440
net: add I2P seeds to chainparamsseeds 2021-05-02 13:37:50 +02:00
Jon Atack
e01f173fb9
contrib: add a few I2P seed nodes 2021-05-02 13:37:48 +02:00
Jon Atack
ea269c7ef1
contrib: parse I2P addresses in generate-seeds.py 2021-05-02 13:37:41 +02:00
W. J. van der Laan
2448457cca
Merge #21830: doc: Add doc/release-notes/release-notes-0.21.1.md
fab53ea72f doc: Add doc/release-notes/release-notes-0.21.1.md (MarcoFalke)

Pull request description:

ACKs for top commit:
  laanwj:
    ACK fab53ea72f

Tree-SHA512: f228c51c5fd4d18badc72ca185b91a05b248614a69646b234e03963626eccbafcf23c8057bbaa9ae3a3fc4e7d8f007fd69306fc87da229c0c44847de8be42aad
2021-05-02 10:36:46 +02:00
MarcoFalke
fab53ea72f
doc: Add doc/release-notes/release-notes-0.21.1.md 2021-05-02 09:59:14 +02:00
fanquake
59869704c0
Merge bitcoin/bitcoin#21818: doc: fixup -coinstatsindex help, update bitcoin.conf and files.md
54133c59b8 doc: add indexes/coinstats/db/ to files.md (Jon Atack)
5d1050f516 doc: fix -coinstatsindex help, and test/rpc touchups (Jon Atack)
e041ee0a80 doc: add coinstatsindex to bitcoin.conf (Jon Atack)

Pull request description:

ACKs for top commit:
  Sjors:
    utACK 54133c59b8
  MarcoFalke:
    cr ACK 54133c59b8
  clarkmoody:
    utACK 54133c5

Tree-SHA512: 1a7f3e89873b7dc79ec71d5d39e9e3e4977ce43cc4bee208ad55291bef1bb319a9d1c34ed84a87d6a803db983bdfd0af4d9f396cec0bec86b1701ebbb6f34378
2021-05-02 13:50:38 +08:00
fanquake
f2865b7394
Merge bitcoin/bitcoin#21811: doc: Remove Visual Studio 2017 reference from readme
0a331456e4 Remove Visual Studio 2017 reference from readme (Aaron Clauson)

Pull request description:

  This PR was motivated by a comment in GUI PR (257) regarding a suggested improvement not being supported by VS2017.

  When checking whether master can still be built with the VS2017 toolset ABI issues were encountered. Most likely due to the pre-compiled Qt binaries that are used.

  It does not seem worth the effort to try and support VS2017, which would most likely require additional Qt binaries, or lengthy instructions on how to build static Qt binaries on Windows (which is very error prone and tedious).

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

Tree-SHA512: 17e2326cd55a5cc3fc13622ba72bb44f9b9d55070cb77941df5fd943cd3f1baf02b9ac9504dfae5941c522748ad7b584c3c8da03fb323a87b3639eb926ce1699
2021-05-02 13:04:02 +08:00
unknown
3bad0b3fad Remove user input from URI error message
+ Detailed error messages for invalid address
+ Used `IsValidDestination` instead of `IsValidDestinationString`
+ Referred to https://github.com/bitcoin/bitcoin/pull/20832 for solution
2021-05-02 07:47:19 +05:30
MarcoFalke
fae196147b
doc: Clarify that feerates are per virtual size 2021-05-01 18:21:05 +02:00
Aaron Clauson
0a331456e4
Remove Visual Studio 2017 reference from readme
This PR was motivated by a comment in GUI PR (257) regarding a suggested improvement not being supported by VS2017.

When checking whether master can still be built with the VS2017 toolset ABI issues were encountered. Most likely due to the pre-compiled Qt binaries that are used.

It does not seem worth the effort to try and support VS2017, which would most likely require additional Qt binaries, or lengthy instructions on how to build static Qt binaries on Windows (which is very error prone and tedious).

Added advisory note about build not working with earlier Visual Studio versions.

Fixed grammar.
2021-05-01 17:15:38 +01:00
Jon Atack
54133c59b8
doc: add indexes/coinstats/db/ to files.md 2021-05-01 13:57:52 +02:00
Jon Atack
5d1050f516
doc: fix -coinstatsindex help, and test/rpc touchups 2021-05-01 13:57:26 +02:00
MarcoFalke
fafb880e88
refactor: [index] Replace deprecated char with uint8_t in serialization 2021-05-01 13:48:42 +02:00
MarcoFalke
d22e7ee933
Merge bitcoin/bitcoin#21822: test: resolve bug in interface_bitcoin_cli.py
c5bb142817 test: resolve bug in test/functional/interface_bitcoin_cli.py - Test -getinfo with -rpcwallet=unloaded wallet returns no balances (klementtan)

Pull request description:

  I think there is a bug in this test case where the new value of `cli_get_info` is not asserted.

ACKs for top commit:
  jonatack:
    ACK c5bb142817

Tree-SHA512: 50c0c2c8fe63c95f951dee892fbacedf92208f47efe5ed481fbb255f15137c799d9200fa3ff31a442df0691248d7ff04d899842722c3032cd7f35553622ba38c
2021-05-01 13:12:37 +02:00
klementtan
c5bb142817 test: resolve bug in test/functional/interface_bitcoin_cli.py - Test -getinfo with -rpcwallet=unloaded wallet returns no balances 2021-05-01 17:58:01 +08:00
MarcoFalke
fa44f5119a
ci: Clarify that previous_releases task is using DEBUG 2021-05-01 11:17:59 +02:00
MarcoFalke
fad0f21c3c
ci: Use clang in multiprocess task to avoid OOM 2021-05-01 11:17:35 +02:00
MarcoFalke
fa80a11c3b
test: Add missing test for empty P2WSH redeem 2021-05-01 10:12:11 +02:00
MarcoFalke
fa83e95ac6
scripted-diff: Clarify that feerates are per virtual size
-BEGIN VERIFY SCRIPT-
sed -i 's|/kB|/kvB|g' $( git grep -l '/kB' ./src )
-END VERIFY SCRIPT-
2021-05-01 09:42:50 +02:00
fanquake
a5550f877a
build: use -stdlib++-isystem with Clang 10 2021-05-01 13:40:50 +08:00
fanquake
51d9d1607f
guix: use Clang 10 for the macOS cross compile 2021-05-01 13:39:45 +08:00
fanquake
b80a6af9e5
build: no longer patch threading out of ld64
Changes introduced in ld64-450.3 have likely removed the need for us to
patch out pthreads. See:
https://opensource.apple.com/source/ld64/ld64-450.3/src/ld/InputFiles.cpp.auto.html.
2021-05-01 13:39:45 +08:00
fanquake
c29cba44b3
build: Xcode 12.1, macOS SDK 10.15.6 2021-05-01 13:39:45 +08:00
fanquake
9ed2f19d38
build: native cctools 973.0.1, ld64 609 2021-05-01 13:39:44 +08:00
Hennadii Stepanov
f48f187cce
build: Clang 10.0.1
LLVM 8 has inherent nondeterminism in the compiler, fixed in LLVM 9+.
2021-05-01 13:39:44 +08:00
fanquake
9b193cd2a3
build: libtapi 1100.0.11 2021-05-01 13:39:44 +08:00
fanquake
bb11a988fa
Merge bitcoin/bitcoin#21793: build: use -isysroot over --sysroot on macOS
cf971c9ea0 build: use -isysroot over --sysroot on macOS (fanquake)

Pull request description:

  Not only does this seem to be the more correct behaviour when targeting Darwin, but if you use `-isysroot`, Clangs Darwin driver will [infer the deployment target](3e037f8f0e/clang/lib/Driver/ToolChains/Darwin.cpp (L1652)) from the SDK and use other SDK info when parsing arguments to the linker. In the case of [`-platform_version`](3e037f8f0e/clang/lib/Driver/ToolChains/Darwin.cpp (L2656)), which is added if the linker is [new enough](3e037f8f0e/clang/lib/Driver/ToolChains/Darwin.cpp (L342)), the version tuple is constructed from the SDKInfo, and SDKInfo, as far as I can tell, only exists when `-isysroot` has been passed, see [parseSDKSettings](3e037f8f0e/clang/lib/Driver/ToolChains/Darwin.cpp (L1785))

  As a result, the SDK version field in the `LC_BUILD_VERSION` command is filled out. i.e when building master:
  ```bash
        cmd LC_BUILD_VERSION
    cmdsize 32
   platform 1
      minos 10.14
        sdk n/a
     ntools 1
       tool 3
    version 650.9
  ```
  vs this PR:
  ```bash
        cmd LC_BUILD_VERSION
    cmdsize 32
   platform 1
      minos 10.14
        sdk 11.3
     ntools 1
       tool 3
    version 650.9
  ```

  This, from what I understand, will fix the issue we are having with Qt deciding wether or not to enable features like "Dark mode" on macOS, see #21771, however I have not tested that. Thus this is an alternative to #21782.

  Our usage of `--sysroot` was added in #17118.

  ```bash
  -isysroot <dir>         Set the system root directory (usually /)
  ```

ACKs for top commit:
  Sjors:
    tACK cf971c9ea0
  hebasto:
    re-ACK cf971c9ea0, only rebased and addressed comments since my [previous](https://github.com/bitcoin/bitcoin/pull/21793#pullrequestreview-647321518) review.

Tree-SHA512: f01138179fb85083b5505bbaa48810451098ffa4da5d3c9b673785448790aa76f2e64b2aab6e698f6ee378a21f70626445a3fabee7c61dbfc44e96f3e3964656
2021-05-01 13:38:43 +08:00
Hennadii Stepanov
13f24d135b
Merge bitcoin-core/gui#298: Peertableview alternating row colors
e94920a0bb qt: peertableview alternating row colors (randymcmillan)

Pull request description:

  peers-tab: enable alternating row colors for peer table and banned table

ACKs for top commit:
  Bosch-0:
    tACK e94920a0bb on Windows 10 - works as intended. Before / after below:
  jarolrod:
    tACK e94920a0bb

Tree-SHA512: 05ba18e1db9700bbd68644fe02292409f4e5c52e301b1b2977c335d1ff16456a93fb0b15c8c8385d1b15f648141341990706d530f6b08ecb33098fa941b9af1f
2021-04-30 23:17:01 +03:00
Jon Atack
e041ee0a80
doc: add coinstatsindex to bitcoin.conf 2021-04-30 20:19:20 +02:00
t-bast
11d6459b6e
rpc: include_unsafe option for fundrawtransaction
Allow RPC users to opt-in to unsafe inputs when funding a raw transaction.

Applications that need to manage a complex RBF flow (such as lightning
nodes using anchor outputs) are very limited if they can only use safe inputs.

Fixes #21299
2021-04-30 18:53:47 +02:00
W. J. van der Laan
2b45cf0bcd
Merge bitcoin/bitcoin#19521: Coinstats Index
5f96d7d22d rpc: gettxoutsetinfo rejects hash_serialized_2 for specific height (Fabian Jahr)
23fe50436b test: Add test for coinstatsindex behavior in reorgs (Fabian Jahr)
90c966b0f3 rpc: Allow gettxoutsetinfo and getblockstats for stale blocks (Fabian Jahr)
b9362392ae index, rpc: Add use_index option for gettxoutsetinfo (Fabian Jahr)
bb7788b121 test: Test coinstatsindex robustness across restarts (Fabian Jahr)
e0938c2909 test: Add tests for block_info in gettxoutsetinfo (Fabian Jahr)
2501576ecc rpc, index: Add verbose amounts tracking to Coinstats index (Fabian Jahr)
655d929836 test: add coinstatsindex getindexinfo coverage, improve current tests (Jon Atack)
ca01bb8d68 rpc: Add Coinstats index to getindexinfo (Fabian Jahr)
57a026c30f test: Add unit test for Coinstats index (Fabian Jahr)
6a4c0c09ab test: Add functional test for Coinstats index (Fabian Jahr)
3f166ecc12 rpc: gettxoutsetinfo can be requested for specific blockheights (Fabian Jahr)
3c914d58ff index: Coinstats index can be activated with command line flag (Fabian Jahr)
dd58a4de21 index: Add Coinstats index (Fabian Jahr)
a8a46c4b3c refactor: Simplify ApplyStats and ApplyHash (Fabian Jahr)
9c8a265fd2 refactor: Pass hash_type to CoinsStats in stats object (Fabian Jahr)
2e2648a902 crypto: Make MuHash Remove method efficient (Fabian Jahr)

Pull request description:

  This is part of the coinstats index project tracked in #18000

  While the review of the new UTXO set hash algorithm (MuHash) takes longer recently #19328 was merged which added the possibility to run `gettxoutsetinfo` with a specific hash type. As the first type it added `hash_type=none` which skips the hashing of the UTXO set altogether. This alone did not make `gettxoutsetinfo` much faster but it allows the use of an index for the remaining coin statistics even before a new hashing algorithm has been added. Credit to Sjors for the idea to take this intermediate step.

  Features summary:
  - Users can start their node with the option `-coinstatsindex` which syncs the index in the background
  - After the index is synced the user can  use `gettxoutsetinfo` with `hash_type=none` or `hash_type=muhash` and will get the response instantly out of the index
  - The user can specify a height or block hash when calling `gettxoutsetinfo` to see coin statistics at a specific block height

ACKs for top commit:
  Sjors:
    re-tACK 5f96d7d22d
  jonatack:
    Code review re-ACK 5f96d7d22d per `git range-diff 13d27b4 07201d3 5f96d7d`
  promag:
    Tested ACK 5f96d7d22d. Light code review ACK 5f96d7d22d.

Tree-SHA512: cbca78bee8e9605c19da4fbcd184625fb280200718396c694a56c7daab6f44ad23ca9fb5456d09f245d8b8d9659fdc2b3f3ce5e953c1c6cf4003dbc74c0463c2
2021-04-30 17:27:19 +02:00
MarcoFalke
fab1eb65b1
test: Fix feature_config_args.py intermittent issue 2021-04-30 10:49:49 +02:00
MarcoFalke
faeabef4f3
ci: Enable D_GLIBCXX_DEBUG for multiprocess task 2021-04-30 08:33:07 +02:00
MarcoFalke
480bf01c29
Merge bitcoin-core/gui#300: Remove progress bar on modal overlay
61fd8fe9a1 Remove progress bar on modal overlay (bruno)

Pull request description:

  This PR removes the progress bar (keeping only the percentage) on modal overlay

  resolves #279

  Before:
  ![1](https://user-images.githubusercontent.com/19480819/116625265-bde65000-a91f-11eb-93ee-72474fc8dd67.PNG)

  After:
  ![2](https://user-images.githubusercontent.com/19480819/116625272-c2126d80-a91f-11eb-80b7-839703f03f87.PNG)

ACKs for top commit:
  Bosch-0:
    tACK 61fd8fe9a1 on Windows 10. Unnecessary Progress bar no longer there :)
  jarolrod:
    tACK 61fd8fe9a1

Tree-SHA512: 96d72f168b26e950ce37e9f489bcbcc608473c44bce3be127ccd47d17b7642fa234d314596186ee16b430d943575c312d84133425507a17ae7ac58ecae986639
2021-04-30 07:51:53 +02:00
windsok
46b025e00d test: add new python linter to check file names and permissions
Replaces the existing tests in the test/lint/lint-filenames.sh and test/lint/lint-shebang.sh linter tests, as well as adding some new and increased testing.
Summary of tests:
- Checks every file in the repository against an allowed regexp to make sure only lowercase or uppercase alphanumerics (a-zA-Z0-9), underscores (_), hyphens (-), at (@) and dots (.) are used in repository filenames.
- Checks only source files (*.cpp, *.h, *.py, *.sh) against a stricter allowed regexp to make sure only lowercase alphanumerics (a-z0-9), underscores (_), hyphens (-) and dots (.) are used in source code filenames. Additionally there is an exception regexp for directories or files which are excepted from matching this regexp (This should replicate the existing test/lint/lint-filenames.sh test)
- Checks all files in the repository match an allowed executable or non-executable file permission octal. Additionally checks that for executable files, the file contains a shebang line.
- Checks that for executable .py and .sh files, the shebang line used matches an allowable list of shebangs (This should replicate the existing test/lint/lint-shebang.sh test)
- Checks every file that contains a shebang line to ensure it has an executable permission

Fixes #21729
2021-04-29 17:00:58 -07:00
Hennadii Stepanov
cdbc2bd1f1
qt: Use template function qOverload in signal-slot connections
This commit does not change behavior.
2021-04-30 00:00:44 +03:00
Hennadii Stepanov
e1e1e708fa
Merge bitcoin-core/gui#125: Enable changing the autoprune block space size in intro dialog
415fb2e1ab GUI/Intro: Move prune setting below explanation (Luke Dashjr)
2a84c6bcf6 GUI/Intro: Estimate max age of backups that can be restored with pruning (Luke Dashjr)
e2dcd957fa GUI/Intro: Rework UI flow to let the user set prune size in GBs (Luke Dashjr)
f2e5a6b54f GUI/Intro: Abstract GUI-to-option into Intro::getPrune (Luke Dashjr)
62932cc686 GUI/Intro: Return actual prune setting from showIfNeeded (Luke Dashjr)

Pull request description:

  ![Screenshot_20200911_095102](https://user-images.githubusercontent.com/1095675/92933661-0c4cea00-f436-11ea-9853-2456091ffab3.png)

  Moved from https://github.com/bitcoin/bitcoin/pull/18728

ACKs for top commit:
  ryanofsky:
    Code review ACK 415fb2e1ab. Changes since last review: mb/gib suffixes, constexpr QOverload expected_backup_days tweaks, new moveonly layout commit
  jarolrod:
    Tested ACK 415fb2e.
  Talkless:
    tACK 415fb2e1ab, tested on Debian Sid with Qt 5.15.2.
  hebasto:
    ACK 415fb2e1ab, my unresolved comments are not blockers, and they could be resolved in follow ups.

Tree-SHA512: bd4882a9c08e6a6eb14b7fb6366983db8581425b4949fea212785d34d8fad9e32fb81ca8c8cdbfb2c05ea394aaf5a746ba2cf16623795c7252c3bdb61d455f00
2021-04-29 23:47:11 +03:00
W. J. van der Laan
298fd02e4a
Merge bitcoin/bitcoin#21045: build: adds switch to enable/disable randomized base address in MSVC builds
9bd3f35003 build: adds switch for disabling random base addresses in MSVC (Ethan Heilman)

Pull request description:

  In m4 builds we have the --disable-hardening switch that can be given in `./configure` to turn off randomized addresses. This PR provides a simple way of turning off randomized addresses in MSVC builds.

  This PR:
  * Adds this option the common-init project file so that it can be globally set across the project
  * Documents this switch in msvc build readme

  I have run the following test to verify this works

  I ran the msvc build with `<RandomizedBaseAddress>true</RandomizedBaseAddress>` then checked `bitcoind.exe` and `bitcoin-cli.exe` with `dumpbin.exe`:

  bitcoind
  ```
  > .\dumpbin.exe /headers src/bitcoind.exe
  Microsoft (R) COFF/PE Dumper Version 14.16.27045.0
  ...
  OPTIONAL HEADER VALUES
               20B magic # (PE32+)
             14.28 linker version
            AE4600 size of code
            345C00 size of initialized data
                 0 size of uninitialized data
            6BED74 entry point (00000001406BED74) mainCRTStartup
              1000 base of code
         140000000 image base (0000000140000000 to 0000000140E2DFFF)
              1000 section alignment
               200 file alignment
              6.00 operating system version
              0.00 image version
              6.00 subsystem version
                 0 Win32 version
            E2E000 size of image
               400 size of headers
                 0 checksum
                 3 subsystem (Windows CUI)
              8160 DLL characteristics
                     High Entropy Virtual Addresses
                     Dynamic base
                     NX compatible
                     Terminal Server Aware
  ```

  bitcoin-cli
  ```
  > .\dumpbin.exe /headers src/bitcoin-cli.exe
  Microsoft (R) COFF/PE Dumper Version 14.16.27045.0
  ...
  OPTIONAL HEADER VALUES
               20B magic # (PE32+)
             14.28 linker version
            1E3E00 size of code
             92C00 size of initialized data
                 0 size of uninitialized data
            104384 entry point (0000000140104384) mainCRTStartup
              1000 base of code
         140000000 image base (0000000140000000 to 0000000140279FFF)
              1000 section alignment
               200 file alignment
              6.00 operating system version
              0.00 image version
              6.00 subsystem version
                 0 Win32 version
            27A000 size of image
               400 size of headers
                 0 checksum
                 3 subsystem (Windows CUI)
              8160 DLL characteristics
                     High Entropy Virtual Addresses
                     Dynamic base
                     NX compatible
                     Terminal Server Aware
  ```

  Then I built with `<RandomizedBaseAddress>false</RandomizedBaseAddress>` then checked `bitcoind.exe` and `bitcoin-cli.exe` with `dumpbin.exe` and observed that `Dynamic base` was longer listed in `OPTIONAL HEADER VALUES`

  bitcoind
  ```
  PS C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64> .\dumpbin.exe /headers C:\Users\e0\Documents\GitHub\bitcoin021noaslr/src/bitcoind.exe
  Microsoft (R) COFF/PE Dumper Version 14.16.27045.0
  ...
  OPTIONAL HEADER VALUES
               20B magic # (PE32+)
             14.28 linker version
            AE4600 size of code
            33FE00 size of initialized data
                 0 size of uninitialized data
            6BED74 entry point (00000001406BED74) mainCRTStartup
              1000 base of code
         140000000 image base (0000000140000000 to 0000000140E27FFF)
              1000 section alignment
               200 file alignment
              6.00 operating system version
              0.00 image version
              6.00 subsystem version
                 0 Win32 version
            E28000 size of image
               400 size of headers
                 0 checksum
                 3 subsystem (Windows CUI)
              8120 DLL characteristics
                     High Entropy Virtual Addresses
                     NX compatible
                     Terminal Server Aware
  ```

  bitcoin-cli
  ```
  > .\dumpbin.exe /headers src/bitcoin-cli.exe
  Microsoft (R) COFF/PE Dumper Version 14.16.27045.0
  ...
  OPTIONAL HEADER VALUES
               20B magic # (PE32+)
             14.28 linker version
            1E3E00 size of code
             90C00 size of initialized data
                 0 size of uninitialized data
            104384 entry point (0000000140104384) mainCRTStartup
              1000 base of code
         140000000 image base (0000000140000000 to 0000000140277FFF)
              1000 section alignment
               200 file alignment
              6.00 operating system version
              0.00 image version
              6.00 subsystem version
                 0 Win32 version
            278000 size of image
               400 size of headers
                 0 checksum
                 3 subsystem (Windows CUI)
              8120 DLL characteristics
                     High Entropy Virtual Addresses
                     NX compatible
                     Terminal Server Aware
  ```

ACKs for top commit:
  sipsorcery:
    ACK 9bd3f35003.
  practicalswift:
    cr ACK 9bd3f35003: patch looks correct

Tree-SHA512: ddffdb4ff8a09c7cfef61c07a5db2a2828e9e3aa795ad8e5a1bf51ab489a68b40f87f6694518c5e0b8858c0fad4f93bb947b052e6b9d5e55eb38e764b746fc02
2021-04-29 22:14:34 +02:00
MarcoFalke
40310f5e8c
Merge bitcoin/bitcoin#21792: test: Fix intermittent issue in p2p_segwit.py
fad6269916 test: Assert that exit code indicates failure (MarcoFalke)
faecb72c3c test: Fix intermittent issue in p2p_segwit.py (MarcoFalke)

Pull request description:

  Calling `start_node` might call `wait_for_rpc_connection`, which will fail.

  https://cirrus-ci.com/task/5669555591708672?logs=ci#L3504

  ```
    File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/p2p_segwit.py", line 1974, in test_upgrade_after_activation
      self.start_node(2, extra_args=["-reindex", f"-segwitheight={SEGWIT_HEIGHT}"])
    File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 508, in start_node
      node.wait_for_rpc_connection()
    File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/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 2] bitcoind exited with status 1 during initialization

ACKs for top commit:
  jnewbery:
    ACK fad6269916
  dhruv:
    ACK fad6269

Tree-SHA512: 4c5e39ce25e135717ea433258518f93f09d1c528c4538a8627d3da13bc0c0ba4b45911703c26392ff0f5e0cb7831a6c7cc53e6e29102d3da9c8cfce7cef333cc
2021-04-29 20:44:24 +02:00
practicalswift
5252f86eb6 fuzz: Reduce maintenance requirements by allowing RPC annotations also for conditionally available RPC commands (such as wallet commands) without the fragility of #ifdef forests 2021-04-29 18:40:25 +00:00
Hennadii Stepanov
792be53d3e
refactor: Replace std::bind with lambdas
Lambdas are shorter and more readable.
Changes are limited to std::thread ctor calls only.
2021-04-29 18:39:31 +03:00
Hennadii Stepanov
a508f718f3
refactor: Use appropriate thread constructor 2021-04-29 18:39:01 +03:00