Interop: Add error case for parent of start of database #12818
Merged
+47
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial infrastructure is crash-looping due to:
This happens because
WithParent
is being called for L1 blocks during calls likeCrossDerivedFromBlockRef
. In the underlyingPreviousDerivedFrom
, if the entry we are getting the parent for isindex=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:
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.