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

Interop: Add error case for parent of start of database #12818

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

axelKingsley
Copy link
Contributor

Initial infrastructure is crash-looping due to:

panic: invalid parent block 0x0000000000000000000000000000000000000000000000000000000000000000:0 to combine with BlockSeal(hash:0x4d00fd89121d13acff9a926e0404c25b9447a5068d44144e3187da526f468361, number:7013365, time:1730764932)

This happens because WithParent is being called for L1 blocks during calls like CrossDerivedFromBlockRef. In the underlying PreviousDerivedFrom, if the entry we are getting the parent for is index=0, we assume it is the genesis block and return no error.

However, for things like L1 data, this assumption is broken. In the above panic message, the L1 block at Genesis was assumed to be the L1 genesis, which of course panics when we attempt to add the 0-parent.

There is a chance that this additional error will cause the interactions between Node and Supervisor to fail more, but I assume derivers will be able to recover from this failure and move on to future calls which have valid parents.

I am undecided on the better direction to go longer term with this conflict:

  • We could allow these errors to happen and accept that Nodes will need to swallow the error and survive until later (hopefully just the no-op solution)
  • We could attempt to collect pre-database parents in the Supervisor so that these errors never happen
  • We could make Nodes considerate of the fact that they are requesting a parentage of data which the Supervisor should not have, and make Nodes therefore repair the data or otherwise work around it.

I ordered these options by preference, but mostly I just don't like option-3 and would prefer one of the other two. @protolambda and @tyler-smith for opinions.

@axelKingsley axelKingsley changed the title Add error case for parent of start of database Interop: Add error case for parent of start of database Nov 5, 2024
@protolambda protolambda added this pull request to the merge queue Nov 5, 2024
Merged via the queue into develop with commit 8565b8f Nov 5, 2024
49 checks passed
@protolambda protolambda deleted the interop-fix-l1-noParent branch November 5, 2024 17:38
GrapeBaBa pushed a commit to optimism-java/optimism that referenced this pull request Nov 13, 2024
…imism#12818)

* Add error case for parent of start of database

* fix unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants