2d99b2c02b fix: force correct `-disablegovernance` and `-txindex` values when pruning is requested via init dialog (UdjinM6)
64b20f0691 fix(qt): set prune dependent options correctly (Kittywhiskers Van Gogh)
Pull request description:
## Issue being fixed or feature implemented
A few things to note:
1. we shouldn't rely on `bPrune` cause it can be overridden via cmd-line
2. `addOverriddenOption` is used to highlight that there are GUI options that were overridden via cmd-line and neither `-disablegovernance` nor `-txindex` override anything, we simply set them to correct values here.
3. we should do all that in `SetPruneEnabled` case that's the central point for GUI prune option logic
fixes https://github.com/dashpay/dash/issues/6366https://github.com/dashpay/dash/pull/6367's alternative
## What was done?
## How Has This Been Tested?
`./src/qt/dash-qt --regtest --resetguisettings` (could also add `--txindex=1` and/or `--disablegovernance=0`), check "Limit ..." box, click OK and confirm it continues with no errors (but with a warning about disabled governance, that's by design)
close qt and check 2 more things:
1. `./src/qt/dash-qt --regtest` should have a warning about disabled governance
2. `./src/qt/dash-qt --regtest --prune=0` should have no warning about disabled governance (not true on `develop`)
## Breaking Changes
## Checklist:
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
kwvg:
ACK 2d99b2c02b
PastaPastaPasta:
utACK 2d99b2c02b
Tree-SHA512: 465bd2f1ca86358145c4671af554078b00b2472375d65b8de7e01ae0db8b24c9b01844a2b8e5a4c85a6d65a892a169ee61797591c0dfc0f51ec044a8e2bba58a
eb37a9b8e7 Merge sipa/minisketch#87: Avoid copy in self-assign
fe6557642e Merge sipa/minisketch#88: build: Add `-Wundef`
8ea298bfa7 Avoid copy in self-assign
978a3d8869 build: Add `-Wundef`
3387044179 Merge sipa/minisketch#86: doc: fix typo in sketch_impl.h
15c2d13b60 doc: fix typo in sketch_impl.h
7be08b8a46 Merge sipa/minisketch#85: Fixes for integer precision loss
00fb4a4d83 Avoid or make integer precision conversion explicit
9d62a4d27c Avoid the need to cast/convert to size_t for vector operations
19e06cc7af Prevent overflows from large capacity/max_elements
git-subtree-dir: src/minisketch
git-subtree-split: eb37a9b8e79f9e49d73b96a49bf97a96d9eb676c
3472e2f5ec Merge sipa/minisketch#81: Avoid overflowing shift by special casing inverse of 1
653d8b2e26 Avoid overflowing shift by special casing inverse of 1
33b7c200b9 Merge sipa/minisketch#80: Add c++20 version of CountBits
4a48f31a37 Merge sipa/minisketch#83: ci: Fix "s390x (big-endian)" task
82b6488acb Add c++20 version of CountBits
0498084d31 ci: Fix "s390x (big-endian)" task
71709dca9e Merge sipa/minisketch#82: ci: Fix `x86_64-w64-mingw32` task
9e6127fa98 Merge sipa/minisketch#74: Avoid >> above type width in BitWriter
ed420bc170 ci: Fix `x86_64-w64-mingw32` task
fe1040f227 Drop -Wno-shift-count-overflow compile flag
154bcd43bd Avoid >> above type width in BitWriter
67b87acdb6 Merge sipa/minisketch#78: ci: Update macOS image for CI
7de7250416 ci: Update macOS image for CI
83d812ea9f Merge sipa/minisketch#73: ci: Use correct variable to designate C++ compiler
e051a7d690 ci: Install wine32 package for Windows tests
2d2c695d78 build: Drop unused `CC` variable
1810fcbd11 ci: Use correct variable to designate C++ compiler
022b959049 Merge sipa/minisketch#77: Add missing include
08443c4892 Add missing include
git-subtree-dir: src/minisketch
git-subtree-split: 3472e2f5ec75ace39ce9243af6b3fee233a67492
e43ca6243a feat: replace assert to error in p2p code of Asset Lock (Konstantin Akimov)
c97f5f5ca5 feat: update some asserts related to CreditPool in consensus code to exceptions (Konstantin Akimov)
877aa08144 feat: generate less blocks in feature_asset_locks.py to make it faster (Konstantin Akimov)
a51ade5cc9 style: apply clang-format (Konstantin Akimov)
ef6190e434 docs: add release notes for withdrawal changes in v22 (Konstantin Akimov)
5b0a2f56cd fix: string in credit pool logs 'previous' is renamed to recently unlocked (Konstantin Akimov)
31ca8a497a feat: update limit of withdrawals to flat 2000 starting from v22 (Konstantin Akimov)
Pull request description:
## Issue being fixed or feature implemented
Limit 1000 seems a bit small at the moment, while limit 2000 is still safe enough.
## What was done?
Withdrawals limits in pre-v22 are:
- if credit pool is more than 10k -> limit withdrawals to 1k
- if credit pool is between 100 dash and 10000 dash -> let to withdraw 10%.
- if 10% of credit pool is less than 100 dash -> no limits, let to withdraw everything.
The fork `withdrawals` introduces higher limit:
- 2000 dash per last 576 blocks. That's all.
## How Has This Been Tested?
Updated functional test `feature_asset_locks.py`
## Breaking Changes
Limits of withdrawals are increased to 2000 dash. It changes consensus rules.
## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e tests
- [x] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
ACKs for top commit:
PastaPastaPasta:
utACK e43ca6243a
UdjinM6:
utACK e43ca6243a
Tree-SHA512: 77fc27b6b38105cc311ee5ea78d66edfe854600ad6fb9422c0d302dac436e9aa1dcdc394a36ccb980d42de98091c1596e01be260b3a940df4e6309842fd89065
cc98f9e724 merge bitcoin#23670: Build minisketch test in make check, not in make (Kittywhiskers Van Gogh)
606a444296 merge bitcoin#26686: Enable erlay setting in process_message(s) targets (Kittywhiskers Van Gogh)
38a16a24d7 merge bitcoin#26359: Erlay support signaling follow-ups (Kittywhiskers Van Gogh)
b55a6f794b merge bitcoin#26448: fix intermittent failure in p2p_sendtxrcncl.py (Kittywhiskers Van Gogh)
36be978fc9 merge bitcoin#26396: Avoid SetTxRelay for feeler connections (Kittywhiskers Van Gogh)
62dc9cb17b merge bitcoin#26381: Fix intermittent issue in p2p_sendtxrcncl.py (Kittywhiskers Van Gogh)
6a7868dba7 merge bitcoin#23443: Erlay support signaling (Kittywhiskers Van Gogh)
fdc3c07554 partial bitcoin#19953: Implement BIP 340-342 validation (Kittywhiskers Van Gogh)
477157d40b merge bitcoin#26272: Prevent UB in `minisketch_tests.cpp` (Kittywhiskers Van Gogh)
0cf7401173 merge bitcoin#23496: Add minisketch fuzz test (Kittywhiskers Van Gogh)
49ef53ce00 merge bitcoin#23491: Move minisketchwrapper to src/node (Kittywhiskers Van Gogh)
Pull request description:
## Additional Information
* Dependent on https://github.com/dashpay/dash/pull/6332
* Dependent on https://github.com/dashpay/dash/pull/6365
* Erlay requires nodes to be `WTXIDRELAY` (as defined by BIP-339, [source](17c04f9fa1/bip-0339.mediawiki))-capable ([source](17c04f9fa1/bip-0330.mediawiki (sendtxrcncl))) as prior to `WTXIDRELAY` adoption, TXIDs of SegWit transactions didn't include the witness data in the hash, which meant, the witness data was malleable ([source](https://bitcoin.stackexchange.com/a/107394)), which would be a relevant factor when you are building out a reconciliation system where you need TXIDs to authoritatively identify a transaction's contents.
As Dash _doesn't_ support SegWit, this requirement can be dispensed with. It has instead been replaced with checking if the node is running Dash Core v22 or above to retain the underlying test logic (but this can also be dispensed with as `SENDTXRCNCL` will simply be ignored by older nodes and major releases are _generally_ mandatory upgrades anyways)
## Breaking Changes
None expected.
## Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
- [x] I have added or updated relevant unit/integration/functional/e2e tests
- [x] I have made corresponding changes to the documentation **(note: N/A)**
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
PastaPastaPasta:
utACK cc98f9e724
UdjinM6:
utACK cc98f9e724
Tree-SHA512: fe985f4df6c96c0a7b984882815a1bce7f23c54370198d099e41a59ac4c46c283a2b8dd95f5c8fc12eb1dc1330c4e5c21626b76d33d83d395326e8eb19d564ce
It is impossible situation which will never happen.
But better to change it to exception for better error-prune implementation
in case someone will decide to change this code:
const auto quorums = qman.ScanQuorums(llmqType, pindexTip, quorums_to_scan);
if (bool isActive = std::any_of(quorums.begin(), quorums.end(), [&](const auto &q) { return q->qc->quorumHash == quorumHash; }); !isActive) {
return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-assetunlock-too-old-quorum");
}
...
const auto quorum = qman.GetQuorum(llmqType, quorumHash);
assert(quorum); <-- for sure exist because we just scanned quorums
A few things to note:
1. we shouldn't rely on `bPrune` cause it can be overridden via cmd-line
2. `addOverriddenOption` is used to highlight that there are GUI options that were overridden via cmd-line and neither `-disablegovernance` nor `-txindex` override anything, we simply set them to correct values here.
3. we should do all that in `SetPruneEnabled` case that's the central point for GUI prune option logic
09504bdd1f merge bitcoin#28895: do not make automatic outbound connections to addnode peers (Kittywhiskers Van Gogh)
6cf206ca0e merge bitcoin#28155: improves addnode / m_added_nodes logic (Kittywhiskers Van Gogh)
11d654af19 merge bitcoin#28189: diversify network outbounds release note (Kittywhiskers Van Gogh)
5dc52b3b6f merge bitcoin#27213: Diversify automatic outbound connections with respect to networks (Kittywhiskers Van Gogh)
291305b4d2 merge bitcoin#26497: Make ConsumeNetAddr always produce valid onion addresses (Kittywhiskers Van Gogh)
6a37934af4 partial bitcoin#26396: Avoid SetTxRelay for feeler connections (Kittywhiskers Van Gogh)
221a78ea84 merge bitcoin#25156: Introduce PeerManagerImpl::RejectIncomingTxs (Kittywhiskers Van Gogh)
cc694c2e5b merge bitcoin#22778: Reduce resource usage for inbound block-relay-only connections (Kittywhiskers Van Gogh)
6e6de54e5e net: use `Peer::m_can_relay_tx` when we mean `m_tx_relay != nullptr` (Kittywhiskers Van Gogh)
77526d2129 net: rename `Peer::m_block_relay_only` to `Peer::m_can_tx_relay` (Kittywhiskers Van Gogh)
Pull request description:
## Additional Information
* Dependency for https://github.com/dashpay/dash/pull/6333
* When backporting [bitcoin#22778](https://github.com/bitcoin/bitcoin/pull/22778), the `m_tx_inventory_known_filter.insert()` call in `queueAndMaybePushInv()` had to be moved out as `EXCLUSIVE_LOCKS_REQUIRED` does not seem to work with lambda parameters list (though it does work with capture list, [source](4b5e39290c/src/net_processing.cpp (L5781))), see error below
<details>
<summary>Compiler error:</summary>
```
net_processing.cpp:5895:21: note: found near match 'tx_relay->m_tx_inventory_mutex'
net_processing.cpp:5955:21: error: calling function 'operator()' requires holding mutex 'queueAndMaybePushInv.m_tx_inventory_mutex' exclusively [-Werror,-Wthread-safety-precise]
queueAndMaybePushInv(tx_relay, CInv(nInvType, hash));
^
net_processing.cpp:5955:21: note: found near match 'tx_relay->m_tx_inventory_mutex'
net_processing.cpp:5977:17: error: calling function 'operator()' requires holding mutex 'queueAndMaybePushInv.m_tx_inventory_mutex' exclusively [-Werror,-Wthread-safety-precise]
queueAndMaybePushInv(inv_relay, inv);
^
```
</details>
* Attempting to remove the `EXCLUSIVE_LOCKS_REQUIRED` or the `AssertLockHeld` are not options due to stricter thread sanitization checks being applied since [dash#6319](https://github.com/dashpay/dash/pull/6319) (and in general, removing annotations being inadvisable regardless)
* We cannot simply lock `peer->GetInvRelay()->m_tx_inventory_mutex` as a) the caller already has a copy of the relay pointer (which means that `m_tx_relay_mutex` was already held) that b) they used to lock `m_tx_inventory_mutex` (which we were already asserting) so c) we cannot simply re-lock `m_tx_inventory_mutex` as it's already already held, just through a less circuitous path.
* The reason locking is mentioned instead of asserting is that the compiler treats `peer->GetInvRelay()->m_tx_inventory_mutex` and `tx_relay->m_tx_inventory_mutex` as separate locks (despite being different ways of accessing the same thing) and would complain similarly to the error above if attempting to assert the former while holding the latter.
* As `m_tx_relay` is always initialized for Dash, to mimic the behaviour _expected_ upstream, in [bitcoin#22778](https://github.com/bitcoin/bitcoin/pull/22778), `SetTxRelay()` will _allow_ `GetTxRelay()` to return `m_can_tx_relay` (while Dash code that demands unconditional access can use `GetInvRelay()` instead) with the lack of `SetTxRelay()` resulting in `GetTxRelay()` feigning the absence of `m_can_tx_relay`.
This allows us to retain the same style of checks used upstream instead of using proxies like `!CNode::IsBlockOnlyConn()` to determined if we _should_ use `m_tx_relay`.
* Speaking of proxies, being a block-only connection is now no longer the only reason not to relay transactions
In preparation for [bitcoin#26396](https://github.com/bitcoin/bitcoin/pull/26396), proxy usage of `!CNode::IsBlockOnlyConn()` and `!Peer::m_block_relay_only` was replaced with the more explicit `Peer::m_can_tx_relay` before being used to gate the result of `GetTxRelay()`, to help it mimic upstream semantics.
## Breaking Changes
None expected
## Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
- [x] I have added or updated relevant unit/integration/functional/e2e tests
- [x] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
UdjinM6:
utACK 09504bdd1f
Tree-SHA512: f4f36f12f749b697dd4ad5521ed15f862c93ed4492a047759554aa80a3ce00dbd1bdc0242f7a4468f41f25925d5b79c8ab774d8489317437b1983f0a1277eecb
b6544791b4 Merge bitcoin/bitcoin#30705: test: Avoid intermittent block download timeout in p2p_ibd_stalling (merge-script)
745a819683 Merge bitcoin/bitcoin#30690: devtools, utxo-snapshot: Fix block height out of range in script (Ava Chow)
01b570e9e2 Merge bitcoin/bitcoin#29999: guix: fix suggested fake date for openssl-1.1.1l (Ava Chow)
432f352719 Merge bitcoin/bitcoin#30580: doc: Add note about distro's `g++-mingw-w64-x86-64-posix` version (merge-script)
1bd090e7fb Merge bitcoin/bitcoin#30597: doc: Drop no longer needed workaround for WSL (merge-script)
8a12237745 Merge bitcoin/bitcoin#30630: doc: Update ccache website link (merge-script)
f66547f84e Merge bitcoin/bitcoin#30588: depends: fix ZMQ CMake getcachesize check (merge-script)
ddaec964c0 Merge bitcoin/bitcoin#30565: depends: Fix `zeromq` build on OpenBSD (merge-script)
e4e5605ef8 Merge bitcoin/bitcoin#30552: test: fix constructor of msg_tx (merge-script)
df3c2392ca Merge bitcoin/bitcoin#26950: cleanse: switch to SecureZeroMemory for Windows cross-compile (merge-script)
57945ce337 Merge bitcoin/bitcoin#30506: depends: Cleanup postprocess commands after switching to CMake (merge-script)
e016ffada1 Merge bitcoin/bitcoin#29878: depends: build expat with CMake (merge-script)
62dcd43b58 Merge bitcoin/bitcoin#29880: depends: build FreeType with CMake (merge-script)
745addf6a7 Merge bitcoin/bitcoin#30245: net: Allow -proxy=[::1] on nodes with IPV6 lo only (Ava Chow)
4e144be0dd Merge bitcoin-core/gui#795: Keep focus on "Hide" while ModalOverlay is visible (Hennadii Stepanov)
69c04b2c48 Merge bitcoin/bitcoin#30372: util: Use SteadyClock in RandAddSeedPerfmon (merge-script)
ebed8af1d0 Merge bitcoin/bitcoin#30336: depends: update doc in Qt pwd patch (merge-script)
9793fb1a87 Merge bitcoin/bitcoin#30340: test: Added coverage to Block not found error using gettxoutsetinfo (Ava Chow)
479cb8bcb8 Merge bitcoin/bitcoin#30312: contrib: add R(UN)PATH check to ELF symbol-check (merge-script)
ca83773854 Merge bitcoin/bitcoin#30283: upnp: fix build with miniupnpc 2.2.8 (merge-script)
63e139d11b Merge bitcoin/bitcoin#30185: guix: show `*_FLAGS` variables in pre-build output (merge-script)
3be0d3e5cd Merge bitcoin/bitcoin#30097: crypto: disable asan for sha256_sse4 with clang and -O0 (merge-script)
3070c3e388 Merge bitcoin/bitcoin#30078: depends: set AR & RANLIB for CMake (merge-script)
Pull request description:
## Issue being fixed or feature implemented
Trivial backports
## What was done?
## How Has This Been Tested?
built locally
## Breaking Changes
## Checklist:
_Go over all the following points, and put an `x` in all the boxes that apply._
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
UdjinM6:
utACK b6544791b4
kwvg:
utACK b6544791b4
Tree-SHA512: 10b5af4e92c83fa9d6764b20bf066bba8e4c600402966fd5c1d6dad07b0549d8a42151a33f21e2f8263336c12a810a6f3fc2828d90bc98153e09c165d9e5b043
700b8c5ac5 Merge bitcoin/bitcoin#29658: Bugfix: GUI: Help messages already have a trailing newline, so don't add an extra one (merge-script)
a0cd305a7c Merge bitcoin/bitcoin#29948: test: add missing comparison of node1's mempool in MempoolPackagesTest (Ava Chow)
f1907ea997 Merge bitcoin/bitcoin#29984: net: Replace ifname check with IFF_LOOPBACK in Discover (merge-script)
daa6eeed5f Merge bitcoin/bitcoin#29960: depends: pass verbose through to cmake based makefiles (merge-script)
61a5832a6a Merge bitcoin/bitcoin#29907: test: Fix `test/streams_tests.cpp` compilation on SunOS / illumos (merge-script)
23f25a94fa Merge bitcoin/bitcoin#29872: test: Add missing Assert(mock_time_in >= 0s) to SetMockTime (merge-script)
a7daee71da Merge bitcoin/bitcoin#29689: lint: scripted-diff verification also requires GNU grep (Ava Chow)
3df1ca102b Merge bitcoin/bitcoin#29953: doc: Bash is needed in gen_id and is not installed on FreeBSD by default (merge-script)
b53b85409f Merge bitcoin/bitcoin#29850: net: Decrease nMaxIPs when learning from DNS seeds (Ava Chow)
c4a147cfea Merge bitcoin/bitcoin#28340: security: restrict abis in bitcoind.service (Ryan Ofsky)
acfdf9e438 Merge bitcoin/bitcoin#28373: doc: Add example of mixing private and public keys in descriptors (Ava Chow)
51bc8bdcd6 Merge bitcoin/bitcoin#29859: build: Fix false positive `CHECK_ATOMIC` test (merge-script)
bb4102c590 Merge bitcoin/bitcoin#29893: test: fix intermittent failure in p2p_compactblocks_hb.py (glozow)
4ecb76104e Merge bitcoin/bitcoin#29786: Drop Windows Socket dependency for `randomenv.cpp` (fanquake)
1a8e805aab Merge bitcoin/bitcoin#29498: test: Update --tmpdir doc string to say directory must not exist (fanquake)
81ca71c266 Merge bitcoin/bitcoin#29781: depends: add new LLVM debug macro (fanquake)
5ce92ca9ea Merge bitcoin/bitcoin#29527: depends: add -g to DEBUG=1 flags (fanquake)
Pull request description:
## Issue being fixed or feature implemented
Trivial backports
## What was done?
## How Has This Been Tested?
built locally
## Breaking Changes
## Checklist:
_Go over all the following points, and put an `x` in all the boxes that apply._
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
UdjinM6:
utACK 700b8c5ac5 but pls confirm Guix is happy now before merging
kwvg:
utACK 700b8c5ac5
Tree-SHA512: 9722979c4f0589cb02bfeaf39373713372a4aa1c8c5a55aa5b4d33388f73ef19231de3963b80ffaad25fbe0db90a133de5080baac691daed41b86a762b867b2d
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
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