mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: rm optimism feature from reth-provider (#14035)
This commit is contained in:
@ -9,11 +9,13 @@ use crate::{
|
||||
};
|
||||
use alloy_consensus::{transaction::TransactionMeta, Header};
|
||||
use alloy_eips::{eip2718::Encodable2718, eip4895::Withdrawals, BlockHashOrNumber};
|
||||
use alloy_primitives::{keccak256, Address, BlockHash, BlockNumber, TxHash, TxNumber, B256, U256};
|
||||
use alloy_primitives::{
|
||||
b256, keccak256, Address, BlockHash, BlockNumber, TxHash, TxNumber, B256, U256,
|
||||
};
|
||||
use dashmap::DashMap;
|
||||
use notify::{RecommendedWatcher, RecursiveMode, Watcher};
|
||||
use parking_lot::RwLock;
|
||||
use reth_chainspec::{ChainInfo, ChainSpecProvider};
|
||||
use reth_chainspec::{ChainInfo, ChainSpecProvider, EthChainSpec};
|
||||
use reth_db::{
|
||||
lockfile::StorageLock,
|
||||
static_file::{
|
||||
@ -655,17 +657,18 @@ impl<N: NodePrimitives> StaticFileProvider<N> {
|
||||
//
|
||||
// If we detect an OVM import was done (block #1 <https://optimistic.etherscan.io/block/1>), skip it.
|
||||
// More on [#11099](https://github.com/paradigmxyz/reth/pull/11099).
|
||||
#[cfg(feature = "optimism")]
|
||||
if reth_chainspec::EthChainSpec::chain(&provider.chain_spec()) ==
|
||||
reth_chainspec::Chain::optimism_mainnet() &&
|
||||
provider
|
||||
.block_number(reth_optimism_primitives::bedrock::OVM_HEADER_1_HASH)?
|
||||
.is_some()
|
||||
if provider.chain_spec().is_optimism() &&
|
||||
reth_chainspec::Chain::optimism_mainnet() == provider.chain_spec().chain_id()
|
||||
{
|
||||
info!(target: "reth::cli",
|
||||
"Skipping storage verification for OP mainnet, expected inconsistency in OVM chain"
|
||||
);
|
||||
return Ok(None)
|
||||
// check whether we have the first OVM block: <https://optimistic.etherscan.io/block/0xbee7192e575af30420cae0c7776304ac196077ee72b048970549e4f08e875453>
|
||||
const OVM_HEADER_1_HASH: B256 =
|
||||
b256!("bee7192e575af30420cae0c7776304ac196077ee72b048970549e4f08e875453");
|
||||
if provider.block_number(OVM_HEADER_1_HASH)?.is_some() {
|
||||
info!(target: "reth::cli",
|
||||
"Skipping storage verification for OP mainnet, expected inconsistency in OVM chain"
|
||||
);
|
||||
return Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
info!(target: "reth::cli", "Verifying storage consistency.");
|
||||
|
||||
Reference in New Issue
Block a user