- Turn 1: verify a proof for incremental blocks on a fork chain.
- Get a forked last state from a CKB node.
- All checks for the proof are correct.
- Compare the reorg blocks from forked last state proof and last N blocks in storage.
- If no ancestor blocks was found, send a request to ask proof for the whole forked chain.
- Turn 2: do full sampling on the whole chain.
- All checks for the proof are correct.
- - Compare the reorg blocks from forked last state proof and last N blocks in storage.
- - If no ancestor blocks was found, panic.
+ - Panic.
If the a chain has the flag and it is valid, just panic!
All other checks are redundant.
Update the process when long fork detected.
If the a chain has the flag and it is valid, just panic! All other checks are redundant.
Ref: #125