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
32 changes: 25 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ optimism = [
"reth-optimism-chainspec",
"reth-optimism-forks",
"reth-optimism-primitives",
"reth-optimism-txpool",
"reth-optimism-rpc",
"reth-optimism-consensus",
"reth-optimism-evm",
"reth-node-builder/op",
"reth-payload-util",
"reth-optimism-cli",
"reth-optimism-rpc",
"rblib-tests-macros?/optimism",
]

Expand Down Expand Up @@ -120,16 +123,17 @@ alloy-origin = { version = "1.0.41", package = "alloy", features = [
"rpc-types-mev",
] }
alloy-evm = "0.23.0"
alloy-json-rpc = "1.0.41"
alloy-serde = "1.0.41"
alloy-json-rpc = "1.0.41"

# Reth dependencies
reth-origin = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", package = "reth" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-db-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", features = [
Expand All @@ -139,8 +143,22 @@ reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", f
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-tracing-otlp = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-network = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-node-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-db-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }

# Revm dependencies
revm-database = "9.0"

# Reth-optimism dependencies (optional)
op-alloy = { version = "0.22.0", features = ["full"], optional = true }
Expand All @@ -149,6 +167,9 @@ reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
Expand All @@ -159,7 +180,7 @@ jsonrpsee-core = { version = "0.26.0", optional = true, features = ["client"] }
nanoid = { version = "0.4", optional = true }
alloy-genesis = { version = "1.0", default-features = false, optional = true }
ctor = { version = "0.5", optional = true }
tracing-subscriber = { version = "0.3", features = [
tracing-subscriber = { version = "0.3.20", features = [
"env-filter",
"json",
], optional = true }
Expand All @@ -170,8 +191,5 @@ tikv-jemallocator = { version = "0.6", optional = true }
[dev-dependencies]
rblib = { path = ".", features = ["test-utils"] }

#[patch.crates-io]
#alloy-primitives = { git = "https://github.com/alloy-rs/core", rev = "8c5713c20e3ed08cf09634ea5cb696d7021002a8" }

[lints]
workspace = true
63 changes: 63 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,16 @@ pub mod test_utils;
pub mod reth {
pub use reth_origin::*;

pub mod chainspec {
pub use reth_chainspec::*;
}

pub mod cli {
pub use {reth_cli::*, reth_origin::cli::*};

pub mod commands {
pub use reth_cli_commands::*;
}
}

pub mod evm {
Expand All @@ -49,6 +57,10 @@ pub mod reth {
pub use reth_errors::*;
}

pub mod metrics {
pub use reth_metrics::*;
}

pub mod payload {
pub use ::reth_origin::payload::*;
pub mod builder {
Expand All @@ -59,13 +71,21 @@ pub mod reth {
};
}

pub mod primitives {
pub use reth_payload_primitives::*;
}

#[cfg(feature = "optimism")]
pub mod util {
pub use reth_payload_util::*;
}
}

pub mod node {
pub mod api {
pub use reth_node_api::*;
}

pub mod builder {
pub use reth_node_builder::*;
}
Expand All @@ -75,6 +95,34 @@ pub mod reth {
}
}

pub mod provider {
pub use reth_provider::*;
}

pub mod rpc_eth_types {
pub use reth_rpc_eth_types::*;
}

pub mod tracing_otlp {
pub use reth_tracing_otlp::*;
}

pub mod db {
pub use reth_db::*;
}

pub mod eth_wire_types {
pub use reth_eth_wire_types::*;
}

pub mod network {
pub use reth_network::*;
}

pub mod node_types {
pub use reth_node_types::*;
}

pub mod ethereum {
pub use reth_ethereum::*;
}
Expand Down Expand Up @@ -103,6 +151,21 @@ pub mod reth {
pub mod primitives {
pub use reth_optimism_primitives::*;
}
pub mod txpool {
pub use reth_optimism_txpool::*;
}
pub mod consensus {
pub use reth_optimism_consensus::*;
}
pub mod evm {
pub use reth_optimism_evm::*;
}
}
}

pub mod revm {
pub mod database {
pub use revm_database::*;
}
}

Expand Down
30 changes: 28 additions & 2 deletions src/orderpool2/prioritized_pool/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@ use {
crate::{
alloy::{
consensus::Transaction,
consensus::transaction::Recovered,
primitives::{Address, B256},
},
orderpool2::{AccountNonce, BundleNonce},
payload::CheckpointExt,
prelude::{Bundle, Checkpoint, ControlFlow, Platform, Step, StepContext},
platform::types::Transaction as PlatformTransaction,
prelude::{
Bundle,
Checkpoint,
ControlFlow,
Optimism,
Platform,
Step,
StepContext,
},
reth,
},
parking_lot::Mutex,
Expand All @@ -36,7 +46,7 @@ where
B: Bundle<P>,
P: Platform,
{
fn new(bundle: B) -> Self {
pub fn new(bundle: B) -> Self {
let txs = bundle.transactions();
let mut nonces = Vec::with_capacity(txs.len());
for tx in txs {
Expand Down Expand Up @@ -74,6 +84,22 @@ where
}
}

impl OrderpoolOrder for Recovered<PlatformTransaction<Optimism>> {
type ID = B256;

fn id(&self) -> Self::ID {
*self.tx_hash()
}

fn nonces(&self) -> Vec<BundleNonce> {
vec![BundleNonce {
address: self.signer(),
nonce: self.nonce(),
optional: false,
}]
}
}

impl<P: Platform> OrderpoolNonceSource for Checkpoint<P> {
type NonceError = reth::errors::ProviderError;

Expand Down
4 changes: 4 additions & 0 deletions src/orderpool2/sim_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,8 @@ where
}
Ok(())
}

pub fn is_ready(&self) -> bool {
!self.ready_orders.is_empty()
}
}
Loading