44285 Commits

Author SHA1 Message Date
merge-script
7e1eca4882 Merge bitcoin/bitcoin#33344: [29.x] Backports
f2bd79f80c doc: update manual pages for v29.2rc1 (fanquake)
461dd13faf build: bump version to v29.2rc1 (fanquake)
9bc4afb62c doc: update release notes for 29.x (fanquake)
61cdc04a83 net: Do not apply whitelist permission to onion inbounds (Martin Zumsande)
1288d44804 test: send duplicate blocktxn message in p2p_compactblocks.py (Eugene Siegel)
569ceb0df4 net: check for empty header before calling FillBlock (Eugene Siegel)
4c940d4789 p2p: remove vestigial READ_STATUS_CHECKBLOCK_FAILED (Greg Sanders)
9b95ab5e9d p2p: Add witness mutation check inside FillBlock (Greg Sanders)
e97588fc3d trace: Workaround GCC bug compiling with old systemtap (Luke Dashjr)
324caa8497 ci: always use tag for LLVM checkout (fanquake)
2717331981 Fix benchmark CSV output (Hennadii Stepanov)

Pull request description:

  Backports:
  * #32646
  * #33296
  * #33310
  * #33340
  * #33364
  * #33395

  Plus changes for 29.2rc1.

ACKs for top commit:
  darosior:
    utACK f2bd79f80c
  mzumsande:
    utACK f2bd79f80c

Tree-SHA512: 346a92032b7a069e2941056c6273ff65e360c5834832b106350a9cd42b634518cc75b807da6e51a6292e3a33342bb7b145777d3538a2792e03c63962d747a025
v29.2rc1
2025-09-17 14:00:10 -04:00
fanquake
f2bd79f80c doc: update manual pages for v29.2rc1 2025-09-17 15:54:29 +01:00
fanquake
461dd13faf build: bump version to v29.2rc1 2025-09-17 15:47:34 +01:00
fanquake
9bc4afb62c doc: update release notes for 29.x 2025-09-17 15:45:45 +01:00
Martin Zumsande
61cdc04a83 net: Do not apply whitelist permission to onion inbounds
Tor inbound connections do not reveal the peer's actual network address.
Therefore do not apply whitelist permissions to them.

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>

Github-Pull: #33395
Rebased-From: f563ce9081
2025-09-17 10:12:08 +01:00
Eugene Siegel
1288d44804 test: send duplicate blocktxn message in p2p_compactblocks.py
Add test_multiple_blocktxn_response that checks that the peer is
disconnected.

Github-Pull: #33296
Rebased-From: 8b62647680
2025-09-12 15:44:07 +01:00
Eugene Siegel
569ceb0df4 net: check for empty header before calling FillBlock
Previously in debug builds, this would cause an Assume crash if
FillBlock had been called previously. This could happen when multiple
blocktxn messages were received.

Co-Authored-By: Greg Sanders <gsanders87@gmail.com>

Github-Pull: #33296
Rebased-From: 5e585a0fc4
2025-09-12 15:44:03 +01:00
Greg Sanders
4c940d4789 p2p: remove vestigial READ_STATUS_CHECKBLOCK_FAILED
Github-Pull: #32646
Rebased-From: 28299ce776
2025-09-12 15:44:00 +01:00
Greg Sanders
9b95ab5e9d p2p: Add witness mutation check inside FillBlock
Since #29412, we have not allowed mutated blocks to continue
being processed immediately the block is received, but this
is only done for the legacy BLOCK message.

Extend these checks as belt-and-suspenders to not allow
similar mutation strategies to affect relay by honest peers
by applying the check inside
PartiallyDownloadedBlock::FillBlock, immediately before
returning READ_STATUS_OK.

This also removes the extraneous CheckBlock call.

Github-Pull: #32646
Rebased-From: bac9ee4830
2025-09-12 15:43:53 +01:00
Luke Dashjr
e97588fc3d trace: Workaround GCC bug compiling with old systemtap
Github-Pull: #33310
Rebased-From: 93a29ff283
2025-09-12 11:52:26 +01:00
fanquake
324caa8497 ci: always use tag for LLVM checkout
Rather than trying to match the apt installed clang version, which is
prone to intermittent issues. i.e #33345.

Github-Pull: #33364
Rebased-From: b736052e39
2025-09-12 09:48:59 +01:00
Hennadii Stepanov
2717331981 Fix benchmark CSV output
The `SHA256AutoDetect` return output is used, among other use cases, to
name benchmarks. Using a comma breaks the CSV output.

This change replaces the comma with a semicolon, which fixes the issue.

Github-Pull: #33340
Rebased-From: 790b440197
2025-09-09 10:13:49 +01:00
merge-script
a0e438bd49 Merge bitcoin/bitcoin#33294: [29.x] *san CI backports
7c6be9acae doc: update release notes for 29.x (fanquake)
ea40fa95d9 ci: use LLVM 21 (fanquake)
5513516241 ci: remove DEBUG_LOCKORDER from TSAN job (fanquake)
f9939cdbe0 ci: instrument libc++ in TSAN job (fanquake)
0fba5ae021 ci: allow libc++ instrumentation other than msan (fanquake)
10cbf2255d ci: Use APT_LLVM_V in msan task (MarcoFalke)

Pull request description:

  Backports:
  * #32999
  * #33099 (added `ninja-build`)
  * #33258

ACKs for top commit:
  marcofleon:
    ACK 7c6be9acae, looks okay to me

Tree-SHA512: 928882d505ed8101a6d4123947252a84d40bd350383408926b5c37aed56dc3359067d1d14c443c51351a6958a8dd9e141bb7713665295ff1f1ad86c5f8a36df0
2025-09-08 17:16:58 +01:00
fanquake
7c6be9acae doc: update release notes for 29.x 2025-09-05 12:04:09 +01:00
fanquake
ea40fa95d9 ci: use LLVM 21
Github-Pull: #33258
Rebased-From: 4cf0ae474b
2025-09-03 16:51:18 +01:00
fanquake
5513516241 ci: remove DEBUG_LOCKORDER from TSAN job
Github-Pull: #33099
Rebased-From: 7aa5b67132
2025-09-03 16:51:18 +01:00
fanquake
f9939cdbe0 ci: instrument libc++ in TSAN job
Qt is disabled, as the build is now taking a very long time.

Github-Pull: #33099
Rebased-From: b09af2ce50
2025-09-03 16:51:14 +01:00
fanquake
0fba5ae021 ci: allow libc++ instrumentation other than msan
Github-Pull: #33099
Rebased-From: 6653cafd0b
2025-09-03 16:16:08 +01:00
MarcoFalke
10cbf2255d ci: Use APT_LLVM_V in msan task
Also, use update-alternatives to avoid having to manually specify
clang-${APT_LLVM_V} or llvm-symbolizer-${APT_LLVM_V} everywhere.

Github-Pull: #32999
Rebased-From: fad040a578
2025-09-03 16:14:25 +01:00
merge-script
fd784f2774 Merge bitcoin/bitcoin#33271: [29.x] finalise v29.1
084c95a18c doc: update manual pages for v29.1 (fanquake)
37d115c67e build: bump version to v29.1 final (fanquake)
b0d88bcc50 doc: finalise release notes for 29.1 (fanquake)
99ab2e70e7 ci: return to using dash in CentOS job (fanquake)
6448ebb5a7 doc: Remove wrong and redundant doxygen tag (MarcoFalke)

Pull request description:

  Backports:
  * #33236
  * #33261

  Since `rc2`, #33212 was also backported in #33251.

ACKs for top commit:
  glozow:
    ACK 084c95a18c
  willcl-ark:
    ACK 084c95a18c

Tree-SHA512: 0698e5b2d12f7328bf5af8dbbd92b0049de401c0a4af27fda2209f9aab35d827c5ac65eb9268aa1fae241e3adf0d3dd89324bb288655ead8af2b5584aae1f6d2
v29.1
2025-09-03 10:49:29 -04:00
fanquake
084c95a18c doc: update manual pages for v29.1 2025-09-03 13:41:57 +01:00
fanquake
37d115c67e build: bump version to v29.1 final 2025-09-03 13:23:31 +01:00
fanquake
b0d88bcc50 doc: finalise release notes for 29.1 2025-09-03 13:22:28 +01:00
fanquake
99ab2e70e7 ci: return to using dash in CentOS job
Github-Pull: #33261
Rebased-From: 509ffea40a
2025-09-03 11:51:12 +01:00
MarcoFalke
6448ebb5a7 doc: Remove wrong and redundant doxygen tag
Remove it in feerate.

Fix it in the other places.

Github-Pull: #33236
Rebased-From: 966666de9a
2025-08-29 14:53:02 +01:00
merge-script
162c009c1d Merge bitcoin/bitcoin#33251: [29.x] backport #33212
fcac8022d8 test: index with an unclean restart after a reorg (Martin Zumsande)
16b1710d97 index: don't commit state in BaseIndex::Rewind (Martin Zumsande)

Pull request description:

  Backports #33212 to 29.x

ACKs for top commit:
  achow101:
    ACK fcac8022d8
  stickies-v:
    ACK fcac8022d8
  mzumsande:
    Code Review ACK fcac8022d8

Tree-SHA512: eeb9213f03bbb1d48c3ccb12121a6e475f436895d314b5171007e7e4ee457c74b312fa7f0d1808d6221dc22b192700a93ea21c4e9e04689da7dde7e1f79e9569
2025-08-27 09:46:59 +01:00
Martin Zumsande
fcac8022d8 test: index with an unclean restart after a reorg
This test fails without the previous commit.

Github-Pull: #33212
Rebased-From: a602f6fb7b
2025-08-24 22:51:07 +01:00
Martin Zumsande
16b1710d97 index: don't commit state in BaseIndex::Rewind
The committed state of an index should never
be ahead of the flushed chainstate. Otherwise, in the case
of an unclean shutdown, the blocks necessary to revert
from the prematurely committed state would not be
available, which would corrupt the coinstatsindex in particular.
Instead, the index state will be committed with the next
ChainStateFlushed notification.

Github-Pull: #33212
Rebased-From: 01b95ac6f4
2025-08-24 22:48:09 +01:00
merge-script
027a60d218 Merge bitcoin/bitcoin#33234: doc: update example bitcoin conf for 29.1rc2
65dc198d2c doc: update example bitcoin conf for 29.1rc2 (fanquake)

Pull request description:

  Followup to #33226.

ACKs for top commit:
  dergoegge:
    ACK 65dc198d2c
  willcl-ark:
    ACK 65dc198d2c

Tree-SHA512: b2924783dd98890bd031dbca8c9c126cd3ab45c3cc8d2f14dd5b5f940fcc7061f3d1f73e2d36482afceaae786f3087b59baab98db0f10bc0d19e3f016f52851a
v29.1rc2
2025-08-21 15:03:20 +01:00
fanquake
65dc198d2c doc: update example bitcoin conf for 29.1rc2 2025-08-21 13:39:05 +01:00
merge-script
89fe999cda Merge bitcoin/bitcoin#33226: [29.x] 33106 backport and final changes for rc2
0034dcfba9 [doc] man pages for 29.1rc2 (glozow)
eb1574af0c [build] bump version to 29.1rc2 (glozow)
f9f1ca5445 [doc] update release notes (glozow)
9dd7efc8c3 [policy] lower default minrelaytxfee and incrementalrelayfee to 100sat/kvB (glozow)
bbdab3ef7b [prep/test] make wallet_fundrawtransaction's minrelaytxfee assumption explicit (glozow)
da30ca0efa [prep/util] help MockMempoolMinFee handle more precise feerates (glozow)
a0ae3fc8a7 [prep/test] replace magic number 1000 with respective feerate vars (glozow)
1c1970fb45 [miner] lower default -blockmintxfee to 1sat/kvB (glozow)
3a7e093f94 [doc] assert that default min relay feerate and incremental are the same (glozow)
567c3ee3cb [test] explicitly check default -minrelaytxfee and -incrementalrelayfee (glozow)
6b5396c4b1 [test] RBF rule 4 for various incrementalrelayfee settings (glozow)
03da7aff99 [test] check bypass of minrelay for various minrelaytxfee settings (glozow)
4e3cfa660d [test] check miner doesn't select 0fee transactions (glozow)

Pull request description:

  Backports #33106 and includes final changes for 29.1rc2. Based on current network conditions (in which nodes rejecting 0.1-1sat/vB are missing many transactions), it is recommended to change these policy settings.

  I did not include #32750 because it causes #33177 and I don't foresee any problems; it was just a nice to have.
  For reviewers: the backport is unclean but fairly straightforward. I just had to adapt a test that is no longer in master (#32973) and include `-datacarriersize` in order to pad transaction size (#32406).

ACKs for top commit:
  dergoegge:
    utACK 0034dcfba9
  marcofleon:
    ACK  0034dcfba9
  murchandamus:
    crACK 0034dcfba9
  brunoerg:
    crACK 0034dcfba9

Tree-SHA512: 1b7540ac3fec5b15cf36926dbf633054f14549d76aa445a2bf042b5667e8637db4f9c21c869af25a0c3f8c7cca6c585d17896d2f7e95a6264c1ff59817446694
2025-08-21 12:18:36 +01:00
glozow
0034dcfba9 [doc] man pages for 29.1rc2 2025-08-20 10:19:48 -04:00
glozow
eb1574af0c [build] bump version to 29.1rc2 2025-08-20 10:19:48 -04:00
glozow
f9f1ca5445 [doc] update release notes
Release notes are from 18720bc5d5
2025-08-20 10:19:32 -04:00
glozow
9dd7efc8c3 [policy] lower default minrelaytxfee and incrementalrelayfee to 100sat/kvB
Let's say an attacker wants to use/exhaust the network's bandwidth, and
has the choice between renting resources from a commercial provider and
getting the network to "spam" itself it by sending unconfirmed
transactions. We'd like the latter to be more expensive than the former.

The bandwidth for relaying a transaction across the network is roughly
its serialized size (plus relay overhead) x number of nodes. A 1000vB
transaction is 1000-4000B serialized. With 100k nodes, that's 0.1-0.4GB
If the going rate for commercial services is 10c/GB, that's like 1-4c per kvB
of transaction data, so a 1000vB transaction should pay at least $0.04.

At a price of 120k USD/BTC, 100sat is about $0.12. This price allows us
to tolerate a large decrease in the conversion rate or increase in the
number of nodes.

Github-Pull: #33106
Rebased-From: 6da5de58ca
2025-08-20 10:19:23 -04:00
glozow
bbdab3ef7b [prep/test] make wallet_fundrawtransaction's minrelaytxfee assumption explicit
Github-Pull: #33106
Rebased-From: 2e515d2897
2025-08-20 10:19:23 -04:00
glozow
da30ca0efa [prep/util] help MockMempoolMinFee handle more precise feerates
Use a virtual size of 1000 to keep precision when using a feerate
(which is rounded to the nearest satoshi per kvb) that isn't just an
integer.

Github-Pull: #33106
Rebased-From: 457cfb61b5
2025-08-20 10:19:23 -04:00
glozow
a0ae3fc8a7 [prep/test] replace magic number 1000 with respective feerate vars
Github-Pull: #33106
Rebased-From: 3eab8b7240
2025-08-20 10:19:23 -04:00
glozow
1c1970fb45 [miner] lower default -blockmintxfee to 1sat/kvB
Back when we implemented coin age priority as a miner policy, miners
mempools might admit transactions paying very low fees, but then want to
set a higher fee for block inclusion. However, since coin age priority
was removed in v0.15, the block assembly policy is solely based on fees,
so we do not need to apply minimum feerate rules in multiple places. In
fact, the block assembly policy ignoring transactions that are added to
the mempool is likely undesirable as we waste resources accepting and
storing this transaction.

Instead, rely on mempool policy to enforce a minimum entry feerate to
the mempool (minrelaytxfee). Set the minimum block feerate to the
minimum non-zero amount (1sat/kvB) so it collects everything it finds in
mempool into the block.

Github-Pull: #33106
Rebased-From:  5f2df0ef78
2025-08-20 10:19:23 -04:00
glozow
3a7e093f94 [doc] assert that default min relay feerate and incremental are the same
Github-Pull: #33106
Rebased-From: d6213d6aa1
2025-08-20 10:19:23 -04:00
glozow
567c3ee3cb [test] explicitly check default -minrelaytxfee and -incrementalrelayfee
Github-Pull: #33106
Rebased-From:  1fbee5d7b6
2025-08-20 10:19:23 -04:00
glozow
6b5396c4b1 [test] RBF rule 4 for various incrementalrelayfee settings
Github-Pull: #33106
Rebased-From: 72dc18467d
2025-08-20 10:19:23 -04:00
glozow
03da7aff99 [test] check bypass of minrelay for various minrelaytxfee settings
Github-Pull: #33106
Rebased-From: 85f498893f
2025-08-20 10:19:23 -04:00
glozow
4e3cfa660d [test] check miner doesn't select 0fee transactions
Github-Pull: #33106
Rebased-From: e5f896bb1f
2025-08-20 10:19:15 -04:00
merge-script
c5196bc9c4 Merge bitcoin/bitcoin#33225: [29.x] Backport logging ratelimiting
0022e25333 test: modify logging_filesize_rate_limit params (Eugene Siegel)
206f5902db config: add DEBUG_ONLY -logratelimit (Eugene Siegel)
dfdd407c42 test: logging_filesize_rate_limit improvements (stickies-v)
11538160b3 test: don't leak log category mask across tests (stickies-v)
4ed7a51642 test: add ReadDebugLogLines helper function (stickies-v)
acfa83d9d0 log: make m_limiter a shared_ptr (stickies-v)
81751341e9 log: clean up LogPrintStr_ and Reset, prefix all logs with "[*]" when there are suppressions (Eugene Siegel)
7c3820ff63 log: change LogLimitStats to struct LogRateLimiter::Stats (Eugene Siegel)
dfe4e19f66 log: clarify RATELIMIT_MAX_BYTES comment, use RATELIMIT_WINDOW (Eugene Siegel)
273ffda2c8 log: remove const qualifier from arguments in LogPrintFormatInternal (Eugene Siegel)
9cde68fa98 log: avoid double hashing in SourceLocationHasher (Eugene Siegel)
25f975b8df test: remove noexcept(false) comment in ~DebugLogHelper (Eugene Siegel)
24c793d06c doc: add release notes for new rate limiting logging behavior (Eugene Siegel)
0b6b096421 log: Add rate limiting to LogPrintf, LogInfo, LogWarning, LogError, LogPrintLevel (Eugene Siegel)
a0992a842e log: use std::source_location in place of __func__, __FILE__, __LINE__ (Eugene Siegel)
41262cc4d5 log: introduce LogRateLimiter, LogLimitStats, Status (Eugene Siegel)
4987c03531 test: Mark ~DebugLogHelper as noexcept(false) (Eugene Siegel)

Pull request description:

  Backports:
  * #32604
    * Note that 24c793d06c isn't clean, as it's added directly to `release-notes.md`.
  * #33011
  * #33211

ACKs for top commit:
  instagibbs:
    utACK 0022e25333
  dergoegge:
    utACK 0022e25333
  stickies-v:
    ACK 0022e25333 - all backports clean except the release notes one, as indicated.

Tree-SHA512: 466aa6884a2c936131cf222b94943148bc385fc9574840cc63933f510c40c2cc74d8c9a9b2560205926a0a70a93de0e191a623fa2352628d8cead45bbee59b1c
2025-08-20 09:54:28 -04:00
Eugene Siegel
0022e25333 test: modify logging_filesize_rate_limit params
Change time_window from 20s to 1h so Reset is not accidentally called
if the test takes a while.

Change num_lines from 1024 to 10 since LogRateLimiter is parameterized
and does not require logging 1MiB of data.

Co-Authored-By: stickies-v <stickies-v@protonmail.com>

Github-Pull: #33211
Rebased-From: 5dda364c4b
2025-08-20 12:01:59 +01:00
Eugene Siegel
206f5902db config: add DEBUG_ONLY -logratelimit
Use -nologratelimit by default in functional tests if the bitcoind
version supports it.

Co-Authored-By: stickies-v <stickies-v@protonmail.com>

Github-Pull: #33011
Rebased-From: 5c74a0b397
2025-08-20 12:01:35 +01:00
stickies-v
dfdd407c42 test: logging_filesize_rate_limit improvements
- Add helper functions and structs to improve readability and
  reusability of test code
- Make tests more specific by comparing all produced log lines with
  expected log lines instead of relying on approximations or proxies.

Github-Pull: #33011
Rebased-From: 9f3b017bcc
2025-08-20 12:01:12 +01:00
stickies-v
11538160b3 test: don't leak log category mask across tests
This ensures log tests behave consistently when other tests modify
the log category mask.

Github-Pull: #33011
Rebased-From: 350193e5e2
2025-08-20 12:00:48 +01:00
stickies-v
4ed7a51642 test: add ReadDebugLogLines helper function
Deduplicates repeated usage of the same functionality.

Github-Pull: #33011
Rebased-From: 05d7c22479
2025-08-20 12:00:22 +01:00