Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 37 additions & 38 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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" }
# init4-bin-base = { path = "../shared" }
42 changes: 23 additions & 19 deletions crates/db/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<crate::JournalHashes>(block_number, journal_hash)?;

Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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::<ZenithHeaders>()?;
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))
Expand All @@ -348,7 +352,7 @@ where
target: BlockNumber,
_remove_from: StorageLocation,
) -> ProviderResult<()> {
self.remove::<ZenithHeaders>(target..)?;
self.remove::<ZenithHeaders>(target + 1..)?;
Ok(())
}

Expand All @@ -371,7 +375,7 @@ where
target: BlockNumber,
remove_from: StorageLocation,
) -> ProviderResult<Vec<(BlockNumber, DbSignetEvent)>> {
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)
Expand All @@ -386,7 +390,7 @@ where
target: BlockNumber,
_remove_from: StorageLocation,
) -> ProviderResult<()> {
self.remove::<SignetEvents>(target..)?;
self.remove::<SignetEvents>(target + 1..)?;
Ok(())
}

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -537,21 +541,21 @@ where
#[instrument(skip(self))]
fn ru_remove_blocks_and_execution_above(
&self,
target: BlockNumber,
block: BlockNumber,
remove_from: StorageLocation,
) -> ProviderResult<()> {
// Implementation largely copied from
// `BlockExecutionWriter::remove_block_and_execution_above`
// 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::<tables::AccountChangeSets>()?
Expand All @@ -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(())
}
Expand All @@ -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();
Expand Down
1 change: 0 additions & 1 deletion crates/node-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions crates/node-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -85,8 +84,6 @@ where

type ChainSpec = ChainSpec;

type StateCommitment = MerklePatriciaTrie;

type Storage = EthStorage;

type Payload = EthEngineTypes;
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions crates/rpc/examples/filler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions crates/rpc/src/ctx/full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
})
}

Expand Down
13 changes: 7 additions & 6 deletions crates/rpc/src/receipts.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down