Commit graph

35061 commits

Author SHA1 Message Date
fanquake
4d06fc4bed
doc: empty REVIEWERS file
It seems that it's time for our experiment with this file to come to an
end.

See discussion here:
https://github.com/bitcoin/bitcoin/pull/25560/files#r915491743.
2022-07-30 09:05:07 +01:00
MacroFake
ab3db34836
Merge bitcoin/bitcoin#25713: tidy: run clang-tidy in quiet mode
3fe58a98d3 tidy: run clang-tidy in quiet mode (fanquake)

Pull request description:

  This should cut the amount of output by atleast half.

  ```bash
  /opt/homebrew/opt/llvm/bin/clang-tidy --use-color -p=bitcoin bitcoin/src/wallet/test/fuzz/coinselection.cpp
  278 warnings generated.
  Suppressed 278 warnings (278 in non-user code).
  Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
  ```
  becomes
  ```bash
  /opt/homebrew/opt/llvm/bin/clang-tidy --use-color -p=/bitcoin -quiet bitcoin/src/wallet/test/fuzz/coinselection.cpp
  278 warnings generated.
  ```

  See https://clang.llvm.org/extra/clang-tidy/.

  >   --quiet
  > Run clang-tidy in quiet mode. This suppresses
  > printing statistics about ignored warnings and
  > warnings treated as errors if the respective
  > options are specified.

  However the `run-clang-tidy` option is `-quiet`. See f28c006a58/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py (L244).

ACKs for top commit:
  jamesob:
    ACK 3fe58a98d3

Tree-SHA512: 936cfab09a78e71a4a2a2b3539087c1a95fe279923cc8c3f950c70924d6920dcd54b0da8b5493a1337c23a3b25834ab0db5a6b0c660c6e46d750f0fc966e7625
2022-07-30 09:26:22 +02:00
Jon Atack
4bedfd702a refactor: remove unneeded temporaries in node/interfaces, simplify code
- make the code easier to read and understand

- improve performance by avoiding unnecessary move operations

- the cleaner, simpler, and easier to read the code is, the
  better chance the compiler has at implementing it well
2022-07-29 19:41:23 +02:00
Jon Atack
b27ba169eb refactor: make all NodeImpl/ChainImpl/ExternalSignerImpl members public
as the classes themselves are private, and to be consistent within all the
*Impl classes in src/node/interfaces.cpp and src/wallet/interfaces.cpp
following this order:

public:
  // ... virtual methods ...
  // ... nonvirtual helper methods ...
  // ... data members ...

and add documentation in src/node/interfaces.cpp and src/wallet/interfaces.cpp
to help future reviewers and contributors.
2022-07-29 19:27:16 +02:00
fanquake
3fe58a98d3
tidy: run clang-tidy in quiet mode 2022-07-29 16:12:45 +01:00
Andrew Chow
8a105ecd1a wallet: Use CalculateMaximumSignedInputSize to indicate solvability
In AvailableCoins, we need to know whether we can solve for an output.
This was done by using IsSolvable, which just calls ProduceSignature and
produces a dummy signature. However, we already do that in order to get
the size of the input by using CalculateMaximumSignedInputSize. As this
function returns -1 if ProduceSignature fails, we can just remove the
use of IsSolvable and check that input_bytes is not -1 to determine
the solvability of an output.
2022-07-29 11:07:29 -04:00
fanquake
5871b5b5ab
Merge bitcoin/bitcoin#25571: refactor: Make mapBlocksUnknownParent local, and rename it
dd065dae9f refactor: Make mapBlocksUnknownParent local, and rename it (Hennadii Stepanov)

Pull request description:

  This PR is a second attempt at #19594. This PR has two motivations:

  - Improve code hygiene by eliminating a global variable, `mapBlocksUnknownParent`
  - Fix fuzz test OOM when running too long ([see #19594 comment](https://github.com/bitcoin/bitcoin/pull/19594#issuecomment-958801638))

  A minor added advantage is to release `mapBlocksUnknownParent` memory when the reindexing phase is done. The current situation is somewhat similar to a memory leak because this map exists unused for the remaining lifetime of the process. It's true that this map should be empty of data elements after use, but its internal metadata (indexing structures, etc.) can have non-trivial size because there can be many thousands of simultaneous elements in this map.

  This PR helps our efforts to reduce the use of global variables. This variable isn't just global, it's hidden inside a function (it looks like a local variable but has the `static` attribute).

  This global variable exists because the `-reindex` processing code calls `LoadExternalBlockFile()` multiple times (once for each block file), but that function must preserve some state between calls (the `mapBlocksUnknownParent` map). This PR fixes this by allocating this map as a local variable in the caller's scope and passing it in on each call. When reindexing completes, the map goes out of scope and is deallocated.

  I tested this manually by reindexing on mainnet and signet. Also, the existing `feature_reindex.py` functional test passes.

ACKs for top commit:
  mzumsande:
    re-ACK dd065dae9f
  theStack:
    re-ACK dd065dae9f
  shaavan:
    reACK dd065dae9f

Tree-SHA512: 9cd20e44d2fa1096dd405bc107bc065ea8f904f5b3f63080341b08d8cf57b790df565f58815c2f331377d044d5306708b4bf6bdfc5ef8d0ed85d8e97d744732c
2022-07-29 15:47:23 +01:00
MacroFake
b1c8ea45c9
Merge bitcoin/bitcoin#25683: refactor: log nEvicted message in LimitOrphans then return void
b4b657ba57 refactor: log `nEvicted` message in `LimitOrphans` then return void (chinggg)

Pull request description:

  Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49347

  LimitOrphans() can log expired tx and it should log evicted tx as well instead of returning the `nEvicted` number for caller to print the message.
  Since `LimitOrphans()` now returns void, the redundant assertion check in fuzz test is also removed.

Top commit has no ACKs.

Tree-SHA512: 18c41702321b0e59812590cd389f3163831d431f4ebdc3b3e1e0698496a6bdbac52288f28f779237a58813c6717da1a35e8933d509822978ff726c1b13cfc778
2022-07-29 16:17:16 +02:00
fanquake
bec911e37a
Update leveldb-subtree subtree to latest upstream 2022-07-29 14:43:11 +01:00
fanquake
f608f25313 Squashed 'src/leveldb/' changes from 330dd6235f..22f1e4a02f
22f1e4a02f Merge bitcoin-core/leveldb-subtree#32: fix macro HAVE_O_CLOEXEC when O_CLOEXEC not found
1eeb1cb879 fix macro HAVE_O_CLOEXEC when O_CLOEXEC not found

git-subtree-dir: src/leveldb
git-subtree-split: 22f1e4a02fd8e96090bb699a04c95c784aa88e74
2022-07-29 14:43:11 +01:00
MacroFake
fa7bef2e80
univalue: Remove unused and confusing set*() return value 2022-07-29 15:24:42 +02:00
fanquake
8f1ff487b3
libxcb: use a patch instead of sed
To remove the unneeded pthread-stubs requirements.
2022-07-29 14:02:23 +01:00
fanquake
7f73f422a4
depends: don't restrict --enable-lto to non-guix cctools
This wasn't actually disabling LTO support anyways, because it's enabled
by default.
2022-07-29 12:48:19 +01:00
fanquake
9b60690b94
cctools: fixup building with LTO
Use lto.h from clang+llvm not libtapi. The later is older,
and comes bundled with the libtapi repo.

Copy libLTO.so when building with FORCE_USE_SYSTEM_CLANG.
2022-07-29 12:48:19 +01:00
Andrew Chow
1abbae65eb
Merge bitcoin/bitcoin#24584: wallet: avoid mixing different OutputTypes during coin selection
71d1d13627 test: add unit test for AvailableCoins (josibake)
da03cb41a4 test: functional test for new coin selection logic (josibake)
438e04845b wallet: run coin selection by `OutputType` (josibake)
77b0707206 refactor: use CoinsResult struct in SelectCoins (josibake)
2e67291ca3 refactor: store by OutputType in CoinsResult (josibake)

Pull request description:

  # Concept

  Following https://github.com/bitcoin/bitcoin/pull/23789, Bitcoin Core wallet will now generate a change address that matches the payment address type. This improves privacy by not revealing which of the outputs is the change at the time of the transaction in scenarios where the input address types differ from the payment address type. However, information about the change can be leaked in a later transaction. This proposal attempts to address that concern.

  ## Leaking information in a later transaction

  Consider the following scenario:

  ![mix input types(1)](https://user-images.githubusercontent.com/7444140/158597086-788339b0-c698-4b60-bd45-9ede4cd3a483.png)

  1. Alice has a wallet with bech32 type UTXOs and pays Bob, who gives her a P2SH address
  2. Alice's wallet generates a P2SH change output, preserving her privacy in `txid: a`
  3. Alice then pays Carol, who gives her a bech32 address
  4. Alice's wallet combines the P2SH UTXO with a bech32 UTXO and `txid: b` has two bech32 outputs

  From a chain analysis perspective, it is reasonable to infer that the P2SH input in `txid: b` was the change from `txid: a`. To avoid leaking information in this scenario, Alice's wallet should avoid picking the P2SH output and instead fund the transaction with only bech32 Outputs. If the payment to Carol can be funded with just the P2SH output, it should be preferred over the bech32 outputs as this will convert the P2SH UTXO to bech32 UTXOs via the payment and change outputs of the new transaction.

  **TLDR;** Avoid mixing output types, spend non-default `OutputTypes` when it is economical to do so.

  # Approach

  `AvailableCoins` now populates a struct, which makes it easier to access coins by `OutputType`. Coin selection tries to find a funding solution by each output type and chooses the most economical by waste metric. If a solution can't be found without mixing, coin selection runs over the entire wallet, allowing mixing, which is the same as the current behavior.

  I've also added a functional test (`test/functional/wallet_avoid_mixing_output_types.py`) and unit test (`src/wallet/test/availablecoins_tests.cpp`.

ACKs for top commit:
  achow101:
    re-ACK 71d1d13627
  aureleoules:
    ACK 71d1d13627.
  Xekyo:
    reACK 71d1d13627 via `git range-diff master 6530d19 71d1d13`
  LarryRuane:
    ACK 71d1d13627

Tree-SHA512: 2e0716efdae5adf5479446fabc731ae81d595131d3b8bade98b64ba323d0e0c6d964a67f8c14c89c428998bda47993fa924f3cfca1529e2bd49eaa4e31b7e426
2022-07-28 18:16:51 -04:00
Andrew Chow
317ef0368b
Merge bitcoin/bitcoin#25670: test: check that combining PSBTs with different txs fails
4e616d20c9 test: check that combining PSBTs with different txs fails (Sebastian Falbesoner)
2a428c7989 test: support passing PSBTMaps directly to PSBT ctor (Sebastian Falbesoner)

Pull request description:

  This PR adds missing test coverage for the `combinepsbt` RPC, in the case of combining two PSBTs with different transactions:
  b8067cd435/src/psbt.cpp (L24-L27)
  The calling function `CombinePSBTs` checks for the false return value and then returns the transaction error string `PSBT_MISMATCH`:
  b8067cd435/src/psbt.cpp (L433-L435)
  b8067cd435/src/util/error.cpp (L30-L31)

ACKs for top commit:
  instagibbs:
    reACK 4e616d20c9
  achow101:
    ACK 4e616d20c9

Tree-SHA512: 45b2b224b13b44ad69ae62e4bc20f74cab32770cf8127b026ec47a7520f7253148fdbf1fad612afece59e45a6738bef9a351ae87ea98dc83d095cc78f6db0318
2022-07-28 17:34:28 -04:00
glozow
41205bf442
Merge bitcoin/bitcoin#25674: add unit tests for RBF rules in isolation
c320cddb1b [unit tests] individual RBF Rules in isolation (glozow)

Pull request description:

  Test each RBF rule more thoroughly and in isolation so we're not relying on things like overall mempool acceptance logic, ordering of mempool checks, RPC results, etc.

  RBF was pretty recently refactored out, so there isn't much unit test coverage. From https://marcofalke.github.io/btc_cov/test_bitcoin.coverage/src/policy/rbf.cpp.gcov.html:
  ![image](https://user-images.githubusercontent.com/25183001/180783280-6777f4b4-ef95-462a-b414-1a9e268836a6.png)

ACKs for top commit:
  instagibbs:
    reACK c320cddb1b
  jonatack:
    ACK c320cddb1b
  w0xlt:
    ACK c320cddb1b

Tree-SHA512: dab555214496255801b9ea92b7bf708bba1ff23edf055c85e29be5eab7d7a863440ee19588aacdce54b2c03feaa4b5963eb159ed89473560bd228737cbfec160
2022-07-28 17:15:15 +01:00
fanquake
c99a1ecc52
guix: enable hardening options in GCC Build
Pass `--enable-default-pie` and `--enable-default-ssp` when configuring
our GCCs. This achieves the following:

--enable-default-pie
	Turn on -fPIE and -pie by default.

--enable-default-ssp
	Turn on -fstack-protector-strong by default.

Note that this isn't a replacement for passing hardneing flags
ourselves, but introduces some redundency, and there isn't really a
reason to not build a more "hardenings enabled" toolchain by default.

See also:
https://gcc.gnu.org/install/configure.html
2022-07-28 14:30:38 +01:00
fanquake
aa87879a77
guix: pass enable-bind-now to glibc
Both glibcs we build support `--enable-bind-now`:
Disable lazy binding for installed shared objects and programs.
This provides additional security hardening because it enables full RELRO
and a read-only global offset table (GOT), at the cost of slightly
increased program load times.

See:
https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
2022-07-28 14:30:38 +01:00
fanquake
3897a131d0
guix: enable SSP for RISC-V glibc (2.27)
Pass `--enable-stack-protector=all` when building the glibc used for the
RISC-V toolchain, to enable stack smashing protection on all functions,
in the glibc code.
2022-07-28 14:30:38 +01:00
glozow
c320cddb1b
[unit tests] individual RBF Rules in isolation
Test each component of the RBF policy in isolation. Unlike the RBF
functional tests, these do not rely on things like RPC results, mempool
submission, etc.
2022-07-28 12:05:05 +01:00
fanquake
62c864605a
Merge bitcoin/bitcoin#25723: test: Drop unused boost workaround
ba9a8e6cc1 test: Drop unused boost workaround (Hennadii Stepanov)

Pull request description:

  This PR is a follow up of bitcoin/bitcoin#24065 and removes the workaround which has already been removed in other [places](https://github.com/bitcoin/bitcoin/pull/24065/files#diff-19427b0dd1a791adc728c82e88f267751ba4f1c751e19262cac03cccd2822216).

  Moreover, this workaround won't be required even if bitcoin/bitcoin#25696 is ever merged.

ACKs for top commit:
  fanquake:
    ACK ba9a8e6cc1

Tree-SHA512: db19fc1550252d7a82a08f388ff6078c78452365e74b41e7bc36cbbc4d0fed9342636e8f2371bb8e78c9d11ee721d6363bcc21d11787f3aac967a6c4a9cc346f
2022-07-28 11:17:06 +01:00
chinggg
b4b657ba57 refactor: log nEvicted message in LimitOrphans then return void
`LimitOrphans()` can log expired tx and it should log evicted tx as well
instead of returning the number for caller to print the message.
Since `LimitOrphans()` now return void, the redundant assertion check in
fuzz test is also removed.
2022-07-28 14:39:45 +08:00
Hennadii Stepanov
ba9a8e6cc1
test: Drop unused boost workaround 2022-07-27 20:38:05 +01:00
fanquake
207a228773
Merge bitcoin/bitcoin#25697: depends: expat 2.4.8 & fix building with -flto
e838a98475 depends: re-enable using -flto when building expat (fanquake)
304452558c depends: expat 2.4.8 (fanquake)

Pull request description:

  Currently, when building the expat package in depends, using `-flto` (`LTO=1`), the configure check can fail, because it cannot determine the system endianess:
  ```bash
  configure:18718: result: unknown
  configure:18733: error: unknown endianness
   presetting ac_cv_c_bigendian=no (or yes) will help
  ```

  Fix that by defining `_DEFAULT_SOURCE`, which in turn defines `__USE_MISC` (`features.h`):
  ```c
  #if defined _DEFAULT_SOURCE
  # define __USE_MISC1
  #endif
  ```
  which exposes additional definitions in `endian.h`:
  ```c
  #include <features.h>

  /* Get the definitions of __*_ENDIAN, __BYTE_ORDER, and __FLOAT_WORD_ORDER.  */
  #include <bits/endian.h>

  #ifdef __USE_MISC
  # define LITTLE_ENDIAN__LITTLE_ENDIAN
  # define BIG_ENDIAN__BIG_ENDIAN
  # define PDP_ENDIAN__PDP_ENDIAN
  # define BYTE_ORDER__BYTE_ORDER
  #endif
  ```
  and gives us a working configure.

  You could test building this change with Guix + LTO with [this branch](https://github.com/fanquake/bitcoin/tree/lto_in_guix). Note that that build may fail for other reasons (on x86_64), unrelated to this change.

  Some related upstream discussion:
  https://bugs.gentoo.org/757681
  https://forums.gentoo.org/viewtopic-t-1013786.html

ACKs for top commit:
  hebasto:
    re-ACK e838a98475, only [suggested](https://github.com/bitcoin/bitcoin/pull/25697#discussion_r929735675) changes since my recent [review](https://github.com/bitcoin/bitcoin/pull/25697#pullrequestreview-1050657421).
  jarolrod:
    code review ACK e838a98475

Tree-SHA512: 9dbf64c9bd1fd995a4d1addc011ffeff83d50df736030012346c97605e63aed4b5bac390a81abe646c1be28ad6fd600f64560dcb26bbc2edf5d513ca3b180bfa
2022-07-27 12:56:17 +01:00
fanquake
9ba73758c9
Merge bitcoin/bitcoin#24697: refactor address relay time
fa64dd6673 refactor: Use type-safe std::chrono for addrman time (MarcoFalke)
fa2ae373f3 Add type-safe AdjustedTime() getter to timedata (MarcoFalke)
fa5103a9f5 Add ChronoFormatter to serialize (MarcoFalke)
fa253d385f util: Add HoursDouble (MarcoFalke)
fa21fc60c2 scripted-diff: Rename addrman time symbols (MarcoFalke)
fa9284c3e9 refactor: Remove not needed std::max (MacroFake)

Pull request description:

  Those refactors are overlapping with, but otherwise largely unrelated to #24662.

ACKs for top commit:
  naumenkogs:
    utACK fa64dd6673
  dergoegge:
    Code review ACK fa64dd6673

Tree-SHA512: a50625e78036e7220a11997e6d9b6c6b317cb38ce02b1835fb41cbee2d8bfb1faf29b29d8990be78d6b5e15e9a9d8dec33bf25fa439b47610ef708950969724b
2022-07-27 10:30:32 +01:00
Hennadii Stepanov
b9f06bf05b
build: Do not export PKG_CONFIG_{PATH|LIBDIR} variables 2022-07-27 10:07:34 +01:00
fanquake
687aba8669
Merge bitcoin/bitcoin#25708: depends: always use correct ar for win qt build
3009180751 depends: always use correct ar for win qt (fanquake)

Pull request description:

  If we don't set this explicitly, then qt will still use it's default
  windows ar, when building with LTO (when we want it to use gcc-ar).

  So set `QMAKE_LIB` which is used for win32, and defaults to `ar rc`, to `our_ar rc`.
  This way we always get the correct ar.

  Issue can be seen building in Guix with LTO. i.e:
  ```bash
  x86_64-w64-mingw32-ar: .obj/release/hb-blob.o: plugin needed to handle lto object
  ```

  Guix Build (x86_64):
  ```bash
  6c24d8a86c2410d5dbf29e8087c1bcd230aeb3f5c8ba3bf63e4edf07503cd689  guix-build-300918075144/output/aarch64-linux-gnu/SHA256SUMS.part
  deb6c99f2efa3b60569fb31fbe543a97071af707f3b6e68825de93e7f1adaab0  guix-build-300918075144/output/aarch64-linux-gnu/bitcoin-300918075144-aarch64-linux-gnu-debug.tar.gz
  d3f14344f472d2c0540ac9254935f3008fb6b8286aa6c52045243a42dd05f2e4  guix-build-300918075144/output/aarch64-linux-gnu/bitcoin-300918075144-aarch64-linux-gnu.tar.gz
  fe97d5c4eb398c18689e7e68b1d97ab9ccbd12d1f0085eff8bd49de242675963  guix-build-300918075144/output/arm-linux-gnueabihf/SHA256SUMS.part
  239dfcaaaee91164c0e6d8835b613af51e43ece4bf7e17236f55c1a4facf8cd7  guix-build-300918075144/output/arm-linux-gnueabihf/bitcoin-300918075144-arm-linux-gnueabihf-debug.tar.gz
  29fe2ffb5c85f654cf23efd43035f1db6cff4e532839b50e7610dd588ad6680b  guix-build-300918075144/output/arm-linux-gnueabihf/bitcoin-300918075144-arm-linux-gnueabihf.tar.gz
  a100ce07e5566284a1b213174295c49573e8d93bfea86ad35b3b2dcb85d6c263  guix-build-300918075144/output/arm64-apple-darwin/SHA256SUMS.part
  593f57ff35de42f262bdae8085afcd49f33e7db350fd0cb0850bc560414a302a  guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin-unsigned.dmg
  6d5ae0ff77dfb0a7f74621a859c00060cda86c426c604b19269987163b67e413  guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin-unsigned.tar.gz
  14bc35725df2dbbd1e3447f57d128125cf65a182d4bb081c840947a0af69bce4  guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin.tar.gz
  29da16189e087c7fc90909d4dfc8002e37ce4ab035d6a94f0d73724d81ce565b  guix-build-300918075144/output/dist-archive/bitcoin-300918075144.tar.gz
  fe4a4a3b84f7782c7d65fdc7d4cbdf6fa57a7898d347ad932cbd4b5d3d7712b4  guix-build-300918075144/output/powerpc64-linux-gnu/SHA256SUMS.part
  e612386c452d04c7a9c9a624efa00f905928af39694067d903635fc7476d0e2c  guix-build-300918075144/output/powerpc64-linux-gnu/bitcoin-300918075144-powerpc64-linux-gnu-debug.tar.gz
  148ff9a17842287e1d541d032bab3c96df98d0c8a2175a132d896e4617799b5b  guix-build-300918075144/output/powerpc64-linux-gnu/bitcoin-300918075144-powerpc64-linux-gnu.tar.gz
  d67e6ad7a8ae2c3a0305602aabbed22ccdf07e354fbc1991b99d9ba58f451d1b  guix-build-300918075144/output/powerpc64le-linux-gnu/SHA256SUMS.part
  a776fb31b742d391cee1b2401204f41b3e93793cc2b54cdfcfca1f1b24a49051  guix-build-300918075144/output/powerpc64le-linux-gnu/bitcoin-300918075144-powerpc64le-linux-gnu-debug.tar.gz
  9bfc9255af051fe3801a556bdeaa940a74399ab7b3b677e5313e5e720a87e9cf  guix-build-300918075144/output/powerpc64le-linux-gnu/bitcoin-300918075144-powerpc64le-linux-gnu.tar.gz
  bc74550b70614e7c07500507943f7b7cda7ec0097908e459b84edfcf9c5f2de7  guix-build-300918075144/output/riscv64-linux-gnu/SHA256SUMS.part
  00906c4d9ba5aa6f567c8c3cfa0d44749f944a182f531ff6724284dc70157f88  guix-build-300918075144/output/riscv64-linux-gnu/bitcoin-300918075144-riscv64-linux-gnu-debug.tar.gz
  9cd40cbaeb3a68faf500410559443376957aafda081e0cdef2a0d17c9b49d933  guix-build-300918075144/output/riscv64-linux-gnu/bitcoin-300918075144-riscv64-linux-gnu.tar.gz
  f9bc2d2cf92493af543a9199763ab913d86bf602f3f5123913ad313391527d75  guix-build-300918075144/output/x86_64-apple-darwin/SHA256SUMS.part
  ba60756267e7fa7add1bb4375c98a65bd730a72a86646e3ddfb8496c1e1b695a  guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin-unsigned.dmg
  fa44e1d7b861e1f02232ef35e81b28dc78dcf52631944ec38768bc2e08943fa5  guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin-unsigned.tar.gz
  57ddb381261a1c242e683c12db6c2cfc0bb690bef73ad596f6503e07522f90ff  guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin.tar.gz
  95e409a241da708c8eefe87c1ba419258f3e4918a36cddd3bc50dbc754a9958e  guix-build-300918075144/output/x86_64-linux-gnu/SHA256SUMS.part
  6b0548280d8558aa68d3a9006beb95a5402e98e64a92a7b211a4341e67b00e85  guix-build-300918075144/output/x86_64-linux-gnu/bitcoin-300918075144-x86_64-linux-gnu-debug.tar.gz
  612a684ed3dc374a81806a50946c85c6d043704945596bed7c5f0f7e998ebf10  guix-build-300918075144/output/x86_64-linux-gnu/bitcoin-300918075144-x86_64-linux-gnu.tar.gz
  a5adc490213892f93e2ea62af2aac6db26127afc721a44cb787b0207b8c16d07  guix-build-300918075144/output/x86_64-w64-mingw32/SHA256SUMS.part
  1c7bf2d489e8d950b22be16506465da70b9402a4e23c770e04a74fb69d05c18c  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-debug.zip
  2a04f07ca0e46a18b68088093eee0bbfbdeb51ec72bb18c2282168d54f748fc4  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-setup-unsigned.exe
  e519347ff375e79d12acd8db87a9b216c5363d4b3cce09d7a8f79b85ba0deb85  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-unsigned.tar.gz
  e49571279f9e5897d5217e5d5fb319467ca213ba7b4e99904e262a1cd1e65df6  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64.zip
  ```

  Guix Build (arm64):
  ```bash
  fe97d5c4eb398c18689e7e68b1d97ab9ccbd12d1f0085eff8bd49de242675963  guix-build-300918075144/output/arm-linux-gnueabihf/SHA256SUMS.part
  239dfcaaaee91164c0e6d8835b613af51e43ece4bf7e17236f55c1a4facf8cd7  guix-build-300918075144/output/arm-linux-gnueabihf/bitcoin-300918075144-arm-linux-gnueabihf-debug.tar.gz
  29fe2ffb5c85f654cf23efd43035f1db6cff4e532839b50e7610dd588ad6680b  guix-build-300918075144/output/arm-linux-gnueabihf/bitcoin-300918075144-arm-linux-gnueabihf.tar.gz
  8ef780a952f6a8352ec897f5446be2c49c2bf06825442dfb38037a2160973ba6  guix-build-300918075144/output/arm64-apple-darwin/SHA256SUMS.part
  4c80a8d78c3bfcef0c6368b54f3112746ee8912bbd7efcebe9f7072ad7f47c32  guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin-unsigned.dmg
  d3aa00742093b62165de0fa74b9c2eef0cc37e245cd1720c82a14db30b05ed40  guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin-unsigned.tar.gz
  67b56f78a0d410ea346f2aa7432b73d4ab99f8471debd2d8e1459d18fcfdf39f  guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin.tar.gz
  29da16189e087c7fc90909d4dfc8002e37ce4ab035d6a94f0d73724d81ce565b  guix-build-300918075144/output/dist-archive/bitcoin-300918075144.tar.gz
  fe4a4a3b84f7782c7d65fdc7d4cbdf6fa57a7898d347ad932cbd4b5d3d7712b4  guix-build-300918075144/output/powerpc64-linux-gnu/SHA256SUMS.part
  e612386c452d04c7a9c9a624efa00f905928af39694067d903635fc7476d0e2c  guix-build-300918075144/output/powerpc64-linux-gnu/bitcoin-300918075144-powerpc64-linux-gnu-debug.tar.gz
  148ff9a17842287e1d541d032bab3c96df98d0c8a2175a132d896e4617799b5b  guix-build-300918075144/output/powerpc64-linux-gnu/bitcoin-300918075144-powerpc64-linux-gnu.tar.gz
  d67e6ad7a8ae2c3a0305602aabbed22ccdf07e354fbc1991b99d9ba58f451d1b  guix-build-300918075144/output/powerpc64le-linux-gnu/SHA256SUMS.part
  a776fb31b742d391cee1b2401204f41b3e93793cc2b54cdfcfca1f1b24a49051  guix-build-300918075144/output/powerpc64le-linux-gnu/bitcoin-300918075144-powerpc64le-linux-gnu-debug.tar.gz
  9bfc9255af051fe3801a556bdeaa940a74399ab7b3b677e5313e5e720a87e9cf  guix-build-300918075144/output/powerpc64le-linux-gnu/bitcoin-300918075144-powerpc64le-linux-gnu.tar.gz
  bc74550b70614e7c07500507943f7b7cda7ec0097908e459b84edfcf9c5f2de7  guix-build-300918075144/output/riscv64-linux-gnu/SHA256SUMS.part
  00906c4d9ba5aa6f567c8c3cfa0d44749f944a182f531ff6724284dc70157f88  guix-build-300918075144/output/riscv64-linux-gnu/bitcoin-300918075144-riscv64-linux-gnu-debug.tar.gz
  9cd40cbaeb3a68faf500410559443376957aafda081e0cdef2a0d17c9b49d933  guix-build-300918075144/output/riscv64-linux-gnu/bitcoin-300918075144-riscv64-linux-gnu.tar.gz
  f9bc2d2cf92493af543a9199763ab913d86bf602f3f5123913ad313391527d75  guix-build-300918075144/output/x86_64-apple-darwin/SHA256SUMS.part
  ba60756267e7fa7add1bb4375c98a65bd730a72a86646e3ddfb8496c1e1b695a  guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin-unsigned.dmg
  fa44e1d7b861e1f02232ef35e81b28dc78dcf52631944ec38768bc2e08943fa5  guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin-unsigned.tar.gz
  57ddb381261a1c242e683c12db6c2cfc0bb690bef73ad596f6503e07522f90ff  guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin.tar.gz
  95e409a241da708c8eefe87c1ba419258f3e4918a36cddd3bc50dbc754a9958e  guix-build-300918075144/output/x86_64-linux-gnu/SHA256SUMS.part
  6b0548280d8558aa68d3a9006beb95a5402e98e64a92a7b211a4341e67b00e85  guix-build-300918075144/output/x86_64-linux-gnu/bitcoin-300918075144-x86_64-linux-gnu-debug.tar.gz
  612a684ed3dc374a81806a50946c85c6d043704945596bed7c5f0f7e998ebf10  guix-build-300918075144/output/x86_64-linux-gnu/bitcoin-300918075144-x86_64-linux-gnu.tar.gz
  a5adc490213892f93e2ea62af2aac6db26127afc721a44cb787b0207b8c16d07  guix-build-300918075144/output/x86_64-w64-mingw32/SHA256SUMS.part
  1c7bf2d489e8d950b22be16506465da70b9402a4e23c770e04a74fb69d05c18c  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-debug.zip
  2a04f07ca0e46a18b68088093eee0bbfbdeb51ec72bb18c2282168d54f748fc4  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-setup-unsigned.exe
  e519347ff375e79d12acd8db87a9b216c5363d4b3cce09d7a8f79b85ba0deb85  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-unsigned.tar.gz
  e49571279f9e5897d5217e5d5fb319467ca213ba7b4e99904e262a1cd1e65df6  guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64.zip
  ```

ACKs for top commit:
  hebasto:
    ACK 3009180751, tested on Ubuntu 22.04.
  jarolrod:
    tACK 3009180751

Tree-SHA512: f1a108ed81b043075250918549471e51c930c8bde617c6cdec0e450e0e2c7f679916a7097561a8f1dbdf00072844b5bbcfc7770dc2c2b265b9e82757fec8f498
2022-07-27 09:47:57 +01:00
MacroFake
7f79746bf0
Merge bitcoin/bitcoin#25705: tidy: enable readability-redundant-string-init
49168df073 tidy: enable readability-redundant-string-init (fanquake)
4ddd746bf9 refactor: remove unnecessary string initializations (fanquake)

Pull request description:

  Remove unnecessary `std::string` = "" initializations. Enable `readability-redundant-string-init`.

  See:
  https://releases.llvm.org/14.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability-redundant-string-init.html

ACKs for top commit:
  shaavan:
    ACK 49168df073

Tree-SHA512: 69e72a434908c9166d407551657b310361ae2ef0170f8289cb1c2b8e96a4632be718c0d55cb12af03a3c3d621d9583eced88e5e9d924abb0a8b1a9b36c903d66
2022-07-26 17:47:55 +02:00
fanquake
5671217477
Merge bitcoin/bitcoin#24974: refactor: Make FEELER_SLEEP_WINDOW type safe (std::chrono)
fa74e726c4 refactor: Make FEELER_SLEEP_WINDOW type safe (std::chrono) (MacroFake)
fa3b3cb9b5 Expose underlying clock in CThreadInterrupt (MacroFake)

Pull request description:

  This gets rid of the `value*1000` manual conversion.

ACKs for top commit:
  naumenkogs:
    utACK fa74e726c4
  dergoegge:
    Code review ACK fa74e726c4

Tree-SHA512: 90409c05c25f0dd2f1c4dead78f707ebfd78b7d84ea4db9fcefd9c4958a1a3338ac657cd9e99eb8b47d52d4485fa3c947dce4ee1559fb56ae65878685e1ed9a3
2022-07-26 15:09:21 +01:00
MacroFake
c90f86e4c7
Merge bitcoin/bitcoin#25694: refactor: Make CTransaction constructor explicit
fa2247a9f9 refactor: Make CTransaction constructor explicit (MacroFake)

Pull request description:

  It involves calculating two hashes, so the performance impact should be
  made explicit.

  Also, add the module to iwyu.

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

Tree-SHA512: e236c352a472c7edfd4f0319a5a16a59f627b0ab7eb8531b53c75d730a3fa3e990a939978dcd952cd73e647925fc79bfa6d9fd87624bbc3ef180f40f95acef19
2022-07-26 13:15:00 +02:00
Antoine Poinsot
00897d0677
script: actually trigger the optimization in BuildScript
The counter is an optimization over calling `ret.empty()`. It was
suggested that the compiler would realize `cnt` is only `0` on the first
iteration, and not actually emit the check and conditional.

This optimization was actually not triggered at all, since we
incremented `cnt` at the beginning of the first iteration. Fix it by
incrementing at the end instead.

This was reported by Github user "Janus".
2022-07-26 13:02:48 +02:00
fanquake
e838a98475
depends: re-enable using -flto when building expat 2022-07-26 11:37:55 +01:00
fanquake
304452558c
depends: expat 2.4.8 2022-07-26 11:37:35 +01:00
glozow
31c1b14754
Merge bitcoin/bitcoin#25689: fuzz: Remove no-op SetMempoolConstraints
fa57c449cf fuzz: Remove no-op SetMempoolConstraints (MacroFake)

Pull request description:

  Now that the mempool no longer uses the args manager (after commit e4e201dfd9), there is no point setting the mempool limits after it is constructed.

  Fix that by setting them once right before the mempool is constructed.

ACKs for top commit:
  dongcarl:
    utACK fa57c449cf
  glozow:
    utACK fa57c449cf

Tree-SHA512: d236f9cdcee8c2076272b82c97f8a5942f1ecf119ab36edafd42088ef97554592348a61e1fbe504fd52b30301ef0177813042599ad12e8cb95b4a20586c85bb0
2022-07-26 10:54:14 +01:00
fanquake
49168df073
tidy: enable readability-redundant-string-init
See:
https://releases.llvm.org/14.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability-redundant-string-init.html
2022-07-26 10:16:42 +01:00
fanquake
4ddd746bf9
refactor: remove unnecessary string initializations 2022-07-26 10:16:42 +01:00
fanquake
a65f6d8cbb
Merge bitcoin/bitcoin#25699: scripted-diff: Replace NullUniValue with UniValue::VNULL
fa28d0f3c3 scripted-diff: Replace NullUniValue with UniValue::VNULL (MacroFake)
fa962103e8 fuzz: refactor: Replace NullUniValue with UniValue{} (MacroFake)

Pull request description:

  This refactor is needed to disable the (potentially expensive for large json) UniValue copy constructors.

ACKs for top commit:
  fanquake:
    ACK fa28d0f3c3

Tree-SHA512: 7d4204cce0a6fc4ecda96973de77d15b7e4c7caa3e0e890e1f5b9a4b9ace8b240b1f7565d6ab586e168a5fa1201b6c60a924868ef34d6abfbfd8ab7f0f99fbc7
2022-07-26 10:08:15 +01:00
MarcoFalke
fa64dd6673
refactor: Use type-safe std::chrono for addrman time 2022-07-26 11:06:10 +02:00
MarcoFalke
fa2ae373f3
Add type-safe AdjustedTime() getter to timedata
Also, fix includes.

The getter will be used in a future commit.
2022-07-26 11:05:54 +02:00
MarcoFalke
fa5103a9f5
Add ChronoFormatter to serialize 2022-07-26 11:05:04 +02:00
fanquake
6078f91299
Merge bitcoin/bitcoin#25701: fix comment spellings from the codespell lint
850b0850cc fix comment spellings from the codespell lint (Greg Weber)

Pull request description:

  test/lint/all-lint.py includes the codespell lint

ACKs for top commit:
  aureleoules:
    ACK 850b0850cc.

Tree-SHA512: bf63690da2652886e705d6594903bab67ff0f35a0e5a5505f063827f5148ebce47681e541cbe0e52396baf1addb25d9fe50e5faa9176456f579a7cd2f1321c44
2022-07-26 10:04:31 +01:00
MarcoFalke
fa253d385f
util: Add HoursDouble 2022-07-26 11:04:14 +02:00
MarcoFalke
fa21fc60c2
scripted-diff: Rename addrman time symbols
-BEGIN VERIFY SCRIPT-
 ren() { sed -i "s:\<$1\>:$2:g" $(git grep -l "\<$1\>" ./src ./test); }

 ren nLastTry          m_last_try
 ren nLastSuccess      m_last_success
 ren nLastGood         m_last_good
 ren nLastCountAttempt m_last_count_attempt
 ren nSinceLastTry     since_last_try
 ren nTimePenalty      time_penalty
 ren nUpdateInterval   update_interval
 ren fCurrentlyOnline  currently_online
-END VERIFY SCRIPT-
2022-07-26 11:04:08 +02:00
MacroFake
fa9284c3e9
refactor: Remove not needed std::max 2022-07-26 11:03:31 +02:00
fanquake
3009180751
depends: always use correct ar for win qt
If we don't set this explicitly, then qt will still use it's default
windows ar, when building with LTO (when we want it to use gcc-ar).

So set `QMAKE_LIB` which is used for win32, and defaults to `ar -rc`.
This way we always get the correct ar.

Issue can be seen building in Guix with LTO. i.e:
```bash
x86_64-w64-mingw32-ar: .obj/release/hb-blob.o: plugin needed to handle lto object
```
2022-07-26 09:38:42 +01:00
Greg Weber
850b0850cc fix comment spellings from the codespell lint
test/lint/all-lint.py includes the codespell lint
2022-07-25 16:13:26 -05:00
Andrew Chow
aa22009887
Merge bitcoin/bitcoin#25700: psbt: Fix unsigned integer overflow
4fa79837ad psbt: Fix unsigned integer overflow (Aurèle Oulès)

Pull request description:

  Fixes #25692.

  This change prevents an unsigned integer overflow during the deserialization of a PSBT.

ACKs for top commit:
  achow101:
    ACK 4fa79837ad

Tree-SHA512: 0863d4d31ada1ba50632b6a66cb4c694c0a15680a90cf9370129cf3db15e3c10e65610b779db047d5a4cc7c920708b728948708e4023e916099c6bfe730f01f9
2022-07-25 15:07:56 -04:00
Aurèle Oulès
4fa79837ad
psbt: Fix unsigned integer overflow 2022-07-25 18:45:57 +02:00
MacroFake
fa28d0f3c3
scripted-diff: Replace NullUniValue with UniValue::VNULL
This is required for removing the UniValue copy constructor.

-BEGIN VERIFY SCRIPT-
 sed -i 's/return NullUniValue/return UniValue::VNULL/g' $(git grep -l NullUniValue ':(exclude)src/univalue')
-END VERIFY SCRIPT-
2022-07-25 17:27:53 +02:00