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

[Sequencer] L1 recovery to support pre etrog #1334

Open
hexoscott opened this issue Oct 17, 2024 · 6 comments
Open

[Sequencer] L1 recovery to support pre etrog #1334

hexoscott opened this issue Oct 17, 2024 · 6 comments
Assignees

Comments

@hexoscott
Copy link
Collaborator

At the moment we can only recover networks post etrog. We need to support recovery of networks prior to this such as the zkevm networks.

@Sharonbc01 Sharonbc01 added this to the RC1 (v2.0.0) milestone Oct 18, 2024
@hexoscott hexoscott self-assigned this Oct 21, 2024
@hexoscott
Copy link
Collaborator Author

On checking the code I can see that we do support this already. Looking at the earliest sequence on the L1 for Bali, Cardona, and Mainnet we have code to handle the ABI for those transactions.
image

@hexoscott
Copy link
Collaborator Author

Re-opening. After pulling the L1 data which was successful the node is stuck reporting it can't find a fork ID to start sequencing. Hopefully something small but we need it to consider this as complete

@hexoscott hexoscott reopened this Oct 22, 2024
@hexoscott
Copy link
Collaborator Author

I'm halting my efforts after a few hours on this one yesterday, until I can get some feedback.

I spoke with Carlos about some of the differences in pre-etrog networks i.e. no injected batch, different mechanisms for handling fork upgrades, and after editing some code to work around some etrog+ concerns I managed to process up to block 37 before hitting issues as the next batch is empty.

So far I have come across the following whilst looking at this:

  • pre-etrog has no injected batch
  • pre-etrog has no L1 info tree so any code related to this needs to be worked around / skipped otherwise we have errors
  • pre-etrog can support empty batches
  • pre-etrog handles GER changes in a very different way to post-etrog i.e. putting messages into the datastream at the end of a batch
  • pre-etrog has different fork upgrade mechanisms to post-etrog, mainly because it only supports a single rollup in the rollup manager contract

I'm sure there will be more if we keep digging. But essentially the task to support recovering pre-etrog networks is a task to implement a fully working sequencer for fork 4,5,6 and all of the minor/major differences between them. As no new networks will be launched with these forks (and I doubt anything before fork 9) this seems like a lot of effort to tackle an unlikely disaster scenario, and will of course add plenty of complexity to the sequencer code for something that might never be needed.

I believe that having suitable backups of Bali, Cardona, Mainnet in 3+ separate places would cover us in the event of a disaster, and if something went seriously wrong we can use a legacy node to sync against the L1 up to the etrog fork.

cc: @Sharonbc01 @mandrigin (not sure on Edu's handle but will share this link with him)

@Sharonbc01
Copy link

Thanks @hexoscott for this detailed update it does seem like the effort out weighs the reward. One to discuss.

@krlosMata
Copy link

Current status summary:

  • the feature to synch from L1 from just only cdk-erigon software is a good to have
  • currently, there is a way to fully synchronize from L1:
    • run legacy-node
    • populate data stream
    • run cdk-erigon to synch from the DS until etrog fork

While the above solution fully synchronize from L1 (so we are covered from a full DB lost), the procedure is not to most convenient and it is tedious/complex.
I will keep this issue open to improve that path

@Sharonbc01
Copy link

Thanks @krlosMata I will descope this issue from this milestone based on your feedback thank you

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

No branches or pull requests

3 participants