Sitelet https://github.com/ithacaxyz/odyssey/commit/986ee5731939da642d47263cbcc59e467a583377
Skip to content

Commit 986ee57

Browse files
authored
chore: bump reth (#115)
fix new breaking changes
1 parent e725ea1 commit 986ee57

9 files changed

Lines changed: 1051 additions & 1415 deletions

File tree

‎Cargo.lock‎

Lines changed: 967 additions & 1346 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -141,76 +141,78 @@ odyssey-node = { path = "crates/node" }
141141
odyssey-wallet = { path = "crates/wallet" }
142142
odyssey-walltime = { path = "crates/walltime" }
143143

144-
alloy = { version = "0.6.4", features = [
144+
alloy = { version = "0.8", features = [
145145
"contract",
146146
"providers",
147147
"provider-http",
148148
"signers",
149149
"reqwest-rustls-tls",
150150
], default-features = false }
151-
alloy-consensus = { version = "0.6.4", default-features = false }
152-
alloy-eips = { version = "0.6.4", default-features = false }
153-
alloy-network = { version = "0.6.4", default-features = false }
154-
alloy-primitives = { version = "0.8.11", default-features = false }
155-
alloy-provider = { version = "0.6.4", default-features = false }
156-
alloy-rpc-client = { version = "0.6.4", default-features = false }
157-
alloy-rpc-types = { version = "0.6.4", default-features = false }
158-
alloy-rpc-types-eth = { version = "0.6.4", default-features = false }
159-
alloy-signer-local = { version = "0.6.4", features = ["mnemonic"] }
160-
alloy-transport = { version = "0.6.4", default-features = false }
161-
alloy-transport-http = { version = "0.6.4", default-features = false, features = [
151+
alloy-consensus = { version = "0.8", default-features = false }
152+
alloy-eips = { version = "0.8", default-features = false }
153+
alloy-network = { version = "0.8", default-features = false }
154+
alloy-primitives = { version = "0.8", default-features = false }
155+
alloy-provider = { version = "0.8", default-features = false }
156+
alloy-rpc-client = { version = "0.8", default-features = false }
157+
alloy-rpc-types = { version = "0.8", default-features = false }
158+
alloy-rpc-types-eth = { version = "0.8", default-features = false }
159+
alloy-signer-local = { version = "0.8", features = ["mnemonic"] }
160+
alloy-transport = { version = "0.8", default-features = false }
161+
alloy-transport-http = { version = "0.8", default-features = false, features = [
162162
"reqwest",
163163
"reqwest-rustls-tls",
164164
] }
165165
reqwest = { version = "0.12.9", default-features = false, features = [
166166
"rustls-tls",
167167
] }
168168

169+
op-alloy-consensus = { version = "0.8", default-features = false }
170+
169171
# tokio
170172
tokio = { version = "1.21", default-features = false }
171173

172-
reth-chainspec = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
173-
reth-cli = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
174-
reth-cli-util = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
175-
reth-errors = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
176-
reth-evm = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
177-
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
178-
reth-node-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
179-
reth-node-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
180-
reth-node-core = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9", features = [
174+
reth-chainspec = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
175+
reth-cli = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
176+
reth-cli-util = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
177+
reth-errors = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
178+
reth-evm = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
179+
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
180+
reth-node-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
181+
reth-node-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
182+
reth-node-core = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9", features = [
181183
"optimism",
182184
] }
183-
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9", features = [
185+
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9", features = [
184186
"optimism",
185187
] }
186-
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9", features = [
188+
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9", features = [
187189
"optimism",
188190
] }
189-
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9", features = [
191+
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9", features = [
190192
"optimism",
191193
] }
192-
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
193-
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
194-
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
195-
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
196-
reth-primitives = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9", features = [
194+
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
195+
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
196+
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
197+
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
198+
reth-primitives = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9", features = [
197199
"optimism",
198200
] }
199-
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
200-
reth-provider = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9", features = [
201+
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
202+
reth-provider = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9", features = [
201203
"optimism",
202204
] }
203-
reth-revm = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
204-
reth-rpc-types-compat = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
205-
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
206-
reth-storage-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
207-
reth-tracing = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
208-
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
209-
reth-trie-common = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
210-
reth-trie-db = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
211-
reth-network = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
212-
reth-network-types = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
213-
reth-chain-state = { git = "https://github.com/paradigmxyz/reth.git", rev = "38cf6c9" }
205+
reth-revm = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
206+
reth-rpc-types-compat = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
207+
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
208+
reth-storage-api = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
209+
reth-tracing = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
210+
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
211+
reth-trie-common = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
212+
reth-trie-db = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
213+
reth-network = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
214+
reth-network-types = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
215+
reth-chain-state = { git = "https://github.com/paradigmxyz/reth.git", rev = "320a0b9" }
214216
revm-primitives = { version = "14.0.0" }
215217
revm-precompile = { version = "15.0.0", features = ["secp256r1"] }
216218

@@ -227,7 +229,7 @@ eyre = "0.6.12"
227229
tracing = "0.1.0"
228230
serde = "1"
229231
serde_json = "1"
230-
thiserror = "1"
232+
thiserror = "2"
231233
futures = "0.3"
232234
url = "2.5"
233235

‎bin/odyssey/src/main.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use odyssey_wallet::{OdysseyWallet, OdysseyWalletApiServer, RethUpstream};
3737
use odyssey_walltime::{OdysseyWallTime, OdysseyWallTimeRpcApiServer};
3838
use reth_node_builder::{engine_tree_config::TreeConfig, EngineNodeLauncher, NodeComponents};
3939
use reth_optimism_cli::Cli;
40-
use reth_optimism_node::{args::RollupArgs, node::OpAddOns};
40+
use reth_optimism_node::{args::RollupArgs, node::OpAddOnsBuilder};
4141
use reth_provider::{providers::BlockchainProvider2, CanonStateSubscriptions};
4242
use tracing::{info, warn};
4343

@@ -63,7 +63,9 @@ fn main() {
6363
let node = builder
6464
.with_types_and_provider::<OdysseyNode, BlockchainProvider2<_>>()
6565
.with_components(OdysseyNode::components(&rollup_args))
66-
.with_add_ons(OpAddOns::new(rollup_args.sequencer_http))
66+
.with_add_ons(
67+
OpAddOnsBuilder::default().with_sequencer(rollup_args.sequencer_http).build(),
68+
)
6769
.on_component_initialized(move |ctx| {
6870
if let Some(address) = address {
6971
ctx.task_executor.spawn(async move {

‎crates/node/Cargo.toml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ reth-evm.workspace = true
3030
reth-revm.workspace = true
3131
reth-rpc-eth-api.workspace = true
3232
reth-rpc-eth-types.workspace = true
33-
reth-rpc-types-compat.workspace = true
3433
reth-transaction-pool.workspace = true
3534
reth-trie-common.workspace = true
3635
reth-trie-db.workspace = true
@@ -43,6 +42,8 @@ alloy-primitives.workspace = true
4342
alloy-rpc-types.workspace = true
4443
alloy-rpc-types-eth.workspace = true
4544

45+
op-alloy-consensus.workspace = true
46+
4647

4748
serde_json.workspace = true
4849
tokio.workspace = true

‎crates/node/src/broadcaster.rs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Sponsor periodic broadcaster
22
33
use alloy_primitives::Address;
4-
use reth_network::transactions::TransactionsHandle;
4+
use reth_network::{transactions::TransactionsHandle, NetworkPrimitives};
55
use reth_transaction_pool::TransactionPool;
66
use std::time::Duration;
77

@@ -10,12 +10,13 @@ use std::time::Duration;
1010
/// `p2p` broadcasting can potentially be flaky, and due to the p2p rules, some txs may never make
1111
/// it to the sequencer, this can happen if a message is dropped internally when channel bounds are
1212
/// enforced for example. So, we re-broadcast them every 10 minutes.
13-
pub async fn periodic_broadcaster<P>(
13+
pub async fn periodic_broadcaster<P, N>(
1414
address: Address,
1515
pool: P,
16-
transactions_handle: TransactionsHandle,
16+
transactions_handle: TransactionsHandle<N>,
1717
) where
1818
P: TransactionPool,
19+
N: NetworkPrimitives,
1920
{
2021
let mut interval_timer = tokio::time::interval(Duration::from_secs(60));
2122

‎crates/node/src/chainspec.rs‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
//! Odyssey chainspec parsing logic.
2-
use std::sync::LazyLock;
3-
4-
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT;
52
use alloy_primitives::{b256, U256};
63
use reth_chainspec::{
74
once_cell_set, BaseFeeParams, BaseFeeParamsKind, Chain, ChainHardforks, ChainSpec,
@@ -10,7 +7,7 @@ use reth_chainspec::{
107
use reth_cli::chainspec::{parse_genesis, ChainSpecParser};
118
use reth_optimism_chainspec::OpChainSpec;
129
use reth_optimism_forks::OpHardfork;
13-
use std::sync::Arc;
10+
use std::sync::{Arc, LazyLock};
1411

1512
/// Odyssey forks.
1613
pub static ODYSSEY_FORKS: LazyLock<ChainHardforks> = LazyLock::new(|| {
@@ -75,7 +72,6 @@ pub static ODYSSEY_MAINNET: LazyLock<Arc<OpChainSpec>> = LazyLock::new(|| {
7572
]
7673
.into(),
7774
),
78-
max_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
7975
prune_delete_limit: 10000,
8076
..Default::default()
8177
})

‎crates/node/src/evm.rs‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
1313
use alloy_consensus::Header;
1414
use alloy_primitives::{Address, Bytes, TxKind, U256};
15+
use op_alloy_consensus::EIP1559ParamError;
1516
use reth_chainspec::{ChainSpec, EthereumHardfork, Head};
17+
use reth_evm::env::EvmEnv;
1618
use reth_node_api::{ConfigureEvm, ConfigureEvmEnv, NextBlockEnvAttributes};
17-
use reth_optimism_chainspec::{DecodeError, OpChainSpec};
19+
use reth_optimism_chainspec::OpChainSpec;
1820
use reth_optimism_forks::OpHardfork;
1921
use reth_primitives::{transaction::FillTxEnv, TransactionSigned};
2022
use reth_revm::{
@@ -81,7 +83,8 @@ impl OdysseyEvmConfig {
8183

8284
impl ConfigureEvmEnv for OdysseyEvmConfig {
8385
type Header = Header;
84-
type Error = DecodeError;
86+
type Transaction = TransactionSigned;
87+
type Error = EIP1559ParamError;
8588

8689
fn fill_tx_env(&self, tx_env: &mut TxEnv, transaction: &TransactionSigned, sender: Address) {
8790
transaction.fill_tx_env(tx_env, sender);
@@ -180,7 +183,7 @@ impl ConfigureEvmEnv for OdysseyEvmConfig {
180183
&self,
181184
parent: &Self::Header,
182185
attributes: NextBlockEnvAttributes,
183-
) -> Result<(CfgEnvWithHandlerCfg, BlockEnv), Self::Error> {
186+
) -> Result<EvmEnv, Self::Error> {
184187
// configure evm env based on parent block
185188
let cfg_env = CfgEnv::default().with_chain_id(self.chain_spec.chain().id());
186189

@@ -226,7 +229,8 @@ impl ConfigureEvmEnv for OdysseyEvmConfig {
226229
handler_cfg: HandlerCfg { spec_id, is_optimism: true },
227230
},
228231
block_env,
229-
))
232+
)
233+
.into())
230234
}
231235
}
232236

‎crates/node/src/node.rs‎

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
//! required for the optimism engine API.
55
66
use crate::evm::OdysseyEvmConfig;
7+
use alloy_consensus::transaction::PooledTransaction;
78
use reth_evm::execute::BasicBlockExecutorProvider;
89
use reth_network::{
910
transactions::{TransactionPropagationMode, TransactionsManagerConfig},
1011
NetworkHandle, NetworkManager, PeersInfo,
1112
};
1213
use reth_network_types::ReputationChangeWeights;
13-
use reth_node_api::{FullNodeTypes, NodeTypesWithEngine};
14+
use reth_node_api::{FullNodeTypes, NodeTypesWithEngine, TxTy};
1415
use reth_node_builder::{
1516
components::{
1617
ComponentsBuilder, ExecutorBuilder, NetworkBuilder, PayloadServiceBuilder,
@@ -24,11 +25,13 @@ use reth_optimism_node::{
2425
node::{
2526
OpAddOns, OpConsensusBuilder, OpNetworkBuilder, OpPayloadBuilder, OpPoolBuilder, OpStorage,
2627
},
27-
OpEngineTypes, OpExecutionStrategyFactory,
28+
OpEngineTypes, OpExecutionStrategyFactory, OpNetworkPrimitives,
2829
};
2930
use reth_optimism_primitives::OpPrimitives;
3031
use reth_payload_builder::PayloadBuilderHandle;
31-
use reth_transaction_pool::{SubPoolLimit, TransactionPool, TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER};
32+
use reth_transaction_pool::{
33+
PoolTransaction, SubPoolLimit, TransactionPool, TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER,
34+
};
3235
use reth_trie_db::MerklePatriciaTrie;
3336
use std::time::Duration;
3437
use tracing::info;
@@ -128,7 +131,7 @@ where
128131
}
129132

130133
fn add_ons(&self) -> Self::AddOns {
131-
OpAddOns::new(self.args.sequencer_http.clone())
134+
Self::AddOns::builder().with_sequencer(self.args.sequencer_http.clone()).build()
132135
}
133136
}
134137

@@ -139,7 +142,7 @@ pub struct OdysseyExecutorBuilder;
139142

140143
impl<Node> ExecutorBuilder<Node> for OdysseyExecutorBuilder
141144
where
142-
Node: FullNodeTypes<Types: NodeTypes<ChainSpec = OpChainSpec>>,
145+
Node: FullNodeTypes<Types: NodeTypes<ChainSpec = OpChainSpec, Primitives = OpPrimitives>>,
143146
{
144147
type EVM = OdysseyEvmConfig;
145148
type Executor = BasicBlockExecutorProvider<OpExecutionStrategyFactory<Self::EVM>>;
@@ -170,7 +173,7 @@ pub struct OdysseyPayloadBuilder {
170173

171174
impl OdysseyPayloadBuilder {
172175
/// Create a new instance with the given `compute_pending_block` flag.
173-
pub const fn new(compute_pending_block: bool) -> Self {
176+
pub fn new(compute_pending_block: bool) -> Self {
174177
Self { inner: OpPayloadBuilder::new(compute_pending_block) }
175178
}
176179
}
@@ -184,7 +187,9 @@ where
184187
Primitives = OpPrimitives,
185188
>,
186189
>,
187-
Pool: TransactionPool + Unpin + 'static,
190+
Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<Node::Types>>>
191+
+ Unpin
192+
+ 'static,
188193
{
189194
async fn spawn_payload_service(
190195
self,
@@ -211,13 +216,18 @@ impl OdysseyNetworkBuilder {
211216
impl<Node, Pool> NetworkBuilder<Node, Pool> for OdysseyNetworkBuilder
212217
where
213218
Node: FullNodeTypes<Types: NodeTypes<ChainSpec = OpChainSpec, Primitives = OpPrimitives>>,
214-
Pool: TransactionPool + Unpin + 'static,
219+
Pool: TransactionPool<
220+
Transaction: PoolTransaction<Consensus = TxTy<Node::Types>, Pooled = PooledTransaction>,
221+
> + Unpin
222+
+ 'static,
215223
{
224+
type Primitives = OpNetworkPrimitives;
225+
216226
async fn build_network(
217227
self,
218228
ctx: &BuilderContext<Node>,
219229
pool: Pool,
220-
) -> eyre::Result<NetworkHandle> {
230+
) -> eyre::Result<NetworkHandle<OpNetworkPrimitives>> {
221231
let mut network_config = self.inner.network_config(ctx)?;
222232
// this is rolled with limited trusted peers and we want ignore any reputation slashing
223233
network_config.peers_config.reputation_weights = ReputationChangeWeights::zero();

‎crates/node/src/rpc.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use reth_rpc_eth_api::{
2020
FromEthApiError,
2121
};
2222
use reth_rpc_eth_types::EthApiError;
23-
use reth_rpc_types_compat::proof::from_primitive_account_proof;
2423
use reth_trie_common::AccountProof;
2524
use tracing::trace;
2625

@@ -96,7 +95,7 @@ where
9695
.map_err(EthApiError::Internal)?,
9796
..Default::default()
9897
};
99-
Ok(from_primitive_account_proof(account_proof, keys))
98+
Ok(account_proof.into_eip1186_response(keys))
10099
})
101100
.await
102101
.map_err(Into::into);

0 commit comments

Comments
 (0)