diff --git a/.gitignore b/.gitignore index bcfc3fe35..ddc787f38 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ /test/ /integration_logs genesis.json -/op-reth # editors .code diff --git a/Cargo.toml b/Cargo.toml index 05ec32d54..71cfc63ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,6 @@ incremental = false [workspace.dependencies] reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } @@ -60,7 +59,6 @@ reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-trie-parallel = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } @@ -71,28 +69,8 @@ reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } - -# reth optimism -reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } -reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" } # compatible with reth v1.4.8 dependencies revm = { version = "24.0.1", features = [ @@ -101,7 +79,6 @@ revm = { version = "24.0.1", features = [ "optional_balance_check", ], default-features = false } revm-inspectors = { version = "0.23.0", default-features = false } -op-revm = { version = "5.0.0", default-features = false } ethereum_ssz_derive = "0.9.0" ethereum_ssz = "0.9.0" @@ -111,43 +88,27 @@ alloy-rlp = "0.3.10" alloy-chains = "0.2.0" alloy-evm = { version = "0.10", default-features = false } alloy-provider = { version = "1.0.9", features = ["ipc", "pubsub", "ws"] } -alloy-pubsub = { version = "1.0.9" } alloy-eips = { version = "1.0.9" } alloy-rpc-types = { version = "1.0.9" } alloy-json-rpc = { version = "1.0.9" } -alloy-transport-http = { version = "1.0.9" } alloy-network = { version = "1.0.9" } alloy-network-primitives = { version = "1.0.9" } -alloy-transport = { version = "1.0.9" } alloy-node-bindings = { version = "1.0.9" } alloy-consensus = { version = "1.0.9", features = ["kzg"] } -alloy-serde = { version = "1.0.9" } alloy-rpc-types-beacon = { version = "1.0.9", features = ["ssz"] } alloy-rpc-types-engine = { version = "1.0.9", features = ["ssz"] } alloy-rpc-types-eth = { version = "1.0.9" } alloy-signer-local = { version = "1.0.9" } -alloy-rpc-client = { version = "1.0.9" } -alloy-genesis = { version = "1.0.9" } alloy-trie = { version = "0.8.1" } -# optimism -alloy-op-evm = { version = "0.5.0", default-features = false } -op-alloy-rpc-types = { version = "0.14.1", default-features = false } -op-alloy-rpc-types-engine = { version = "0.14.1", default-features = false } -op-alloy-rpc-jsonrpsee = { version = "0.14.1", default-features = false } -op-alloy-network = { version = "0.14.1", default-features = false } -op-alloy-consensus = { version = "0.14.1", default-features = false } - async-trait = { version = "0.1.83" } clap = { version = "4.4.3", features = ["derive", "env"] } clap_builder = { version = "4.5.19" } thiserror = { version = "1.0.64" } eyre = { version = "0.6.12" } jsonrpsee = { version = "0.24.4" } -jsonrpsee-types = { version = "0.24.4" } parking_lot = { version = "0.12.3" } tokio = { version = "1.40.0" } -auto_impl = { version = "1.2.0" } reqwest = { version = "0.12.8" } serde = { version = "1.0.210" } serde_json = { version = "1.0.128" } diff --git a/config-optimism-local.toml b/config-optimism-local.toml deleted file mode 100644 index 2986f1f61..000000000 --- a/config-optimism-local.toml +++ /dev/null @@ -1,40 +0,0 @@ -log_json = false -log_level = "info,rbuilder=debug" -redacted_telemetry_server_port = 6071 -redacted_telemetry_server_ip = "0.0.0.0" -full_telemetry_server_port = 6070 -full_telemetry_server_ip = "0.0.0.0" - -chain = "$HOME/grimoire/optimism/.devnet/genesis-l2.json" -reth_datadir = "$HOME/.playground/devnet/data_reth" -relay_secret_key = "5eae315483f028b5cdd5d1090ff0c7618b18737ea9bf3c35047189db22835c48" -coinbase_secret_key = "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" - -cl_node_url = ["http://localhost:3500"] -jsonrpc_server_port = 8645 -jsonrpc_server_ip = "0.0.0.0" -el_node_ipc_path = "/tmp/reth.ipc" -extra_data = "⚡🤖" - -ignore_cancellable_orders = true - -sbundle_mergeable_signers = [] -live_builders = ["mp-ordering"] - -enabled_relays = ["custom"] - -[[relays]] -name = "custom" -url = "http://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@localhost:5555" -priority = 0 -use_ssz_for_submit = false -use_gzip_for_submit = false - -[[builders]] -name = "mgp-ordering" -algo = "ordering-builder" -discard_txs = true -sorting = "mev-gas-price" -failed_order_retries = 1 -drop_failed_orders = true - diff --git a/crates/rbuilder/Cargo.toml b/crates/rbuilder/Cargo.toml index 6b45a4690..0f188d5a9 100644 --- a/crates/rbuilder/Cargo.toml +++ b/crates/rbuilder/Cargo.toml @@ -144,8 +144,6 @@ assert_matches = "1.5.0" criterion = { version = "0.5.1", features = ["html_reports", "async_tokio"] } [features] -# TODO: remove? -optimism = [] redact-sensitive = [] [[bench]] diff --git a/crates/rbuilder/src/live_builder/base_config.rs b/crates/rbuilder/src/live_builder/base_config.rs index 83d8b1860..48c3ef678 100644 --- a/crates/rbuilder/src/live_builder/base_config.rs +++ b/crates/rbuilder/src/live_builder/base_config.rs @@ -721,7 +721,7 @@ mod test { // Setup and initialize a temp reth db (with static files) let tempdir = TempDir::with_prefix_in("rbuilder-", "/tmp").unwrap(); - let data_dir = MaybePlatformPath::::from(tempdir.into_path()); + let data_dir = MaybePlatformPath::::from(tempdir.keep()); let data_dir = data_dir.unwrap_or_chain_default(Chain::mainnet(), DatadirArgs::default()); let db = Arc::new(init_db(data_dir.data_dir(), Default::default()).unwrap()); diff --git a/crates/rbuilder/src/live_builder/mod.rs b/crates/rbuilder/src/live_builder/mod.rs index aa8a3dc82..5649c4610 100644 --- a/crates/rbuilder/src/live_builder/mod.rs +++ b/crates/rbuilder/src/live_builder/mod.rs @@ -70,7 +70,7 @@ pub struct TimingsConfig { } impl TimingsConfig { - /// Classic rbuilder + /// Timings for the Ethereum network. pub fn ethereum() -> Self { Self { slot_proposal_duration: Duration::from_secs(4), @@ -78,15 +78,6 @@ impl TimingsConfig { get_block_header_period: time::Duration::milliseconds(250), } } - - /// Configuration for OP-based chains with fast block times - pub fn optimism() -> Self { - Self { - slot_proposal_duration: Duration::from_secs(0), - block_header_deadline_delta: time::Duration::milliseconds(-25), - get_block_header_period: time::Duration::milliseconds(25), - } - } } /// Trait used to trigger a new block building process in the slot. @@ -160,7 +151,7 @@ where "Builder coinbase address: {:?}", self.coinbase_signer.address ); - let timings = self.timings(); + let timings = TimingsConfig::ethereum(); if let Some(error_storage_path) = self.error_storage_path { spawn_error_storage_writer(error_storage_path, self.global_cancellation.clone()) @@ -373,17 +364,6 @@ where Ok(()) } - - // Currently we only need two timings config, depending on whether rbuilder is being - // used in the optimism context. If further customisation is required in the future - // this should be improved on. - fn timings(&self) -> TimingsConfig { - if cfg!(feature = "optimism") { - TimingsConfig::optimism() - } else { - TimingsConfig::ethereum() - } - } } /// May fail if we wait too much (see [BLOCK_HEADER_DEAD_LINE_DELTA]) diff --git a/scripts/ci/benchmark-in-ci.sh b/scripts/ci/benchmark-in-ci.sh index 27cc9f48d..291ff3b74 100755 --- a/scripts/ci/benchmark-in-ci.sh +++ b/scripts/ci/benchmark-in-ci.sh @@ -50,7 +50,7 @@ function run_benchmark() { if [ "$HEAD_SHA" == "$BASE_SHA" ]; then # Benchmark only current commit, no comparison echo "Running cargo bench ..." - cargo bench --workspace --features optimism + cargo bench --workspace else # Benchmark target commit first, and then benchmark current commit against that baseline echo "Benchmarking ${HEAD_SHA_SHORT} against the target ${BASE_SHA_SHORT} ..." @@ -58,14 +58,14 @@ function run_benchmark() { # Switch to target commit and run benchmarks echo "Switching to $BASE_SHA_SHORT and starting benchmarks ..." git checkout $BASE_SHA - cargo bench --workspace --features optimism + cargo bench --workspace # Switch back to current commit and run benchmarks again echo "Switching back to $HEAD_SHA_SHORT and running benchmarks ..." # Reset to ensure any changes (e.g. to Cargo.lock) are discarded before attempting to checkout. git reset --hard git checkout $HEAD_SHA - cargo bench --workspace --features optimism + cargo bench --workspace fi } diff --git a/scripts/ci/download-op-reth.sh b/scripts/ci/download-op-reth.sh deleted file mode 100755 index 186eb1e52..000000000 --- a/scripts/ci/download-op-reth.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -VERSION=${VERSION:-1.3.12} - -ARCH=$(uname -m) -case $ARCH in - "x86_64") - if [[ "$(uname)" == "Darwin" ]]; then - ARCH_STRING="x86_64-apple-darwin" - else - ARCH_STRING="x86_64-unknown-linux-gnu" - fi - ;; - "arm64" | "aarch64") - if [[ "$(uname)" == "Darwin" ]]; then - ARCH_STRING="aarch64-apple-darwin" - else - ARCH_STRING="aarch64-unknown-linux-gnu" - fi - ;; - *) - echo "Unsupported architecture: $ARCH" - exit 1 - ;; -esac - -FILENAME="op-reth-v${VERSION}-${ARCH_STRING}.tar.gz" -echo "Downloading ${FILENAME}" - -wget -q "https://github.com/paradigmxyz/reth/releases/download/v${VERSION}/${FILENAME}" - -# Extract the tar.gz file -tar -xzf "${FILENAME}" - -# Make the binary executable -chmod +x op-reth - -# Clean up the tar.gz file (optional) -rm "${FILENAME}" diff --git a/zepter.yaml b/zepter.yaml index 5ae4ad130..33a57dfce 100644 --- a/zepter.yaml +++ b/zepter.yaml @@ -12,7 +12,7 @@ workflows: # Check that `A` activates the features of `B`. "propagate-feature", # These are the features to check: - "--features=std,optimism,dev,asm-keccak,jemalloc,jemalloc-prof,tracy-allocator,serde-bincode-compat,serde,test-utils,arbitrary,bench,redact-sensitive", + "--features=std,dev,asm-keccak,jemalloc,jemalloc-prof,tracy-allocator,serde-bincode-compat,serde,test-utils,arbitrary,bench,redact-sensitive", # Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually. "--left-side-feature-missing=ignore", # Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.