Commit graph

41378 commits

Author SHA1 Message Date
Ava Chow
327f08bb0c
Merge bitcoin/bitcoin#30169: fuzz: Fix wallet_bdb_parser stdlib error matching
fac7298529 fuzz: Fix wallet_bdb_parser stdlib error matching (MarcoFalke)

Pull request description:

  The stdlib error string is an implementation detail and can not be relied upon.

  Ref: `libc++abi: terminating due to uncaught exception of type std::runtime_error: AutoFile::read: end of file: unspecified iostream_category error`

ACKs for top commit:
  achow101:
    ACK fac7298529

Tree-SHA512: 588acc71a05d97855d6bb65380411e8486692536434eadee7697de09f80b128ff2f90a31fd0e8384d084b554d2f3978efd076082e070e721cf05b07c94cc83b1
2024-05-24 13:15:47 -04:00
Fabian Jahr
efc1b5be8a
test: Add coverage for txid coins count check when loading snapshot 2024-05-24 18:44:05 +02:00
Fabian Jahr
6b6084850b
assumeutxo: Add network magic ctor param to SnapshotMetadata
This prevents SnapshotMetadata from using any globals implicitly.
2024-05-24 18:44:02 +02:00
MarcoFalke
fac7298529
fuzz: Fix wallet_bdb_parser stdlib error matching 2024-05-24 14:21:30 +02:00
willcl-ark
4b7d984269
lint: add markdown hyperlink checker
This adds a markdown hyperlink check task to the lint test_runner. It
relies on having the [`mlc`](https://crates.io/crates/mlc) binary found
on $PATH, but will fail with `success` if the binary is not found.

`mlc` is also added to the ci/04_install.sh script run by the
containerfile.

Note that broken markdown hyperlinks will be detected in untracked
markdown files found in a dirty working directory (including e.g.
.venv).
2024-05-24 12:11:50 +01:00
Fabian Jahr
1f1f998455
assumeutxo: Deserialize trailing byte instead of Txid 2024-05-24 12:42:09 +02:00
Fabian Jahr
359967e310
doc: Add release notes for #29612 2024-05-24 12:42:06 +02:00
glozow
4c387cb64f
Merge bitcoin/bitcoin#30072: refactor prep for package rbf
2fd34ba504 Add sanity checks for various ATMPArgs booleans (Greg Sanders)
20d8936d8b [refactor] make some members MemPoolAccept-wide (glozow)
cbbfe719b2 cpfp carveout is excluded in packages (glozow)
69f7ab05ba Add m_allow_sibling_eviction as separate ATMPArgs flag (Greg Sanders)
57ee3029dd Add description for m_test_accept (Greg Sanders)

Pull request description:

  First few commits of https://github.com/bitcoin/bitcoin/pull/28984 to set the stage for the package RBF logic.

  These refactors are preparation for evaluating an RBF in a multi-proposed-transaction context instead of only a single proposed transaction. Also, carveouts and sibling evictions only should work in single RBF cases so add logic to preclude multi-tx cases in the future.

  No behavior changes aside from bailing earlier from failed carve-outs.

ACKs for top commit:
  glozow:
    reACK 2fd34ba504 via range-diff
  sr-gi:
    utACK [2fd34ba](2fd34ba504)
  theStack:
    re-ACK 2fd34ba504

Tree-SHA512: 5071c5b8d9b8d2c9faa278c8c4df31de288cb407a68e4d55544c588caff6c86160cce7825453549c6ed69e29d9ccb5ee2d4a518b18f563bfb12f2ced073fe42a
2024-05-24 10:24:50 +01:00
Epic Curious
9013e2b97e Link to gen-bitcoin-conf.sh instead of bitcoin.conf placeholder 2024-05-23 19:14:06 -04:00
Ava Chow
413844f1c2
Merge bitcoin/bitcoin#29612: rpc: Optimize serialization and enhance metadata of dumptxoutset output
542e13b293 rpc: Enhance metadata of the dumptxoutset output (Fabian Jahr)
4d8e5edbaa assumeutxo: Add documentation on dumptxoutset serialization format (Fabian Jahr)
c14ed7f384 assumeutxo: Add test for changed coin size value (Fabian Jahr)
de95953d87 rpc: Optimize serialization disk space of dumptxoutset (Fabian Jahr)

Pull request description:

  The second attempt at implementing the `dumptxoutset` space optimization as suggested in #25675. Closes #25675.

  This builds on the work done in #26045, addresses open feedback, adds some further improvements (most importantly usage of compact size), documentation, and an additional test.

  The [original snapshot at height 830,000](https://github.com/bitcoin/bitcoin/pull/29551) came in at 10.82 GB. With this change, the same snapshot is 8.94 GB, a reduction of 17.4%.

  This also enhances the metadata of the output file and adds the following data to allow for better error handling and make future upgrades easier:
  - A newly introduced utxo set magic
  - A version number
  - The network magic
  - The block height

ACKs for top commit:
  achow101:
    ACK 542e13b293
  TheCharlatan:
    Re-ACK 542e13b293
  theStack:
    ACK 542e13b293

Tree-SHA512: 0825d30e5c3c364062db3c6cbca4e3c680e6e6d3e259fa70c0c2b2a7020f24a47406a623582040988d5c7745b08649c31110df4c10656aa25f3f27eb35843d99
2024-05-23 12:31:23 -04:00
dergoegge
949abebea0 [fuzz] Avoid collecting initialization coverage 2024-05-23 17:26:26 +01:00
Ava Chow
915d7276e4
Merge bitcoin/bitcoin#27064: system: use %LOCALAPPDATA% as default datadir on windows
84900ac34f doc: add release-notes-27064.md (Matthew Zipkin)
855dd8d592 system: use %LOCALAPPDATA% as default datadir on windows (Matthew Zipkin)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/2391

  This PR changes the default datadir location on Windows from `C:\Users\Username\AppData\Roaming\Bitcoin` to `C:\Users\Username\AppData\Local\Bitcoin`. This change only applies to fresh installs. To preserve backwards compatibility, on startup we check for the existence of `C:\Users\Username\AppData\Roaming\Bitcoin\chainstate` and if it is there, we continue using the "Roaming" directory as the default datadir location.

  [Note that in Windows 11 this change may be moot:](https://learn.microsoft.com/en-us/uwp/api/windows.storage.applicationdata.roamingfolder?view=winrt-22621)

  > Roaming data and settings is no longer supported as of Windows 11. The recommended replacement is [Azure App Service](https://learn.microsoft.com/en-us/azure/app-service/). Azure App Service is widely supported, well documented, reliable, and supports cross-platform/cross-ecosystem scenarios such as iOS, Android and web. Settings stored here no longer roam (as of Windows 11), but the settings store is still available.

ACKs for top commit:
  achow101:
    ACK 84900ac34f
  BenWestgate:
    crACK 84900ac34f
  hebasto:
    re-ACK 84900ac34f, only addressed feedback since my recent [review](https://github.com/bitcoin/bitcoin/pull/27064#pullrequestreview-2028718273).

Tree-SHA512: 807c6e89571287e2c8f4934229aec91ef28e7d0a675234acf1b7d085c24c7b73a08b6e345fbfc9038e6239187b6b69c08490ddaa1c057de5ea975c4a000bba42
2024-05-23 12:11:55 -04:00
Greg Sanders
2fd34ba504 Add sanity checks for various ATMPArgs booleans 2024-05-23 12:08:46 -04:00
glozow
20d8936d8b [refactor] make some members MemPoolAccept-wide
No change in behavior.

For single transaction acceptance, this is a simple refactor:
Workspace::m_all_conflicting
Workspace::m_conflicting_fees
Workspace::m_conflicting_size
Workspace::m_replaced_transactions

are now grouped under a new SubPackageState struct that is
a member of MemPoolAccept.

And local variables m_total_vsize and m_total_modified_fees are now
SubpackageState members so they can be accessed from
PackageMempoolChecks.

We want these to be package-wide variables because
- Transactions could conflict with the same tx (just not the same
prevout), or their conflicts could share descendants.
- We want to compare conflicts with the package fee rather than
individual transaction fee.

We reset these MemPoolAccept-wide fields for each subpackage
evaluation to not cause state leaking, similar to temporary
coins.
2024-05-23 12:08:46 -04:00
glozow
cbbfe719b2 cpfp carveout is excluded in packages
The behavior is not new, but this rule exits earlier than before.
Previously, a carve out could have been granted in PreChecks() but then
nullified in PackageMempoolChecks() when CheckPackageLimits() is called
with the default limits.
2024-05-23 12:08:46 -04:00
Greg Sanders
69f7ab05ba Add m_allow_sibling_eviction as separate ATMPArgs flag 2024-05-23 12:08:39 -04:00
Greg Sanders
57ee3029dd Add description for m_test_accept 2024-05-23 12:08:39 -04:00
Ava Chow
867f6af803
Merge bitcoin/bitcoin#29873: policy: restrict all TRUC (v3) transactions to 10kvB
154b2b2296 [fuzz] V3_MAX_VSIZE and effective ancestor/descendant size limits (glozow)
a29f1df289 [policy] restrict all v3 transactions to 10kvB (glozow)
d578e2e354 [policy] explicitly require non-v3 for CPFP carve out (glozow)

Pull request description:

  Opening for discussion / conceptual review.

  We like the idea of a smaller maximum transaction size because:
  - It lowers potential replacement cost (i.e. harder to do Rule 3 pinning via gigantic transaction)
  - They are easier to bin-pack in block template production
  - They equate to a tighter memory limit in data structures that are bounded by a number of transactions (e.g. orphanage and vExtraTxnForCompact). For example, the current memory bounds for orphanage is 100KvB * 100 = 40MB, and guaranteeing 1 tx per peer would require reserving a pretty large space.

  History for `MAX_STANDARD_TX_WEIGHT=100KvB` (copied from https://github.com/bitcoin/bitcoin/pull/29873#issuecomment-2115459510):
  - 2010-09-13 In 3df62878c3 satoshi added a 100kB (MAX_BLOCK_SIZE_GEN/5 with MBS_GEN = MAX_BLOCK_SIZE/2) limit on new transactions in CreateTransaction()
  - 2013-02-04 https://github.com/bitcoin/bitcoin/pull/2273 In gavin gave that constant a name, and made it apply to transaction relay as well

  Lowering `MAX_STANDARD_TX_WEIGHT` for all txns is not being proposed, as there are existing apps/protocols that rely on large transactions. However, it's been brought up that we should consider this for TRUCs (which is especially designed to avoid Rule 3 pinning).

  This reduction should be ok because using nVersion=3 isn't standard yet, so this wouldn't break somebody's existing use case. If we find that this is too small, we can always increase it later. Decreasing would be much more difficult.
  ~[Expected size of a commitment transaction](https://github.com/lightning/bolts/blob/master/03-transactions.md#expected-weight-of-the-commitment-transaction) is within (900 + 172 * 483 + 224) / 4 = 21050vB~ EDIT: this is incorrect, but perhaps not something that should affect how we choose this number.

ACKs for top commit:
  sdaftuar:
    ACK 154b2b2296
  achow101:
    ACK 154b2b2296
  instagibbs:
    ACK 154b2b2296
  t-bast:
    ACK 154b2b2296
  murchandamus:
    crACK 154b2b2296

Tree-SHA512: 89392a460908a8ea9f547d90e00f5181de0eaa9d2c4f2766140a91294ade3229b3d181833cad9afc93a0d0e8c4b96ee2f5aeda7c50ad7e6f3a8320b9e0c5ae97
2024-05-23 11:54:18 -04:00
Ryan Ofsky
6300438a2e
Merge bitcoin/bitcoin#30115: rpc: avoid copying into UniValue
d7707d9843 rpc: avoid copying into UniValue (Cory Fields)

Pull request description:

  These are the simple (and hopefully obviously correct) copies that can be moves instead.

  This is a follow-up from https://github.com/bitcoin/bitcoin/pull/30094#issuecomment-2108751842

  As it turns out, there are hundreds of places where we copy UniValues needlessly. It should be the case that moves are always preferred over copies, so there should be no downside to these changes.

  willcl-ark, however, noticed that memory usage may increase in some cases. Logically this makes no sense to me. The only plausible explanation imo is that because the moves are faster, more ops/second occur in some cases.

  This list of moves was obtained by changing the function signatures of the UniValue functions to accept only rvalues, then compiling and fixing them up one by one. There still exist many places where copies are being made. These can/should be fixed up, but weren't done here for the sake of doing the easy ones first.

  I ran these changes through clang-tidy with `performance-move-const-arg` and `bugprone-use-after-move` and no bugs were detected (though that's obviously not to say it can be trusted 100%).

  As stated above, there are still lots of other less trivial fixups to do after these including:
  - Using non-const UniValues where possible so that moves can happen
  - Refactoring code in order to be able to move a UniValue without introducing a use-after-move
  - Refactoring functions to accept UniValues by value rather than by const reference

ACKs for top commit:
  achow101:
    ACK d7707d9843
  ryanofsky:
    Code review ACK d7707d9843. No changes since last review other than rebase. I agree benchmarks showing increased peak memory usage and RSS are surprising, but number of allocations is down as expected, and runtime is also decreased.
  willcl-ark:
    ACK d7707d9843

Tree-SHA512: 7f511be73984553c278186286a7d161a34b2574c7f5f1a0edc87c2913b4c025a0af5241ef9af2df17547f2e4ef79710aa5bbb762fc9472435781c0488dba3435
2024-05-23 10:53:37 -04:00
Ava Chow
e163d864d3
Merge bitcoin/bitcoin#30118: test: improve robustness of connect_nodes()
6629d1d0f8 test: improve robustness of connect_nodes() (furszy)

Pull request description:

  Decoupled from #27837 because this can help other too, found it investigating a CI failure https://cirrus-ci.com/task/5805115213348864?logs=ci#L3200.

  The `connect_nodes` function in the test framework relies on a stable number of peer
  connections to verify that the new connection between the nodes is successfully established.
  This approach is fragile, as any of the peers involved in the process can drop, lose, or
  create a connection at any step, causing subsequent `wait_until` checks to stall indefinitely
  even when the peers in question were connected successfully.

  This commit improves the situation by using the nodes' subversion and the connection
  direction (inbound/outbound) to identify the exact peer connection and perform the
  checks exclusively on it.

ACKs for top commit:
  stratospher:
    reACK 6629d1d.
  achow101:
    ACK 6629d1d0f8
  maflcko:
    utACK 6629d1d0f8
  AngusP:
    re-ACK 6629d1d0f8

Tree-SHA512: 5f345c0ce49ea81b643e97c5cffd133e182838752c27592fcdeac14ad10919fb4b7ff38e289e42a7c3c638a170bd0d0b7a9cd493898997a2082a7b7ceef4aeeb
2024-05-23 10:00:00 -04:00
merge-script
f15778536a
Merge bitcoin/bitcoin#30149: contrib: Renew Windows code signing certificate
9f4ff1e965 windeploy: Renew certificate (Ava Chow)

Pull request description:

  Renewed the Windows code signing certificate for another 3 years.

ACKs for top commit:
  fanquake:
    ACK 9f4ff1e965
  glozow:
    tested ACK 9f4ff1e965

Tree-SHA512: 6441aa55fa1aa4e532bbe1ce1ad8b9be8a197d8de0aa57a8b02d41681a433599f305eb0a519e90782cebe20f473322be519ff6398933f525c39cc3476e860283
2024-05-23 13:25:14 +01:00
glozow
83ae1bac9d
Merge bitcoin/bitcoin#30062: net: add ASMap info in getrawaddrman RPC
1e54d61c46 test: add coverage for `mapped_as` from `getrawaddrman` (brunoerg)
8c2714907d net: rpc: return peer's mapped AS in getrawaddrman (brunoerg)

Pull request description:

  This PR adds two new fields in `getrawaddrman` RPC: "mapped_as" and "source_mapped_as". These fields are used to return the ASN (Autonomous System Number) mapped to the peer and its source. With these informations we can have a better view of the bucketing logic with ASMap specially in projects like [addrman-observer](https://github.com/0xb10c/addrman-observer).

ACKs for top commit:
  fjahr:
    Code review ACK 1e54d61c46
  virtu:
    ACK [1e54d61](1e54d61c46)
  0xB10C:
    ACK 1e54d61c46
  glozow:
    ACK 1e54d61c46

Tree-SHA512: af86bcc7a2e69bebd3fa9eaa2e527e0758c44c0a958de7292514d5f99f8f01f5df3bae11400451268e0255f738ff3acccc77f48fe129937512f1e9d9963c4c5e
2024-05-23 12:08:36 +01:00
merge-script
ef44726918
Merge bitcoin/bitcoin#30151: depends: Fetch miniupnpc sources from an alternative website
21b8a14d37 depends: Fetch miniupnpc sources from an alternative website (Hennadii Stepanov)

Pull request description:

  The https://miniupnp.tuxfamily.org website is unavailable now.

ACKs for top commit:
  achow101:
    ACK 21b8a14d37
  edilmedeiros:
    utACK 21b8a14d37
  theuni:
    utACK 21b8a14d37

Tree-SHA512: 141427447d5f1902f17fe3774fadf0ac912f663d7fd6467dff42fd6131f6884906b77cf49bbe7387f118fd9e9d52af1d36778624f9f02237d2ba3387fc974be6
2024-05-23 09:39:47 +01:00
Hernan Marino
df6dc2aaae test: Assumeutxo: snapshots with less work should not be loaded 2024-05-22 21:06:06 -03:00
merge-script
6f36624147
Merge bitcoin/bitcoin#30150: doc: Correct pull request prefix for scripts and tools
fa3e1151a2 doc: Correct pull request prefix for scripts and tools (MarcoFalke)

Pull request description:

  `script` is confusing, because in the context of Bitcoin, it usually means Bitcoin script (c.f. `CScript` in `script.h`, or pull requests such as https://github.com/bitcoin/bitcoin/pull/27122 using the prefix).

  This could be fixed by renaming it to `scripts` (with a plural `s` at the end), however, looking at the current usage `contrib` and `cli` seem more common (https://github.com/bitcoin/bitcoin/pull/29687, https://github.com/bitcoin/bitcoin/pull/26953, https://github.com/bitcoin/bitcoin/pull/26584, https://github.com/bitcoin/bitcoin/pull/24864, https://github.com/bitcoin/bitcoin/pull/30074, https://github.com/bitcoin/bitcoin/pull/29433 ...)

ACKs for top commit:
  fanquake:
    ACK fa3e1151a2
  willcl-ark:
    ACK fa3e1151a2
  hebasto:
    ACK fa3e1151a2.
  theuni:
    ACK fa3e1151a2

Tree-SHA512: fb3a3892ca5f859e590c8a620350c397ef1f9eafd9e174c70ef50095d401a396758d6c93ad41888da8025c41e25e691f30c18f9e974af13597f2266bb2c53b6d
2024-05-22 14:43:32 +01:00
merge-script
93bec6e953
Merge bitcoin/bitcoin#30131: wallet, tests: Avoid stringop-overflow warning in PollutePubKey
2289d45240 wallet, tests: Avoid stringop-overflow warning in PollutePubKey (Ava Chow)

Pull request description:

  Fixes  #30114

ACKs for top commit:
  maflcko:
    ACK 2289d45240 with g++ 14.1.1 🦄
  theStack:
    utACK 2289d45240
  laanwj:
    ACK 2289d45240

Tree-SHA512: 173c3c299bdd890f73e8a67a37880dbf816265e8b3c8298557ef2fc4670f5447005c0d2d81726f9bc43f6a69d677365d90a604354b3cbab0e3c52c4526d0407e
2024-05-22 13:43:33 +01:00
Hennadii Stepanov
21b8a14d37
depends: Fetch miniupnpc sources from an alternative website
The https://miniupnp.tuxfamily.org website is unavailable now.
2024-05-22 12:05:26 +01:00
brunoerg
1e54d61c46 test: add coverage for mapped_as from getrawaddrman
Test addresses are being mapped according to the ASMap
file provided properly. Compare the result of the `getrawaddrman`
RPC with the result from the ASMap Health Check.
2024-05-22 07:58:08 -03:00
brunoerg
8c2714907d net: rpc: return peer's mapped AS in getrawaddrman
This information can be used to check bucketing
logic.
2024-05-22 07:57:04 -03:00
merge-script
fa8cb0516d
Merge bitcoin/bitcoin#30144: ci: Add mising -Wno-error=maybe-uninitialized to armhf task
fa73431dd4 ci: Add mising -Wno-error=maybe-uninitialized to armhf task (MarcoFalke)

Pull request description:

  This happens after bd597c33e3 in many pull requests as a silent merge conflict. For example:

  * https://github.com/bitcoin/bitcoin/pull/29720#issuecomment-2120847661
  * https://github.com/bitcoin/bitcoin/pull/29521#issuecomment-2106542236
  * (Probably many undetected, because the CI task was not yet re-run)
  * ...

ACKs for top commit:
  fjahr:
    utACK fa73431dd4
  fanquake:
    ACK fa73431dd4 - many fixed with 13.x

Tree-SHA512: 6e6ff8dc6f3c6a2abcd04c4203d3468f6e98c1ad3a4da4ad0037a9ee2cbec6bec079a5f778aba0273e38e173849927abcdfcfba7643d08ed66c1168cb89fab08
2024-05-22 09:20:45 +01:00
MarcoFalke
fa3e1151a2
doc: Correct pull request prefix for scripts and tools 2024-05-22 09:59:58 +02:00
fanquake
e8c25e8a35
guix: drop binutils from macOS env 2024-05-22 08:51:34 +01:00
fanquake
555fddf646
guix: use GUIX_LD_WRAPPER_DISABLE_RPATH for all HOSTS 2024-05-22 08:51:33 +01:00
fanquake
9ec238d0f3
guix: remove ZERO_AR_DATE export
LLD enables ZERO_AR_DATE by default, setting it to zero would enable
non-determinism, setting it to any other value is ignored.

See:
https://github.com/llvm/llvm-project/blob/main/lld/docs/MachO/ld64-vs-lld.rst.
2024-05-22 08:51:33 +01:00
fanquake
f836f7e9b3
depends: remove cctools & libtapi 2024-05-22 08:51:33 +01:00
fanquake
4a0536c5d9
build: switch to using lld for macOS builds
Adjust the security check for:
ld64.lld: warning: Option `-allow_stack_execute' is not yet implemented.
ld64.lld: error: -fixup_chains is incompatible with -no_pie
and to account for the embedding of LLVMs version number.
2024-05-22 08:51:33 +01:00
fanquake
c6a6b2d6fd
build: add lld into macOS build environment(s) 2024-05-22 08:51:33 +01:00
fanquake
437e908ebd
depends: swap cctools-x for llvm-x
Only build ld64 from cctools.
Disable adhoc codesigning, to avoid non-determinism.
2024-05-22 08:51:33 +01:00
fanquake
bab287d1ba
depends: don't use -no_warning_for_no_symbols in macOS qt build
Not supported by llvm-ar / llvm-ranlib.
2024-05-22 08:51:33 +01:00
merge-script
0388dd702b
Merge bitcoin/bitcoin#30120: Update libsecp256k1 subtree to current master
a057869aa3 build: pass --with-ecmult-gen-kb=86 to secp256k1 (fanquake)
ca3d945dc6 Squashed 'src/secp256k1/' changes from d8311688bd..06bff6dec8 (fanquake)

Pull request description:

  This includes changes from the 0.5.0 release: https://github.com/bitcoin-core/secp256k1/releases/tag/v0.5.0

  > New function secp256k1_ec_pubkey_sort that sorts public keys using lexicographic (of compressed serialization) order.

  > The implementation of the point multiplication algorithm used for signing and public key generation was changed, resulting in improved performance for those operations.
  >    The related configure option --ecmult-gen-precision was replaced with --ecmult-gen-kb (ECMULT_GEN_KB for CMake).
  >    This changes the supported precomputed table sizes for these operations. The new supported sizes are 2 KiB, 22 KiB, or 86 KiB (while the old supported sizes were 32 KiB, 64 KiB, or 512 KiB).

ACKs for top commit:
  hebasto:
    ACK a057869aa3, I've got a zero diff with my local branch, which reproduces the subtree update, and `ecmult gen table size   = 86 KiB` in the configure summary.
  jonasnick:
    utACK a057869aa3

Tree-SHA512: 907012b0d7e0a6bd68b245c238e968f2318d8ac5de5ec9070245de8391c996eb5ec6428184d028f6f0f54d3b2f5a8292ad7081177e1c331397879505436dc38e
2024-05-22 08:50:42 +01:00
Ava Chow
9f4ff1e965 windeploy: Renew certificate 2024-05-21 23:19:51 -04:00
merge-script
2ec0a28a37
Merge bitcoin/bitcoin#30137: build: Remove --enable-threadlocal
17fe948cce build: remove --enable-threadlocal (fanquake)
1e7c20bc19 doc: remove comment about using thread_local (fanquake)
5bba43312c build: Enable `thread_local` for MinGW-w64 builds (Hennadii Stepanov)

Pull request description:

  Includes a commit from #30099.
  Closes #29952.

ACKs for top commit:
  laanwj:
    Code review ACK 17fe948cce
  maflcko:
    utACK 17fe948cce
  hebasto:
    ACK 17fe948cce.
  theuni:
    utACK 17fe948cce

Tree-SHA512: 2aad6d19e79c4d6d7aefd0f41b215ac8d9320f5908808221d78e6ee1c77503832a02759bee2ad397e235b6739e22aca8dcf5c5ef8854deb8c697b18ac56a06da
2024-05-21 21:14:30 +01:00
Ava Chow
6c13b1375f
Merge bitcoin/bitcoin#29421: net: make the list of known message types a compile time constant
b3efb48673 protocol: make message types constexpr (Vasil Dimov)
2fa9de06c2 net: make the list of known message types a compile time constant (Vasil Dimov)

Pull request description:

  Turn the `std::vector` to `std::array` because it is cheaper and allows us to have the number of the messages as a compile time constant: `ALL_NET_MESSAGE_TYPES.size()` which can be used in future code to build other `std::array`s with that size.

  ---

  This change is part of https://github.com/bitcoin/bitcoin/pull/29418 but it makes sense on its own and would be good to have it, regardless of the fate of https://github.com/bitcoin/bitcoin/pull/29418. Also, if this is merged, that would reduce the size of https://github.com/bitcoin/bitcoin/pull/29418, thus the current standalone PR.

ACKs for top commit:
  achow101:
    ACK b3efb48673
  jonatack:
    ACK b3efb48673
  maflcko:
    utACK b3efb48673 🎊
  willcl-ark:
    ACK b3efb48673

Tree-SHA512: 6d3860c138c64514ebab13d97ea67893e2d346dfac30a48c3d9bc769a1970407375ea4170afdb522411ced306a14a9af4eede99e964d1fb1ea3efff5d5eb57af
2024-05-21 13:59:33 -04:00
Ava Chow
2289d45240 wallet, tests: Avoid stringop-overflow warning in PollutePubKey 2024-05-21 12:59:47 -04:00
glozow
154b2b2296 [fuzz] V3_MAX_VSIZE and effective ancestor/descendant size limits 2024-05-21 15:06:58 +01:00
glozow
a29f1df289 [policy] restrict all v3 transactions to 10kvB 2024-05-21 15:06:55 +01:00
glozow
d578e2e354 [policy] explicitly require non-v3 for CPFP carve out
This carve out is intended to allow a second child under restricted
circumstances, but this topology is not allowed for v3 transactions.

As CPFP carve out does not explicitly require a second child to actually
exist, it has the effect of granting a free +10KvB descendant size limit
when a single child is enough to bust the descendant limit.
2024-05-21 15:06:02 +01:00
furszy
6629d1d0f8
test: improve robustness of connect_nodes()
The 'connect_nodes' function in the test framework relies
on a stable number of peer connections to verify the new
connection between the nodes is successfully established.
This approach is fragile, as any of the peers involved in
the process can drop, lose, or create a connection at any
step, causing subsequent 'wait_until' checks to stall
indefinitely even when the peers in question are connected
successfully.

This commit improves the situation by using the nodes' subversion
and the connection direction (inbound/outbound) to identify the
exact peer connection and perform the checks exclusively on it.
2024-05-21 10:58:44 -03:00
Fabian Jahr
542e13b293
rpc: Enhance metadata of the dumptxoutset output
The following data is added:
- A newly introduced utxo set magic
- A version number
- The network magic
- The block height
2024-05-21 13:57:09 +02:00
Fabian Jahr
4d8e5edbaa
assumeutxo: Add documentation on dumptxoutset serialization format 2024-05-21 13:38:09 +02:00