Skip to content

Commit

Permalink
feat: propagate scroll chain spec in execution
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Edison <[email protected]>
  • Loading branch information
greged93 committed Dec 9, 2024
1 parent d41b561 commit ca0580f
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 116 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
partition: 2
total_partitions: 2
- type: scroll
args: -p reth-scroll-state-commitment --locked --features "scroll"
args: --locked --features "scroll" --workspace --exclude ef-tests -E 'package(reth-scroll-*)'
partition: 1
total_partitions: 1
- type: book
Expand Down
55 changes: 29 additions & 26 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ reth-rpc-eth-types = { path = "crates/rpc/rpc-eth-types", default-features = fal
reth-rpc-layer = { path = "crates/rpc/rpc-layer" }
reth-rpc-server-types = { path = "crates/rpc/rpc-server-types" }
reth-rpc-types-compat = { path = "crates/rpc/rpc-types-compat" }
reth-scroll-chainspec = { path = "crates/scroll/chainspec" }
reth-scroll-consensus = { path = "crates/scroll/consensus" }
reth-scroll-evm = { path = "crates/scroll/evm" }
reth-scroll-execution = { path = "crates/scroll/execution" }
Expand Down Expand Up @@ -669,10 +670,9 @@ tracy-client = "0.17.3"
#op-alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/op-alloy", rev = "6a042e7681b1" }

[patch.crates-io]
revm = { git = "https://github.com/scroll-tech/revm.git", branch = "scroll-evm-executor/v50" }
revm-primitives = { git = "https://github.com/scroll-tech/revm.git", branch = "scroll-evm-executor/v50" }
revm = { git = "https://github.com/scroll-tech/revm.git", branch = "scroll-evm-executor/reth/v50" }
revm-primitives = { git = "https://github.com/scroll-tech/revm.git", branch = "scroll-evm-executor/reth/v50" }

ff = { git = "https://github.com/scroll-tech/ff", branch = "feat/sp1" }

alloy-eip2930 = { git = "https://github.com/scroll-tech/alloy-eips", branch = "v0.4.2" }
alloy-eip7702 = { git = "https://github.com/scroll-tech/alloy-eips", branch = "v0.4.2" }
alloy-eip2930 = { git = "https://github.com/scroll-tech/alloy-eips", branch = "v0.3.2" }
27 changes: 26 additions & 1 deletion crates/scroll/chainspec/src/genesis.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Scroll types for genesis data.
use alloy_primitives::Address;
use alloy_primitives::{address, Address};
use alloy_serde::OtherFields;
use serde::de::Error;

Expand Down Expand Up @@ -115,6 +115,31 @@ impl ScrollChainConfig {
pub fn extract_from(others: &OtherFields) -> Option<Self> {
Self::try_from(others).ok()
}

/// Returns the [`ScrollChainConfig`] for Scroll Mainnet.
pub const fn mainnet() -> Self {
Self {
fee_vault_address: Some(address!("5300000000000000000000000000000000000005")),
l1_config: L1Config {
l1_chain_id: 1,
l1_message_queue_address: address!("0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B"),
scroll_chain_address: address!("a13BAF47339d63B743e7Da8741db5456DAc1E556"),
num_l1_messages_per_block: 10,
},
}
}
/// Returns the [`ScrollChainConfig`] for Scroll Sepolia.
pub const fn sepolia() -> Self {
Self {
fee_vault_address: Some(address!("5300000000000000000000000000000000000005")),
l1_config: L1Config {
l1_chain_id: 11155111,
l1_message_queue_address: address!("F0B2293F5D834eAe920c6974D50957A1732de763"),
scroll_chain_address: address!("2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0"),
num_l1_messages_per_block: 10,
},
}
}
}

impl TryFrom<&OtherFields> for ScrollChainConfig {
Expand Down
2 changes: 1 addition & 1 deletion crates/scroll/chainspec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mod dev;
pub use dev::SCROLL_DEV;

mod genesis;
pub use genesis::ScrollChainInfo;
pub use genesis::{ScrollChainConfig, ScrollChainInfo};

mod scroll;
pub use scroll::SCROLL_MAINNET;
Expand Down
4 changes: 4 additions & 0 deletions crates/scroll/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ reth-revm.workspace = true
# revm
revm = { workspace = true, features = ["optional_no_base_fee"] }

# scroll
reth-scroll-chainspec.workspace = true
reth-scroll-forks.workspace = true

# alloy
alloy-consensus.workspace = true
alloy-eips.workspace = true
Expand Down
Loading

0 comments on commit ca0580f

Please sign in to comment.