diff --git a/Cargo.toml b/Cargo.toml index fb5398b..d2ca8ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/*"] resolver = "2" [workspace.package] -version = "0.9.4" +version = "0.10.0" edition = "2024" rust-version = "1.88" authors = ["init4"] @@ -34,55 +34,55 @@ debug = false incremental = false [workspace.dependencies] -signet-blobber = { version = "0.9.0", path = "crates/blobber" } -signet-db = { version = "0.9.0", path = "crates/db" } -signet-node-types = { version = "0.9.0", path = "crates/node-types" } -signet-rpc = { version = "0.9.0", path = "crates/rpc" } +signet-blobber = { version = "0.10.0", path = "crates/blobber" } +signet-db = { version = "0.10.0", path = "crates/db" } +signet-node-types = { version = "0.10.0", path = "crates/node-types" } +signet-rpc = { version = "0.10.0", path = "crates/rpc" } -init4-bin-base = { version = "0.10.0", features = ["alloy"] } +init4-bin-base = { version = "0.11.0", features = ["alloy"] } -signet-bundle = "0.9.0" -signet-constants = "0.9.0" -signet-evm = "0.9.0" -signet-extract = "0.9.0" -signet-tx-cache = "0.9.0" -signet-types = "0.9.0" -signet-zenith = "0.9.0" +signet-bundle = "0.10.0" +signet-constants = "0.10.0" +signet-evm = "0.10.0" +signet-extract = "0.10.0" +signet-tx-cache = "0.10.0" +signet-types = "0.10.0" +signet-zenith = "0.10.0" # ajj ajj = { version = "0.3.4" } # trevm -trevm = { version = "0.27.1", features = ["full_env_cfg"] } +trevm = { version = "0.27.8", features = ["full_env_cfg"] } # Alloy periphery crates -alloy = { version = "1.0.19", features = [ +alloy = { version = "1.0.25", features = [ "full", "rpc-types-beacon", "rpc-types-mev", "genesis", "arbitrary", ] } -alloy-contract = { version = "1.0.19", features = ["pubsub"] } +alloy-contract = { version = "1.0.25", features = ["pubsub"] } # Reth -reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-exex-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-network-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-prune-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } -reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.1" } +reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-exex-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-network-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-prune-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } +reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" } # Foundry periphery foundry-blob-explorers = "0.17" @@ -117,3 +117,14 @@ uuid = "1.16.0" # Test Utils alloy-rlp = "0.3.11" tempfile = "3.17.0" + +# [patch.crates-io] +# signet-bundle = { path = "../sdk/crates/bundle"} +# signet-constants = { path = "../sdk/crates/constants"} +# signet-evm = { path = "../sdk/crates/evm"} +# signet-extract = { path = "../sdk/crates/extract"} +# signet-tx-cache = { path = "../sdk/crates/tx-cache"} +# signet-types = { path = "../sdk/crates/types"} +# signet-zenith = { path = "../sdk/crates/zenith"} + +# init4-bin-base = { path = "../shared" } \ No newline at end of file diff --git a/crates/rpc/src/ctx/signet.rs b/crates/rpc/src/ctx/signet.rs index eadbbce..8a3a6be 100644 --- a/crates/rpc/src/ctx/signet.rs +++ b/crates/rpc/src/ctx/signet.rs @@ -19,8 +19,8 @@ use reth::{ primitives::{Block, Receipt, Recovered, RecoveredBlock, TransactionSigned}, providers::{ BlockHashReader, BlockIdReader, BlockNumReader, CanonStateSubscriptions, HeaderProvider, - ProviderBlock, ProviderError, ProviderReceipt, ProviderResult, ReceiptProvider, - StateProviderFactory, TransactionsProvider, providers::BlockchainProvider, + ProviderError, ProviderResult, ReceiptProvider, StateProviderFactory, TransactionsProvider, + providers::BlockchainProvider, }, revm::{database::StateProviderDatabase, primitives::hardfork::SpecId}, rpc::{ @@ -32,6 +32,7 @@ use reth::{ calculate_reward_percentiles_for_block, fee_history_cache_new_blocks_task, }, logs_utils::{self, ProviderOrBlock, append_matching_block_logs}, + receipt::EthReceiptConverter, }, types::{FilterBlockOption, FilteredParams}, }, @@ -66,10 +67,7 @@ where // State stuff provider: BlockchainProvider, - cache: EthStateCache< - ProviderBlock>, - ProviderReceipt>, - >, + cache: EthStateCache, // Gas stuff gas_oracle: GasPriceOracle>, @@ -225,8 +223,8 @@ where } /// Create a transaction response builder for the RPC API. - pub const fn tx_resp_builder(&self) -> EthRpcConverter { - EthRpcConverter::new() + pub fn rpc_converter(&self) -> EthRpcConverter { + EthRpcConverter::new(EthReceiptConverter::new(self.chain_spec())) } /// Get the block for a given block, formatting the block for @@ -246,9 +244,11 @@ where (*block) .clone() - .into_rpc_block(full.unwrap_or_default().into(), |tx, tx_info| { - self.tx_resp_builder().fill(tx, tx_info) - }) + .into_rpc_block( + full.unwrap_or_default().into(), + |tx, tx_info| self.rpc_converter().fill(tx, tx_info), + |header, rlp_len| self.rpc_converter().convert_header(header, rlp_len), + ) .map(Some) }