Skip to content

Commit 42991b8

Browse files
authored
feat: bump sdk to 0.10 to support reth 1.6 (#24)
1 parent b5b75aa commit 42991b8

File tree

2 files changed

+55
-44
lines changed

2 files changed

+55
-44
lines changed

Cargo.toml

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["crates/*"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.9.4"
6+
version = "0.10.0"
77
edition = "2024"
88
rust-version = "1.88"
99
authors = ["init4"]
@@ -34,55 +34,55 @@ debug = false
3434
incremental = false
3535

3636
[workspace.dependencies]
37-
signet-blobber = { version = "0.9.0", path = "crates/blobber" }
38-
signet-db = { version = "0.9.0", path = "crates/db" }
39-
signet-node-types = { version = "0.9.0", path = "crates/node-types" }
40-
signet-rpc = { version = "0.9.0", path = "crates/rpc" }
37+
signet-blobber = { version = "0.10.0", path = "crates/blobber" }
38+
signet-db = { version = "0.10.0", path = "crates/db" }
39+
signet-node-types = { version = "0.10.0", path = "crates/node-types" }
40+
signet-rpc = { version = "0.10.0", path = "crates/rpc" }
4141

42-
init4-bin-base = { version = "0.10.0", features = ["alloy"] }
42+
init4-bin-base = { version = "0.11.0", features = ["alloy"] }
4343

44-
signet-bundle = "0.9.0"
45-
signet-constants = "0.9.0"
46-
signet-evm = "0.9.0"
47-
signet-extract = "0.9.0"
48-
signet-tx-cache = "0.9.0"
49-
signet-types = "0.9.0"
50-
signet-zenith = "0.9.0"
44+
signet-bundle = "0.10.0"
45+
signet-constants = "0.10.0"
46+
signet-evm = "0.10.0"
47+
signet-extract = "0.10.0"
48+
signet-tx-cache = "0.10.0"
49+
signet-types = "0.10.0"
50+
signet-zenith = "0.10.0"
5151

5252
# ajj
5353
ajj = { version = "0.3.4" }
5454

5555
# trevm
56-
trevm = { version = "0.27.1", features = ["full_env_cfg"] }
56+
trevm = { version = "0.27.8", features = ["full_env_cfg"] }
5757

5858
# Alloy periphery crates
59-
alloy = { version = "1.0.19", features = [
59+
alloy = { version = "1.0.25", features = [
6060
"full",
6161
"rpc-types-beacon",
6262
"rpc-types-mev",
6363
"genesis",
6464
"arbitrary",
6565
] }
66-
alloy-contract = { version = "1.0.19", features = ["pubsub"] }
66+
alloy-contract = { version = "1.0.25", features = ["pubsub"] }
6767

6868
# Reth
69-
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
70-
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
71-
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
72-
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
73-
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
74-
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
75-
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
76-
reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
77-
reth-exex-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
78-
reth-network-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
79-
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
80-
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
81-
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
82-
reth-prune-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
83-
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
84-
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
85-
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" }
69+
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
70+
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
71+
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
72+
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
73+
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
74+
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
75+
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
76+
reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
77+
reth-exex-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
78+
reth-network-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
79+
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
80+
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
81+
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
82+
reth-prune-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
83+
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
84+
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
85+
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
8686

8787
# Foundry periphery
8888
foundry-blob-explorers = "0.17"
@@ -117,3 +117,14 @@ uuid = "1.16.0"
117117
# Test Utils
118118
alloy-rlp = "0.3.11"
119119
tempfile = "3.17.0"
120+
121+
# [patch.crates-io]
122+
# signet-bundle = { path = "../sdk/crates/bundle"}
123+
# signet-constants = { path = "../sdk/crates/constants"}
124+
# signet-evm = { path = "../sdk/crates/evm"}
125+
# signet-extract = { path = "../sdk/crates/extract"}
126+
# signet-tx-cache = { path = "../sdk/crates/tx-cache"}
127+
# signet-types = { path = "../sdk/crates/types"}
128+
# signet-zenith = { path = "../sdk/crates/zenith"}
129+
130+
# init4-bin-base = { path = "../shared" }

crates/rpc/src/ctx/signet.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ use reth::{
1919
primitives::{Block, Receipt, Recovered, RecoveredBlock, TransactionSigned},
2020
providers::{
2121
BlockHashReader, BlockIdReader, BlockNumReader, CanonStateSubscriptions, HeaderProvider,
22-
ProviderBlock, ProviderError, ProviderReceipt, ProviderResult, ReceiptProvider,
23-
StateProviderFactory, TransactionsProvider, providers::BlockchainProvider,
22+
ProviderError, ProviderResult, ReceiptProvider, StateProviderFactory, TransactionsProvider,
23+
providers::BlockchainProvider,
2424
},
2525
revm::{database::StateProviderDatabase, primitives::hardfork::SpecId},
2626
rpc::{
@@ -32,6 +32,7 @@ use reth::{
3232
calculate_reward_percentiles_for_block, fee_history_cache_new_blocks_task,
3333
},
3434
logs_utils::{self, ProviderOrBlock, append_matching_block_logs},
35+
receipt::EthReceiptConverter,
3536
},
3637
types::{FilterBlockOption, FilteredParams},
3738
},
@@ -66,10 +67,7 @@ where
6667

6768
// State stuff
6869
provider: BlockchainProvider<Inner>,
69-
cache: EthStateCache<
70-
ProviderBlock<BlockchainProvider<Inner>>,
71-
ProviderReceipt<BlockchainProvider<Inner>>,
72-
>,
70+
cache: EthStateCache<Inner::Primitives>,
7371

7472
// Gas stuff
7573
gas_oracle: GasPriceOracle<BlockchainProvider<Inner>>,
@@ -225,8 +223,8 @@ where
225223
}
226224

227225
/// Create a transaction response builder for the RPC API.
228-
pub const fn tx_resp_builder(&self) -> EthRpcConverter {
229-
EthRpcConverter::new()
226+
pub fn rpc_converter(&self) -> EthRpcConverter<ChainSpec> {
227+
EthRpcConverter::new(EthReceiptConverter::new(self.chain_spec()))
230228
}
231229

232230
/// Get the block for a given block, formatting the block for
@@ -246,9 +244,11 @@ where
246244

247245
(*block)
248246
.clone()
249-
.into_rpc_block(full.unwrap_or_default().into(), |tx, tx_info| {
250-
self.tx_resp_builder().fill(tx, tx_info)
251-
})
247+
.into_rpc_block(
248+
full.unwrap_or_default().into(),
249+
|tx, tx_info| self.rpc_converter().fill(tx, tx_info),
250+
|header, rlp_len| self.rpc_converter().convert_header(header, rlp_len),
251+
)
252252
.map(Some)
253253
}
254254

0 commit comments

Comments
 (0)