Skip to content
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
2 changes: 1 addition & 1 deletion .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
46 changes: 23 additions & 23 deletions Cargo.lock

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

23 changes: 12 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"] }

Expand Down Expand Up @@ -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"
Expand All @@ -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" }

18 changes: 15 additions & 3 deletions src/tasks/block/cfg.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down Expand Up @@ -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 => {
Expand Down Expand Up @@ -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),
}
Expand Down Expand Up @@ -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();
}
}