Skip to content

Commit 5fa30f2

Browse files
committed
Bump to reth 1.6.0 and add isthmus migration
1 parent bc22047 commit 5fa30f2

File tree

10 files changed

+871
-660
lines changed

10 files changed

+871
-660
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -19,64 +19,64 @@ fraxtal-node = { path = "crates/node" }
1919
fraxtal-evm = { path = "crates/evm" }
2020
fraxtal-op-evm = { path = "crates/op-evm" }
2121

22-
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
23-
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
24-
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
25-
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
26-
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
27-
reth-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
28-
reth-ethereum-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
29-
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
30-
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
31-
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
32-
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
33-
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
34-
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
35-
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
36-
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
37-
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
38-
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
39-
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
40-
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
41-
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
42-
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
43-
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
44-
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
45-
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
46-
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
47-
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
48-
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
49-
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
50-
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
51-
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
22+
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
23+
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
24+
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
25+
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
26+
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
27+
reth-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
28+
reth-engine-local = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
29+
reth-ethereum-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
30+
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
31+
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
32+
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
33+
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
34+
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
35+
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
36+
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
37+
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
38+
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
39+
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
40+
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
41+
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
42+
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
43+
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
44+
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
45+
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
46+
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
47+
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
48+
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
49+
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
50+
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
51+
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
52+
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
53+
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
5254

5355
# eth
54-
alloy-chains = { version = "0.2.0", default-features = false }
55-
alloy-consensus = { version = "1.0.13", default-features = false }
56-
alloy-eips = { version = "1.0.13", default-features = false }
57-
alloy-evm = { version = "0.12", default-features = false }
58-
alloy-primitives = { version = "1.2.0", default-features = false, features = ["map-foldhash"] }
56+
alloy-chains = { version = "0.2.5", default-features = false }
57+
alloy-consensus = { version = "1.0.23", default-features = false }
58+
alloy-eips = { version = "1.0.23", default-features = false }
59+
alloy-evm = { version = "0.15", default-features = false }
60+
alloy-primitives = { version = "1.3.0", default-features = false, features = ["map-foldhash"] }
5961
alloy-rlp = { version = "0.3.10", default-features = false, features = ["core-net"] }
60-
alloy-rpc-types-debug = { version = "1.0.13", default-features = false }
61-
alloy-rpc-types-eth = { version = "1.0.13", default-features = false }
62-
alloy-rpc-types-engine = { version = "1.0.13", default-features = false }
62+
alloy-rpc-types-debug = { version = "1.0.23", default-features = false }
63+
alloy-rpc-types-eth = { version = "1.0.23", default-features = false }
64+
alloy-rpc-types-engine = { version = "1.0.23", default-features = false }
6365

6466
# op
65-
alloy-op-evm = { version = "0.12", default-features = false }
67+
alloy-op-evm = { version = "0.15", default-features = false }
6668
alloy-op-hardforks = "0.2.2"
67-
op-alloy-consensus = { version = "0.18.7", default-features = false }
68-
op-alloy-rpc-types = { version = "0.18.7", default-features = false }
69-
op-alloy-rpc-types-engine = { version = "0.18.7", default-features = false }
69+
op-alloy-consensus = { version = "0.18.12", default-features = false }
70+
op-alloy-rpc-types = { version = "0.18.12", default-features = false }
71+
op-alloy-rpc-types-engine = { version = "0.18.12", default-features = false }
7072

7173
# revm
72-
revm = { version = "26.0.1", default-features = false }
74+
revm = { version = "27.0.3", default-features = false }
7375
revm-primitives = { version = "20.0.0", default-features = false }
74-
op-revm = { version = "7.0.1", default-features = false }
76+
op-revm = { version = "8.0.3", default-features = false }
7577

7678
# misc
77-
serde_json = { version = "1.0", default-features = false, features = [
78-
"alloc",
79-
] }
79+
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
8080
auto_impl = "1"
8181
clap = { version = "4", features = ["derive", "env"] }
8282
tracing = { version = "0.1.0", default-features = false }

crates/evm/src/lib.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use op_revm::{OpSpecId, OpTransaction};
1212
use reth_chainspec::EthChainSpec;
1313
use reth_evm::{ConfigureEvm, EvmEnv};
1414
use reth_optimism_chainspec::OpChainSpec;
15-
use reth_optimism_consensus::next_block_base_fee;
1615
use reth_optimism_evm::{
1716
revm_spec, revm_spec_by_timestamp_after_bedrock, OpBlockAssembler, OpNextBlockEnvAttributes,
1817
OpRethReceiptBuilder,
@@ -81,7 +80,7 @@ impl<ChainSpec: OpHardforks, N: NodePrimitives, R> FraxtalEvmConfig<ChainSpec, N
8180

8281
impl<ChainSpec, N, R> ConfigureEvm for FraxtalEvmConfig<ChainSpec, N, R>
8382
where
84-
ChainSpec: EthChainSpec + OpHardforks,
83+
ChainSpec: EthChainSpec<Header = Header> + OpHardforks,
8584
N: NodePrimitives<
8685
Receipt = R::Receipt,
8786
SignedTx = R::Transaction,
@@ -106,7 +105,6 @@ where
106105
fn block_assembler(&self) -> &Self::BlockAssembler {
107106
&self.block_assembler
108107
}
109-
110108
fn evm_env(&self, header: &Header) -> EvmEnv<OpSpecId> {
111109
let spec = revm_spec(self.chain_spec(), header);
112110

@@ -119,7 +117,7 @@ where
119117
.is_enabled_in(SpecId::CANCUN)
120118
.then_some(BlobExcessGasAndPrice {
121119
excess_blob_gas: 0,
122-
blob_gasprice: 0,
120+
blob_gasprice: 1,
123121
});
124122

125123
let block_env = BlockEnv {
@@ -165,7 +163,7 @@ where
165163
.is_enabled_in(SpecId::CANCUN)
166164
.then_some(BlobExcessGasAndPrice {
167165
excess_blob_gas: 0,
168-
blob_gasprice: 0,
166+
blob_gasprice: 1,
169167
});
170168

171169
let block_env = BlockEnv {
@@ -176,7 +174,10 @@ where
176174
prevrandao: Some(attributes.prev_randao),
177175
gas_limit: attributes.gas_limit,
178176
// calculate basefee based on parent block's gas usage
179-
basefee: next_block_base_fee(self.chain_spec(), parent, attributes.timestamp)?,
177+
basefee: self
178+
.chain_spec()
179+
.next_block_base_fee(parent, attributes.timestamp)
180+
.unwrap_or_default(),
180181
// calculate excess gas based on parent block's blob gas usage
181182
blob_excess_gas_and_price,
182183
};

crates/node/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ reth-basic-payload-builder.workspace = true
1515
reth-evm.workspace = true
1616
reth-node-api.workspace = true
1717
reth-chainspec.workspace = true
18+
reth-engine-local.workspace = true
1819
reth-optimism-evm.workspace = true
1920
reth-optimism-forks.workspace = true
2021
reth-optimism-node.workspace = true
@@ -25,6 +26,7 @@ reth-optimism-primitives.workspace = true
2526
reth-optimism-rpc.workspace = true
2627
reth-payload-builder.workspace = true
2728
reth-provider.workspace = true
29+
reth-rpc-api.workspace = true
2830
reth-node-builder.workspace = true
2931
reth-transaction-pool.workspace = true
3032
reth-trie-db.workspace = true

crates/node/src/node.rs

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
use std::sync::Arc;
2+
13
use fraxtal_evm::FraxtalEvmConfig;
24
use reth_chainspec::ChainSpecProvider;
5+
use reth_engine_local::LocalPayloadAttributesBuilder;
36
use reth_evm::ConfigureEvm;
4-
use reth_node_api::{FullNodeComponents, PayloadTypes, PrimitivesTy, TxTy};
7+
use reth_node_api::{
8+
FullNodeComponents, PayloadAttributesBuilder, PayloadTypes, PrimitivesTy, TxTy,
9+
};
510
use reth_node_builder::{
611
components::{
712
BasicPayloadServiceBuilder, ComponentsBuilder, ExecutorBuilder, PayloadBuilderBuilder,
@@ -19,7 +24,8 @@ use reth_optimism_node::{
1924
OpPoolBuilder,
2025
},
2126
txpool::OpPooledTx,
22-
OpEngineApiBuilder, OpEngineTypes, OpFullNodeTypes, OpPayloadAttributes, OpStorage,
27+
OpAddOnsBuilder, OpEngineApiBuilder, OpEngineTypes, OpFullNodeTypes, OpPayloadAttributes,
28+
OpStorage,
2329
};
2430
use reth_optimism_payload_builder::{
2531
builder::OpPayloadTransactions,
@@ -29,6 +35,7 @@ use reth_optimism_payload_builder::{
2935
use reth_optimism_primitives::OpPrimitives;
3036
use reth_optimism_rpc::eth::OpEthApiBuilder;
3137
use reth_provider::providers::ProviderFactoryBuilder;
38+
use reth_rpc_api::eth::RpcTypes;
3239
use reth_transaction_pool::TransactionPool;
3340
use reth_trie_db::MerklePatriciaTrie;
3441

@@ -102,6 +109,17 @@ impl FraxtalNode {
102109
.consensus(OpConsensusBuilder::default())
103110
}
104111

112+
/// Returns [`OpAddOnsBuilder`] with configured arguments.
113+
pub fn add_ons_builder<NetworkT: RpcTypes>(&self) -> OpAddOnsBuilder<NetworkT> {
114+
OpAddOnsBuilder::default()
115+
.with_sequencer(self.args.sequencer.clone())
116+
.with_sequencer_headers(self.args.sequencer_headers.clone())
117+
.with_da_config(self.da_config.clone())
118+
.with_enable_tx_conditional(self.args.enable_tx_conditional)
119+
.with_min_suggested_priority_fee(self.args.min_suggested_priority_fee)
120+
.with_historical_rpc(self.args.historical_rpc.clone())
121+
}
122+
105123
/// Instantiates the [`ProviderFactoryBuilder`] for an opstack node.
106124
///
107125
/// # Open a Providerfactory in read-only mode from a datadir
@@ -162,14 +180,7 @@ where
162180
}
163181

164182
fn add_ons(&self) -> Self::AddOns {
165-
Self::AddOns::builder()
166-
.with_sequencer(self.args.sequencer.clone())
167-
.with_sequencer_headers(self.args.sequencer_headers.clone())
168-
.with_da_config(self.da_config.clone())
169-
.with_enable_tx_conditional(self.args.enable_tx_conditional)
170-
.with_min_suggested_priority_fee(self.args.min_suggested_priority_fee)
171-
.with_historical_rpc(self.args.historical_rpc.clone())
172-
.build()
183+
self.add_ons_builder().build()
173184
}
174185
}
175186

@@ -182,6 +193,12 @@ where
182193
fn rpc_to_primitive_block(rpc_block: Self::RpcBlock) -> reth_node_api::BlockTy<Self> {
183194
rpc_block.into_consensus()
184195
}
196+
197+
fn local_payload_attributes_builder(
198+
chain_spec: &Self::ChainSpec,
199+
) -> impl PayloadAttributesBuilder<<Self::Payload as PayloadTypes>::PayloadAttributes> {
200+
LocalPayloadAttributesBuilder::new(Arc::new(chain_spec.clone()))
201+
}
185202
}
186203

187204
impl NodeTypes for FraxtalNode {

crates/op-evm/src/block/holocene/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ where
2828
if chain_spec.is_holocene_active_at_timestamp(timestamp)
2929
&& !chain_spec.is_holocene_active_at_timestamp(timestamp.saturating_sub(2))
3030
{
31-
info!(target: "evm", "Forcing frax upgrades on Holocne transition");
31+
info!(target: "evm", "Forcing frax upgrades on Holocene transition");
3232

3333
let (proxy_migrations, bytecode_migrations, storage_migrations) =
3434
match chain_spec.chain().id() {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
use alloy_primitives::{address, b256, Address, B256};
2+
3+
pub(super) const MAINNET_ORACLES_ADDRESSES: &[Address] = &[
4+
address!("0xf750636e1df115e3b334ed06e5b45c375107fc60"),
5+
address!("0x1B680F4385f24420D264D78cab7C58365ED3F1FF"),
6+
];
7+
8+
pub(super) const PROXY_ADDR: Address = address!("fc0000000000000000000000000000000000000a");
9+
pub(super) const PROXY_ADMIN_ADDR: Address = address!("fc0000000000000000000000000000000000000a");
10+
pub(super) const PROXY_ADMIN_SLOT: B256 =
11+
b256!("b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103");
12+
pub(super) const PROXY_IMPLEMENTATION_SLOT: B256 =
13+
b256!("360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc");

0 commit comments

Comments
 (0)