[Bug] "An error occurred during the synchronization process of Aleochain, preventing further synchronization."
🐛 Bug Report
cmd logs
2024-02-28 14:44:41.989 TRACE Invalid prover solution 'puzzle15h3v37hmawj2jn8yng2ckj6ee9yaexzynx5jysvjvknm3yd20sd8tryfjann9a8f6e7gh34krffsqyyhdwx' for the proof target.
2024-02-28 14:44:42.005 DEBUG request{method=GET uri=/testnet3/program/credits.aleo/mapping/bonded/all version=HTTP/1.1}: finished processing request latency=143 ms status=200
2024-02-28 14:44:42.008 WARN The next block (1542071) is invalid - Failed to speculate on transactions - Failed to post-ratify - Next round 3367264 must be greater than current round 3367264
2024-02-28 14:44:42.024 TRACE Invalid prover solution 'puzzle10wc2u4arvzsd9wfwvrhmxgsk7d27rpg6sklsmda4zggge5zlv3lrxrl2gykjl8jlc0gggk0s4vxsqr7fdl4' for the proof target.
2024-02-28 14:44:42.028 DEBUG request{method=GET uri=/testnet3/block/1521941 version=HTTP/1.1}: finished processing request latency=198 ms status=200
The issue couldn't be resolved by attempting a restart, which is highly unfortunate. We need to find a historical snapshot to initiate the synchronization process, but this will take a considerable amount of time. It would be much better if there is a rollback interface available to handle this. I tried using "remove_last_n_from_tree_only" for the rollback, but it was incomplete as some mapping data couldn't be validated.
Encountered a similar issue, it would be great if we could set the rollback height for the local chain.
2024-03-06 15:52:01.091 TRACE Invalid prover solution 'puzzle1pxwthy65kjhyv63w25t0lt982wdejnvks06xrxp3s3y0vrqu7utjzt6sxspnz76ysp7l7t4tyjdqqgge0xx' for the proof target.
2024-03-06 15:52:01.181 TRACE Invalid prover solution 'puzzle1kxym4t2n5tty2p95jklplv3qqs0j3xe4z6xgtjepnr4g4hyfhpek04y7l6zvsw8r4u8s8seyqxsqqdghgv9' for the proof target.
2024-03-06 15:52:01.271 WARN The next block (1598775) is invalid - Invalid transaction found in the transactions list: Fee verification failed: global state root not found
2024-03-06 15:52:01.751 INFO Received 'GET /testnet3/block/height/latest' from '172.71.142.16:15166'
Due to how the mappings are stored in snarkVM, there isn't really a viable way to revert a finalized block.
I can think of 2 technical possibilities:
- Store the full mapping history;
- Execute the transitions in reverse to get the value before the transition.
Probably you can see why we can't really do much about it.
This issue stemmed from a DB corruption or error in performing storage to DB. Like Haruka mentioned, we do not have an easy way to perform finalize reverts, especially in the case of corruption.
We've made efforts to mitigate this and have found fixes like - https://github.com/AleoNet/snarkVM/pull/2457. I am closing this issue, as we have not been able to reproduce this corruption recently in testing. If this problem persists, feel free to reopen or crate a new issue.