Commit graph

40673 commits

Author SHA1 Message Date
laanwj
a3c6a13cb2 doc: Suggest installing dev packages for debian/ubuntu qt5 build
Pretty much all library packages were renamed in the 64-bit time_t
migration to add `t64` (even on 64-bit platforms).

Instead of complicating the doc with conditional package names, suggest
installing the `-dev` packages which still have the same name, and
besides that, are the right way to go about it as they contain the
"user facing" C++ headers needed to build against Qt5.

For Fedora, devel packages are already suggested.

This affects Ubuntu 24.04 and Debian Testing.
2024-03-29 09:33:43 +01:00
AngusP
c3c18433ae
refactor: Use typesafe Wtxid in compact block encoding message, instead of ambiguous uint256.
Wtxid/Txid types introduced in #28107
2024-03-28 23:29:57 +01:00
Hennadii Stepanov
f8f5cece4d
doc: Override -g properly to skip debugging information 2024-03-28 11:50:12 +00:00
glozow
d1e9a02126
Merge bitcoin/bitcoin#29402: mempool: Log added for dumping mempool transactions to disk
4d5b55735b log: renamed disk to file so wording was more accurate (kevkevin)
b9f04be870 mempool: Log added for dumping mempool transactions to disk (kevkevin)

Pull request description:

  Sometimes when shutting off bitcoind it can take a while to dump the mempool transaction onto the disk so
  this change adds additional logging to the `DumpMempool` method in `kernel/mempool_persist.cpp`

  Motivated by https://github.com/bitcoin/bitcoin/pull/29227 this change
   - adds a single new line for the amount of transactions being dumped and the amount of memory being dumped to file

  This is in response to https://github.com/bitcoin/bitcoin/pull/29227#issuecomment-1893375082

  The logs will now look like this
  ```
  2024-02-09T23:41:52Z DumpAnchors: Flush 2 outbound block-relay-only peer addresses to anchors.dat completed (0.02s)
  2024-02-09T23:41:52Z scheduler thread exit
  2024-02-09T23:41:52Z Writing 29 mempool transactions to file...
  2024-02-09T23:41:52Z Writing 0 unbroadcast transactions to file.
  2024-02-09T23:41:52Z Dumped mempool: 0.000s to copy, 0.022s to dump, 0.015 MB dumped to file
  2024-02-09T23:41:52Z Flushed fee estimates to fee_estimates.dat.
  2024-02-09T23:41:53Z Shutdown: done
  ```

ACKs for top commit:
  maflcko:
    cr-ACK 4d5b55735b
  glozow:
    reACK 4d5b557

Tree-SHA512: 049191e140d00c1ea57debe0138f1c9eb0f9bb0ef8138e2568e6d89e64f45a5d5853ce3b9cc0b28566aab97555b47ddfb0f9199fc8cea6b81e53f50592d5ae6a
2024-03-28 11:43:10 +00:00
brunoerg
b4c9ace6ff test: check disconnection when sending sendaddrv2 after verack 2024-03-28 07:25:06 -03:00
furszy
2eb5175de8
test: fix StopIteration exception in p2p_node_network_limited.py
The `next()` call throws an exception if the default parameter is omitted and the iterator is exhausted.
Fix it by providing a default value.

The failure can be tested by commenting out lines 90 and 91 in the test (the `self.connect_nodes(2, 0)``).
Since there is no connection, the node in question retrieves a single element in the 'getchaintips()' call.
This scenario without the fix, aborts the test right away, throwing an StopIteration exception, and with
the fix, the test properly waits until the timeout (wait_until() call).
2024-03-27 16:37:36 -03:00
fanquake
430f319f73
depends: qt 5.15.13
I need to try and patch around Qts buildsystem to keep #21778 moving
along (the issue being that even when you tell Qt to build using
Clang on Linux, it still calls out to GCC, breaking our ability to have
a macOS release build env that doesn't have a GCC toolchain installed,
and thus no ld binary).

Before trying to patch Qt any further, update to the latest LTS
release, and update the current patch set.
2024-03-27 16:45:21 +00:00
Ryan Ofsky
c8e3978114
Merge bitcoin/bitcoin#27307: wallet: track mempool conflicts with wallet transactions
5952292133 wallet, rpc: show mempool conflicts in `gettransaction` result (ishaanam)
54e07ee22f wallet: track mempool conflicts (ishaanam)
d64922b590 wallet refactor: use CWalletTx member functions to determine tx state (ishaanam)
ffe5ff1fb6 scripted-diff: wallet: s/TxStateConflicted/TxStateBlockConflicted (ishaanam)
180973a941 test: Add tests for wallet mempool conflicts (ishaanam)

Pull request description:

  The `mempool_conflicts` variable is added to `CWalletTx`, it is a set of txids of txs in the mempool conflicting with the wallet tx or a wallet tx's parent. This PR only changes how mempool-conflicted txs are dealt with in memory.

  `IsSpent` now returns false for an output being spent by a mempool conflicted transaction where it previously returned true.

  A txid is added to `mempool_conflicts` during  `transactionAddedToMempool`. A txid is removed from `mempool_conflicts` during  `transactionRemovedFromMempool`.

  This PR also adds a `mempoolconflicts` field to the `gettransaction` wallet RPC result.

  Builds on #27145
  Second attempt at #18600

ACKs for top commit:
  achow101:
    ACK 5952292133
  ryanofsky:
    Code review ACK 5952292133. Just small suggested changes since last review
  furszy:
    ACK 59522921

Tree-SHA512: 615779606723dbb6c2e302681d8e58ae2052ffee52d721ee0389746ddbbcf4b4c4afacf01ddf42b6405bc6f883520524186a955bf6b628fe9b3ae54cffc56a29
2024-03-27 12:45:08 -04:00
fanquake
7a12cbed99
Merge bitcoin/bitcoin#29747: depends: fix mingw-w64 Qt DEBUG=1 build
b7e7e727ab depends: fix mingw-w64 Qt DEBUG=1 build (fanquake)

Pull request description:

  The issue is that compilation is done with `x86_64-w64-mingw32-g++-posix`, but then linking is done with `x86_64-w64-mingw32-g++`.

  I'm guessing this has been broken since #24131 (01d1845a80), but have not checked.

  Fixes #29734.
  Unblocks #29527 (`DEBUG=1` builds can be tested).

ACKs for top commit:
  hebasto:
    ACK b7e7e727ab, tested on Ubuntu 22.04 with the [installed](https://github.com/bitcoin/bitcoin/issues/29734#issuecomment-2022852344) `g++-mingw-w64-x86-64` package.
  TheCharlatan:
    ACK b7e7e727ab

Tree-SHA512: 9e24e84046c0489c20971bb9c68d1a643c233837193c184f61bff79dfc8d7397a5c5526ac1a205ad423920f2589559cd01cb104ceb7f89515bb6421510d82ca9
2024-03-27 16:36:14 +00:00
Sergi Delgado Segura
61560d5e93 test: makes timeout a forced named argument in tests methods that use it
This makes calls to such methods more explicit and less error prone
2024-03-27 15:33:07 +01:00
Sebastian Falbesoner
d5a715536e
build: remove boost::process dependency for building external signer support 2024-03-27 14:16:38 +00:00
Sebastian Falbesoner
70434b1c44
external_signer: replace boost::process with cpp-subprocess
This primarily affects the `RunCommandParseJSON` utility function.
2024-03-27 14:16:37 +00:00
Hennadii Stepanov
cc8b9875b1
Add cpp-subprocess header-only library
Upstream repo: https://github.com/arun11299/cpp-subprocess
Commit: 4025693decacaceb9420efedbf4967a04cb028e7

The "Convenience Functions" section is unused in our codebase, so it has
been removed.
2024-03-27 14:16:32 +00:00
kevkevin
4d5b55735b
log: renamed disk to file so wording was more accurate 2024-03-27 07:19:46 -05:00
kevkevin
b9f04be870
mempool: Log added for dumping mempool transactions to disk 2024-03-27 07:18:49 -05:00
fanquake
28f2ca675f
Merge bitcoin/bitcoin#29479: test: Refactor subtree exclusion in lint tests
80fa7da21c test: Refactor subtree exclusion in lint tests (Brandon Odiwuor)

Pull request description:

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

  Refactor subtree exclusion in lint tests to one place

  Second attempt after PR: https://github.com/bitcoin/bitcoin/pull/24435

ACKs for top commit:
  fjahr:
    re-ACK 80fa7da21c
  maflcko:
    lgtm ACK 80fa7da21c
  davidgumberg:
    ACK 80fa7da21c

Tree-SHA512: deff7457dd19ca5ea440d3d53feae047e8863b9ddeb6494a3c94605a5d16edc91db8f99a435b4fab2ef89aedee42439562be006da647fb85bbf3def903a3ce50
2024-03-27 11:40:18 +00:00
fanquake
b8b0d64765
Merge bitcoin/bitcoin#29740: ci: Print tsan errors to stderr
fa22a438fa ci: Print tsan errors to stderr (MarcoFalke)

Pull request description:

  This fixes a bug introduced in https://github.com/bitcoin/bitcoin/pull/27667

  All sanitizers print their errors to stderr, except for tsan, which prints to a file and expects the file to be read.

  Fix this by not using a log file in any sanitizer.

ACKs for top commit:
  dergoegge:
    utACK fa22a438fa

Tree-SHA512: 15dca57932a21bda145335fab6367bbf2ae67b25e0b7b61044d2c06ab7a8db3a452f057f6656b81a031726375b7bb238f5ced18ab8894f005e7ab254c7d1ef06
2024-03-27 11:07:02 +00:00
fanquake
b7e7e727ab
depends: fix mingw-w64 Qt DEBUG=1 build
The issue is that compilation is done with `x86_64-w64-mingw32-g++-posix`,
but then linking is done with `x86_64-w64-mingw32-g++`.

I'm guessing this has been broken since #24131
(01d1845a80), but have not checked.

Fixes #29734.
Unblocks #29527 (now DEBUG=1 builds can be tested).
2024-03-27 10:52:32 +00:00
MarcoFalke
fa22a438fa
ci: Print tsan errors to stderr 2024-03-26 19:19:28 +01:00
fanquake
601edd8ee8
ci: use codespell 2.2.6 2024-03-26 16:51:46 +00:00
crazeteam
52fa0d285f
doc: fix some typos
Signed-off-by: crazeteam <lilujing@outlook.com>
2024-03-26 16:51:46 +00:00
RoboSchmied
b5ed13a240
doc: Fix typos
Fix three typos.
2024-03-26 16:51:37 +00:00
Greg Sanders
ee1b9b231a CalculateFeerateDiagramsForRBF: update misleading description of old diagram contents 2024-03-26 11:42:42 -04:00
fanquake
d04324a705
Merge bitcoin/bitcoin#29695: guix: build GCC with --enable-standard-branch-protection
7850c5fe20 guix: build GCC with --enable-standard-branch-protection (fanquake)

Pull request description:

  This is one change extracted from #24123 (which now produces fully BTI & PAC enabled bins), which will mean that everything in depends, for Guix builds, is compiled using `-mbranch-protection=standard`.

  Turning this on by default, is similar to what we already do with `--enable-default-ssp`, `--enable-default-pie` etc.

  See: https://gcc.gnu.org/install/specific.html#aarch64-x-x

  > To enable Branch Target Identification Mechanism and Return Address Signing by default at configure time use the `--enable-standard-branch-protection` option.

  > This is equivalent to having `-mbranch-protection=standard` during compilation. This can be explicitly disabled during compilation by passing the `-mbranch-protection=none` option which turns off all types of branch protections.

ACKs for top commit:
  TheCharlatan:
    ACK 7850c5fe20

Tree-SHA512: 18f898da27021bab502e708ea5fa9b325352f8f6e23d9488a2a0feda87e0af2ac0e4f87b3af9ad6a9a37bbfc99ab0285de4f0bdc174dcd38163d92c122e958e2
2024-03-26 13:45:33 +00:00
Greg Sanders
a9d42b9aa5 CompareFeerateDiagram: short-circuit comparison when detected as incomparable 2024-03-26 08:41:06 -04:00
Greg Sanders
cebcced65e remove erroneous CompareFeerateDiagram comment about slope 2024-03-26 08:20:30 -04:00
Greg Sanders
a0376e1061 unit test: clarify unstated assumption for calc_feerate_diagram_rbf chunking 2024-03-26 08:20:30 -04:00
Greg Sanders
890cb015f3 s/effected/affected/ 2024-03-26 08:20:30 -04:00
Greg Sanders
d9391ec095 CalculateFeerateDiagramsForRBF: remove size tie-breaking from chunking conflicts 2024-03-26 08:20:30 -04:00
Greg Sanders
b684d82d7e fuzz: Add more invariant checks for package_rbf 2024-03-26 08:20:30 -04:00
Greg Sanders
2a3ada8b21 fuzz: finer grained ImprovesFeerateDiagram check on error result 2024-03-26 08:20:30 -04:00
Greg Sanders
c377ae9ba0 unit test: improve ImprovesFeerateDiagram coverage with one less vb case 2024-03-26 08:20:30 -04:00
Greg Sanders
d2bf923eb1 unit test: make calc_feerate_diagram_rbf less brittle 2024-03-26 08:20:30 -04:00
Greg Sanders
defe023f6e fuzz: add PrioritiseTransaction coverage in diagram checks 2024-03-26 08:20:30 -04:00
Greg Sanders
216d5ff162 unit test: add coverage showing priority affects diagram check results 2024-03-26 08:20:30 -04:00
Greg Sanders
a80d80936a unit test: add CheckConflictTopology case for not the only child 2024-03-26 08:20:30 -04:00
Hennadii Stepanov
eff19fa1c8
build, macos: Drop unused osx_volname target 2024-03-26 12:14:59 +00:00
Greg Sanders
69bd18ca80 unit test: check tx4 conflict error message 2024-03-26 08:05:22 -04:00
Greg Sanders
c0c37f07eb unit test: have CompareFeerateDiagram tested with diagrams both ways 2024-03-26 08:05:22 -04:00
Greg Sanders
b62e2c0fa5 ImprovesFeerateDiagram: Spelling fix and removal of unused diagram vectors 2024-03-26 08:05:22 -04:00
Greg Sanders
bb42402945 doc: fix comment about non-existing CompareFeeFrac 2024-03-26 08:05:22 -04:00
Brandon Odiwuor
80fa7da21c test: Refactor subtree exclusion in lint tests 2024-03-26 13:49:47 +03:00
fanquake
007ea322a6
depends: switch to building libqrencode with CMake 2024-03-26 10:28:29 +00:00
fanquake
884330c0a5
guix: make cmake-minimal a global requirement
Needed for switching to building miniupnpc with CMake.
2024-03-26 10:01:56 +00:00
glozow
19b968f743
Merge bitcoin/bitcoin#29722: 28950 followups
7b29119d79 use const ref for client_maxfeerate (Greg Sanders)
f10fd07320 scripted-diff: Rename max_sane_feerate to client_maxfeerate (Greg Sanders)

Pull request description:

  Follow-ups to https://github.com/bitcoin/bitcoin/pull/28950

ACKs for top commit:
  glozow:
    utACK 7b29119d79
  stickies-v:
    ACK 7b29119d79

Tree-SHA512: b9e13509c6e9d7c08aa9d4e759f9707004c1c7b8f3e521fe2ec0037160b87c7fb02528966b9f26eaca6291621df9300e84b5aec66dbc2e97d13bf2f3cd7f979c
2024-03-26 08:56:44 +00:00
glozow
c2dbbc35b9
Merge bitcoin/bitcoin#29242: Mempool util: Add RBF diagram checks for single chunks against clusters of size 2
7295986778 Unit tests for CalculateFeerateDiagramsForRBF (Greg Sanders)
b767e6bd47 test: unit test for ImprovesFeerateDiagram (Greg Sanders)
7e89b659e1 Add fuzz test for FeeFrac (Greg Sanders)
4d6528a3d6 fuzz: fuzz diagram creation and comparison (Greg Sanders)
e9c5aeb11d test: Add tests for CompareFeerateDiagram and CheckConflictTopology (Greg Sanders)
588a98dccc fuzz: Add fuzz target for ImprovesFeerateDiagram (Greg Sanders)
2079b80854 Implement ImprovesFeerateDiagram (Greg Sanders)
66d966dcfa Add FeeFrac unit tests (Greg Sanders)
ce8e22542e Add FeeFrac utils (Greg Sanders)

Pull request description:

  This is a smaller piece of https://github.com/bitcoin/bitcoin/pull/28984 broken off for easier review.

  Up to date explanation of diagram checks are here: https://delvingbitcoin.org/t/mempool-incentive-compatibility/553

  This infrastructure has two near term applications prior to cluster mempool:
  1) Limited Package RBF(https://github.com/bitcoin/bitcoin/pull/28984): We want to allow package RBF only when we know it improves the mempool. This narrowly scoped functionality allows use with v3-like topologies, and will be expanded at some point post-cluster mempool when diagram checks can be done efficiently against bounded cluster sizes.
  2) Replacement for single tx RBF(in a cluster size of up to two) against conflicts of up to cluster size two. `ImprovesFeerateDiagram` interface will have to change for this use-case, which is a future direction to solve certain pins and improve mempool incentive compatibility: https://delvingbitcoin.org/t/ephemeral-anchors-and-mev/383#diagram-checks-fix-this-3

  And longer-term, this would be the proposed way we would compute incentive compatibility for all conflicts, post-cluster mempool.

ACKs for top commit:
  sipa:
    utACK 7295986778
  glozow:
    code review ACK 7295986778
  murchandamus:
    utACK 7295986778
  ismaelsadeeq:
    Re-ACK 7295986778
  willcl-ark:
    crACK 7295986778
  sdaftuar:
    ACK 7295986778

Tree-SHA512: 79593e5a087801c06f06cc8b73aa3e7b96ab938d3b90f5d229c4e4bfca887a77b447605c49aa5eb7ddcead85706c534ac5eb6146ae2396af678f4beaaa5bea8e
2024-03-26 08:48:37 +00:00
Ava Chow
b44f9e4645
Merge bitcoin/bitcoin#28928: test: add coverage for bech32m in wallet_keypool_topup
a8bfc3dea1 test: add coverage for bech32m in `wallet_keypool_topup` (brunoerg)

Pull request description:

  0dcac51049 added coverage for all keypool addresses types in `wallet_keypool_topup` (4y ago). Now we have bech23m, so this PR adds it.

ACKs for top commit:
  achow101:
    ACK a8bfc3dea1
  marcofleon:
    ACK a8bfc3dea1. Definitely a more straightfoward addition to the test. Reviewed the code, built the PR branch and ran all functional tests without issues.
  furszy:
    utACK a8bfc3dea

Tree-SHA512: aa830b723a7a54b23744f9fb3cf5214452c4ffc8e3bbe0e8bd980bdf902e61c3dd2fd57361b82c5c0c5224aa0774158daf34b6b2188edda0a971f82111976051
2024-03-25 17:49:02 -04:00
fanquake
2102c978b5
Merge bitcoin/bitcoin#29706: depends: set two CMake options globally
76045bb9d6 depends: always set CMAKE_POSITION_INDEPENDENT_CODE=ON (fanquake)
d04623678c depends: always set CMAKE_INSTALL_LIBDIR=lib/ (fanquake)

Pull request description:

  Set `CMAKE_INSTALL_LIBDIR=lib/` and `CMAKE_POSITION_INDEPENDENT_CODE=ON` globally in depends, rather than per-package. `CMAKE_INSTALL_LIBDIR=lib/` is needed to override the annoying [`GNUInstallDirs`](https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html) `lib` vs `lib64` behaviour, and we always want PIC code. The PIC commit is the counterpart to the same Autotools change in #29488. I'm PRing these commits as I have a CMake branch building on top, and want to avoid adding the same workarounds to every package we are going to touch, but these can go in separately as the build should be tested for existing packages (i.e multiprocess).

ACKs for top commit:
  hebasto:
    re-ACK 76045bb9d6.
  theuni:
    utACK 76045bb9d6. Both changes make sense to me, and both can be overridden if needed, though I can't imagine we'd need to.

Tree-SHA512: 655a0b6b7ee5a5820f52e8e919ef03fc216d29f13f3904f72b64ce57436510e073c903039488d5740535c56e1f6221267229238c5231de5f8467d238fd562578
2024-03-25 16:47:40 +00:00
fanquake
220487bafd
Merge bitcoin/bitcoin#29718: Correct '-dbcache' to '-prune'
416b9d9427 correct '-dbcache' to '-prune' (Ben Westgate)

Pull request description:

  This looks like a typo, '-prune' is doubled not the '-dbcache' by my understanding.

ACKs for top commit:
  Sjors:
    ACK 416b9d9427
  fjahr:
    ACK 416b9d9427

Tree-SHA512: d954a8976f6e43e0af9bc2ba89fec1a1ccc90483cc005af3d2810379bd6bea7dbd87766af71c2a45b3d751a3f682f0f67a4525ec350bf6163bc4bb88fab6e4cb
2024-03-25 16:21:20 +00:00
Greg Sanders
7b29119d79 use const ref for client_maxfeerate 2024-03-25 11:52:12 -04:00