Currently dumptxoutset
uses hash_serialized_2
for its txoutset_hash
. The proposed loadtxoutset
(#27596) then checks this against the hash we hardcode in CChainParams
.
Unfortunately the only way to check this hash, if you’re not using it yourself, is to rollback the chain to the assume-utxo snapshot height, call the (slow) gettxoutsetinfo
and then replay to the tip. This process is slow and potentially wreaks havoc on your lightning node if you forget to shut it down first.
If we used the MuHash instead then any user with -coinstatsindex
can verify it with a simple gettxoutsetinfo muhash HEIGHT
.
For good measure we should also modify (we already do this)gettxoutsetinfo
so it can calculate the muhash for the current UTXO set without relying on the index. This would help users with pruned nodes (and without the index) to verify a newly proposed snapshot (if they haven’t pruned beyond it).
I think this can be changed after #27596 is merged. It would just require offering two snapshots for download for a while.