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

refactor: Update messages boxes to account for L2 reorgs #7592

Closed
Tracked by #7614
LHerskind opened this issue Jul 24, 2024 · 1 comment · Fixed by #7926
Closed
Tracked by #7614

refactor: Update messages boxes to account for L2 reorgs #7592

LHerskind opened this issue Jul 24, 2024 · 1 comment · Fixed by #7926
Assignees

Comments

@LHerskind
Copy link
Contributor

LHerskind commented Jul 24, 2024

To accommodate for L2 chain reorgs (the pending chain reorging) we need to update the inbox and outbox.

Namely, instead of the inbox keeping track of the tree to consume, we can just have the rollup pass along the block number as pending chain is expanded. This means that when we extend the pending chain we will be "finishing" the trees to include. If there is a reorg, we simply go back and read these, but we don't need to overwrite them or anything. This makes L1 -> L2 messages fairly easy to handle.

For L2 -> L1, the approach depends on whether we have sequential proofs or not.

  • Sequential proofs: Just move the insertion to time of proof verification.
  • Non-sequential proofs: Store data for insertion as part of BlockLog such that it can be inserted as part of _progressState.

Another approach is that we keep inserting in both cases, but have that the outbox itself take a look back at the rollup to figure out if the proven chain is further than what is being consumed.

@just-mitch just-mitch changed the title Update messages boxes to account for L2 reorgs refactor: Update messages boxes to account for L2 reorgs Jul 25, 2024
@LHerskind
Copy link
Contributor Author

Easier to deal with if handled after #7594 and together with #7616 since we can then more easily deal test and actually do a reorg there 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant