Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got "header to verify not found" error if the chain is unwinded and replayed from earlier blocks #39

Closed
yarkinwho opened this issue Jul 19, 2023 · 1 comment

Comments

@yarkinwho
Copy link
Contributor

Will be triggered if when we are trying to dealing with potential forks when reconnecting to SHiP.

The logic behind the issue is:

1 Unwinding will only reset canonical header, but the cache will not be touched.

2 ExecutionEngine::insert_block()
Should
a update cache
b save block in db
c update canonical head
but it will skip them if the block is in cache

3 ExecutionEngine::verify_chain() will try to check if the newly inserted block is in canonical branch.
But since canonical head is not updated in step 2, it will report the "header to verify not found"

4 Fortunately, the block is indeed in db (because unwinding process will not remove them), so if a new block with unseen hash comes, the forward will be triggered correctly and everything returns to normal.

We needs to figure out the proper way to fix this issue.

Option A: remove block from cache during unwinding
Option B: do not check cache when inserting
Option C: Tolerate the error and change the wording. (Maybe also some extra checks to make sure we are indeed in this scenario)

@yarkinwho
Copy link
Contributor Author

After some discussion, we determined that the issue is caused by we are calling those functions in a ugly manner.

We should fix this issue in eosnetworkfoundation/eos-evm-node#3 instead of here.

We do not need any fix in this repo.

Mark this issue as closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant