diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index d50cf2ca..7e20c6f2 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -2,7 +2,7 @@ ## Crate Summary -Single-crate Rust application (not a workspace) that builds Signet rollup blocks. Actor-based async task system: watches host/rollup chains, ingests transactions and bundles, simulates them against rollup state, then submits valid blocks to Ethereum as EIP-4844 blob transactions via Flashbots. Built on alloy, trevm, tokio, and the `signet-*` SDK crates. Binary: `zenith-builder-example`. Minimum Rust 1.88, Edition 2024. +Single-crate Rust application (not a workspace) that builds Signet rollup blocks. Actor-based async task system: watches host/rollup chains, ingests transactions and bundles, simulates them against rollup state, then submits valid blocks to Ethereum as EIP-4844 blob transactions via Flashbots. Built on alloy, trevm, tokio, and the `signet-*` SDK crates. Binary: `zenith-builder-example`. Minimum Rust 1.92, Edition 2024. ## Build Commands diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 1da3ef16..c36b129a 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -9,5 +9,5 @@ jobs: rust-base: uses: init4tech/actions/.github/workflows/rust-base.yml@main with: - install-foundry: true + install-foundry: false test-all-features: false diff --git a/Cargo.lock b/Cargo.lock index 217e298e..189572f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1963,7 +1963,7 @@ dependencies = [ [[package]] name = "builder" -version = "1.2.0" +version = "2.0.0" dependencies = [ "alloy", "alloy-chains", @@ -3553,9 +3553,9 @@ dependencies = [ [[package]] name = "init4-bin-base" -version = "0.21.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "750f93023d2b79b1e26164e495a13510c04adf39220a76161534b1f2ebfefb47" +checksum = "5ab5107dc68cc10d1cc74abe47e5490df2a4d2ec0db8f3b25f13acef2a6b1a16" dependencies = [ "alloy", "async-trait", @@ -5954,9 +5954,9 @@ dependencies = [ [[package]] name = "signet-bundle" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bafc9f47f2ad9e1dccf66f3a6bd8f71bf8ff60c8ea8dd1acfa2c1075af403fa" +checksum = "3dce158c5f71b2debf53edf20ef792b472aeef743a09a2a725cb6747343eec35" dependencies = [ "alloy", "serde", @@ -5970,9 +5970,9 @@ dependencies = [ [[package]] name = "signet-constants" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0cc668a4c95c16a6400b669224ffda7dd2ede0a35a26621152f40ae4eaa7e5" +checksum = "c0d77fc64cea008e81eb4444227bf3de17cc6ed5eb391f84dc8cbf90673abe88" dependencies = [ "alloy", "serde", @@ -5982,9 +5982,9 @@ dependencies = [ [[package]] name = "signet-evm" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00af2bd72925c5908ee9c46b0eea14469995e14d195bd4ebebb6d72d0020b6cc" +checksum = "09692691cefd2ed41e831c31b07b92b0b948d492c489754629dd0c016532375f" dependencies = [ "alloy", "bitflags", @@ -5999,9 +5999,9 @@ dependencies = [ [[package]] name = "signet-extract" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1297a8e52d12bab8482b84d3e0dfccf7829935f25d4f197c51f91fbf2d6f7d" +checksum = "c0887b4cb48ecb0228675a0054f6e3dc69ac238c5a03953530e4301991abb6d1" dependencies = [ "alloy", "signet-types", @@ -6011,9 +6011,9 @@ dependencies = [ [[package]] name = "signet-genesis" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad55ffbe0c9553d251802ac98e266b28e93bf5a0052aa5e7a58e79c59241e841" +checksum = "21257ac398c6682f0055c4ee884ee84be654ff85c3a2a4c4b85081ac641806eb" dependencies = [ "alloy", "init4-bin-base", @@ -6026,9 +6026,9 @@ dependencies = [ [[package]] name = "signet-journal" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "790304d2a99fd4e8baef20a452c52e835a790173cd02f18ba5bb2674cb1f01f2" +checksum = "affbb6e3ee8cdd94eca7e54148d6ce13d0b42de0eeca92cd6cafee3e7a4ced77" dependencies = [ "alloy", "futures-util", @@ -6038,9 +6038,9 @@ dependencies = [ [[package]] name = "signet-sim" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a159ddefa0d6aeb596805abb6b1308fc76c9aba72518ab93581a0d095226a5a4" +checksum = "d2dee2fefdcb8bd863335102b77ec982605e3303e095c92dcd44fac68d893760" dependencies = [ "alloy", "lru", @@ -6057,9 +6057,9 @@ dependencies = [ [[package]] name = "signet-tx-cache" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cede3766494e2958687c3daba14d02fb84f35ff72e60aa22c1c9187e5e161d" +checksum = "41d56cca1146acae435adf991323e81fa0704b3e39ef830ab249354558cb9661" dependencies = [ "alloy", "eventsource-stream", @@ -6078,9 +6078,9 @@ dependencies = [ [[package]] name = "signet-types" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ab5ab70ee9fae53178c8ecf52e768226c93842b2c9826c773b0aeceaa618d3" +checksum = "06c7324022e5a0958717d682f17b9c54748ce2d936134ba5a1457bfcbe4568ef" dependencies = [ "alloy", "chrono", @@ -6092,9 +6092,9 @@ dependencies = [ [[package]] name = "signet-zenith" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dbe24b7cabf762735fad690d913886ebf3ddcf679f3d680be08e582825ca6bc" +checksum = "606a73c8975c90bdc33ca8180992559790912207525c3872760cbc9b93f9d3cb" dependencies = [ "alloy", "alloy-core", diff --git a/Cargo.toml b/Cargo.toml index 3d47ad4d..b11bdf58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "builder" -version = "1.2.0" +version = "2.0.0" description = "signet builder example" edition = "2024" -rust-version = "1.88" +rust-version = "1.92" authors = ["init4"] license = "Apache-2.0 OR MIT" homepage = "https://github.com/init4tech/builder" @@ -21,15 +21,15 @@ name = "zenith-builder-example" path = "bin/builder.rs" [dependencies] -init4-bin-base = { version = "0.21.0", features = ["perms", "aws", "pylon", "sse"] } +init4-bin-base = { version = "0.23.1", features = ["perms", "aws", "pylon", "sse"] } -signet-constants = { version = "0.18.0" } -signet-evm = { version = "0.18.0" } -signet-sim = { version = "0.18.0" } -signet-tx-cache = { version = "0.18.0" } -signet-types = { version = "0.18.0" } -signet-zenith = { version = "0.18.0" } -signet-genesis = { version = "0.18.0" } +signet-constants = "0.19.0" +signet-evm = "0.19.0" +signet-sim = "0.19.0" +signet-tx-cache = "0.19.0" +signet-types = "0.19.0" +signet-zenith = "0.19.0" +signet-genesis = "0.19.0" trevm = { version = "0.34.0", features = ["concurrent-db", "test-utils", "asyncdb"] } @@ -68,7 +68,7 @@ alloy-hardforks = "0.4.0" alloy-chains = "0.2" criterion = { version = "0.8.2", features = ["async_tokio"] } metrics-util = "0.20" -signet-bundle = "0.18.0" +signet-bundle = "0.19.0" [[bench]] name = "sim" @@ -88,3 +88,4 @@ required-features = ["test-utils"] # signet-tx-cache = { path = "../signet-sdk/crates/tx-cache" } # signet-bundle = { path = "../signet-sdk/crates/bundle" } # init4-bin-base = { path = "../bin-base" } + diff --git a/src/tasks/block/cfg.rs b/src/tasks/block/cfg.rs index ac884631..bc0ffee1 100644 --- a/src/tasks/block/cfg.rs +++ b/src/tasks/block/cfg.rs @@ -1,10 +1,11 @@ //! This file implements the [`trevm::Cfg`] and [`trevm::Block`] traits for Signet and host networks. use alloy::eips::eip7840::BlobParams; use reth_chainspec::{ChainSpec, EthChainSpec}; -use signet_constants::{mainnet, parmigiana}; +use signet_constants::{gouda, mainnet, parmigiana}; use signet_evm::EthereumHardfork; use signet_genesis::{ - MAINNET_GENESIS, MAINNET_HOST_GENESIS, PARMIGIANA_GENESIS, PARMIGIANA_HOST_GENESIS, + GOUDA_GENESIS, MAINNET_GENESIS, MAINNET_HOST_GENESIS, PARMIGIANA_GENESIS, + PARMIGIANA_HOST_GENESIS, }; use std::sync::OnceLock; use trevm::revm::{ @@ -44,7 +45,7 @@ impl SignetCfgEnv { /// Returns a reference to the [`ChainSpec`] for the configured chain. fn chainspec(&self) -> &ChainSpec { match self.chain_id { - parmigiana::RU_CHAIN_ID | mainnet::RU_CHAIN_ID => { + parmigiana::RU_CHAIN_ID | gouda::RU_CHAIN_ID | mainnet::RU_CHAIN_ID => { RU_CHAINSPEC.get_or_init(|| initialize_ru_chainspec(self.chain_id)) } parmigiana::HOST_CHAIN_ID | mainnet::HOST_CHAIN_ID => { @@ -82,6 +83,7 @@ impl trevm::Cfg for SignetCfgEnv { fn initialize_ru_chainspec(chain_id: u64) -> ChainSpec { match chain_id { parmigiana::RU_CHAIN_ID => ChainSpec::from_genesis(PARMIGIANA_GENESIS.to_owned()), + gouda::RU_CHAIN_ID => ChainSpec::from_genesis(GOUDA_GENESIS.to_owned()), mainnet::RU_CHAIN_ID => ChainSpec::from_genesis(MAINNET_GENESIS.to_owned()), _ => unimplemented!("Unknown rollup chain ID: {}", chain_id), } @@ -109,4 +111,14 @@ mod tests { let cfg = SignetCfgEnv::new(NamedChain::Mainnet as u64, 0, MAINNET_OSAKA_TIMESTAMP); assert_eq!(cfg.spec_id(), SpecId::OSAKA); } + + #[test] + fn gouda_cfg_env_does_not_panic() { + // Regression: gouda rollup chain id 792669 was missing from the chainspec + // match arm, causing `unimplemented!("Unknown chain ID: 792669")` at + // simulator startup. Confirm a SignetCfgEnv built with the gouda rollup + // chain id resolves to a real SpecId. + let cfg = SignetCfgEnv::new(gouda::RU_CHAIN_ID, 0, MAINNET_OSAKA_TIMESTAMP); + let _ = cfg.spec_id(); + } }