42154 Commits

Author SHA1 Message Date
Ava Chow
e24a25d882
test: Use shell builtins in run_command test case
Github-Pull: bitcoin/bitcoin#30952
Rebased-From: 7bd3ee62f6d6f59ca599e85f81776d282dee1539
2024-09-24 11:40:27 -04:00
merge-script
1147e72953
Merge bitcoin/bitcoin#30827: [28.x] Further backports and rc2
06a7df70df30879e0b691d1a252636f703b8cdfb doc: Generate manpages (Ava Chow)
5315886bf5bb430ced1b23ebfcd0b8865b523675 build: Bump to 28.0rc2 (Ava Chow)
ff95cb31da6ab6af70125b2c0b78aa976780c61e streams: remove AutoFile::Get() entirely (Pieter Wuille)
8229e981167f61e2d4c2e8b7761cba68374ea92f streams: cache file position within AutoFile (Pieter Wuille)
1b853fdb0a40064a5c75b2dae96dfe1d590de6e1 qt: Translations update (Hennadii Stepanov)
674dded8756ddf9b731f3149c66dd044090e4c8e gui: fix crash when closing wallet (furszy)
d39262e5d41e92d22e020d283ddb6e4e406647b2 test: Wait for local services to update in feature_assumeutxo (Fabian Jahr)
b329ed739b7311b3b47cae1ef8d576a90e0a36a1 test: add coverage for assumeUTXO honest peers disconnection (furszy)
c6b5db1d591f0984cd0e6918970a9e4fc32595d3 assumeUTXO: fix peers disconnection during sync (furszy)
598415bcc1d1f8d516159a1501dda24e8d7c2ea9 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 06a7df70df30879e0b691d1a252636f703b8cdfb
  hebasto:
    ACK 06a7df70df30879e0b691d1a252636f703b8cdfb, 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
v28.0rc2
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: a240e150e837b5a95ed19765a2e8b7c5b6013f35
2024-09-16 23:10:17 -04:00
Pieter Wuille
8229e98116
streams: cache file position within AutoFile
Github-Pull: bitcoin/bitcoin#30884
Rebased-From: e624a9bef16b6335fd119c10698352b59bf2930a
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: ae0529576147a1a5bee992574e2cefc8a1fa37d0
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: a965f2bc07a3588f8c2b8d6a542961562e3f5d0e
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: 19f4a7c95a99162122068d4badffeea240967a65
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: 992f83bb6f4b29b44f4eaace1d1a2c0001d43cac
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: 6d5812e5c852c233bd7ead2ceef051f8567619ed
2024-09-11 13:42:51 -04:00
MarcoFalke
598415bcc1
test: Work around boost compilation error
Github-Pull: bitcoin/bitcoin#30834
Rebased-From: fa9d7d5d205ada8915cbbc29599ab8e7bf1fffe0
2024-09-06 11:31:19 -04:00
Ava Chow
fa46088440
Merge bitcoin/bitcoin#30762: [28.x] rc backports
b2a137929a20baed161988e24de592b1f59c0096 depends: build libevent with -D_GNU_SOURCE (fanquake)
199bb09d88e28d951c5068eb65643390dbedd066 test: fixing failing system_tests/run_command under some Locales (Jadi)
342baabaffc385dc44a44f6d8cf32728a25a0356 test: Avoid intermittent timeout in p2p_headers_sync_with_minchainwork.py (MarcoFalke)
5577d5a3c0904a4805e7b768cb60144daa2a0854 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 b2a137929a20baed161988e24de592b1f59c0096
  achow101:
    ACK b2a137929a20baed161988e24de592b1f59c0096
  stickies-v:
    ACK b2a137929a20baed161988e24de592b1f59c0096

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: 556775408797d8e27154c3edaf139820b0979cce
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: ae48a22a3df086fb59843b7b814619ed5df7557b
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: fa247e6e8c7fddf9e3461c3e2e6f5fade0fe64cf
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: bd7ce05f9d9d21903163a2bd9dd2df3ed3990c3e
2024-08-30 11:07:00 +01:00
Ava Chow
88f0419c1a
Merge bitcoin/bitcoin#30726: [28.x] Bump to 28.0rc1
bd45bc611b8b245d0a6bc8e0f5a224b0642f06d0 doc: Point release notes to wiki draft (Ava Chow)
27b63004851c1c2bb14387fc537052a27265145f examples: Generate example bitcoin.conf (Ava Chow)
08887d3297175ca1eed800319b958d5d8247b885 doc: Generate manpages (Ava Chow)
6974e30bdd2b32197f543050c21f8fc2cca5a0b9 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 bd45bc611b8b245d0a6bc8e0f5a224b0642f06d0.

Tree-SHA512: c3cd28b003ead64631b8c2d1bdbf7403d4d9f53ee5ccdc448d89ca25941678f6d1d8966c2f9a92fa021c815b3e36a84056342caa4eaacdab371f0d581e4e58dc
v28.0rc1
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
1bf9b706583572b1211762ec6ee5368bb8a2f2cd docs: Add 379 and 387 to bips.md (Ava Chow)
35ef34eab7b36e3c53ed438d74a9b783cbcaec27 docs: Remove release 28.0 release notes fragments (Ava Chow)
f5cf43bb912e817cbddd870c6c2f6c615840f5fd 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 1bf9b706583572b1211762ec6ee5368bb8a2f2cd
  tdb3:
    re ACK 1bf9b706583572b1211762ec6ee5368bb8a2f2cd

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
b061b3510585a1fe113cc9d1af65852b155aba45 seeds: Regenerate mainnet seeds (virtu)
02dc45c506f78eae96b5fe8e8e4899b45811da05 seeds: Pull nodes from Luke's seeder (virtu)
7a2068a0ff9eec2bab436b47eba37fd34b71bba4 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 b061b3510585a1fe113cc9d1af65852b155aba45
  fjahr:
    utACK b061b3510585a1fe113cc9d1af65852b155aba45

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
1b41d45d462d856a9d0b44ae0039bbb2cd78407c 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 1b41d45d462d856a9d0b44ae0039bbb2cd78407c
  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
c88a7dc53e3be7489605c3326cf768df5437393a 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 c88a7dc53e3be7489605c3326cf768df5437393a
  BrandonOdiwuor:
    ACK c88a7dc53e3be7489605c3326cf768df5437393a

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
fa5b58ea01fac1adb6336b8b6b5217193295c695 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 fa5b58ea01fac1adb6336b8b6b5217193295c695
  brunoerg:
    utACK fa5b58ea01fac1adb6336b8b6b5217193295c695

Tree-SHA512: 9a9221f264bea52be5e9fe81fd319f5a6970cd315cc5e9f5e2e049c5d84619b19b9f6f075cda8d34565c2d6c17a88fb57e195c66c271e40f73119a77caecb6d7
2024-08-27 11:20:42 +01:00
virtu
b061b35105 seeds: Regenerate mainnet seeds
Regenerate mainnet seeds from new sources without the need for hardcoded
data. Result has 512 nodes from each network type except cjdns, for
which only eight nodes were found that match the seed node criteria.
2024-08-27 07:00:27 +02:00
virtu
02dc45c506 seeds: Pull nodes from Luke's seeder
Pull additional nodes from Luke's seeder to further decentralize the
generation of seed nodes.
2024-08-27 07:00:27 +02:00
virtu
7a2068a0ff seeds: Pull nodes from virtu's crawler
Pull additional nodes from virtu's crawler. Data includes sufficient
Onion and I2P nodes to align the uptime requirements for these networks
to that of clearnet nodes (i.e., 50%). Data also includes more than
three times the number of CJDNS nodes currently hardcoded into
nodes_main_manual.txt, so hardcoded nodes becomes obsolete.
2024-08-27 07:00:09 +02:00
Ava Chow
37cdb5f248
Merge bitcoin/bitcoin#30008: seeds: Pull additional nodes from my seeder and update fixed seeds
41ad84a00c20f54b520aab7f6f975231da0ee2d0 seeds: Use fjahr's more up to date asmap (Ava Chow)
d8fd1e0fafa144a9ff96fc646cf9f21e220d5cd6 seeds: Fixed seeds update (Ava Chow)
f1f24d72141dcd2955420195135cabe5092017ff seeds: Add testnet4 fixed seeds file (Ava Chow)
8ace71c73750e3b537784178f3fc299447c461ed seeds: Remove manual onion and i2p seeds (Ava Chow)
ed5b86cbe47676276f8ff1a48001d5ecd560e153 seeds: Add testnet instructions (Ava Chow)
0676515397fcc8fb580973047e60279ce65bec48 seeds: Also pull from achow101 seeder (Ava Chow)
5bab3175a663610070c1000dd4211a58490e5023 makeseeds: Configurable minimum blocks for testnet4's smaller chain (Ava Chow)
d2465dfac68f96ffdaad88a0bd4891ed37cbfdfc makeseeds: Shuffle ips after parsing (Ava Chow)
af550b3a0fd406f175f197ea9867b41ff4e97af4 makeseeds: Support CJDNS (Ava Chow)
d5a8c4c4bd76f296f4d744184dc80a6a6a0731bd makeseeds: Update user agent regex (Ava Chow)

Pull request description:

  The [DNS seeder](https://github.com/achow101/dnsseedrs) that I wrote collects statistics on node reliability in the same way that sipa's seeder does, and also outputs this information in the same file format. Thus it can also be used in our fixed seeds update scripts. My seeder additionally crawls onion v3, i2p, and cjdns, so will now be able to set those fixed seeds automatically rather than curating manual lists.

  In doing this update, I've found that `makeseeds.py` is missing newer versions from the regex as well as cjdns support; both of these have been updated.

  I also noticed that the testnet fixed seeds are all manually curated and sipa's seeder does not appear to publish any testnet data. Since I am also running the seeder for testnet, I've added the commands to generate testnet fixed seeds from my seeder's data too.

  Lastly, I've updated all of the fixed seeds. However, since my seeder has not found any cjdns nodes that met the reliability criteria (possibly due to connectivity issues present in those networks), I've left the previous manual seeds for that network.

ACKs for top commit:
  fjahr:
    re-ACK 41ad84a00c20f54b520aab7f6f975231da0ee2d0
  virtu:
    ACK [41ad84a](41ad84a00c)

Tree-SHA512: 6ba0141f053d9d6ae7d8c9574f061be38f3e65b28de1d6660c1885ab942623b5a0ec70754b4fcfc5d98fe970f5f179a940d5880b5061ed698f7932500e01d3ee
2024-08-26 15:49:42 -04:00
Ava Chow
c88a7dc53e chainparams: Remove seed.bitcoinstats.com
This seeder no longer appears to be serving sufficient addresses.
2024-08-26 15:44:22 -04:00
Ava Chow
f5cf43bb91 build: Bump to 28.99 2024-08-26 15:12:58 -04:00
Ava Chow
a05987defd
Merge bitcoin/bitcoin#30715: qt: 28.0 translations update
a0cdf43c4dde4f8d1983311fee2393fcde9123fe qt: 28.0 translations update (Hennadii Stepanov)

Pull request description:

  The 28.x branching off is [scheduled](https://github.com/bitcoin/bitcoin/issues/29891) for today, so it's [time](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#before-branch-off) to fetch the recent translations from [Transifex.com](https://www.transifex.com/bitcoin/bitcoin) using the [`bitcoin-maintainer-tools/update-translations.py`](https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py) tool.

  A similar PR from the previous release cycle: https://github.com/bitcoin/bitcoin/pull/29546.

ACKs for top commit:
  achow101:
    ACK a0cdf43c4dde4f8d1983311fee2393fcde9123fe
  pablomartin4btc:
    ACK a0cdf43c4dde4f8d1983311fee2393fcde9123fe

Tree-SHA512: 865d2dc21415a157fafacfab5e018594fdbfa77ce32600877247bfb755407bd93e894eb3e1c8b6a286013e85b63e3d14baf6853d3308b4dfc0705b7a090fd4aa
2024-08-26 15:04:24 -04:00
Ava Chow
a1f2b5bbb5
Merge bitcoin/bitcoin#30690: devtools, utxo-snapshot: Fix block height out of range in script
5b4f34006dbd76223b55b156421f87d2241ac296 devtools, utxo-snapshot: Fix block height out of range (pablomartin4btc)

Pull request description:

  <details>
  <summary>Fixing a <a href="https://github.com/bitcoin/bitcoin/pull/28553#pullrequestreview-2251032570">bug</a> in <code>utxo_snapshot.sh</code>.</summary>

  ```
  /contrib/devtools/utxo_snapshot.sh 840000 snapshot2.dat ./src/bitcoin-cli -datadir=${AU_DATADIR}
  Do you want to disable network activity (setnetworkactive false) before running invalidateblock? (Y/n):
  Disabling network activity
  false
  error code: -8
  error message:
  Block height out of range
  ```

  And the user will see the following in the node and it would stay there if not reset:

  ```
  2024-08-21T14:44:13Z UpdateTip: new best=00000000000000afa0cd000a16e244f56032735d41acd32ac00337aceb2a5240 height=235382 version=0x00000002 log2_work=69.987697 tx=17492185 date='2013-05-09T23:54:32Z' progress=0.016219 cache=71.0MiB(571085txo)
  2024-08-21T14:44:13Z UpdateTip: new best=0000000000000087c5e0b820afff496b95ba44ad64640c73b234d3261d3f99d2 height=235383 version=0x00000002 log2_work=69.987750 tx=17492341 date='2013-05-09T23:54:47Z' progress=0.016219 cache=71.0MiB(571291txo)
  2024-08-21T14:44:13Z UpdateTip: new best=000000000000014a4b5fddf3c8abb6209247255ca9e8df786b271dd1b2ac82a6 height=235384 version=0x00000002 log2_work=69.987804 tx=17492344 date='2013-05-10T00:20:18Z' progress=0.016219 cache=71.0MiB(571297txo)
  2024-08-21T14:44:13Z SetNetworkActive: false

  ```

  </details>

  This is a "temporary" fix until #29553 gets merged, which will remove the script entirely.

  Handle the "Block height out of range" error gracefully by checking if the node has synchronized to or beyond the required block height, otherwise without this validation the node would keep the network disabled if the user selected that option.

  <details>
  <summary>Provide a user-friendly message if the block height is out of range and exit the script cleanly.</summary>

  ```
  /contrib/devtools/utxo_snapshot.sh 840000 snapshot2.dat ./src/bitcoin-cli -datadir=${AU_DATADIR}
  Error: The node has not yet synchronized to block height 840001.
  Please wait until the node has synchronized past this block height and try again.
  ```

  </details>

ACKs for top commit:
  achow101:
    ACK 5b4f34006dbd76223b55b156421f87d2241ac296
  fjahr:
    tACK 5b4f34006dbd76223b55b156421f87d2241ac296

Tree-SHA512: 2b71286b627872d7cfdb367e29361afa3806a7ef9d65075b93892b735ff2ab729069e2f7259d30262909e73cef17fb7dca231615cc1863968cd042f4a2a4f901
2024-08-26 14:55:10 -04:00
Ava Chow
5116dd4b83
Merge bitcoin/bitcoin#30698: test: Add time-timewarp-attack boundary cases
31378d44f44cabc576bf92ddd61afde4b528de77 test: Add time-timewarp-attack boundary cases (Greg Sanders)

Pull request description:

  Basic addition to test case added in https://github.com/bitcoin/bitcoin/pull/30681

ACKs for top commit:
  fjahr:
    Code review ACK 31378d44f44cabc576bf92ddd61afde4b528de77
  achow101:
    ACK 31378d44f44cabc576bf92ddd61afde4b528de77
  tdb3:
    ACK 31378d44f44cabc576bf92ddd61afde4b528de77

Tree-SHA512: 7d18af9e7fac0ecb0fb5e4c009d6ce3f9af849b4abc54ae8cf681dc8b882aaa9b4cffd7f798b7193c76d89f96ec2cb6dbd13e341882d59b0580d3573ec675ffd
2024-08-26 14:44:33 -04:00
Ava Chow
d50f0ce248
Merge bitcoin/bitcoin#30669: test: XORed blocks test follow up
e1d5dd732d5dc641faf1dde316275c84b6bb224b test: check xor.dat recreated when missing (tdb3)
d1610962bf1ff14df45c57cc1d2e075f71fcd19a test: add null block xor key (tdb3)
1ad999b9da39b60e16c51f9813f4fd39b7bdc2b9 refactor: lift NUM_XOR_BYTES (tdb3)
d8399584dd59b3954a0bea393b2de350a732055e refactor: move read_xor_key() to TestNode (tdb3)
d43948c3ef610c383176bf9b389697973bd0ad64 refactor: use unlink rather than os.remove (tdb3)
c8176f758b5991c3797c32ee519d32c14b444991 test: add blocks_key_path (tdb3)

Pull request description:

  Builds on PR #30657.

  Refactors `read_xor_key()` from `util.py` to `test_node.py` (comment https://github.com/bitcoin/bitcoin/pull/30657#discussion_r1723358327)

  Adds a check that `xor.dat` is created when missing (comment https://github.com/bitcoin/bitcoin/pull/30657#discussion_r1717724161)

  Help states:
  ```
  -blocksxor
         Whether an XOR-key applies to blocksdir *.dat files. The created XOR-key
         will be zeros for an existing blocksdir or when `-blocksxor=0` is
         set, and random for a freshly initialized blocksdir. (default: 1)
  ```

ACKs for top commit:
  maflcko:
    ACK e1d5dd732d5dc641faf1dde316275c84b6bb224b
  achow101:
    ACK e1d5dd732d5dc641faf1dde316275c84b6bb224b
  theStack:
    re-ACK e1d5dd732d5dc641faf1dde316275c84b6bb224b
  brunoerg:
    reACK e1d5dd732d5dc641faf1dde316275c84b6bb224b

Tree-SHA512: 325912ef646ec88e0a58e1ece263a2b04cbc06497e8fe5fcd603e509e80c6bcf84b09dd52dfac60e23013f07fc2b2f6db851ed0598649c3593f452c4a1424bd9
2024-08-26 14:30:07 -04:00
ismaelsadeeq
1b41d45d46
wallet: bugfix: ensure atomicity in settings updates
- Settings updates were not thread-safe, as they were executed in
  three separate steps:

  1) Obtain settings value while acquiring the settings lock.
  2) Modify settings value.
  3) Overwrite settings value while acquiring the settings lock.

  This approach allowed concurrent threads to modify the same base value
  simultaneously, leading to data loss. When this occurred, the final
  settings state would only reflect the changes from the last thread
  that completed the operation, overwriting updates from other threads.

  Fix this by making the settings update operation atomic.

- Add test coverage for this behavior.

Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
2024-08-26 13:41:56 +01:00
Hennadii Stepanov
a0cdf43c4d
qt: 28.0 translations update 2024-08-26 08:38:58 +01:00
tdb3
e1d5dd732d
test: check xor.dat recreated when missing 2024-08-25 08:43:45 -04:00
tdb3
d1610962bf
test: add null block xor key 2024-08-25 08:43:37 -04:00
tdb3
1ad999b9da
refactor: lift NUM_XOR_BYTES 2024-08-25 08:43:33 -04:00
tdb3
d8399584dd
refactor: move read_xor_key() to TestNode 2024-08-25 08:42:38 -04:00
tdb3
d43948c3ef
refactor: use unlink rather than os.remove 2024-08-25 08:41:21 -04:00
merge-script
6d546336e8
Merge bitcoin/bitcoin#30651: fuzz: remove repeated word in note
3f05a1068d10ffe0f2859cd20c5fc9bc8efa1c70 remove repeated word in note (sunerok)

Pull request description:

  Fix typo.

ACKs for top commit:
  maflcko:
    ACK 3f05a1068d10ffe0f2859cd20c5fc9bc8efa1c70
  danielabrozzoni:
    ACK 3f05a1068d10ffe0f2859cd20c5fc9bc8efa1c70

Tree-SHA512: 709d96ed18608c0ea788b4f0696abad79ab1b81c4f266487d16bbe4cfca5b99b8f7f9a58f830866db9695aa3aebcc6442098b1533d85507729af99709a53d26a
2024-08-24 18:56:24 +01:00
merge-script
6441c77e97
Merge bitcoin/bitcoin#30687: test: replace deprecated secp256k1 context flags usage
60055f1abc4b4ad5f66a2fcf2e61c65efc777036 test: replace deprecated secp256k1 context flags usage (Sebastian Falbesoner)

Pull request description:

  The flags `SECP256K1_CONTEXT_{SIGN,VERIFY}` have been marked as deprecated since libsecp256k1 version 0.2 (released in December 2022), with the recommendation to use SECP256K1_CONTEXT_NONE instead, see https://github.com/bitcoin-core/secp256k1/pull/1126 and 1988855079/CHANGELOG.md (L132). Note that in contrast to other deprecated functions/variables, these defines don't have a deprecated attribute and hence don't lead to a compiler warning (see https://github.com/bitcoin-core/secp256k1/pull/1126#discussion_r922105271), so they are not easily detected.

ACKs for top commit:
  TheCharlatan:
    ACK 60055f1abc4b4ad5f66a2fcf2e61c65efc777036
  ismaelsadeeq:
    utACK 60055f1abc4b4ad5f66a2fcf2e61c65efc777036
  tdb3:
    light CR and test ACK 60055f1abc4b4ad5f66a2fcf2e61c65efc777036

Tree-SHA512: d93cf49e018a58469620c0d2f50242141f22dabc70afb2a7cd64e416f4f55588714510ae5a877376dd1e6b6f7494261969489af4b18a1c9dff0d0dfdf93f1fa8
2024-08-24 18:53:41 +01:00
merge-script
d54fbc85c4
Merge bitcoin/bitcoin#30703: test: Avoid duplicate curl call in get_previous_releases.py
fa5aeab3cb18405ecf8a1401d89539b924a618f6 test: Avoid duplicate curl call in get_previous_releases.py (MarcoFalke)

Pull request description:

  Seems odd having to translate `404` to "Binary tag was not found". Also, it seems odd to write a for-loop over a list with one item.

  Fix both issues by just using a single call to `curl --fail ...`.

  Can be tested with: `test/get_previous_releases.py -b v99.99.99`

  Before:

  ```
  Releases directory: releases
  Fetching: https://bitcoincore.org/bin/bitcoin-core-99.99.99/bitcoin-99.99.99-x86_64-linux-gnu.tar.gz
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
    0  286k    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  Binary tag was not found
  ```

  After:

  ```
  Releases directory: releases
  Fetching: https://bitcoincore.org/bin/bitcoin-core-99.99.99/bitcoin-99.99.99-x86_64-linux-gnu.tar.gz
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
    0  286k    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  curl: (22) The requested URL returned error: 404

ACKs for top commit:
  fanquake:
    ACK fa5aeab3cb18405ecf8a1401d89539b924a618f6
  brunoerg:
    utACK fa5aeab3cb18405ecf8a1401d89539b924a618f6
  tdb3:
    tested ACK fa5aeab3cb18405ecf8a1401d89539b924a618f6

Tree-SHA512: d5d31e0bccdd9de9b4a8ecf2e69348f4e8cee773050c8259b61db1ce5de73f6fbfffbe8c4d2571f7bef2de29cb42fd244573deebfbec614e487e76ef41681b9c
2024-08-24 16:24:23 +01:00
tdb3
c8176f758b
test: add blocks_key_path
Adds a convenience function to TestNode
to provide the path to the blocks xor key.
Updates util and feature_blocksxor to use it.
2024-08-23 12:49:56 -04:00