Commit graph

42175 commits

Author SHA1 Message Date
merge-script
d6b225f165
Merge bitcoin/bitcoin#31104: [28.x] Backports & 28.1rc1
Some checks failed
CI / test each commit (push) Has been cancelled
CI / macOS 13 native, x86_64, no depends, sqlite only, gui (push) Has been cancelled
CI / Win64 native, VS 2022 (push) Has been cancelled
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Has been cancelled
8fef83a0a0 doc: update manual pages for 28.1rc1 (fanquake)
df7764621e build: bump version to 28.1rc1 (fanquake)
9add853b65 doc: update release notes for 28.1rc1 (fanquake)
1025090fbe build: disable compiling fuzz/utxo_snapshot.cpp with MSVC (fanquake)
446f5d20d6 refactor: Drop deprecated space in operator""_mst (MarcoFalke)
9976162a0e addrman: change nid_type from int to int64_t (Martin Zumsande)
1d0411dc8f addrman, refactor: introduce user-defined type for internal nId (Martin Zumsande)
7fec638222 depends: For mingw cross compile use -gcc-posix to prevent library conflict (laanwj)
f998ac6286 key: clear out secret data in `DecodeExtKey` (Sebastian Falbesoner)
0773560abf ci: add LLVM_SYMBOLIZER_PATH to Valgrind fuzz job (fanquake)
b917334208 test: add missing sync to feature_fee_estimation.py (Martin Zumsande)
f072721181 doc: add testnet4 section header for config file (Marnix)
6643fd2145 doc: Archive 28.0 release notes (Ava Chow)

Pull request description:

  Backports:
  * #30568
  * #31007
  * #31013
  * #31016
  * #31035
  * #31166

  Contains:
  * A commit to do the same as #31307.

ACKs for top commit:
  willcl-ark:
    ACK 8fef83a0a0

Tree-SHA512: 58f0c6cb9e5b7ac17ad20141acdc5423dbe8e79cc3a2cf1c4e503d289b75940632c9838c64e3ac733b1a55e65723fc1071ccdd9a860a710256cc88e29f42ccdb
2024-12-04 13:36:28 +00:00
fanquake
8fef83a0a0
doc: update manual pages for 28.1rc1 2024-12-02 14:20:15 +00:00
fanquake
df7764621e
build: bump version to 28.1rc1 2024-12-02 14:20:15 +00:00
fanquake
9add853b65
doc: update release notes for 28.1rc1 2024-12-02 14:20:15 +00:00
fanquake
1025090fbe
build: disable compiling fuzz/utxo_snapshot.cpp with MSVC
This is a backport of #31307 / b2d5361002
for 28.x.
2024-12-02 14:20:15 +00:00
MarcoFalke
446f5d20d6
refactor: Drop deprecated space in operator""_mst
Github-Pull: #31267
Rebased-From: faf2162565
2024-12-02 14:20:14 +00:00
Martin Zumsande
9976162a0e
addrman: change nid_type from int to int64_t
With nId being incremented for each addr received,
an attacker could cause an overflow in the past.
(https://bitcoincore.org/en/2024/07/31/disclose-addrman-int-overflow/)
Even though that attack was made infeasible by
rate-limiting (PR #22387), to be on the safe side change the
type to an int64_t.

Github-Pull: #30568
Rebased-From: 51f7668d31
2024-12-02 14:19:59 +00:00
Martin Zumsande
1d0411dc8f
addrman, refactor: introduce user-defined type for internal nId
This makes it easier to track which spots refer to an nId
(as opposed to, for example, bucket index etc. which also use int)

Co-authored-by: Pieter Wuille <pieter@wuille.net>

Github-Pull: #30568
Rebased-From: 051ba3290e
2024-11-04 16:27:06 +00:00
laanwj
7fec638222
depends: For mingw cross compile use -gcc-posix to prevent library conflict
CMake parses some paths from the spec of the C compiler, assuming it
will be the linker, resulting in the link to end up with
`-L/usr/lib/gcc/x86_64-w64-mingw32/12-win32` on debian bookworm if both
-win32 and -posix variants are installed, and -win32 is the default
alternative.

This results in the wrong C++ library being linked, missing
std::threads::hardware_concurrency and other threading functions.

To fix this, use the -posix variant of gcc as well when available. This
fixes a regression compared to autotools, where this scenario worked.

Github-Pull: #31013
Rebased-From: ae56b3230b
2024-10-31 15:07:51 +00:00
Sebastian Falbesoner
f998ac6286
key: clear out secret data in DecodeExtKey
Same as in `DecodeSecret`, we should also clear out the secret data from
the vector resulting from the Base58Check parsing for xprv keys. Note
that the if condition is needed in order to avoid UB, see #14242 (commit
d855e4cac8).

Github-Pull: #31166
Rebased-From: 559a8dd9c0
2024-10-31 14:48:56 +00:00
fanquake
0773560abf
ci: add LLVM_SYMBOLIZER_PATH to Valgrind fuzz job
Otherwise:
```bash
	NEW_FUNC[1/23]: ==4710==WARNING: invalid path to external symbolizer!
==4710==WARNING: Failed to use and restart external symbolizer!
0xb72010  (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0xa6a010) (BuildId: 2087ad415cb752eea259ed750f3b78a7fcb0b43b)
	NEW_FUNC[2/23]: 0xb72240  (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/fuzz+0xa6a240) (BuildId: 2087ad415cb752eea259ed750f3b78a7fcb0b43b)

```

Github-Pull: #30961
Rebased-From: c1832584bf
2024-10-22 16:06:06 +01:00
Martin Zumsande
b917334208
test: add missing sync to feature_fee_estimation.py
Fixes a race between node 1 catching up with the chain and mining a
new block in the sanity_check_rbf_estimates subtest.

Github-Pull: #31016
Rebased-From: a1576edab3
2024-10-22 16:04:14 +01:00
Marnix
f072721181
doc: add testnet4 section header for config file
Github-Pull: #31007
Rebased-From: 61cdb1c9d8
2024-10-22 16:04:04 +01:00
Ava Chow
6643fd2145
doc: Archive 28.0 release notes
Github-Pull: #31035
Rebased-From: f019fcec41
2024-10-16 16:25:33 +01:00
Ava Chow
89522379d1
Merge bitcoin/bitcoin#31034: [28.x] doc: Sync 28.0 release notes with website
Some checks failed
CI / test each commit (push) Has been cancelled
CI / macOS 13 native, x86_64, no depends, sqlite only, gui (push) Has been cancelled
CI / Win64 native, VS 2022 (push) Has been cancelled
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Has been cancelled
89d34cffed doc: Sync 28.0 release notes with website (Ava Chow)

Pull request description:

  Since there were some changes to the release notes after the tagging, update the in branch release notes to match those that ended up on the website.

ACKs for top commit:
  tdb3:
    ACK 89d34cffed

Tree-SHA512: 1feeafb0f604d36c1817e8bf38cbaef5d41f958dd823c99a19a1a9f7f1f1d38f917872c84b536dd784d7a672904ed2399369693f200a2837cd5707a686d3e634
2024-10-05 11:17:41 -04:00
Ava Chow
89d34cffed doc: Sync 28.0 release notes with website 2024-10-04 19:25:24 -04:00
Ava Chow
1101837461
Merge bitcoin/bitcoin#30959: [28.x] backports and finalize
Some checks failed
CI / test each commit (push) Has been cancelled
CI / macOS 13 native, x86_64, no depends, sqlite only, gui (push) Has been cancelled
CI / Win64 native, VS 2022 (push) Has been cancelled
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Has been cancelled
5de225f5c1 doc: 28.0 Release Notes (Ava Chow)
98745e03ff doc: generate manpages (Ava Chow)
5feef9ce7e build: Bump to 28.0 (Ava Chow)
7fcd7b85c6 validation: Disable CheckForkWarningConditions for background chainstate (Martin Zumsande)
e24a25d882 test: Use shell builtins in run_command test case (Ava Chow)

Pull request description:

  * #30952
  * #30962
  * Finalize 28.0 (or rc3 if additional backports are needed)

ACKs for top commit:
  sipa:
    utACK 5de225f5c1

Tree-SHA512: b42948a04d4250f2c9ef3331a39a4c3d7de9ceb9f4f294dd283599d08f3e2b7147297ef9ec1c4276e291a015fc2daa5a72c1f1c33fb517e8ea5c740c4459bf32
2024-10-01 13:30:02 -04:00
Ava Chow
5de225f5c1 doc: 28.0 Release Notes 2024-09-30 17:13:20 -04:00
Ava Chow
98745e03ff
doc: generate manpages 2024-09-25 14:34:31 -04:00
Ava Chow
5feef9ce7e
build: Bump to 28.0 2024-09-25 14:34:29 -04:00
Martin Zumsande
7fcd7b85c6
validation: Disable CheckForkWarningConditions for background chainstate
The comparison of m_best_invalid with the tip of the respective chainstate
makes no sense for the background chainstate, and can lead to incorrect
error messages.

Github-Pull: bitcoin/bitcoin#30962
Rebased-From: c0a0c72b4d
2024-09-25 14:34:26 -04:00
Ava Chow
e24a25d882
test: Use shell builtins in run_command test case
Github-Pull: bitcoin/bitcoin#30952
Rebased-From: 7bd3ee62f6
2024-09-24 11:40:27 -04:00
merge-script
1147e72953
Merge bitcoin/bitcoin#30827: [28.x] Further backports and rc2
Some checks failed
CI / test each commit (push) Has been cancelled
CI / macOS 13 native, x86_64, no depends, sqlite only, gui (push) Has been cancelled
CI / Win64 native, VS 2022 (push) Has been cancelled
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Has been cancelled
06a7df70df doc: Generate manpages (Ava Chow)
5315886bf5 build: Bump to 28.0rc2 (Ava Chow)
ff95cb31da streams: remove AutoFile::Get() entirely (Pieter Wuille)
8229e98116 streams: cache file position within AutoFile (Pieter Wuille)
1b853fdb0a qt: Translations update (Hennadii Stepanov)
674dded875 gui: fix crash when closing wallet (furszy)
d39262e5d4 test: Wait for local services to update in feature_assumeutxo (Fabian Jahr)
b329ed739b test: add coverage for assumeUTXO honest peers disconnection (furszy)
c6b5db1d59 assumeUTXO: fix peers disconnection during sync (furszy)
598415bcc1 test: Work around boost compilation error (MarcoFalke)

Pull request description:

  * #30834
  * #30807
  * #30880
  * https://github.com/bitcoin-core/gui/pull/835
  * #30899
  * #30884

ACKs for top commit:
  stickies-v:
    ACK 06a7df70df
  hebasto:
    ACK 06a7df70df, I've backported the listed PRs locally. The only merge conflict I faced was in https://github.com/bitcoin/bitcoin/pull/30807. It was trivial to resolve.

Tree-SHA512: 779d734b50fdce379a20865ba30c969def028963ba51da0f497ddf1b5375e1f6166365295f226c1a07bab8be0c1aa0a6a3296fc6acd9fcf17bcc4874aac980a6
2024-09-17 17:14:28 +01:00
Ava Chow
06a7df70df
doc: Generate manpages 2024-09-16 23:10:20 -04:00
Ava Chow
5315886bf5
build: Bump to 28.0rc2 2024-09-16 23:10:18 -04:00
Pieter Wuille
ff95cb31da
streams: remove AutoFile::Get() entirely
Co-Authored-By: David Gumberg <davidzgumberg@gmail.com>

Github-Pull: bitcoin/bitcoin#30884
Rebased-From: a240e150e8
2024-09-16 23:10:17 -04:00
Pieter Wuille
8229e98116
streams: cache file position within AutoFile
Github-Pull: bitcoin/bitcoin#30884
Rebased-From: e624a9bef1
2024-09-16 23:10:14 -04:00
Hennadii Stepanov
1b853fdb0a
qt: Translations update
The recent translations from Transifex.com 28.x fetched with the
bitcoin-maintainer-tools/update-translations.py tool.

Github-Pull: bitcoin/bitcoin#30899
Rebased-From: ae05295761
2024-09-16 11:57:21 -04:00
furszy
674dded875
gui: fix crash when closing wallet
The crash occurs because 'WalletController::removeAndDeleteWallet' is called
twice for the same wallet model: first in the GUI's button connected function
'WalletController::closeWallet', and then again when the backend emits the
'WalletModel::unload' signal.

This causes the issue because 'removeAndDeleteWallet' inlines an
erase(std::remove()). So, if 'std::remove' returns an iterator to the end
(indicating the element wasn't found because it was already erased), the
subsequent call to 'erase' leads to an undefined behavior.

Github-Pull: bitcoin-core/gui#835
Rebased-From: a965f2bc07
2024-09-13 11:32:55 -04:00
Fabian Jahr
d39262e5d4
test: Wait for local services to update in feature_assumeutxo
Github-Pull: bitcoin/bitcoin#30880
Rebased-From: 19f4a7c95a
2024-09-12 15:02:05 -04:00
furszy
b329ed739b
test: add coverage for assumeUTXO honest peers disconnection
Exercising and verifying the following points:

1. An IBD node can sync headers from an AssumeUTXO node at
   any time.

2. IBD nodes do not request historical blocks from AssumeUTXO
   nodes while they are syncing the background-chain.

3. The assumeUTXO node dynamically adjusts the network services
   it offers according to its state.

4. IBD nodes can fully sync from AssumeUTXO nodes after they
   finish the background-chain sync.

Github-Pull: bitcoin/bitcoin#30807
Rebased-From: 992f83bb6f
2024-09-11 13:42:54 -04:00
furszy
c6b5db1d59
assumeUTXO: fix peers disconnection during sync
Because AssumeUTXO nodes prioritize tip synchronization, they relay their local
address through the network before completing the background chain sync.
This, combined with the advertising of full-node service (NODE_NETWORK), can
result in an honest peer in IBD connecting to the AssumeUTXO node (while syncing)
and requesting an historical block the node does not have. This behavior leads to
an abrupt disconnection due to perceived unresponsiveness (lack of response)
from the AssumeUTXO node.

This lack of response occurs because nodes ignore getdata requests when they do
not have the block data available (further discussion can be found in PR 30385).

Fix this by refraining from signaling full-node service support while the
background chain is being synced. During this period, the node will only
signal 'NODE_NETWORK_LIMITED' support. Then, full-node ('NODE_NETWORK')
support will be re-enabled once the background chain sync is completed.

Github-Pull: bitcoin/bitcoin#30807
Rebased-From: 6d5812e5c8
2024-09-11 13:42:51 -04:00
MarcoFalke
598415bcc1
test: Work around boost compilation error
Github-Pull: bitcoin/bitcoin#30834
Rebased-From: fa9d7d5d20
2024-09-06 11:31:19 -04:00
Ava Chow
fa46088440
Merge bitcoin/bitcoin#30762: [28.x] rc backports
Some checks failed
CI / test each commit (push) Has been cancelled
CI / macOS 13 native, x86_64, no depends, sqlite only, gui (push) Has been cancelled
CI / Win64 native, VS 2022 (push) Has been cancelled
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Has been cancelled
b2a137929a depends: build libevent with -D_GNU_SOURCE (fanquake)
199bb09d88 test: fixing failing system_tests/run_command under some Locales (Jadi)
342baabaff test: Avoid intermittent timeout in p2p_headers_sync_with_minchainwork.py (MarcoFalke)
5577d5a3c0 test: fix `TestShell` initialization (late follow-up for #30463) (Sebastian Falbesoner)

Pull request description:

  Backports:
  * https://github.com/bitcoin/bitcoin/pull/30714
  * https://github.com/bitcoin/bitcoin/pull/30743
  * https://github.com/bitcoin/bitcoin/pull/30761
  * https://github.com/bitcoin/bitcoin/pull/30788

ACKs for top commit:
  willcl-ark:
    ACK b2a137929a
  achow101:
    ACK b2a137929a
  stickies-v:
    ACK b2a137929a

Tree-SHA512: bf08ac0c613395def974a1b287345d4a64edc066c14f8c9f0184478b0e33e48333760eeb6e96b6b5fbafbb21b40d01875e3f526213a2734e226b2e111d71f3a3
2024-09-05 18:29:25 -04:00
fanquake
b2a137929a
depends: build libevent with -D_GNU_SOURCE
Currently, builds of libevent in depends, using CMake, fail on some
systems, like Alpine, with the following:
```bash
/bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c: In function 'evmap_signal_add_':
/bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c:456:31: error: 'NSIG' undeclared (first use in this function)
  456 |         if (sig < 0 || sig >= NSIG)
```

From what I can tell the `_GNU_SOURCE` "detection" in libevents CMake build
system, never? really worked, and it's not clear what a nice fix is.

For now, always use `_GNU_SOURCE` when building libevent in depends.

Github-Pull: #30743
Rebased-From: 5567754087
2024-09-05 10:37:40 +01:00
Jadi
199bb09d88
test: fixing failing system_tests/run_command under some Locales
the run_command test under system_tests fails if the locale is anything
other than English ones because results such as "No such file or directory"
will be different under Non-English locales.

On the old version, a `ls nonexistingfile` was used to generate the error
output which is not ideal. In the current version we are using a Python one-liner
to generate a non 0 zero return value and "err" on stderr and check the
expected value against this.

fixes #30608

Github-Pull: #30788
Rebased-From: ae48a22a3d
2024-09-05 09:40:11 +01:00
MarcoFalke
342baabaff
test: Avoid intermittent timeout in p2p_headers_sync_with_minchainwork.py
Github-Pull: #30761
Rebased-From: fa247e6e8c
2024-09-03 10:01:56 +01:00
Sebastian Falbesoner
5577d5a3c0
test: fix TestShell initialization (late follow-up for #30463)
Github-Pull: #30714
Rebased-From: bd7ce05f9d
2024-08-30 11:07:00 +01:00
Ava Chow
88f0419c1a
Merge bitcoin/bitcoin#30726: [28.x] Bump to 28.0rc1
Some checks failed
CI / macOS 13 native, x86_64, no depends, sqlite only, gui (push) Has been cancelled
CI / Win64 native, VS 2022 (push) Has been cancelled
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Has been cancelled
CI / test each commit (push) Has been cancelled
bd45bc611b doc: Point release notes to wiki draft (Ava Chow)
27b6300485 examples: Generate example bitcoin.conf (Ava Chow)
08887d3297 doc: Generate manpages (Ava Chow)
6974e30bdd build: Bump to 28.0rc1 (Ava Chow)

Pull request description:

  * Bump version to 28.0rc1
  * Generated manpages
  * Generated example bitcoin.conf
  * Point release notes to wiki

ACKs for top commit:
  hebasto:
    ACK bd45bc611b.

Tree-SHA512: c3cd28b003ead64631b8c2d1bdbf7403d4d9f53ee5ccdc448d89ca25941678f6d1d8966c2f9a92fa021c815b3e36a84056342caa4eaacdab371f0d581e4e58dc
2024-08-27 15:46:19 -04:00
Ava Chow
bd45bc611b doc: Point release notes to wiki draft 2024-08-27 13:16:19 -04:00
Ava Chow
27b6300485 examples: Generate example bitcoin.conf 2024-08-27 13:16:17 -04:00
Ava Chow
08887d3297 doc: Generate manpages 2024-08-27 13:16:15 -04:00
Ava Chow
6974e30bdd build: Bump to 28.0rc1 2024-08-27 13:16:06 -04:00
Ava Chow
1248d0da22
Merge bitcoin/bitcoin#30719: Pre-28.x branch off version bump and doc updates
1bf9b70658 docs: Add 379 and 387 to bips.md (Ava Chow)
35ef34eab7 docs: Remove release 28.0 release notes fragments (Ava Chow)
f5cf43bb91 build: Bump to 28.99 (Ava Chow)

Pull request description:

  * Bump to 28.99 in preparation for the 28.x branching
  * Remove current release note fragments. They've been moved to [draft release notes]((https://github.com/bitcoin-core/bitcoin-devwiki/wiki/28.0-Release-Notes-Draft).) in the wiki.
  * Updated bips.md with missing BIPs that were implemented a while ago.

ACKs for top commit:
  maflcko:
    lgtm ACK 1bf9b70658
  tdb3:
    re ACK 1bf9b70658

Tree-SHA512: 9d5b05330268bb233369d78f06011dbdcdcb87770c499ae743ac4833735ba657b6611ff1e332c9d4added854b694c5a3a961d911247303f7ddaaaa72149d5574
2024-08-27 13:12:01 -04:00
Ava Chow
0022c84716
Merge bitcoin/bitcoin#30695: seeds: Add additional seed source and bump uptime requirements for Onion and I2P nodes
b061b35105 seeds: Regenerate mainnet seeds (virtu)
02dc45c506 seeds: Pull nodes from Luke's seeder (virtu)
7a2068a0ff seeds: Pull nodes from virtu's crawler (virtu)

Pull request description:

  This builds on #30008 and adds data [exported](https://github.com/virtu/seed-exporter) by [my crawler](https://github.com/virtu/p2p-crawler) an additional source for seed nodes. Data covers all supported network types.

  [edit: Added Luke's seeder as input as well.]

  ### Motivation
  - Further decentralizes the seed node selection process (in the long term potentially enabling an _n_-source threshold for nodes to prevent a single source from entering malicious nodes)
  - No longer need to manually curate seed node list for any network type: See last paragraph of OP in #30008. My crawler has been [discovering the handful of available cjdns nodes](https://21.ninja/reachable-nodes/nodes-by-net-type/) for around two months, all but one of which meet the reliability criteria.
  - Alignment of uptime requirements for Onion and I2P nodes with those of clearnet nodes to 50%: If I'm reading the code correctly, seeders appear to optimize for up-to-dateness by using [lower connection timeouts](3c1a63c672/src/crawl.rs (L349)) than [Bitcoin Core](bc87ad9854/src/netbase.cpp (L40C27-L40C48)) to maximize throughput. Since my crawler does not have the same timeliness requirements, it opts for accuracy by using generous timeouts. As a result, its data contains additional eligible Onion (and other darknet nodes), as is shown in the histogram below. Around 4500 Onion nodes are discovered so far (blue); my data adds ~6400 more (orange); ~ 1500 nodes take longer than the default 20-second Bitcoin Core timeout and won't qualify as "good".

  ![Connection time histogram for Onion nodes](https://github.com/user-attachments/assets/c3513604-aa48-4c75-b51d-13421eaed9eb)

  Here's the current results with 512 nodes for all networks except cjdns:
  <details>
  <summary>Using the extra data</summary>

  ```
  IPv4   IPv6  Onion  I2P    CJDNS Pass
  10335   2531  11545   1589     10 Initial
  10335   2531  11545   1589     10 Skip entries with invalid address
  5639   1431  11163   1589      8 After removing duplicates
  5606   1417  11163   1589      8 Enforce minimal number of blocks
  5606   1417  11163   1589      8 Require service bit 1
  4873   1228  11163   1589      8 Require minimum uptime
  4846   1225  11161   1588      8 Require a known and recent user agent
  4846   1225  11161   1588      8 Filter out hosts with multiple bitcoin ports
  512    512    512    512      8 Look up ASNs and limit results per ASN and per net
  ```
  </details>
  <details>
  <summary>Before</summary>

  ```
  IPv4   IPv6  Onion  I2P    CJDNS Pass
  5772   1323    443      0      2 Initial
  5772   1323    443      0      2 Skip entries with invalid address
  4758   1110    443      0      2 After removing duplicates
  4723   1094    443      0      2 Enforce minimal number of blocks
  4723   1094    443      0      2 Require service bit 1
  3732    867    443      0      2 Require minimum uptime
  3718    864    443      0      2 Require a known and recent user agent
  3718    864    443      0      2 Filter out hosts with multiple bitcoin ports
   512    409    443      0      2 Look up ASNs and limit results per ASN and per net
  ```
  </details>

  ### To dos
  - [x] Remove manual nodes and update README
  - [x] Mark nodes with connection times exceeding Bitcoin Core's default as bad in [exporter](https://github.com/virtu/seed-exporter): [done](https://github.com/virtu/seed-exporter/pull/12)
  - [x] Regenerate mainnet seeds
  - [x] Rebase, then remove WIP label once #30008 gets merged

ACKs for top commit:
  achow101:
    ACK b061b35105
  fjahr:
    utACK b061b35105

Tree-SHA512: 63e86220787251c7e8d2d5957bad69352e19ae17d7b9b2d27d8acddfec5bdafe588edb68d77d19c57f25f149de723e2eeadded0c8cf13eaca22dc33bd8cf92a0
2024-08-27 12:52:56 -04:00
Ava Chow
78567b052d
Merge bitcoin/bitcoin#30697: Bugfix: Ensure Atomicity in Wallet Settings Updates from Chain Interface
1b41d45d46 wallet: bugfix: ensure atomicity in settings updates (ismaelsadeeq)

Pull request description:

  This PR fixes #30620.

  As outlined in the issue, creating two wallets with `load_on_startup=true` simultaneously results in only one wallet being added to the startup file.

  The current issue arises because the wallet settings update process involves:
  1. Obtaining the settings value while acquiring the settings lock.
  2. Modifying the settings value.
  3. Overwriting the settings value while acquiring the settings lock again.

  This sequence is not thread-safe. Different threads could modify the same base value simultaneously, overwriting data from other workers without realizing it.

  The PR attempts to  fix this by modifying the chain interface's `updateRwSetting` method to accept a function that will be called with the settings reference. This function will either update or delete the setting and return an enum indicating whether the settings need to be overwritten in this or not.

  Additionally, this PR introduces two new methods to the chain interface:
  - `overwriteRwSetting`: This method replaces the setting with a new value.
  Used in `VerifyWallets`
  - `deleteRwSettings`: This method completely erases a specified setting.
  This method is currently used only in `overwriteRwSetting`.

  These changes ensure that updates are race-free across all clients.

ACKs for top commit:
  achow101:
    ACK 1b41d45d46
  furszy:
    self-code-ACK 1b41d45d46

Tree-SHA512: 50cda612b782aeb5e03e2cf63cc44779a013de1c535b883b57af4de22f24b0de80b4edecbcda235413baec0a12bdf0e5750fb6731c9e67d32e742d8c63f08c13
2024-08-27 12:29:20 -04:00
Ava Chow
1bf9b70658 docs: Add 379 and 387 to bips.md 2024-08-27 11:20:54 -04:00
Ava Chow
35ef34eab7 docs: Remove release 28.0 release notes fragments 2024-08-27 11:14:25 -04:00
merge-script
c6d2d1cb66
Merge bitcoin/bitcoin#30720: chainparams: Remove seed.bitcoinstats.com
c88a7dc53e chainparams: Remove seed.bitcoinstats.com (Ava Chow)

Pull request description:

  This seeder no longer appears to be serving sufficient addresses.

  Fixes #29911

ACKs for top commit:
  1440000bytes:
    ACK c88a7dc53e
  virtu:
    ACK c88a7dc53e
  mzumsande:
    ACK c88a7dc53e
  BrandonOdiwuor:
    ACK c88a7dc53e

Tree-SHA512: 23db3a217bbc3cd96785f17bd2b1db886392cc864dfc00498fa30e69df414ad02cb35f34cd6b7e8adab7c024a7efa8fd4a39b8b8ef274d95974cb16eb1c39a5b
2024-08-27 11:59:01 +01:00
merge-script
e53b1c1a4b
Merge bitcoin/bitcoin#30705: test: Avoid intermittent block download timeout in p2p_ibd_stalling
fa5b58ea01 test: Avoid intermittent block download timeout in p2p_ibd_stalling (MarcoFalke)

Pull request description:

  Fixes #30704

  The goal of the test is to check the stalling timeout, not the block download timeout.

  On extremely slow hardware (for example qemu virtual hardware), downloading the 1023 blocks may take longer than the block download timeout.

  Fix it by pinning the time using mocktime, and only advance it when testing the stalling timeout.

ACKs for top commit:
  tdb3:
    CR ACK fa5b58ea01
  brunoerg:
    utACK fa5b58ea01

Tree-SHA512: 9a9221f264bea52be5e9fe81fd319f5a6970cd315cc5e9f5e2e049c5d84619b19b9f6f075cda8d34565c2d6c17a88fb57e195c66c271e40f73119a77caecb6d7
2024-08-27 11:20:42 +01:00