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

Support snap sync for OP chains #105

Merged
merged 3 commits into from
Jul 25, 2023

Conversation

ImTei
Copy link
Contributor

@ImTei ImTei commented Jul 10, 2023

Description

Hi! This is Tei from Test in Prod.

This PR is a small fix for Geth’s snap sync for op chains.

  • Geth reads account bytecodes with prefixed keys during the snap-sync. However, the bedrock genesis DB saves bytecodes with the legacy key without prefixes. This PR adds a fallback logic for the legacy keys to serve bytecodes for snap sync.
  • Geth starts snap sync only if the current chain head is at the genesis block. This PR allows snap sync from the bedrock genesis block.

Tests

This fix was tested manually. I think it can be tested automatically in Hive.

Additional context

A new feature to trigger snap sync of op-geth has been implemented in op-node.

@protolambda protolambda merged commit 7d958e9 into ethereum-optimism:optimism Jul 25, 2023
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