Skip to content

Commit ce30551

Browse files
committed
Add is_ready to simtree
add orderpool impl for Recovered make new in BundleWithNonces public Add rand dep Fix clippy Add more deps reexports add jovian extra data chore: reth 1.9.3 fix: set minBaseFee in OpPayloadAttribute fix: BlockHash fmt bump reth
1 parent a0f9d95 commit ce30551

File tree

4 files changed

+114
-2
lines changed

4 files changed

+114
-2
lines changed

Cargo.toml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ optimism = [
6969
"reth-optimism-chainspec",
7070
"reth-optimism-forks",
7171
"reth-optimism-primitives",
72+
"reth-optimism-txpool",
73+
"reth-optimism-rpc",
74+
"reth-optimism-consensus",
75+
"reth-optimism-evm",
7276
"reth-node-builder/op",
7377
"reth-payload-util",
7478
"reth-optimism-cli",
@@ -125,7 +129,9 @@ reth-origin = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", pac
125129
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
126130
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
127131
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
132+
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
128133
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
134+
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
129135
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
130136
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
131137
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", features = [
@@ -134,8 +140,21 @@ reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", f
134140
] }
135141
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
136142
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
143+
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
137144
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
145+
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
146+
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
147+
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
148+
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
138149
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
150+
reth-tracing-otlp = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
151+
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
152+
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
153+
reth-network = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
154+
reth-node-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
155+
156+
# Revm dependencies
157+
revm-database = "9.0"
139158

140159
# Reth-optimism dependencies (optional)
141160
op-alloy = { version = "0.22.0", features = ["full"], optional = true }
@@ -144,6 +163,9 @@ reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.
144163
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
145164
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
146165
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
166+
reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
167+
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
168+
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
147169
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
148170
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
149171
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
@@ -154,7 +176,7 @@ jsonrpsee-core = { version = "0.26.0", optional = true, features = ["client"] }
154176
nanoid = { version = "0.4", optional = true }
155177
alloy-genesis = { version = "1.0", default-features = false, optional = true }
156178
ctor = { version = "0.5", optional = true }
157-
tracing-subscriber = { version = "0.3", features = [
179+
tracing-subscriber = { version = "0.3.20", features = [
158180
"env-filter",
159181
"json",
160182
], optional = true }

src/lib.rs

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,16 @@ pub mod test_utils;
3737
pub mod reth {
3838
pub use reth_origin::*;
3939

40+
pub mod chainspec {
41+
pub use reth_chainspec::*;
42+
}
43+
4044
pub mod cli {
4145
pub use {reth_cli::*, reth_origin::cli::*};
46+
47+
pub mod commands {
48+
pub use reth_cli_commands::*;
49+
}
4250
}
4351

4452
pub mod evm {
@@ -49,6 +57,10 @@ pub mod reth {
4957
pub use reth_errors::*;
5058
}
5159

60+
pub mod metrics {
61+
pub use reth_metrics::*;
62+
}
63+
5264
pub mod payload {
5365
pub use ::reth_origin::payload::*;
5466
pub mod builder {
@@ -59,13 +71,21 @@ pub mod reth {
5971
};
6072
}
6173

74+
pub mod primitives {
75+
pub use reth_payload_primitives::*;
76+
}
77+
6278
#[cfg(feature = "optimism")]
6379
pub mod util {
6480
pub use reth_payload_util::*;
6581
}
6682
}
6783

6884
pub mod node {
85+
pub mod api {
86+
pub use reth_node_api::*;
87+
}
88+
6989
pub mod builder {
7090
pub use reth_node_builder::*;
7191
}
@@ -75,6 +95,34 @@ pub mod reth {
7595
}
7696
}
7797

98+
pub mod provider {
99+
pub use reth_provider::*;
100+
}
101+
102+
pub mod rpc_eth_types {
103+
pub use reth_rpc_eth_types::*;
104+
}
105+
106+
pub mod tracing_otlp {
107+
pub use reth_tracing_otlp::*;
108+
}
109+
110+
pub mod db {
111+
pub use reth_db::*;
112+
}
113+
114+
pub mod eth_wire_types {
115+
pub use reth_eth_wire_types::*;
116+
}
117+
118+
pub mod network {
119+
pub use reth_network::*;
120+
}
121+
122+
pub mod node_types {
123+
pub use reth_node_types::*;
124+
}
125+
78126
pub mod ethereum {
79127
pub use reth_ethereum::*;
80128
}
@@ -96,6 +144,24 @@ pub mod reth {
96144
pub mod primitives {
97145
pub use reth_optimism_primitives::*;
98146
}
147+
pub mod txpool {
148+
pub use reth_optimism_txpool::*;
149+
}
150+
pub mod rpc {
151+
pub use reth_optimism_rpc::*;
152+
}
153+
pub mod consensus {
154+
pub use reth_optimism_consensus::*;
155+
}
156+
pub mod evm {
157+
pub use reth_optimism_evm::*;
158+
}
159+
}
160+
}
161+
162+
pub mod revm {
163+
pub mod database {
164+
pub use revm_database::*;
99165
}
100166
}
101167

src/orderpool2/prioritized_pool/step.rs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ use {
99
alloy::{
1010
consensus::Transaction,
1111
primitives::{Address, B256},
12+
consensus::transaction::Recovered,
1213
},
1314
orderpool2::{AccountNonce, BundleNonce},
1415
payload::CheckpointExt,
1516
prelude::{Bundle, Checkpoint, ControlFlow, Platform, Step, StepContext},
17+
platform::types::Transaction as PlatformTransaction,
1618
reth,
1719
},
1820
parking_lot::Mutex,
@@ -23,6 +25,7 @@ use {
2325
sync::Arc,
2426
},
2527
};
28+
use crate::prelude::Optimism;
2629

2730
#[derive(Clone)]
2831
pub struct BundleWithNonces<B, P> {
@@ -36,7 +39,7 @@ where
3639
B: Bundle<P>,
3740
P: Platform,
3841
{
39-
fn new(bundle: B) -> Self {
42+
pub fn new(bundle: B) -> Self {
4043
let txs = bundle.transactions();
4144
let mut nonces = Vec::with_capacity(txs.len());
4245
for tx in txs {
@@ -74,6 +77,23 @@ where
7477
}
7578
}
7679

80+
impl OrderpoolOrder for Recovered<PlatformTransaction<Optimism>>
81+
{
82+
type ID = B256;
83+
84+
fn id(&self) -> Self::ID {
85+
*self.tx_hash()
86+
}
87+
88+
fn nonces(&self) -> Vec<BundleNonce> {
89+
vec![BundleNonce{
90+
address: self.signer(),
91+
nonce: self.nonce(),
92+
optional: false
93+
}]
94+
}
95+
}
96+
7797
impl<P: Platform> OrderpoolNonceSource for Checkpoint<P> {
7898
type NonceError = reth::errors::ProviderError;
7999

src/orderpool2/sim_tree.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,4 +271,8 @@ where
271271
}
272272
Ok(())
273273
}
274+
275+
pub fn is_ready(&self) -> bool {
276+
!self.ready_orders.is_empty()
277+
}
274278
}

0 commit comments

Comments
 (0)