Commit Graph

32790 Commits

Author SHA1 Message Date
fanquake
003523d239
Merge bitcoin/bitcoin#24338: util: Work around libstdc++ create_directories issue
b223c3c21e test: Add functional test for symlinked blocks directory (laanwj)
ddb75c2e87 test: Add fs_tests/create_directories unit test (Hennadii Stepanov)
1f46b6e46e util: Work around libstdc++ create_directories issue (laanwj)

Pull request description:

  Work around libstdc++ issue [PR101510] with create_directories where the leaf already exists as a symlink. Fixes #24257, introduced by the switch to `std::filesystem`. It is meant to be more thorough than #24266, which worked around one instance of the problem.

  The issue was [fixed upstream](https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=124eaa50e0a34f5f89572c1aa812c50979da58fc), but unfortunately we'll have to carry a fix for it for a while.

  This introduces a function `fs::create_directories` which wraps
  `std::filesystem::create_directories`. This allows easiliy reverting the
  workaround when it is no longer necessary.

ACKs for top commit:
  jonatack:
    re-ACK b223c3c21e per `git range-diff df08250 67019cd b223c3c`
  hebasto:
    re-ACK b223c3c21e
  w0xlt:
    re-ACK b223c3c
  vasild:
    ACK b223c3c21e

Tree-SHA512: 028321717c8b10d16185c3711b35da6b05fb7aa31cee1c8c7e754e92bf5a0b02719a3785cd0f6f8bf052b3bd759f644af212320672baabc9e44e0b93ba464abc
2022-02-17 16:29:10 +00:00
MarcoFalke
9999f891d1
bench: Avoid deprecated use of volatile += 2022-02-17 17:25:57 +01:00
laanwj
6c4fd36089 util: Add missing rseq to syscall sandbox
Fixes #24368.
2022-02-17 15:01:43 +01:00
laanwj
922c49a138
Merge bitcoin/bitcoin#23819: ConnectBlock: don't serialize block hash twice
eb8b22d517 block_connected: re-use previous GetTimeMicros (William Casarin)
80e1c55687 block_connected: don't serialize block hash twice (William Casarin)

Pull request description:

  In the validation:block_connected tracepoint, we call block->GetHash(), which
  ends up calling CBlockHeader::GetHash(), executing around 8000 serialization
  instructions. We don't need to do this extra work, because block->GetHash() is
  already called further up in the function. Let's save that value as a local
  variable and re-use it in our tracepoint so there is no unnecessary tracepoint
  overhead.

  Shave off an extra 100 or so instructions from the validation:block_connected
  tracepoint by reusing a nearby GetTimeMicros(). This brings the tracepoint down
  to 54 instructions.  Still high, but much better than the previous ~154 and
  8000 instructions which it was originally.

  Signed-off-by: William Casarin <jb55@jb55.com>

ACKs for top commit:
  0xB10C:
    ACK eb8b22d517
  laanwj:
    Code review ACK eb8b22d517
  theStack:
    re-ACK eb8b22d517

Tree-SHA512: 92ae585e487554e0f73042a8abaa239f630502c1d198e010bd7c1de252d882bccb627bbf0e4faec09c1253e782b145bcf153f9fee78cdb8456188044a96f8267
2022-02-17 14:10:13 +01:00
Hennadii Stepanov
1513727e2b
build, qt: (Re-)sign package
Starting with macOS 11 on Apple silicon, executables must be signed
before they are allowed to run.
2022-02-17 14:10:17 +02:00
Hennadii Stepanov
c26a0a5af7
build, qt: Align frameworks with macOS codesign tool requirements
Currently the codesign tool fails to sign copied frameworks.
2022-02-17 14:10:11 +02:00
Jon Atack
e670edd434
User-facing content fixups from transifex translator feedback 2022-02-17 12:59:30 +01:00
laanwj
b223c3c21e test: Add functional test for symlinked blocks directory 2022-02-17 12:33:30 +01:00
Hennadii Stepanov
ddb75c2e87 test: Add fs_tests/create_directories unit test 2022-02-17 12:30:59 +01:00
laanwj
1f46b6e46e util: Work around libstdc++ create_directories issue
Work around libstdc++ issue [PR101510] with create_directories where the
leaf already exists as a symlink. Fixes #24257, introduced by the switch
to `std::filesystem`. It is meant to be more thorough than #24266, which
only worked around one instance of the problem.

The issue was fixed upstream in
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=124eaa50e0a34f5f89572c1aa812c50979da58fc,
but unfortunately we'll have to carry a fix for it for a while.

This introduces a function `fs::create_directories` which wraps
`std::filesystem::create_directories`. This allows easiliy reverting the
workaround when it is no longer necessary.
2022-02-17 12:30:11 +01:00
laanwj
df0825046a
Merge bitcoin/bitcoin#24331: util: Revert back MoveFileExW call for MinGW-w64
dc01cbc538 test: Add fs_tests/rename unit test (Hennadii Stepanov)
d4999d40b9 util: Revert back MoveFileExW call for MinGW-w64 (Hennadii Stepanov)

Pull request description:

  Unfortunately, bitcoin/bitcoin#24308 introduced a [regression](https://github.com/bitcoin/bitcoin/pull/24308#issuecomment-1037259386) for mingw builds.

  The root of the problem is a broken implementation of [`std::filesystem::rename`](https://en.cppreference.com/w/cpp/filesystem/rename). In particular, the expected behavior
  > If `old_p` is a non-directory file, then `new_p` must be ... existing non-directory file: `new_p` _is first deleted_...

  fails with the "File exists" error.

  This PR reverts back the `MoveFileExW` call, and adds the [suggested](https://github.com/bitcoin/bitcoin/pull/24308#pullrequestreview-878832906) unit test.

ACKs for top commit:
  vasild:
    ACK dc01cbc538

Tree-SHA512: c8e5a98844cfa32bec0ad67a1aaa58fe2efd0c5474d3e83490211985b110f83245758a742dcaa0a933a192ab66a7f11807e0c53ae69260b7dd02fc99f6d03849
2022-02-17 12:29:41 +01:00
fanquake
97611921be
Merge bitcoin/bitcoin#24348: build: Fix Guix build for Windows (attempt 2)
b3617a99c1 build: Point Guix to recent commit on the master branch (Hennadii Stepanov)
7f2f35fe20 build: Fix gcc-cross-x86_64-w64-mingw32-10.3.0 in Guix (Hennadii Stepanov)

Pull request description:

  Fixes bitcoin/bitcoin#24055.
  Replaces bitcoin/bitcoin#24300.

  #### Guix builds:
  ```
  $ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  d807189a8b5721892395968a86acd47f0cff2c7e76e75e6e927045ba339ba1dc  guix-build-b3617a99c141/output/aarch64-linux-gnu/SHA256SUMS.part
  a1c89935c5d5c57df428a360168944d1be83fc00324a903a0a68c284fa4d71cf  guix-build-b3617a99c141/output/aarch64-linux-gnu/bitcoin-b3617a99c141-aarch64-linux-gnu-debug.tar.gz
  2936adc6d4425f297c2eee310fa8a90b51209289474d10a5a320346c9b4fb90a  guix-build-b3617a99c141/output/aarch64-linux-gnu/bitcoin-b3617a99c141-aarch64-linux-gnu.tar.gz
  10420ef9e7001f7dbe009261925db81ee94764bb42514f28d0aa429de37c81d6  guix-build-b3617a99c141/output/arm-linux-gnueabihf/SHA256SUMS.part
  00b762833139e0d7b470570e30dfe10c427f78a5bd498207b8750695b307fcfe  guix-build-b3617a99c141/output/arm-linux-gnueabihf/bitcoin-b3617a99c141-arm-linux-gnueabihf-debug.tar.gz
  2084c431e262a49cf18a2346e1465f73ccb8c320cfda3aa918439f371c1fec9c  guix-build-b3617a99c141/output/arm-linux-gnueabihf/bitcoin-b3617a99c141-arm-linux-gnueabihf.tar.gz
  752b769cbee5b04a4ae1fff0db5d8521b76df68e20c966bad141e9c65de3d196  guix-build-b3617a99c141/output/arm64-apple-darwin/SHA256SUMS.part
  708a39f525ea225cce71d53120df411c808a5f5a29e9c3498646ab7e5d5ab14d  guix-build-b3617a99c141/output/arm64-apple-darwin/bitcoin-b3617a99c141-arm64-apple-darwin.tar.gz
  cc60ed18529d0656feb87189c69f2fbe048b2b37ac11952d9290dd0f8576ea97  guix-build-b3617a99c141/output/arm64-apple-darwin/bitcoin-b3617a99c141-osx-unsigned.dmg
  5e10d7f0ab7352995ceb7959b5b371615e06904f9a857d59229dd5e1b7f5825e  guix-build-b3617a99c141/output/arm64-apple-darwin/bitcoin-b3617a99c141-osx-unsigned.tar.gz
  b44e8a11279d3fe29cc4d72f3ac1b3da1f11608636b4a9c8653272bf6be5ed92  guix-build-b3617a99c141/output/dist-archive/bitcoin-b3617a99c141.tar.gz
  c467e2371a88fd2fbcd98c9413f47f1ddc81183ac9f0674182a7af208df18e31  guix-build-b3617a99c141/output/powerpc64-linux-gnu/SHA256SUMS.part
  2de931fe54aaf6fdaac9aa2595d7f4901eeba80ab1185249c2bc2141318a9811  guix-build-b3617a99c141/output/powerpc64-linux-gnu/bitcoin-b3617a99c141-powerpc64-linux-gnu-debug.tar.gz
  2d2cf5236d41d9dbe2480e19a94107c726dce3c52bfa8672e3f41ada7a8acd61  guix-build-b3617a99c141/output/powerpc64-linux-gnu/bitcoin-b3617a99c141-powerpc64-linux-gnu.tar.gz
  2815de278610cc7aa3d365af3834ed77e49cf6695dc9e2ffdbc3ccd6cc8362fc  guix-build-b3617a99c141/output/powerpc64le-linux-gnu/SHA256SUMS.part
  fd13b01363a44c03dd52b1193b2690efdaa358c2bcdc31c43e83c96e06c2bc05  guix-build-b3617a99c141/output/powerpc64le-linux-gnu/bitcoin-b3617a99c141-powerpc64le-linux-gnu-debug.tar.gz
  796bd23f314e6edb429d893e7ffafc7c4d6b51c0febe1faaa192085435aeb0bb  guix-build-b3617a99c141/output/powerpc64le-linux-gnu/bitcoin-b3617a99c141-powerpc64le-linux-gnu.tar.gz
  c1e449e6ac3e78682d613d8bcebf97bce5ed69a865cfdc939cf6d290a3a5c7ef  guix-build-b3617a99c141/output/riscv64-linux-gnu/SHA256SUMS.part
  c3e6380e81229779ad60fa1c1fa856d6af46c1cab9a87abe296694be0b42b405  guix-build-b3617a99c141/output/riscv64-linux-gnu/bitcoin-b3617a99c141-riscv64-linux-gnu-debug.tar.gz
  1351e7755ace57cdbcb66f2673733f31d3b90063e414a0eeb1f0c71b19ca3b88  guix-build-b3617a99c141/output/riscv64-linux-gnu/bitcoin-b3617a99c141-riscv64-linux-gnu.tar.gz
  1af14acc6e7210286d09618e9e43b93707540eac9ee48226a6a2d69ab10dfe24  guix-build-b3617a99c141/output/x86_64-apple-darwin/SHA256SUMS.part
  e76b872e075604916ad60fa50989bba81080ecad9a12e8793a2628713bc816fd  guix-build-b3617a99c141/output/x86_64-apple-darwin/bitcoin-b3617a99c141-osx-unsigned.dmg
  2755d5766efc86f360909b01206e4594f5049e7aed17bc8ba3781a375acc28cf  guix-build-b3617a99c141/output/x86_64-apple-darwin/bitcoin-b3617a99c141-osx-unsigned.tar.gz
  335a08ee376c51692e9e24f4dd0a71fc24af2b15f3acd4ef2881ecb882fc708f  guix-build-b3617a99c141/output/x86_64-apple-darwin/bitcoin-b3617a99c141-osx64.tar.gz
  0ed78a1a1e22e8d20de9aeff052f57f0ada1eb536d541d28318223120610614b  guix-build-b3617a99c141/output/x86_64-linux-gnu/SHA256SUMS.part
  d07dfb39d9fd65ed2514eae7697a25f43ece18efdd1255a592feb0e6eb0510e4  guix-build-b3617a99c141/output/x86_64-linux-gnu/bitcoin-b3617a99c141-x86_64-linux-gnu-debug.tar.gz
  c427792751e83edbc48a4ed05278b70d888b957b77d8e7d9e298da47d2351bab  guix-build-b3617a99c141/output/x86_64-linux-gnu/bitcoin-b3617a99c141-x86_64-linux-gnu.tar.gz
  f24d5d065cebd214a948600adc97cdc1535ad3411e07ec66d3af2007586518e9  guix-build-b3617a99c141/output/x86_64-w64-mingw32/SHA256SUMS.part
  de196c52b6767a84c36d0d8c304ad46060dfd27accbc0812dd29600449385ab2  guix-build-b3617a99c141/output/x86_64-w64-mingw32/bitcoin-b3617a99c141-win-unsigned.tar.gz
  f6795755776c06fcc42482f2aaeedc0d45f11396a7766423bc8ee408feb203b8  guix-build-b3617a99c141/output/x86_64-w64-mingw32/bitcoin-b3617a99c141-win64-debug.zip
  76e75bb47277ae9f4a1b3116f98a91ed7291705c6c87456d9fa10a98448818d3  guix-build-b3617a99c141/output/x86_64-w64-mingw32/bitcoin-b3617a99c141-win64-setup-unsigned.exe
  615cb51c1536ff809025a580e3542da5eba02041676a37a21dbe11e1ac5f97c2  guix-build-b3617a99c141/output/x86_64-w64-mingw32/bitcoin-b3617a99c141-win64.zip
  ```

ACKs for top commit:
  laanwj:
    In any case I'm pretty happy with this solution. Code review and lightly tested ACK b3617a99c1
  fanquake:
    ACK b3617a99c1 - thanks Carl for following up upstream.

Tree-SHA512: 9621cadcf5ce75142eeec97e9b5dabe36e3b9f39b4c58c1088f2341d3a6a66b1d1351c80c508b82a1587380d3b3ec6274453ccf0542ffa336da3b31ba8ef16a5
2022-02-17 10:51:08 +00:00
MarcoFalke
03c8c6937e
Merge bitcoin/bitcoin#24177: validation, refactor: add missing thread safety lock assertions
f485a07454 Add missing thread safety lock assertions in validation.h (Jon Atack)
37af8a20cf Add missing thread safety lock assertions in validation.cpp (Jon Atack)

Pull request description:

  A number of functions in validation.{h,cpp} have a thread safety lock annotation in the declaration but are missing the corresponding run-time lock assertion in the definition.

ACKs for top commit:
  hebasto:
    re-ACK f485a07454, only suggested change since my [previous](https://github.com/bitcoin/bitcoin/pull/24177#pullrequestreview-877810465) review.
  vasild:
    ACK f485a07454

Tree-SHA512: c86c0c0e8fe6ec7ae9ed9890f1dd7d042aa482ecf99feb6679a670aa004f6e9a99f7bc047205a34968fab7f1f841898c59b48c3ed6245c166e3b5abbf0867445
2022-02-17 08:01:52 +01:00
MarcoFalke
b304b65782
Merge bitcoin/bitcoin#24359: doc: Fix typos
ba4906f951 doc: Fix typos (Taeik Lim)

Pull request description:

  Fix typos.

ACKs for top commit:
  prayank23:
    ACK ba4906f951
  Zero-1729:
    crACK ba4906f951
  jonatack:
    ACK ba4906f951

Tree-SHA512: 63ae44e97c0bf9530dce974df58f2ec0ea95dc03168f54e26342d741adf6b6914e2dedac7db1737bba0d419c58bdc648d46715e896200e613b0764352f76f76a
2022-02-17 07:58:31 +01:00
Andrew Chow
3d985d4f43 wallet: Don't generate keys when privkeys disabled when upgrading
When private keys are disabled, we should not be trying to generate new
keys during upgradewallet.
2022-02-16 22:53:27 -05:00
Fabian Jahr
820c03aff5
index: check muhash is in sync on coinstatsindex launch 2022-02-17 00:36:47 +01:00
Fabian Jahr
38ed58b850
index: remove txindex references from base index 2022-02-17 00:34:37 +01:00
Taeik Lim
ba4906f951 doc: Fix typos 2022-02-17 03:42:08 +09:00
Jon Atack
a4da16fbd4
Improve -netinfo help based on feedback from users and devs
- clarify that the peer counts table is of reachable networks

- a few other clarifications
2022-02-16 18:38:37 +01:00
Pieter Wuille
0683f377e1 Add tr() descriptor unit tests 2022-02-15 18:34:02 -05:00
MarcoFalke
1e8aa02ec5
Merge bitcoin/bitcoin#24117: index: make indices robust against init aborts
bfcd60f5d5 test: activate all index types in feature_init.py (Martin Zumsande)
0243907fae index: Don't commit without valid m_best_block_index (Martin Zumsande)

Pull request description:

  When an index thread receives an interrupt during init before it got to index anything (so `m_best_block_index == nullptr` still), it will still try to commit previous "work" before stopping the thread. That means that `BaseIndex::CommitInternal()` calls `GetLocator(nullptr)`, which returns an locator to the tip ([code](06b6369766/src/chain.cpp (L31-L32))), and saves it to the index DB.
  On the next startup, this locator will be read and it will be assumed that we have successfully synced the index to the tip, when in reality we have indexed nothing.
  In the case of coinstatsindex, this would lead to a shutdown of bitcoind without any indication what went wrong. For the other indexes, there would be no immediate shutdown, but the index would be corrupt.

  This PR fixes this by not committing when `m_best_block_index==nullptr`, and it also adds an error log message to the silent coinstatsindex shutdown path.

  This is another small bug found by `feature_init.py` - the second commit enables blockfilterindex and coinstatsindex for this test, enabling coinstatsindex without the first commit would have led to frequent failures.

ACKs for top commit:
  fjahr:
    reACK bfcd60f5d5
  shaavan:
    reACK bfcd60f5d5

Tree-SHA512: 8e2bac0fc40cde209518a9e59b597ae0a5a875a2a90898673987c91733718d40e528dada942bf552b58bc021bf46e59da2d0cc5a61045f48f9bae2b1baf6033b
2022-02-15 19:57:25 +01:00
Pieter Wuille
4b2e31a7ae Bugfix: make ToPrivateString work with x-only keys 2022-02-15 11:57:25 -05:00
Hennadii Stepanov
b3617a99c1
build: Point Guix to recent commit on the master branch 2022-02-15 15:29:00 +02:00
Hennadii Stepanov
7f2f35fe20
build: Fix gcc-cross-x86_64-w64-mingw32-10.3.0 in Guix 2022-02-15 15:28:31 +02:00
TheCharlatan
d4b3483cec
Primitives: Correct CTransaction deserialization docstring
Since https://github.com/bitcoin/bitcoin/pull/8589 CTxWitness was
removed and instead replaced with CScriptWitness inside each CTxIn.
2022-02-15 12:27:08 +01:00
MarcoFalke
fae3f17823
fuzz: Split script formatting from script fuzz target 2022-02-15 12:19:34 +01:00
MarcoFalke
fa8dad0e07
rpc: Fix implicit-integer-sign-change in verifychain 2022-02-15 11:12:05 +01:00
MarcoFalke
7164e00e1b
Merge bitcoin/bitcoin#24324: test: refactor: remove unneeded bytes<->hex conversions in byte_to_base58
f11dad22a5 test: refactor: remove unneeded bytes<->hex conversions in `byte_to_base58` (Sebastian Falbesoner)

Pull request description:

  It seems like the only reason for using hex strings in this method was to have a convenient way to convert to an integer from the input data interpreted as big-endian. In Python3 we have `int.from_bytes(..., 'big')` for that purpose, hence there is no need for that anymore and we can simply operate on bytes only.

ACKs for top commit:
  laanwj:
    Code review ACK f11dad22a5

Tree-SHA512: 9b1563010066ca74d85139c3b9259e9a5bb49e1f141c30b6506a0445afddb2bde7fd421fdd917dc516956e66f93610e2c21d720817640daee8f57f803be76ee4
2022-02-15 09:31:58 +01:00
MarcoFalke
566df80624
Merge bitcoin/bitcoin#24336: Print enable_fuzz_binary in configure
faef344f84 Print enable_fuzz_binary in configure (MarcoFalke)

Pull request description:

  A *disabled* `enable_fuzz` on current master does *not* mean the the fuzz binary is not compiled. This is confusion, so fix it.

  * `enable_fuzz` toggles compilation flags for fuzzing and disables all other target. There is no need to print this in the configure result, because the compilation flags are already printed. Also, all other targets are already printed as `no`.
  * `enable_fuzz_binary` does what it says it does and is currently not printed. So print it.

ACKs for top commit:
  hebasto:
    ACK faef344f84, tested on Linux Mint 20.2 (x86_64):

Tree-SHA512: 9b02b05c4b9c5fc92cf3487497392690303c36eace5e217f18b4349f059b5a23a7c0e0d030fb6fa7bbad83e927576a5e81c00099164f9ed8e185c0969dc17689
2022-02-15 09:30:16 +01:00
MarcoFalke
444b6b342d
Merge bitcoin/bitcoin#24340: util: Add missing unlinkat to syscall sandbox
fa455975e5 util: Add missing unlinkat to syscall sandbox (MarcoFalke)

Pull request description:

  This will be needed for g++-12 (after libstdc++6 12-20220206).

  Steps to reproduce:

  ```
  gdb --args ./src/bitcoind -sandbox=log-and-abort -regtest
  ./src/bitcoin-cli -regtest -named createwallet wallet_name=a descriptors=false
  ./src/bitcoin-cli -regtest stop
  ```

  BT:

  ```
  Thread 1 "b-shutoff" received signal SIGSYS, Bad system call.
  0x00007ffff79564f7 in unlinkat () from /lib/x86_64-linux-gnu/libc.so.6
  (gdb) bt
  #0  0x00007ffff79564f7 in unlinkat () from /lib/x86_64-linux-gnu/libc.so.6
  #1  0x00007ffff7cc7335 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
  #2  0x00007ffff7cc94e3 in std::filesystem::remove_all(std::filesystem::__cxx11::path const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
  #3  0x00005555559d4918 in wallet::BerkeleyEnvironment::Flush (this=0x7fffc4005160, fShutdown=<optimized out>) at /usr/include/c++/12/bits/fs_path.h:595
  #4  0x000055555592c058 in wallet::StopWallets (context=...) at /usr/include/c++/12/bits/shared_ptr_base.h:1665
  #5  0x00005555556617ca in Shutdown (node=...) at ./src/init.cpp:293
  #6  0x000055555563ada6 in AppInit (argv=<optimized out>, argc=<optimized out>, node=...) at ./src/bitcoind.cpp:249
  #7  main (argc=<optimized out>, argv=<optimized out>) at ./src/bitcoind.cpp:273

ACKs for top commit:
  laanwj:
    Code review ACK fa455975e5

Tree-SHA512: e80a38828f8656040954c9befa2d1c9d5170e204dc09c61031633349897f51ccd85cc5c99a089c4726d7f5237875cd9ed3fa8ef864cd6c1c8a2b8250b392d57f
2022-02-15 09:26:44 +01:00
fanquake
493b1156d8
Merge bitcoin/bitcoin#24345: doc: Release process: fix broken link to Guix building docs
64645fa3e0 Release process: fix broken link to Guix building docs (Jeremy Rand)

Pull request description:

  Not 100% sure whether this link was always broken or if the Guix docs renamed the heading at some point.  Either way, seems good to fix it.

ACKs for top commit:
  fanquake:
    ACK 64645fa3e0

Tree-SHA512: 4932059fe583c0d27c70febf8f4dd8cffd3e15567359c5429d2691e221afc6da319bf43ebcd264ae0f98302e1eeb67ffd763d3d7d06ab1633913555ee7461643
2022-02-15 08:02:57 +00:00
MarcoFalke
6b8e4977b8
Merge bitcoin/bitcoin#24342: test: remove import socket in test_ipv6_local
460fa8e0d9 test: remove `import socket` in test_ipv6_local (brunoerg)

Pull request description:

  Since this module (`socket`) is imported at the top of file, there is no need to import it again within the function.

ACKs for top commit:
  MarcoFalke:
    cr ACK 460fa8e0d9

Tree-SHA512: 031c17a776dedaa21b3ec6458ca822304e76a5a3f4494406e6b7b04f08cc2abefcfe742c462b60c9b3e2fee3cd110a69ed5ad413357886dc7b823abc916ea40e
2022-02-15 08:47:21 +01:00
Hennadii Stepanov
1695d6661b
Merge bitcoin-core/gui#509: Respect dialog modality and fix a regression in wallet unlock
f730bd7d58 scripted-diff: Rename ShowModalDialogAndDeleteOnClose (Hennadii Stepanov)
5d7666b151 qt: Revert 7fa91e8312 partially (Hennadii Stepanov)
89c277a6fc qt: Delay shutdown while a modal dialog is active (Hennadii Stepanov)
8c0eb80f41 qt: Disable tray icon menu when a modal dialog is active (Hennadii Stepanov)
92427354dd qt, refactor: Use local QAction instances for the tray icon menu (Hennadii Stepanov)
58e16035c1 qt, refactor: Drop BitcoinGUI::{send,receive}CoinsMenuAction members (Hennadii Stepanov)
fd667e73cd qt: Make show_hide_action dependent on the main window actual state (Hennadii Stepanov)
ee151d0327 qt: Drop BitcoinGUI::toggleHideAction member (Hennadii Stepanov)
78189daac8 qt, refactor: Fill up trayIconMenu before connections (Hennadii Stepanov)
66afa286e5 qt, refactor: Replace BitcoinGUI::trayIconActivated with a lambda (Hennadii Stepanov)
c3ca8364b2 qt, refactor: Replace BitcoinGUI::macosDockIconActivated with a lambda (Hennadii Stepanov)

Pull request description:

  As pointed in bitcoin/bitcoin#23790 a regression in wallet unlock was introduced in bitcoin-core/gui#336 when a synchronous `AskPassphraseDialog` has been replaced with an asynchronous one.

  This PR reverts a call back to a synchronous mode.

  To make synchronous dialogs behave nice during shutdown some additional changes were made.

  Please note that disabling the tray icon menu when a modal dialog is active is useful itself as on master (4ad59042b3) it is possible to switch to the "Receive" tab while the GUI is waiting for a password for the "Send" tab:

  ![Screenshot from 2021-12-17 18-59-51](https://user-images.githubusercontent.com/32963518/146580710-0a755f24-a166-414b-be60-7863232ac778.png)

  This is confusing and must be avoided.

  Fixes bitcoin/bitcoin#23790.

ACKs for top commit:
  prayank23:
    tACK f730bd7d58

Tree-SHA512: 2b68275754190e4a9831b96e882d3c5b005e03909aeb6f2c5846da07199bb3efbb74ce87a9d25bb139f643c43d377a2051b221d553281fa5aefdd3181a58077f
2022-02-15 08:38:57 +02:00
Pieter Wuille
18ad54c3b2 Bugfix: set x-only flag when inferring pk() inside tr() 2022-02-14 18:14:10 -05:00
Jeremy Rand
64645fa3e0
Release process: fix broken link to Guix building docs 2022-02-14 23:02:32 +00:00
brunoerg
460fa8e0d9 test: remove import socket in test_ipv6_local 2022-02-14 19:27:33 -03:00
Murch
e50a9be154
Remove outdated comment on CFeeRate
This comment described how the constructor of CFeeRate was previously
indirectly used to parse fee rate arguments from RPCs. The command line
input was actually in sat/vB but due to the use of AmountFromValue() it
got converted to BTC/vB. In the constructor this could be rectified by
creating a CFeeRate from that given value (in BTC/vB) and COIN as the
transaction size, turning the input effectively to sat/vB. Since this
usage pattern was removed from the codebase some months ago, the comment
is now obsolete.

Also:
• Use vsize and vbyte instead of size and byte
2022-02-14 16:01:26 -05:00
fanquake
8fe6f5a6fb
Merge bitcoin/bitcoin#24326: build: minor cleanups to native_clang package
4255b46693 build: remove -f from clang cp invocation (fanquake)
dbcaba835d build: remove unused include dir from clang package (fanquake)

Pull request description:

  Pulled out of #21778.

  Guix build:
  ```bash
  bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  b7fc20b23d2270f0bf39859fc2d9b75c687a0cceaf287b3871d872e8e7aaaeb6  guix-build-4255b4669359/output/arm64-apple-darwin/SHA256SUMS.part
  bd31487de1f49fd84b1eb37c744ea55b1268d729ec4715e7cb50a768b147628e  guix-build-4255b4669359/output/arm64-apple-darwin/bitcoin-4255b4669359-arm64-apple-darwin.tar.gz
  6eca741ecd7e35e5d917442326e8f64e2f745cb0cf8573e616fb1fc388d3376f  guix-build-4255b4669359/output/arm64-apple-darwin/bitcoin-4255b4669359-osx-unsigned.dmg
  b54797d350e00a597478dadb3c7372d15306c095f63cc3e5257a3b1851856614  guix-build-4255b4669359/output/arm64-apple-darwin/bitcoin-4255b4669359-osx-unsigned.tar.gz
  af212f87138950a398e2cd1c3ebc69bbe90126ac916a735d5a24a91864e0a164  guix-build-4255b4669359/output/dist-archive/bitcoin-4255b4669359.tar.gz
  d25ab8698524f283958e32cbdfaa14d344d905f972c66987ff27286cb2abcdfa  guix-build-4255b4669359/output/x86_64-apple-darwin/SHA256SUMS.part
  39f069317efff319aea55d6f929ee4cd5e4c04cfb5cf84ea1e6500b18e368be3  guix-build-4255b4669359/output/x86_64-apple-darwin/bitcoin-4255b4669359-osx-unsigned.dmg
  dc755eff3cb4e628637f68c3e31a28ae41bbece1339067a2c0042f39899a275c  guix-build-4255b4669359/output/x86_64-apple-darwin/bitcoin-4255b4669359-osx-unsigned.tar.gz
  d084f798f08cb175272ae420a68df3fa69c3b2be2fbe972c929dd4d4214039f7  guix-build-4255b4669359/output/x86_64-apple-darwin/bitcoin-4255b4669359-osx64.tar.gz
  ```

ACKs for top commit:
  hebasto:
    ACK 4255b46693

Tree-SHA512: a8b08a74dca8d6e82c32b23e031ff1b7484d7436d8d8b169c267462766f3ee270ea22342ab81b00daeaed9b93705d51931ff9a327da07337b242e7e0e4d0521c
2022-02-14 20:24:53 +00:00
fanquake
988058defb
Merge bitcoin/bitcoin#24254: build: Add Boost.Process usage check
abc057c603 build: Add Boost.Process usage check (Hennadii Stepanov)

Pull request description:

  This PR adds a check that Boost.Process can be used without linking any libraries (header-only).
  Disable the functionality if that is not the case.

  Fixes bitcoin/bitcoin#24314.

ACKs for top commit:
  fanquake:
    ACK abc057c603

Tree-SHA512: ed2a32b1f751ec6f88cc7220766edd4cdab93c1d0515c892aa3094ee8d5b13ef569830d6e7a7a00c0197b117585dc526d00d943cc99a1f8c8a66ac4e20fe2061
2022-02-14 20:21:10 +00:00
fanquake
9011d4d8ae
Merge bitcoin/bitcoin#23955: build: add support for NetBSD in depends
bcd36e14f0 build: correct depends FreeBSD C{XX}FLAGS (fanquake)
7b06ffce9c build: add NetBSD support to depends (fanquake)

Pull request description:

  Similar to #23948. Doesn't build the Qt package; I haven't looked at doing that yet, but have an assumption that it's going to fail out of the box similar to the FreeBSD build.

  Guix Build:
  ```bash
  ```

ACKs for top commit:
  theuni:
    ACK bcd36e14f0

Tree-SHA512: 9a0946cefbcb9a92dd730b885463f3213e304c8d4b39fea8d831fc013a73d2ef998ca84e384bf45a01fa1449cf5a35eaffaa5b57a9062c2cdda34312d33ec3fc
2022-02-14 20:17:13 +00:00
laanwj
c23bf06492
Merge bitcoin/bitcoin#24115: ARMv8 SHA2 Intrinsics
aaa1d03d3a Add optimized sha256d64_arm_shani::Transform_2way (Pieter Wuille)
fe0629852a Implement sha256_arm_shani::Transform (Pavol Rusnak)
48a72fa81f Add sha256_arm_shani to build system (Pavol Rusnak)
c2b7934250 Rename SHANI to X86_SHANI to allow future implementation of ARM_SHANI (Pavol Rusnak)

Pull request description:

  This PR adds support for ARMv8 SHA2 Intrinsics.

  Fixes https://github.com/bitcoin/bitcoin/issues/13401 and https://github.com/bitcoin/bitcoin/issues/17414

  * Integration part was done by me.
  * The original SHA2 NI code comes from https://github.com/noloader/SHA-Intrinsics/blob/master/sha256-arm.c
  * Minor optimizations from https://github.com/rollmeister/bitcoin-armv8/blob/master/src/crypto/sha256.cpp are applied too.
  * The 2-way transform added by @sipa

ACKs for top commit:
  laanwj:
    Code review and lightly tested ACK aaa1d03d3a

Tree-SHA512: 9689d6390c004269cb1ee79ed05430d7d35a6efef2554a2b6732f7258a11e7e959b3306c04b4e8637a9623fb4c12d1c1b3592da0ff0dc6d737932db302509669
2022-02-14 21:12:39 +01:00
Hennadii Stepanov
abc057c603
build: Add Boost.Process usage check
Check that Boost.Process can be used without linking any libraries
(header-only). Disable the functionality if that is not the case.
2022-02-14 19:34:00 +02:00
fanquake
bcd36e14f0
build: correct depends FreeBSD C{XX}FLAGS 2022-02-14 16:52:26 +00:00
fanquake
7b06ffce9c
build: add NetBSD support to depends 2022-02-14 16:52:23 +00:00
MarcoFalke
fa455975e5
util: Add missing unlinkat to syscall sandbox 2022-02-14 17:12:34 +01:00
Hennadii Stepanov
dc01cbc538
test: Add fs_tests/rename unit test
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
2022-02-14 16:56:40 +02:00
Hennadii Stepanov
d4999d40b9
util: Revert back MoveFileExW call for MinGW-w64 2022-02-14 16:56:35 +02:00
fanquake
4255b46693
build: remove -f from clang cp invocation 2022-02-14 13:59:44 +00:00
fanquake
dbcaba835d
build: remove unused include dir from clang package 2022-02-14 13:59:09 +00:00
Kiminuo
d970a85d33 Move GetAllOutputTypes function from rpc/rawtransaction.cpp to rpc/util.{h|cpp} 2022-02-14 14:34:04 +01:00