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

Str-711: bump RETH (and deps) to the latest version. #542

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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,527 changes: 1,406 additions & 1,121 deletions Cargo.lock

Large diffs are not rendered by default.

101 changes: 53 additions & 48 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,64 +119,69 @@ strata-zkvm = { path = "crates/zkvm/zkvm" }

# IMPORTANT: ensure alloy-* and revm packages are of the same version as inside reth dependency
# reth dependencies:
alloy-consensus = { version = "0.4.2", default-features = false }
alloy-eips = { version = "0.4.2", default-features = false }
alloy-genesis = { version = "0.4.2", default-features = false }
alloy-network = { version = "0.4.2", default-features = false }
alloy-primitives = { version = "0.8.7", default-features = false }
alloy-rlp = "0.3.4"
alloy-rlp-derive = "0.3.4"
alloy-rpc-types = { version = "0.4.2", features = [
alloy-consensus = { version = "0.7.3", default-features = false }
alloy-eips = { version = "0.7.3", default-features = false }
alloy-genesis = { version = "0.7.3", default-features = false }
alloy-network = { version = "0.7.3", default-features = false }
alloy-primitives = { version = "0.8.11", default-features = false }
alloy-rlp = { version = "0.3.10", default-features = false }
alloy-rlp-derive = "0.3.10"
alloy-rpc-types = { version = "0.7.3", features = [
"eth",
], default-features = false }
alloy-rpc-types-eth = { version = "0.4.2", default-features = false, features = [
alloy-rpc-types-eth = { version = "0.7.3", default-features = false, features = [
"serde",
] }
alloy-serde = { version = "0.4.2", default-features = false }
alloy-sol-types = "0.8.0"
revm = { version = "14.0.3", features = ["std"], default-features = false }
revm-primitives = { version = "10.0.0", features = [
alloy-serde = { version = "0.7.3", default-features = false }
alloy-sol-types = "0.8.11"
alloy-trie = { version = "0.7", default-features = false }
revm = { version = "18.0.0", features = ["std"], default-features = false }
revm-primitives = { version = "14.0.0", features = [
"std",
"serde",
], default-features = false }

# reth itself:
reth = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-cli = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-db = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-errors = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-ethereum-forks = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-evm = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-exex = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-ipc = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-network-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0", default-features = false, features = [
reth = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-cli = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-db = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-errors = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-ethereum-forks = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-evm = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-exex = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-ipc = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-network-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-payload-validator = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3", default-features = false, features = [
"std",
"serde-bincode-compat",
] }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0", default-features = false }
reth-provider = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-revm = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-rpc = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0", default-features = false }
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-rpc-types-compat = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-tasks = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-trie = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-trie-common = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.0" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3", default-features = false }
reth-provider = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-revm = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-rpc = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3", default-features = false }
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-rpc-types-compat = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-tasks = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-trie = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-trie-common = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth.git", rev = "v1.1.3" }

anyhow = "1.0.86"
arbitrary = { version = "1.3.2", features = ["derive"] }
Expand Down
9 changes: 5 additions & 4 deletions bin/strata-cli/src/signet/persist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ use bdk_wallet::{

use crate::signet::SignetWallet;

/// Wrapper around the built-in rusqlite db that allows
/// [`PersistedWallet`](crate::signet::PersistedWallet) to be shared across multiple threads by
/// lazily initializing per core connections to the sqlite db and keeping them in local thread
/// storage instead of sharing the connection across cores.
/// Wrapper around the built-in rusqlite db.
///
/// It allows [`PersistedWallet`](crate::signet::PersistedWallet) to be shared across multiple
/// threads by lazily initializing per core connections to the sqlite db and keeping them in
/// local thread storage instead of sharing the connection across cores.
///
/// WARNING: [`set_data_dir`] **MUST** be called and set before using [`Persister`].
#[derive(Debug)]
Expand Down
18 changes: 8 additions & 10 deletions bin/strata-reth/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mod db;
mod rpc;

use std::{fs, future::Future, path::PathBuf, sync::Arc};

Expand All @@ -15,8 +14,8 @@
use reth_cli_commands::node::NodeCommand;
use strata_reth_db::rocksdb::WitnessDB;
use strata_reth_exex::ProverWitnessGenerator;
use strata_reth_node::StrataEthereumNode;
use strata_reth_rpc::{SequencerClient, StrataRPC, StrataRpcApiServer};
use strata_reth_node::{args::StrataNodeArgs, StrataEthereumNode};
use strata_reth_rpc::{StrataRPC, StrataRpcApiServer};
use tracing::info;

const DEFAULT_CHAIN_SPEC: &str = include_str!("../res/devnet-chain.json");
Expand All @@ -39,9 +38,13 @@

if let Err(err) = run(command, |builder, ext| async move {
let datadir = builder.config().datadir().data_dir().to_path_buf();
let mut node_builder = builder.node(StrataEthereumNode::default());

let sequencer_http = ext.sequencer_http.clone();
let node_args = StrataNodeArgs {
sequencer_http: ext.sequencer_http.clone(),
};

let mut node_builder = builder.node(StrataEthereumNode::new(node_args));

Check warning on line 47 in bin/strata-reth/src/main.rs

View check run for this annotation

Codecov / codecov/patch

bin/strata-reth/src/main.rs#L42-L47

Added lines #L42 - L47 were not covered by tests
let mut extend_rpc = None;

// Install Prover Input ExEx, persist to DB, and add RPC for querying block witness.
Expand All @@ -63,11 +66,6 @@
ctx.modules.merge_configured(rpc.into_rpc())?;
}

if let Some(sequencer_http) = sequencer_http {
ctx.registry
.eth_api()
.set_sequencer_client(SequencerClient::new(sequencer_http))?;
}
Ok(())
});

Expand Down
125 changes: 0 additions & 125 deletions bin/strata-reth/src/rpc.rs

This file was deleted.

10 changes: 6 additions & 4 deletions crates/chaintsn/src/transition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ use crate::{
slot_rng::{self, SlotRng},
};

/// Processes a block, making writes into the provided state cache that will
/// then be written to disk. This does not check the block's credentials, it
/// plays out all the updates a block makes to the chain, but it will abort if
/// there are any semantic issues that don't make sense.
/// Processes a block, making writes into the provided state cache.
///
/// The cache will eventually be written to disk. This does not check the
/// block's credentials, it plays out all the updates a block makes to the
/// chain, but it will abort if there are any semantic issues that
/// don't make sense.
///
/// This operates on a state cache that's expected to be empty, panics
/// otherwise. Does not check the `state_root` in the header for correctness,
Expand Down
4 changes: 3 additions & 1 deletion crates/consensus-logic/src/csm/state_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ impl<D: Database> StateTracker<D> {
}
}

/// Reconstructs the [`ClientState`] by fetching the last available checkpoint
/// Reconstructs the [`ClientState`].
///
/// It does so by fetching the last available checkpoint
/// and replaying all relevant
/// [`ClientStateWrite`](strata_state::operation::ClientStateWrite)
/// from that checkpoint up to the specified index `idx`,
Expand Down
5 changes: 3 additions & 2 deletions crates/consensus-logic/src/duty/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,9 @@ pub enum IdentityKey {
Sequencer(Buf32),
}

/// Contains both the identity key used for signing and the identity used for
/// verifying signatures. This is really just a stub that we should replace
/// Container for signing identity key and verification identity key.
///
/// This is really just a stub that we should replace
/// with real cryptographic signatures and putting keys in the rollup params.
#[derive(Clone, Debug)]
pub struct IdentityData {
Expand Down
8 changes: 5 additions & 3 deletions crates/db/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ use std::sync::Arc;

use super::traits::*;

/// Shim database type that assumes that all the database impls are wrapped in
/// `Arc`s and that the provider and stores are actually the same types. We
/// might actually use this in practice, it's just for testing.
/// Shim database type to wrap various database impls.
///
/// It assumes that all the database impls are wrapped in `Arc`s and that
/// the provider and stores are actually the same types. We might actually
/// use this in practice, it's just for testing.
pub struct CommonDatabase<L1DB, L2DB, SyncEventDB, ClientStateDB, ChainstateDB, CheckpointDB>
where
L1DB: L1Database + Sync + Send + 'static,
Expand Down
14 changes: 8 additions & 6 deletions crates/db/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,14 @@ pub enum BlockStatus {
Invalid,
}

/// Db trait for the (consensus layer) chain state database. For now we only
/// have a modestly sized "toplevel" chain state and no "large" state like the
/// EL does. This trait is designed to permit a change to storing larger state
/// like that in the future without *too* much extra effort. We decide new
/// states by providing the database with a generic "write batch" and offloading
/// the effort of deciding how to compute that write batch to the database impl.
/// Db trait for the (consensus layer) chain state database.
///
/// For now we only have a modestly sized "toplevel" chain state and no "large"
/// state like the EL does. This trait is designed to permit a change to
/// storing larger state like that in the future without *too* much extra effort.
/// We decide new states by providing the database with a generic "write batch"
/// and offloading the effort of deciding how to compute that write batch to the
/// database impl.
pub trait ChainstateDatabase {
/// Writes the genesis chainstate at index 0.
fn write_genesis_state(&self, toplevel: &Chainstate) -> DbResult<()>;
Expand Down
Loading
Loading