This adds a height parameter to the dumptxoutset RPC. This internalizes the workflow that was previously done by scripts: roll back the chain to the height we actually want the snapshot from, create the snapshot, roll forward to the real tip again.
The nice thing about internalizing this functionality is that we can write tests for the code and it gives us more options to make the functionality robust. The shell scripts we have so far will be more cumbersome to maintain in the long run, especially since we will only notice later when we have broken them.
This is a partial backport of core#29553, core#18836, core#30808 and core#30817
RPC: Add type parameter to dumptxoutset
https://github.com/bitcoin/bitcoin/pull/29553/commits/993cafe7e45ab0af1e862c7def3de688f47c0443
test: Test for dumptxoutset at specific height
https://github.com/bitcoin/bitcoin/pull/29553/commits/842685035244e151f4a10019af2dfe0563f11a82
tests: Add a sha256sum_file function to util
https://github.com/bitcoin/bitcoin/pull/18836/commits/092fc434854f881330771a93a1280ac67b1d3549
assumeutxo: Remove devtools/utxo_snapshot.sh
https://github.com/bitcoin/bitcoin/pull/29553/commits/b29c21fc92dcc3da95bd032ba41675a8b9a0a24b
rpc: Don't re-enable previously disabled network after dumptxoutset
Also fixes a typo in the RPC help text.
https://github.com/bitcoin/bitcoin/pull/30808/commits/598b9bba5aa95d0b5f78ab90ac491f742819047a
refactor: Manage dumptxoutset RAII classes with std::optional
(partial) https://github.com/bitcoin/bitcoin/pull/30817/commits/c2b779da4e7f1bf1a5c5d67ec94cba3027b42ee7