axonweb3 / axon

Axon is a Layer 2 framework of CKB with native cross-chain and interoperability.
https://axonweb3.io
MIT License
65 stars 39 forks source link

A tool or sub-command to rollback blocks. #1574

Open yangby-cryptape opened 9 months ago

yangby-cryptape commented 9 months ago

Description

When the size of chain data is big, re-play the whole chain is very difficult.

Without the rollback feature, use binary search to find the commit that introduced a bug is impossible.

As an example, in #1573, when I found the first good commit 9a0bdbd, my chain data was updated. So, I could not do test again. I only known the bug is introduced between ad4375b and 9a0bdbd.

Very lucky, there are only 9 commits between ad4375b and 9a0bdbd and 5 of them didn't update codes.

But we won't be so luck forever. And I tried more times than a binary search could use, wasted me a lot of time.

Flouse commented 9 months ago

Since https://github.com/axonweb3/axon/pull/1581 has been implemented, I suggest to postpone this feature.