diff --git a/Cargo.toml b/Cargo.toml index 221d40f..8755144 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/*"] resolver = "2" [workspace.package] -version = "0.10.4" +version = "0.11.0" edition = "2024" rust-version = "1.88" authors = ["init4"] @@ -34,57 +34,56 @@ debug = false incremental = false [workspace.dependencies] -signet-blobber = { version = "0.10", path = "crates/blobber" } -signet-block-processor = { version = "0.10", path = "crates/block-processor" } -signet-db = { version = "0.10", path = "crates/db" } -signet-node-types = { version = "0.10", path = "crates/node-types" } -signet-rpc = { version = "0.10", path = "crates/rpc" } - -init4-bin-base = { version = "0.11.0", features = ["alloy"] } - -signet-bundle = "0.10.1" -signet-constants = "0.10.1" -signet-evm = "0.10.1" -signet-extract = "0.10.1" -signet-journal = "0.10.1" -signet-tx-cache = "0.10.1" -signet-types = "0.10.1" -signet-zenith = "0.10.1" +signet-blobber = { version = "0.11", path = "crates/blobber" } +signet-block-processor = { version = "0.11", path = "crates/block-processor" } +signet-db = { version = "0.11", path = "crates/db" } +signet-node-types = { version = "0.11", path = "crates/node-types" } +signet-rpc = { version = "0.11", path = "crates/rpc" } + +init4-bin-base = { version = "0.13.1", features = ["alloy"] } + +signet-bundle = "0.11.1" +signet-constants = "0.11.1" +signet-evm = "0.11.1" +signet-extract = "0.11.1" +signet-tx-cache = "0.11.1" +signet-types = "0.11.1" +signet-zenith = "0.11.1" +signet-journal = "0.11.1" # ajj ajj = { version = "0.3.4" } # trevm -trevm = { version = "0.27.8", features = ["full_env_cfg"] } +trevm = { version = "0.29.0", features = ["full_env_cfg"] } # Alloy periphery crates -alloy = { version = "1.0.25", features = [ +alloy = { version = "1.0.35", features = [ "full", "rpc-types-beacon", "rpc-types-mev", "genesis", "arbitrary", ] } -alloy-contract = { version = "1.0.25", features = ["pubsub"] } +alloy-contract = { version = "1.0.35", features = ["pubsub"] } # Reth -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" } +reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-exex-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-network-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-prune-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } +reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" } # Foundry periphery foundry-blob-explorers = "0.17" @@ -129,4 +128,4 @@ tempfile = "3.17.0" # signet-types = { path = "../sdk/crates/types"} # signet-zenith = { path = "../sdk/crates/zenith"} -# init4-bin-base = { path = "../shared" } \ No newline at end of file +# init4-bin-base = { path = "../shared" } diff --git a/crates/db/src/provider.rs b/crates/db/src/provider.rs index 25b245a..fa9d17a 100644 --- a/crates/db/src/provider.rs +++ b/crates/db/src/provider.rs @@ -151,12 +151,16 @@ where // in `reth/crates/storage/provider/src/providers/database/provider.rs` // duration metrics have been removed // - // Last reviewed at tag v1.5.1 + // Last reviewed at tag v1.8.1 let block_number = block.number(); + + // SIGNET-SPECIFIC + // Put journal hash into the DB if let Some(header) = header { self.insert_signet_header(header, block_number)?; } + // SIGNET-SPECIFIC // Put journal hash into the DB self.tx_ref().put::(block_number, journal_hash)?; @@ -226,7 +230,7 @@ where // duration metrics have been removed, and the implementation has been // modified to work with a single signet block. // - // last reviewed at tag v1.5.1 + // last reviewed at tag v1.8.1 let sf = self.static_file_provider(); @@ -333,7 +337,7 @@ where let mut items = Vec::new(); trace!(target: "signet_db_lifecycle", "taking zenith headers"); let mut cursor_write = self.tx_ref().cursor_write::()?; - let mut walker = cursor_write.walk_range(target..)?; + let mut walker = cursor_write.walk_range(target + 1..)?; while let Some((k, DbZenithHeader(e))) = walker.next().transpose()? { walker.delete_current()?; items.push((k, e)) @@ -348,7 +352,7 @@ where target: BlockNumber, _remove_from: StorageLocation, ) -> ProviderResult<()> { - self.remove::(target..)?; + self.remove::(target + 1..)?; Ok(()) } @@ -371,7 +375,7 @@ where target: BlockNumber, remove_from: StorageLocation, ) -> ProviderResult> { - let range = target..=(1 + self.last_block_number()?); + let range = target + 1..=self.last_block_number()?; let items = self.get_signet_events(range)?; self.remove_signet_events_above(target, remove_from)?; Ok(items) @@ -386,7 +390,7 @@ where target: BlockNumber, _remove_from: StorageLocation, ) -> ProviderResult<()> { - self.remove::(target..)?; + self.remove::(target + 1..)?; Ok(()) } @@ -415,7 +419,7 @@ where // in `reth/crates/storage/provider/src/providers/database/provider.rs` // duration metrics have been removed // - // last reviewed at tag v1.5.1 + // last reviewed at tag v1.8.1 let BlockResult { sealed_block: block, execution_outcome, .. } = block_result; @@ -467,13 +471,13 @@ where // `BlockExecutionWriter::take_block_and_execution_above` // in `reth/crates/storage/provider/src/providers/database/provider.rs` // - // last reviewed at tag v1.5.1 + // last reviewed at tag v1.8.1 - let range = target..=self.last_block_number()?; + let range = target + 1..=self.last_block_number()?; // This block is copied from `unwind_trie_state_range` // - // last reviewed at tag v1.5.1 + // last reviewed at tag v1.8.1 { let changed_accounts = self .tx_ref() @@ -537,7 +541,7 @@ where #[instrument(skip(self))] fn ru_remove_blocks_and_execution_above( &self, - target: BlockNumber, + block: BlockNumber, remove_from: StorageLocation, ) -> ProviderResult<()> { // Implementation largely copied from @@ -545,13 +549,13 @@ where // in `reth/crates/storage/provider/src/providers/database/provider.rs` // duration metrics have been removed // - // last reviewed at tag v1.5.1 + // last reviewed at tag v1.8.1 // This block is copied from `unwind_trie_state_range` // - // last reviewed at tag v1.5.1 + // last reviewed at tag v1.8.1 { - let range = target..=self.last_block_number()?; + let range = block + 1..=self.last_block_number()?; let changed_accounts = self .tx_ref() .cursor_read::()? @@ -572,14 +576,14 @@ where self.unwind_storage_history_indices(changed_storages.iter().copied())?; } - self.remove_state_above(target, remove_from)?; - self.remove_blocks_above(target, remove_from)?; + self.remove_state_above(block, remove_from)?; + self.remove_blocks_above(block, remove_from)?; // Signet specific: - self.remove_extraction_results_above(target, remove_from)?; + self.remove_extraction_results_above(block, remove_from)?; // Update pipeline stages - self.update_pipeline_stages(target, true)?; + self.update_pipeline_stages(block, true)?; Ok(()) } @@ -594,7 +598,7 @@ where // `StateWriter::write_state` for `DatabaseProvider` // in `reth/crates/storage/provider/src/providers/database/provider.rs` // - // Last reviewed at tag v1.5.1 + // Last reviewed at tag v1.8.1 let first_block = execution_outcome.first_block(); let block_count = execution_outcome.len() as u64; let last_block = execution_outcome.last_block(); diff --git a/crates/node-types/Cargo.toml b/crates/node-types/Cargo.toml index 41d509c..80a65f2 100644 --- a/crates/node-types/Cargo.toml +++ b/crates/node-types/Cargo.toml @@ -14,6 +14,5 @@ reth-chainspec.workspace = true reth-db.workspace = true reth-node-api.workspace = true reth-node-ethereum.workspace = true -reth-trie-db.workspace = true tokio.workspace = true \ No newline at end of file diff --git a/crates/node-types/src/lib.rs b/crates/node-types/src/lib.rs index 71fb7bf..43a28a4 100644 --- a/crates/node-types/src/lib.rs +++ b/crates/node-types/src/lib.rs @@ -24,7 +24,6 @@ use reth::{ use reth_chainspec::ChainSpec; use reth_node_api::{NodePrimitives, NodeTypes, NodeTypesWithDB}; use reth_node_ethereum::EthEngineTypes; -use reth_trie_db::MerklePatriciaTrie; use std::marker::PhantomData; use tokio::sync::broadcast::error::SendError; @@ -85,8 +84,6 @@ where type ChainSpec = ChainSpec; - type StateCommitment = MerklePatriciaTrie; - type Storage = EthStorage; type Payload = EthEngineTypes; diff --git a/crates/rpc/Cargo.toml b/crates/rpc/Cargo.toml index 1ae8e49..c06b86f 100644 --- a/crates/rpc/Cargo.toml +++ b/crates/rpc/Cargo.toml @@ -42,7 +42,7 @@ tracing.workspace = true serde_json.workspace = true futures-util = "0.3.31" itertools.workspace = true -revm-inspectors = "0.26.5" +revm-inspectors = "0.30.0" signet-db.workspace = true [dev-dependencies] diff --git a/crates/rpc/examples/filler.rs b/crates/rpc/examples/filler.rs index 6fdf906..b1d9c6e 100644 --- a/crates/rpc/examples/filler.rs +++ b/crates/rpc/examples/filler.rs @@ -137,6 +137,7 @@ where replacement_uuid: None, // optional if implementing strategies that replace or cancel bundles ..Default::default() // all other options are not used. }, + host_txs: vec![], }; // submit the Bundle to the transaction cache diff --git a/crates/rpc/src/ctx/full.rs b/crates/rpc/src/ctx/full.rs index 76efb68..90648c7 100644 --- a/crates/rpc/src/ctx/full.rs +++ b/crates/rpc/src/ctx/full.rs @@ -185,12 +185,12 @@ where where Tasks: TaskSpawner + Clone + 'static, { + let tracing_semaphores = Semaphore::new(eth_config.max_tracing_requests).into(); + SignetCtx::new(constants, provider, eth_config, tx_cache, spawner).map(|signet| Self { host, signet, - shared: SharedContext { - tracing_semaphores: Semaphore::new(eth_config.max_tracing_requests).into(), - }, + shared: SharedContext { tracing_semaphores }, }) } diff --git a/crates/rpc/src/receipts.rs b/crates/rpc/src/receipts.rs index 90c4031..69ccec5 100644 --- a/crates/rpc/src/receipts.rs +++ b/crates/rpc/src/receipts.rs @@ -1,12 +1,13 @@ //! Signet RPC receipt response builder. -use alloy::consensus::Transaction; -use alloy::consensus::{ReceiptEnvelope, TxReceipt, transaction::TransactionMeta}; -use alloy::primitives::{Address, TxKind}; -use alloy::rpc::types::eth::{Log, ReceiptWithBloom, TransactionReceipt}; -use reth::core::primitives::SignerRecoverable; -use reth::primitives::{Receipt, TransactionSigned, TxType}; +use alloy::{ + consensus::{ReceiptEnvelope, Transaction, TxReceipt, transaction::TransactionMeta}, + primitives::{Address, TxKind}, + rpc::types::eth::{Log, ReceiptWithBloom, TransactionReceipt}, +}; +use reth::primitives::{Receipt, TransactionSigned}; use reth::rpc::server_types::eth::{EthApiError, EthResult}; +use reth::{core::primitives::SignerRecoverable, primitives::TxType}; use signet_types::MagicSig; /// Builds an [`TransactionReceipt`] obtaining the inner receipt envelope from the given closure.