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

feat: display warning for op-mainnet launch without pre-Bedrock state #11765

Merged

Conversation

stevencartavia
Copy link
Contributor

Resolves #11632

Comment on lines 71 to 78
let is_bedrock_active = OP_MAINNET.is_bedrock_active_at_block(105235063);

if !is_bedrock_active {
warn!(
"Warning: Op-mainnet has been launched without importing the pre-Bedrock state. \
The chain will not progress without this import. \
Please ensure that the pre-Bedrock state is imported to avoid synchronization issues and ensure proper chain operation."
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't quite right, because the chainspec only tracks static activation.

but we need checks this against the local database when the chain is op-mainnet

I believe the best location to do this would be somewhere here

pub fn check_pipeline_consistency(&self) -> ProviderResult<Option<B256>> {

we could introduce a helper function that is something like

fn chain_specific_db_checks

which would only check if the chain id is op-mainnet for example

wdyt @joshieDo

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i think it could work

@@ -5,7 +5,6 @@
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
Copy link
Collaborator

@joshieDo joshieDo Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undo please

chain_spec.fork(OptimismHardfork::Bedrock).active_at_block(105235063);

if db_checks_passed && !is_bedrock_active {
warn!("Op-mainnet has been launched without importing the pre-Bedrock state. The chain won't progress without this.");
Copy link
Collaborator

@joshieDo joshieDo Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just error if we dont pass the check

@mattsse mattsse enabled auto-merge November 14, 2024 10:46
@mattsse mattsse added this pull request to the merge queue Nov 14, 2024
Merged via the queue into paradigmxyz:main with commit 7bd7c37 Nov 14, 2024
40 checks passed
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.

Display warning if op-mainnet is launched without pre-bedrock state
3 participants