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

chore(chainspec): move op stack chain specs to reth-optimism-chainspec #10485

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ members = [
"crates/node/core/",
"crates/node/events/",
"crates/node/metrics",
"crates/optimism/chainspec",
"crates/optimism/cli",
"crates/optimism/consensus",
"crates/optimism/evm/",
Expand Down Expand Up @@ -339,6 +340,7 @@ reth-node-ethereum = { path = "crates/ethereum/node" }
reth-node-events = { path = "crates/node/events" }
reth-node-metrics = { path = "crates/node/metrics" }
reth-node-optimism = { path = "crates/optimism/node" }
reth-optimism-chainspec = { path = "crates/optimism/chainspec" }
reth-optimism-cli = { path = "crates/optimism/cli" }
reth-optimism-consensus = { path = "crates/optimism/consensus" }
reth-optimism-payload-builder = { path = "crates/optimism/payload" }
Expand Down
2 changes: 1 addition & 1 deletion crates/chainspec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ alloy-trie.workspace = true
# op
op-alloy-rpc-types = { workspace = true, optional = true }


# misc
auto_impl.workspace = true
once_cell.workspace = true
Expand Down Expand Up @@ -56,5 +55,6 @@ std = []
arbitrary = [
"alloy-chains/arbitrary"
]
test-utils = []


8 changes: 0 additions & 8 deletions crates/chainspec/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,3 @@ pub(crate) const MAINNET_DEPOSIT_CONTRACT: DepositContract = DepositContract::ne
11052984,
b256!("649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5"),
);

/// Max gas limit on Base Sepolia: <https://sepolia.basescan.org/block/12506483>
#[cfg(feature = "optimism")]
pub(crate) const BASE_SEPOLIA_MAX_GAS_LIMIT: u64 = 45_000_000;

/// Max gas limit on Base: <https://basescan.org/block/17208876>
#[cfg(feature = "optimism")]
pub(crate) const BASE_MAINNET_MAX_GAS_LIMIT: u64 = 105_000_000;
32 changes: 14 additions & 18 deletions crates/chainspec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,31 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(feature = "std"), no_std)]

pub use alloy_chains::{Chain, ChainKind, NamedChain};
pub use info::ChainInfo;
pub use spec::{
BaseFeeParams, BaseFeeParamsKind, ChainSpec, ChainSpecBuilder, ChainSpecProvider,
DepositContract, ForkBaseFeeParams, DEV, HOLESKY, MAINNET, SEPOLIA,
};
#[cfg(feature = "optimism")]
pub use spec::{BASE_MAINNET, BASE_SEPOLIA, OP_MAINNET, OP_SEPOLIA};

#[cfg(not(feature = "std"))]
extern crate alloc;

// /// The config info module namely spec id.
// pub mod config;
/// Chain specific constants
pub(crate) mod constants;

mod api;
/// The chain info module.
mod info;

/// The chain spec module.
mod spec;

mod api;
pub use api::EthChainSpec;

/// Chain specific constants
pub(crate) mod constants;

pub use alloy_chains::{Chain, ChainKind, NamedChain};
/// Re-export for convenience
pub use reth_ethereum_forks::*;

pub use api::EthChainSpec;
pub use info::ChainInfo;
#[cfg(feature = "test-utils")]
pub use spec::test_fork_ids;
pub use spec::{
BaseFeeParams, BaseFeeParamsKind, ChainSpec, ChainSpecBuilder, ChainSpecProvider,
DepositContract, ForkBaseFeeParams, DEV, HOLESKY, MAINNET, SEPOLIA,
};

#[cfg(test)]
mod tests {
use super::*;
Expand Down
Loading
Loading