Description
Snapshot is an important component used in Geth, which is basically the flatten format state for fast access and iteration.
However, the snapshot generation is quite slow(generated by the trie iteration) and it's fragile. It's really annoying to re-generate the snapshot after some exceptions.
This issue proposes a tool to recover the corrupted snapshot, so that we can avoid the regeneration in most cases.
The tool can be used for verifying the correctness of the snapshot, especially the disk layer. Local merkle trie and range prover can be used to detect the corrupted range in the disk layer(if the merkle trie is not corrupted) and fix it.
The tool can be used to run the generation or wipe the snapshot offline(probably it's faster than online version)
And also the tool can be used to apply the state transitions based on a complete snapshot. It's very common that the user enables the snapshot previously and later forget to enable it again. So the gapped snapshot is entirely useless. The tool can fix the gap by executing the relevant blocks.