From 0b9a934a043a25fa44f6f1bd13281fd6683558f5 Mon Sep 17 00:00:00 2001 From: z Date: Thu, 30 Oct 2025 22:15:59 +1300 Subject: [PATCH 01/25] block_on_any_runtime function made publicly accessible --- forc-pkg/src/source/reg/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forc-pkg/src/source/reg/mod.rs b/forc-pkg/src/source/reg/mod.rs index aeca6aca029..61271132699 100644 --- a/forc-pkg/src/source/reg/mod.rs +++ b/forc-pkg/src/source/reg/mod.rs @@ -653,7 +653,7 @@ where /// If we are already in a runtime, this will spawn a new OS thread to create a new runtime. /// /// If we are not in a runtime, a new runtime is created and the future is blocked on. -pub(crate) fn block_on_any_runtime(future: F) -> F::Output +pub fn block_on_any_runtime(future: F) -> F::Output where F: std::future::Future + Send + 'static, F::Output: Send + 'static, From 890835e0700a46cefb220697b12141642b258fd7 Mon Sep 17 00:00:00 2001 From: z Date: Thu, 30 Oct 2025 22:16:51 +1300 Subject: [PATCH 02/25] added fork_url cli param to fork node --- forc-plugins/forc-node/src/local/cmd.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/forc-plugins/forc-node/src/local/cmd.rs b/forc-plugins/forc-node/src/local/cmd.rs index d98763e3bc2..fd127b9d3e2 100644 --- a/forc-plugins/forc-node/src/local/cmd.rs +++ b/forc-plugins/forc-node/src/local/cmd.rs @@ -49,6 +49,10 @@ pub struct LocalCmd { #[arg(long = "poa-instant", env)] pub poa_instant: bool, + + /// URL of the remote node to fork from (enables state forking) + #[clap(long, value_name = "URL")] + pub fork_url: Option, } fn get_coins_per_account( From 075d0e19dad32e59a957edd626e9ca42df310c62 Mon Sep 17 00:00:00 2001 From: z Date: Thu, 30 Oct 2025 22:17:47 +1300 Subject: [PATCH 03/25] added fork_block_number param to forc node --- forc-plugins/forc-node/src/local/cmd.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/forc-plugins/forc-node/src/local/cmd.rs b/forc-plugins/forc-node/src/local/cmd.rs index fd127b9d3e2..58bdb55de63 100644 --- a/forc-plugins/forc-node/src/local/cmd.rs +++ b/forc-plugins/forc-node/src/local/cmd.rs @@ -53,6 +53,10 @@ pub struct LocalCmd { /// URL of the remote node to fork from (enables state forking) #[clap(long, value_name = "URL")] pub fork_url: Option, + + /// Block number to fork from (latest if not specified) + #[clap(long, value_name = "BLOCK")] + pub fork_block_number: Option, } fn get_coins_per_account( From 41cb97361d075fafb253cd2297095f0ce8d76f5d Mon Sep 17 00:00:00 2001 From: z Date: Thu, 30 Oct 2025 22:22:35 +1300 Subject: [PATCH 04/25] forc node contract data and state forking support --- forc-plugins/forc-node/src/local/fork.rs | 499 +++++++++++++++++++++++ forc-plugins/forc-node/src/local/mod.rs | 61 ++- 2 files changed, 556 insertions(+), 4 deletions(-) create mode 100644 forc-plugins/forc-node/src/local/fork.rs diff --git a/forc-plugins/forc-node/src/local/fork.rs b/forc-plugins/forc-node/src/local/fork.rs new file mode 100644 index 00000000000..7eee085209c --- /dev/null +++ b/forc-plugins/forc-node/src/local/fork.rs @@ -0,0 +1,499 @@ +use anyhow::Context; +use forc_pkg::source::reg::block_on_any_runtime; +use fuel_core::{ + database::{database_description::on_chain::OnChain, Database}, + state::{ + data_source::DataSourceType, iterable_key_value_view::IterableKeyValueViewWrapper, + key_value_view::KeyValueViewWrapper, ColumnType, IterableKeyValueView, KeyValueView, + TransactableStorage, + }, +}; +use fuel_core_client::client::FuelClient; +use fuel_core_storage::{ + self, + column::Column, + iter::{BoxedIter, IterDirection, IterableStore}, + kv_store::{KVItem, KeyItem, KeyValueInspect, Value, WriteOperation}, + transactional::{Changes, ReferenceBytesKey, StorageChanges}, + Result as StorageResult, +}; +use fuel_core_types::{ + fuel_tx::ContractId, + fuel_types::{BlockHeight, Bytes32}, +}; +use std::{collections::BTreeMap, sync::Arc}; + +#[derive(Clone, Debug)] +pub struct ForkSettings { + pub fork_url: String, + pub fork_block_height: Option, +} + +impl ForkSettings { + pub fn new(fork_url: String, fork_block_height: Option) -> Self { + Self { + fork_url, + fork_block_height, + } + } +} + +#[derive(Debug, Clone)] +pub struct ForkClient { + client: FuelClient, + block_height: Option, +} + +impl ForkClient { + pub fn new(fork_url: String, block_height: Option) -> anyhow::Result { + let client = FuelClient::new(&fork_url) + .with_context(|| format!("failed to create FuelClient for {fork_url}"))?; + Ok(Self { + client, + block_height, + }) + } + + pub fn fetch_contract_bytecode_blocking( + &self, + contract_id: &ContractId, + ) -> anyhow::Result>> { + let client = self.client.clone(); + let contract_id = *contract_id; + match block_on_any_runtime(async move { client.contract(&contract_id).await }) { + Ok(Some(contract)) => Ok(Some(contract.bytecode)), + Ok(None) => Ok(None), + Err(e) => { + tracing::debug!("Failed to fetch contract bytecode: {}", e); + Ok(None) + } + } + } + + pub fn fetch_contract_state_blocking( + &self, + contract_id: &ContractId, + key: &Bytes32, + ) -> anyhow::Result>> { + let client = self.client.clone(); + let block_height = self.block_height; + let contract_id = *contract_id; + let key = *key; + match block_on_any_runtime(async move { + client + .contract_slots_values(&contract_id, block_height, vec![key]) + .await + }) { + Ok(slot_values) => { + for (slot_key, slot_value) in slot_values { + if slot_key == key { + return Ok(Some(slot_value)); + } + } + Ok(None) + } + Err(e) => { + tracing::debug!("Failed to fetch contract state: {}", e); + Ok(None) + } + } + } +} + +#[derive(Clone, Debug)] +pub struct ForkingOnChainStorage { + data_source: DataSourceType, + fork_client: Arc, +} + +impl ForkingOnChainStorage { + pub fn new(on_chain: Database, fork_client: Arc) -> Self { + let data_source = on_chain.inner_storage().data.clone(); + Self { + data_source, + fork_client, + } + } + + pub fn wrap_iterable_view( + &self, + view: IterableKeyValueView, BlockHeight>, + ) -> IterableKeyValueView, BlockHeight> { + let (storage, metadata) = view.into_inner(); + let forked_store = + ForkedView::new(storage, self.data_source.clone(), self.fork_client.clone()); + let wrapped = IterableKeyValueViewWrapper::new(forked_store); + IterableKeyValueView::from_storage_and_metadata(wrapped, metadata) + } + + pub fn wrap_key_value_view( + &self, + view: KeyValueView, BlockHeight>, + ) -> KeyValueView, BlockHeight> { + let (storage, metadata) = view.into_inner(); + let forked_store = + ForkedView::new(storage, self.data_source.clone(), self.fork_client.clone()); + let wrapped = KeyValueViewWrapper::new(forked_store); + KeyValueView::from_storage_and_metadata(wrapped, metadata) + } +} + +impl IterableStore for ForkingOnChainStorage { + fn iter_store( + &self, + column: Self::Column, + prefix: Option<&[u8]>, + start: Option<&[u8]>, + direction: IterDirection, + ) -> BoxedIter { + self.data_source + .iter_store(column, prefix, start, direction) + } + + fn iter_store_keys( + &self, + column: Self::Column, + prefix: Option<&[u8]>, + start: Option<&[u8]>, + direction: IterDirection, + ) -> BoxedIter { + self.data_source + .iter_store_keys(column, prefix, start, direction) + } +} + +impl KeyValueInspect for ForkingOnChainStorage { + type Column = ColumnType; + + fn exists(&self, key: &[u8], column: Self::Column) -> StorageResult { + self.data_source.exists(key, column) + } + + fn size_of_value(&self, key: &[u8], column: Self::Column) -> StorageResult> { + self.data_source.size_of_value(key, column) + } + + fn get(&self, key: &[u8], column: Self::Column) -> StorageResult> { + self.data_source.get(key, column) + } + + fn read( + &self, + key: &[u8], + column: Self::Column, + offset: usize, + buf: &mut [u8], + ) -> StorageResult { + self.data_source.read(key, column, offset, buf) + } +} + +impl TransactableStorage for ForkingOnChainStorage { + fn commit_changes( + &self, + height: Option, + changes: StorageChanges, + ) -> StorageResult<()> { + self.data_source.commit_changes(height, changes) + } + + fn view_at_height( + &self, + height: &BlockHeight, + ) -> StorageResult, BlockHeight>> { + let view = self.data_source.view_at_height(height)?; + Ok(self.wrap_key_value_view(view)) + } + + fn latest_view(&self) -> StorageResult, BlockHeight>> { + let view = self.data_source.latest_view()?; + Ok(self.wrap_iterable_view(view)) + } + + fn rollback_block_to(&self, height: &BlockHeight) -> StorageResult<()> { + self.data_source.rollback_block_to(height) + } + + fn shutdown(&self) { + self.data_source.shutdown(); + } +} + +struct ForkedView { + inner: V, + storage: DataSourceType, + fork_client: Arc, +} + +impl ForkedView { + fn new(inner: V, storage: DataSourceType, fork_client: Arc) -> Self { + tracing::debug!("Creating ForkedView"); + Self { + inner, + storage, + fork_client, + } + } + + fn persist_value(&self, column: Column, key: Vec, value: Vec) { + let mut column_changes = BTreeMap::new(); + column_changes.insert( + ReferenceBytesKey::from(key), + WriteOperation::Insert(value.into()), + ); + + let mut changes = Changes::default(); + changes.insert(column as u32, column_changes); + + if let Err(e) = self + .storage + .commit_changes(None, StorageChanges::Changes(changes)) + { + tracing::warn!( + "Failed to persist forked value for column {:?}: {}", + column, + e + ); + } + } +} + +impl KeyValueInspect for ForkedView +where + V: KeyValueInspect, +{ + type Column = Column; + + fn exists(&self, key: &[u8], column: Self::Column) -> StorageResult { + match column { + Column::ContractsRawCode | Column::ContractsAssets | Column::ContractsState => { + if self.inner.exists(key, column)? { + return Ok(true); + } + + if column == Column::ContractsRawCode { + if let Ok(contract_id) = key.try_into() { + let fork_client = self.fork_client.clone(); + match fork_client.fetch_contract_bytecode_blocking(&contract_id) { + Ok(Some(_)) => Ok(true), + _ => Ok(false), + } + } else { + Ok(false) + } + } else { + Ok(false) + } + } + _ => self.inner.exists(key, column), + } + } + + fn size_of_value(&self, key: &[u8], column: Self::Column) -> StorageResult> { + if let Some(size) = self.inner.size_of_value(key, column)? { + return Ok(Some(size)); + } + + match column { + Column::ContractsRawCode => { + if let Ok(contract_id) = key.try_into() { + let fork_client = self.fork_client.clone(); + match fork_client.fetch_contract_bytecode_blocking(&contract_id) { + Ok(Some(bytecode)) => Ok(Some(bytecode.len())), + _ => Ok(None), + } + } else { + Ok(None) + } + } + _ => Ok(None), + } + } + + fn get(&self, key: &[u8], column: Self::Column) -> StorageResult> { + tracing::trace!("ForkedView::get called for column {:?}", column); + + if let Some(value) = self.inner.get(key, column)? { + tracing::trace!("ForkedView: Found value locally for column {:?}", column); + return Ok(Some(value)); + } + + tracing::trace!( + "ForkedView: Value not found locally for column {:?}, checking if contract-related", + column + ); + + match column { + Column::ContractsRawCode => { + if let Ok(contract_id) = key.try_into() { + tracing::info!( + "ForkedView: Attempting to fetch contract {} from fork", + contract_id + ); + let fork_client = self.fork_client.clone(); + match fork_client.fetch_contract_bytecode_blocking(&contract_id) { + Ok(Some(bytecode)) => { + tracing::info!( + "ForkedView: Successfully fetched contract {} from fork", + contract_id + ); + self.persist_value( + Column::ContractsRawCode, + contract_id.as_ref().to_vec(), + bytecode.clone(), + ); + Ok(Some(bytecode.into())) + } + Ok(None) => { + tracing::debug!( + "ForkedView: Contract {} not found on fork", + contract_id + ); + Ok(None) + } + Err(e) => { + tracing::warn!( + "ForkedView: Error fetching contract {} from fork: {}", + contract_id, + e + ); + Err(fuel_core_storage::Error::Other(e)) + } + } + } else { + Ok(None) + } + } + Column::ContractsAssets => Ok(None), + Column::ContractsState => { + if key.len() >= 64 { + let contract_bytes = &key[..32]; + let state_key_bytes = &key[32..64]; + + if let (Ok(contract_bytes), Ok(state_key_bytes)) = ( + <[u8; 32]>::try_from(contract_bytes), + <[u8; 32]>::try_from(state_key_bytes), + ) { + let contract_id = ContractId::from(contract_bytes); + let state_key = Bytes32::from(state_key_bytes); + tracing::info!( + "ForkedView: Attempting to fetch state for contract {} key {} from fork", + contract_id, + state_key + ); + let fork_client = self.fork_client.clone(); + + match fork_client.fetch_contract_state_blocking(&contract_id, &state_key) { + Ok(Some(state_data)) => { + tracing::info!( + "ForkedView: Successfully fetched state for contract {} key {} from fork", + contract_id, + state_key + ); + let mut storage_key = Vec::with_capacity( + contract_id.as_ref().len() + state_key.as_ref().len(), + ); + storage_key.extend_from_slice(contract_id.as_ref()); + storage_key.extend_from_slice(state_key.as_ref()); + self.persist_value( + Column::ContractsState, + storage_key, + state_data.clone(), + ); + Ok(Some(state_data.into())) + } + Ok(None) => { + tracing::debug!( + "ForkedView: State for contract {} key {} not found on fork", + contract_id, + state_key + ); + Ok(None) + } + Err(e) => { + tracing::warn!( + "ForkedView: Error fetching state for contract {} key {} from fork: {}", + contract_id, + state_key, + e + ); + Err(fuel_core_storage::Error::Other(e)) + } + } + } else { + tracing::warn!("ForkedView: Failed to parse ContractsState key"); + Ok(None) + } + } else { + tracing::warn!( + "ForkedView: ContractsState key too short: {} bytes", + key.len() + ); + Ok(None) + } + } + _ => Ok(None), + } + } + + fn read( + &self, + key: &[u8], + column: Self::Column, + offset: usize, + buf: &mut [u8], + ) -> StorageResult { + if self.inner.read(key, column, offset, buf)? { + return Ok(true); + } + + match column { + Column::ContractsRawCode => { + if let Ok(contract_id) = key.try_into() { + let fork_client = self.fork_client.clone(); + + match fork_client.fetch_contract_bytecode_blocking(&contract_id) { + Ok(Some(bytecode)) => { + if offset >= bytecode.len() { + return Ok(false); + } + let available = bytecode.len() - offset; + let len = available.min(buf.len()); + buf[..len].copy_from_slice(&bytecode[offset..offset + len]); + Ok(true) + } + _ => Ok(false), + } + } else { + Ok(false) + } + } + _ => Ok(false), + } + } +} + +impl IterableStore for ForkedView +where + V: IterableStore, +{ + fn iter_store( + &self, + column: Column, + prefix: Option<&[u8]>, + start: Option<&[u8]>, + direction: IterDirection, + ) -> BoxedIter { + self.inner.iter_store(column, prefix, start, direction) + } + + fn iter_store_keys( + &self, + column: Column, + prefix: Option<&[u8]>, + start: Option<&[u8]>, + direction: IterDirection, + ) -> BoxedIter { + self.inner.iter_store_keys(column, prefix, start, direction) + } +} diff --git a/forc-plugins/forc-node/src/local/mod.rs b/forc-plugins/forc-node/src/local/mod.rs index 130338a9fdb..a4559a1e60a 100644 --- a/forc-plugins/forc-node/src/local/mod.rs +++ b/forc-plugins/forc-node/src/local/mod.rs @@ -1,11 +1,20 @@ pub mod cmd; +mod fork; use crate::{ chain_config::{check_and_update_chain_config, ChainConfig}, util::HumanReadableConfig, }; use forc_tracing::println_green; -use fuel_core::service::FuelService; +use fork::{ForkClient, ForkSettings, ForkingOnChainStorage}; +use fuel_core::{ + combined_database::CombinedDatabase, + database::{database_description::on_chain::OnChain, Database, RegularStage}, + service::FuelService, + state::data_source::{DataSource, DataSourceType}, +}; +use fuel_core_types::fuel_types::BlockHeight; +use std::sync::Arc; /// Local is a local node suited for local development. /// By default, the node is in `debug` mode and the db used is `in-memory`. @@ -13,17 +22,61 @@ use fuel_core::service::FuelService; pub async fn run(cmd: cmd::LocalCmd, dry_run: bool) -> anyhow::Result> { check_and_update_chain_config(ChainConfig::Local).await?; + let fork_url = cmd.fork_url.clone(); + let fork_block_number = cmd.fork_block_number; let config = fuel_core::service::Config::from(cmd); + let fork_settings = fork_url.map(|url| { + let block_height = fork_block_number.map(BlockHeight::new); + ForkSettings::new(url, block_height) + }); + if dry_run { // For dry run, display the configuration that would be used println_green(&format!("{}", HumanReadableConfig::from(&config))); + if let Some(fork) = fork_settings { + println_green(&format!( + "State fork enabled from {} at height {:?}", + fork.fork_url, fork.fork_block_height + )); + } return Ok(None); } println_green("Starting fuel-core service..."); - let service = FuelService::new_node(config) - .await - .map_err(|e| anyhow::anyhow!("Failed to start fuel-core service: {}", e))?; + + let service = match fork_settings { + Some(fork_settings) => { + let combined_database = CombinedDatabase::from_config(&config.combined_db_config) + .map_err(|e| anyhow::anyhow!("Failed to start fuel-core service: {}", e))?; + + let fork_client = Arc::new(ForkClient::new( + fork_settings.fork_url.clone(), + fork_settings.fork_block_height, + )?); + + let off_chain = combined_database.off_chain().clone(); + let relayer = combined_database.relayer().clone(); + let gas_price = combined_database.gas_price().clone(); + let compression = combined_database.compression().clone(); + let on_chain = { + let on_chain = combined_database.on_chain().clone(); + let (_, metadata) = on_chain.clone().into_inner(); + let stage: RegularStage = Default::default(); + let forking_storage: DataSourceType = + Arc::new(ForkingOnChainStorage::new(on_chain, fork_client)); + let data_source = DataSource::new(forking_storage, stage); + Database::from_storage_and_metadata(data_source, metadata) + }; + let combined_database = + CombinedDatabase::new(on_chain, off_chain, relayer, gas_price, compression); + FuelService::from_combined_database(combined_database, config) + .await + .map_err(|e| anyhow::anyhow!("Failed to start fuel-core service: {}", e))? + } + None => FuelService::new_node(config) + .await + .map_err(|e| anyhow::anyhow!("Failed to start fuel-core service: {}", e))?, + }; println_green(&format!("Service started on: {}", service.bound_address)); Ok(Some(service)) From b6b177e0288d544d1fac9d09e249d2e42ec4e13a Mon Sep 17 00:00:00 2001 From: z Date: Fri, 31 Oct 2025 14:52:49 +1300 Subject: [PATCH 05/25] added state forking e2e tests --- forc-plugins/forc-node/tests/local.rs | 500 +++++++++++++++++++++++++- 1 file changed, 497 insertions(+), 3 deletions(-) diff --git a/forc-plugins/forc-node/tests/local.rs b/forc-plugins/forc-node/tests/local.rs index 8d63ce0c55d..c34c5178fa7 100644 --- a/forc-plugins/forc-node/tests/local.rs +++ b/forc-plugins/forc-node/tests/local.rs @@ -1,13 +1,505 @@ -use std::time::Duration; +use std::{ + net::{Ipv4Addr, SocketAddr}, + path::{Path, PathBuf}, + str::FromStr, + time::Duration, +}; +use forc_client::{cmd, op::call as forc_call, NodeTarget}; use forc_node::local::{cmd::LocalCmd, run}; +use fuel_core::service::FuelService; +use fuel_core_client::client::FuelClient; +use fuel_crypto::SecretKey; +use fuel_tx::Input; +use fuels::{ + accounts::{signers::private_key::PrivateKeySigner, wallet::Wallet}, + prelude::{ + setup_single_asset_coins, setup_test_provider, AssetId, Contract, LoadConfiguration, + NodeConfig, Provider, TxPolicies, + }, +}; use serde_json::json; use tokio::time::sleep; -#[ignore = "CI errors with: IO error: not a terminal"] +const DEFAULT_PRIVATE_KEY: &str = + "0xde97d8624a438121b86a1956544bd72ed68cd69f2c99555b08b1e8c51ffd511c"; + +mod fork { + pub const CONTRACT_BIN: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/fork/fork.bin"); + pub const CONTRACT_ABI: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/fork/fork-abi.json"); + fuels::prelude::abigen!(Contract( + name = "Contract", + abi = "forc-plugins/forc-node/tests/fork/fork-abi.json", + )); +} + +mod fork_caller { + pub const CONTRACT_BIN: &str = concat!( + env!("CARGO_MANIFEST_DIR"), + "/tests/fork-caller/fork-caller.bin" + ); + pub const CONTRACT_ABI: &str = concat!( + env!("CARGO_MANIFEST_DIR"), + "/tests/fork-caller/fork-caller-abi.json" + ); + fuels::prelude::abigen!(Contract( + name = "Contract", + abi = "forc-plugins/forc-node/tests/fork-caller/fork-caller-abi.json", + )); +} + +async fn run_node(fork_url: Option) -> (FuelService, String) { + let port = portpicker::pick_unused_port().expect("pick port"); + + let db_path = tempfile::tempdir() + .expect("Failed to create temp dir for tests") + .path() + .to_path_buf(); + + let secret = SecretKey::from_str(DEFAULT_PRIVATE_KEY).expect("valid private key"); + let address = Input::owner(&secret.public_key()); + let default_account_address = format!("{address:#x}"); + + let local_cmd = LocalCmd { + chain_config: None, + port: Some(port), + db_path: Some(db_path), + account: vec![default_account_address], + db_type: Some(fuel_core::service::DbType::RocksDb), + debug: true, + historical_execution: true, + poa_instant: true, + fork_url, + fork_block_number: None, + }; + let service = run(local_cmd, false).await.unwrap().unwrap(); + // Wait for node to start graphql service + sleep(Duration::from_secs(2)).await; + + (service, format!("http://127.0.0.1:{port}/v1/graphql")) +} + +async fn forc_call_result( + contract_id: &fuel_tx::ContractId, + abi_path: &str, + graphql_endpoint: &str, + function: &str, + function_args: Vec, +) -> String { + let secret_key = SecretKey::from_str(DEFAULT_PRIVATE_KEY).expect("parse private key"); + let call_cmd = cmd::Call { + address: (*(*contract_id)).into(), + abi: Some(cmd::call::AbiSource::File(PathBuf::from(abi_path))), + function: Some(function.to_string()), + function_args, + node: NodeTarget { + node_url: Some(graphql_endpoint.to_string()), + ..Default::default() + }, + caller: cmd::call::Caller { + signing_key: Some(secret_key), + wallet: false, + }, + call_parameters: Default::default(), + mode: cmd::call::ExecutionMode::DryRun, + gas: None, + external_contracts: None, + contract_abis: None, + label: None, + output: cmd::call::OutputFormat::Raw, + list_functions: false, + variable_output: None, + verbosity: 0, + debug: false, + }; + + let operation = call_cmd + .validate_and_get_operation() + .expect("validate forc-call operation"); + + forc_call::call(operation, call_cmd) + .await + .expect("forc-call failed") + .result + .expect("forc-call did not return result") + .trim() + .to_string() +} + +#[tokio::test] +async fn fork_contract_bytecode() { + let secret_key = SecretKey::from_str(DEFAULT_PRIVATE_KEY).expect("parse private key"); + let signer = PrivateKeySigner::new(secret_key); + let coins = setup_single_asset_coins(signer.address(), AssetId::zeroed(), 1, 1_000_000); + let node_config = NodeConfig { + addr: SocketAddr::new( + Ipv4Addr::LOCALHOST.into(), + portpicker::pick_unused_port().expect("pick port"), + ), + ..Default::default() + }; + + let provider = setup_test_provider(coins, vec![], Some(node_config), None) + .await + .expect("start test provider"); + let graphql_endpoint = format!("{}/v1/graphql", provider.url()); + let wallet = Wallet::new(signer, provider.clone()); + + let deployed = Contract::load_from(Path::new(fork::CONTRACT_BIN), LoadConfiguration::default()) + .expect("load contract bytecode") + .deploy(&wallet, TxPolicies::default()) + .await + .expect("deploy contract"); + let contract_id_hex = format!("{:#x}", deployed.contract_id); + + let original_client = + FuelClient::new(&graphql_endpoint).expect("create fuel client for original node"); + let original_contract = original_client + .contract(&deployed.contract_id) + .await + .expect("query original node") + .expect("contract missing on original node"); + assert!( + !original_contract.bytecode.is_empty(), + "bytecode missing on original node" + ); + + let (_fork_service, fork_url) = run_node(Some(graphql_endpoint)).await; + let graphql_query = format!("{{ contract(id: \"{contract_id_hex}\") {{ bytecode }} }}"); + let response = reqwest::Client::new() + .post(&fork_url) + .header("Content-Type", "application/json") + .json(&json!({ "query": graphql_query })) + .send() + .await + .expect("query test provider for bytecode"); + assert!( + response.status().is_success(), + "graphql request failed: {}", + response.status() + ); + + let body: serde_json::Value = response.json().await.expect("parse graphql response"); + if let Some(errors) = body.get("errors") { + panic!("graphql reported errors: {errors}"); + } + + let bytecode_value = body + .get("data") + .and_then(|data| data.get("contract")) + .and_then(|contract| contract.get("bytecode")) + .expect("missing bytecode in graphql response"); + + let serde_json::Value::String(bytecode) = bytecode_value else { + panic!("bytecode missing for deployed contract"); + }; + + assert!( + !bytecode.trim().is_empty(), + "bytecode missing for forked contract" + ); +} + +#[tokio::test] +async fn fork_contract_state_with_forc_call() { + let secret_key = SecretKey::from_str(DEFAULT_PRIVATE_KEY).expect("parse private key"); + let signer = PrivateKeySigner::new(secret_key); + + // deploy a contract on the original node + let (_original_service, original_url) = run_node(None).await; + let wallet = Wallet::new( + signer.clone(), + Provider::connect(&original_url) + .await + .expect("connect provider to original node"), + ); + + let deployment = + Contract::load_from(Path::new(fork::CONTRACT_BIN), LoadConfiguration::default()) + .expect("load contract bytecode") + .deploy(&wallet, TxPolicies::default()) + .await + .expect("deploy contract to original node"); + let contract_id = deployment.contract_id; + + // verify that the original node returns the original contract state (remains unchanged) + let original_count = forc_call_result( + &contract_id, + fork::CONTRACT_ABI, + &original_url, + "get_count", + vec![], + ) + .await; + assert_eq!( + original_count, "0", + "unexpected initial contract state on original node" + ); + + // fork the original node + let (_fork_service, fork_url) = run_node(Some(original_url.clone())).await; + + // verify that the forked node returns the original contract state (remains unchanged) + let fork_result = forc_call_result( + &contract_id, + fork::CONTRACT_ABI, + &fork_url, + "get_count", + vec![], + ) + .await; + assert_eq!( + fork_result, original_count, + "forked node returned unexpected contract state" + ); + + // update the contract state on the original node + let increment_amount_orig = (2u64, 3u64); + let contract_instance = fork::Contract::new(contract_id, wallet); + contract_instance + .methods() + .increment_count(fork::Adder { + vals: increment_amount_orig, + }) + .call() + .await + .expect("increment contract counter"); + + // verify that the contract state was updated on the original node + let updated_count = contract_instance + .methods() + .get_count() + .call() + .await + .expect("call get_count after update") + .value; + assert_eq!( + updated_count, + increment_amount_orig.0 + increment_amount_orig.1, + "failed to update contract state" + ); + + // verify that the forked node returns the original contract state (remains unchanged) + let fork_result = forc_call_result( + &contract_id, + fork::CONTRACT_ABI, + &fork_url, + "get_count", + vec![], + ) + .await; + assert_eq!( + fork_result, original_count, + "forked node returned unexpected contract state" + ); + + let wallet = Wallet::new( + signer, + Provider::connect(&fork_url) + .await + .expect("connect provider to forked node"), + ); + + // update the contract state on the forked node + let increment_amount_fork = (4u64, 5u64); + let contract_instance = fork::Contract::new(contract_id, wallet); + contract_instance + .methods() + .increment_count(fork::Adder { + vals: increment_amount_fork, + }) + .call() + .await + .expect("increment contract counter"); + + // verify that the contract state was updated on the forked node + let fork_result = forc_call_result( + &contract_id, + fork::CONTRACT_ABI, + &fork_url, + "get_count", + vec![], + ) + .await; + assert_eq!( + fork_result, + format!("{}", increment_amount_fork.0 + increment_amount_fork.1), + "forked node returned unexpected contract state" + ); + + // verify that the original node returns the original contract state (remains unchanged) + let original_result = forc_call_result( + &contract_id, + fork::CONTRACT_ABI, + &original_url, + "get_count", + vec![], + ) + .await; + assert_eq!( + original_result, + format!("{}", increment_amount_orig.0 + increment_amount_orig.1), + "original node returned unexpected contract state" + ); +} + +#[tokio::test] +async fn update_transitive_contract_state() { + let secret_key = SecretKey::from_str(DEFAULT_PRIVATE_KEY).expect("parse private key"); + let signer = PrivateKeySigner::new(secret_key); + + // deploy contract A on the original node + let (_original_service, original_url) = run_node(None).await; + let wallet = Wallet::new( + signer.clone(), + Provider::connect(&original_url) + .await + .expect("connect provider to original node"), + ); + + // deploy contract A on the original node + let deployment = + Contract::load_from(Path::new(fork::CONTRACT_BIN), LoadConfiguration::default()) + .expect("load contract bytecode") + .deploy(&wallet, TxPolicies::default()) + .await + .expect("deploy contract to original node"); + let contract_a_id = deployment.contract_id; + + // deploy contract B on the original node + let deployment = Contract::load_from( + Path::new(fork_caller::CONTRACT_BIN), + LoadConfiguration::default(), + ) + .expect("load contract bytecode") + .deploy(&wallet, TxPolicies::default()) + .await + .expect("deploy contract to original node"); + let contract_b_id = deployment.contract_id; + + // verify that the original node returns correct contract A state + let result = forc_call_result( + &contract_a_id, + fork::CONTRACT_ABI, + &original_url, + "get_count", + vec![], + ) + .await; + assert_eq!( + result, "0", + "original node returned unexpected contract A state" + ); + + // verify that the original node returns correct contract A state via calling contract B + let result_b = forc_call_result( + &contract_b_id, + fork_caller::CONTRACT_ABI, + &original_url, + "check_current_count", + vec![format!("{{{:#x}}}", contract_a_id)], + ) + .await; + assert_eq!( + result_b, "0", + "unexpected initial contract state on original node" + ); + + // fork the original node + let (_fork_service, fork_url) = run_node(Some(original_url.clone())).await; + + // verify that the forked node returns the original contract state (remains unchanged) + let fork_result = forc_call_result( + &contract_a_id, + fork::CONTRACT_ABI, + &fork_url, + "get_count", + vec![], + ) + .await; + assert_eq!( + fork_result, "0", + "forked node returned unexpected contract state" + ); + + // connect to the forked node + let fork_wallet = Wallet::new( + signer, + Provider::connect(&fork_url) + .await + .expect("connect provider to forked node"), + ); + + // update the contract A state on the forked node + let increment_amount_fork = (4u64, 5u64); + let contract_instance = fork::Contract::new(contract_a_id, fork_wallet.clone()); + contract_instance + .methods() + .increment_count(fork::Adder { + vals: increment_amount_fork, + }) + .call() + .await + .expect("increment contract counter"); + + // update the contract A state on the forked node by calling the contract B + // let contract_instance = fork_caller::Contract::new(contract_b_id.clone(), fork_wallet); + // contract_instance + // .methods() + // .call_increment_count(contract_a_id.clone(), fork_caller::Adder { vals: increment_amount_fork }) + // .with_contract_ids(&[contract_a_id.clone()]) + // .call() + // .await + // .expect("fork-caller: update contract A state via contract B"); + + // verify that the contract A state was updated on the forked node + let fork_result = forc_call_result( + &contract_a_id, + fork::CONTRACT_ABI, + &fork_url, + "get_count", + vec![], + ) + .await; + assert_eq!( + fork_result, + format!("{}", increment_amount_fork.0 + increment_amount_fork.1), + "fork-caller: forked node returned unexpected contract A state" + ); + + // verify that the contract state was transitively updated by calling contract B on the forked node + let fork_result = forc_call_result( + &contract_b_id, + fork_caller::CONTRACT_ABI, + &fork_url, + "check_current_count", + vec![format!("{{{:#x}}}", contract_a_id)], + ) + .await; + assert_eq!( + fork_result, + format!("{}", increment_amount_fork.0 + increment_amount_fork.1), + "forked node returned unexpected contract B state" + ); + + // verify that the original node returns unchanged contract A state + let original_result = forc_call_result( + &contract_a_id, + fork::CONTRACT_ABI, + &original_url, + "get_count", + vec![], + ) + .await; + assert_eq!( + original_result, "0", + "original node returned unexpected contract A state" + ); +} + #[tokio::test] async fn start_local_node_check_health() { - let port = portpicker::pick_unused_port().expect("No ports free"); + let port = portpicker::pick_unused_port().expect("pick port"); let local_cmd = LocalCmd { chain_config: None, port: Some(port), @@ -17,6 +509,8 @@ async fn start_local_node_check_health() { debug: false, historical_execution: false, poa_instant: false, + fork_url: None, + fork_block_number: None, }; let _service = run(local_cmd, false).await.unwrap().unwrap(); From c1b7a90f4686065ab9b6893f68a7901adb3eb13a Mon Sep 17 00:00:00 2001 From: z Date: Fri, 31 Oct 2025 14:52:58 +1300 Subject: [PATCH 06/25] fuel-core branch patch --- Cargo.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 64fad61a784..730fbbcc08e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -259,3 +259,10 @@ vte = "0.13" walkdir = "2.3" whoami = "1.5" wiremock = "0.6" + +[patch.crates-io] +fuel-core = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } +fuel-core-chain-config = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } +fuel-core-client = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } +fuel-core-storage = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } +fuel-core-types = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } From 440a91c3f729c8c1e6255b18adc2006778eecc9d Mon Sep 17 00:00:00 2001 From: z Date: Fri, 31 Oct 2025 14:53:00 +1300 Subject: [PATCH 07/25] forc-node cargo.toml upd --- forc-plugins/forc-node/Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/forc-plugins/forc-node/Cargo.toml b/forc-plugins/forc-node/Cargo.toml index b5a0c29b65a..98e11530627 100644 --- a/forc-plugins/forc-node/Cargo.toml +++ b/forc-plugins/forc-node/Cargo.toml @@ -21,8 +21,11 @@ clap = { workspace = true, features = ["derive", "string"] } dialoguer.workspace = true forc-tracing.workspace = true forc-util.workspace = true +forc-pkg.workspace = true fuel-core = { workspace = true, default-features = false, features = ["relayer", "rocksdb", "test-helpers"] } fuel-core-chain-config.workspace = true +fuel-core-client.workspace = true +fuel-core-storage.workspace = true fuel-core-types.workspace = true fuel-crypto = { workspace = true, features = ["random"] } libc.workspace = true @@ -38,6 +41,9 @@ tracing.workspace = true tracing-subscriber.workspace = true [dev-dependencies] +fuel-tx.workspace = true +fuels.workspace = true +forc-client.workspace = true portpicker.workspace = true reqwest = { workspace = true, features = ["json"] } serde_json.workspace = true From e85b5b525558ed58d80a745f79cce621654cb5e6 Mon Sep 17 00:00:00 2001 From: z Date: Fri, 31 Oct 2025 14:53:03 +1300 Subject: [PATCH 08/25] cargo.lock upd --- Cargo.lock | 157 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 96 insertions(+), 61 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 243d4804584..dd23c2e93cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4105,12 +4105,18 @@ dependencies = [ "anyhow", "clap", "dialoguer", + "forc-client", + "forc-pkg", "forc-tracing 0.70.1", "forc-util", "fuel-core", "fuel-core-chain-config 0.46.0", + "fuel-core-client 0.46.0", + "fuel-core-storage 0.46.0", "fuel-core-types 0.46.0", "fuel-crypto", + "fuel-tx", + "fuels 0.75.1", "libc", "libp2p-identity", "portpicker", @@ -4407,8 +4413,7 @@ dependencies = [ [[package]] name = "fuel-core" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d31ad9ea2111f9c2f9bfcc175c565d041e1d2d4ca1d28414fea8d46f59d2259" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "async-graphql", @@ -4425,12 +4430,12 @@ dependencies = [ "fuel-core-executor", "fuel-core-gas-price-service", "fuel-core-importer", - "fuel-core-metrics 0.46.0", + "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-p2p", - "fuel-core-poa 0.46.0", + "fuel-core-poa 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-producer", "fuel-core-relayer", - "fuel-core-services 0.46.0", + "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-shared-sequencer", "fuel-core-storage 0.46.0", "fuel-core-tx-status-manager", @@ -4488,8 +4493,7 @@ dependencies = [ [[package]] name = "fuel-core-chain-config" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22eafbabed0229dfc8af85619855887fc662a185c58cb3d578a63c8a372d327" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "bech32", @@ -4533,8 +4537,7 @@ dependencies = [ [[package]] name = "fuel-core-client" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9543159741956f6a44d5f82127064c05a688eb6f1508a43806b9e60ffb36efe" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "base64 0.22.1", @@ -4559,8 +4562,7 @@ dependencies = [ [[package]] name = "fuel-core-compression" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa3c474257a09a9b12eeff9f10d092b89f3d5dadd143fea299a4c6d93e2d47ef" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "enum_dispatch", @@ -4574,15 +4576,14 @@ dependencies = [ [[package]] name = "fuel-core-compression-service" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031cde7f42dfa79927bf396c3df0bb531c0f5afef509a1202dc2bab1dd1f77e3" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "async-trait", "enum-iterator", "fuel-core-compression", - "fuel-core-metrics 0.46.0", - "fuel-core-services 0.46.0", + "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", + "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-storage 0.46.0", "fuel-core-types 0.46.0", "futures", @@ -4598,12 +4599,11 @@ dependencies = [ [[package]] name = "fuel-core-consensus-module" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c427b131c6b53d9541d98903c9e7965602cb88a0d69c95e27c54e4fb599a58" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "fuel-core-chain-config 0.46.0", - "fuel-core-poa 0.46.0", + "fuel-core-poa 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-storage 0.46.0", "fuel-core-types 0.46.0", ] @@ -4611,8 +4611,7 @@ dependencies = [ [[package]] name = "fuel-core-database" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8a86c1d167857f3268ea3905043bf71befa2b57fedd387c0bcc455c0f3bc4dd" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "derive_more 0.99.20", @@ -4623,8 +4622,7 @@ dependencies = [ [[package]] name = "fuel-core-executor" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f93d38367242c799739d50e0ff3d0b4b69ef2aca845bbcc7c708105716b73" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "fuel-core-storage 0.46.0", @@ -4637,14 +4635,13 @@ dependencies = [ [[package]] name = "fuel-core-gas-price-service" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c313fb9d02e8ba40f7446e4742cdbfcf01a2750c1ec3368e57970c417c86c6e" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "async-trait", "enum-iterator", - "fuel-core-metrics 0.46.0", - "fuel-core-services 0.46.0", + "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", + "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-storage 0.46.0", "fuel-core-types 0.46.0", "fuel-gas-price-algorithm", @@ -4666,12 +4663,11 @@ dependencies = [ [[package]] name = "fuel-core-importer" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2270df9d744fd6d5fbf4ddfbdb6aa59ee7fc2e44d8a69ea6010c6c5eb57a951a" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "derive_more 0.99.20", - "fuel-core-metrics 0.46.0", + "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-storage 0.46.0", "fuel-core-types 0.46.0", "mockall", @@ -4712,17 +4708,31 @@ dependencies = [ "tracing", ] +[[package]] +name = "fuel-core-metrics" +version = "0.46.0" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +dependencies = [ + "once_cell", + "parking_lot", + "pin-project-lite", + "prometheus-client", + "regex", + "strum 0.25.0", + "strum_macros 0.25.3", + "tracing", +] + [[package]] name = "fuel-core-p2p" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6923d96d610fdf816fb047e6603baae1c1cca35ee9d5dbdf0aa1632b155fd287" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "async-trait", "fuel-core-chain-config 0.46.0", - "fuel-core-metrics 0.46.0", - "fuel-core-services 0.46.0", + "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", + "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-storage 0.46.0", "fuel-core-types 0.46.0", "futures", @@ -4773,7 +4783,26 @@ dependencies = [ "anyhow", "async-trait", "fuel-core-chain-config 0.46.0", - "fuel-core-services 0.46.0", + "fuel-core-services 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fuel-core-storage 0.46.0", + "fuel-core-types 0.46.0", + "serde", + "serde_json", + "thiserror 2.0.17", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "fuel-core-poa" +version = "0.46.0" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +dependencies = [ + "anyhow", + "async-trait", + "fuel-core-chain-config 0.46.0", + "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-storage 0.46.0", "fuel-core-types 0.46.0", "serde", @@ -4787,8 +4816,7 @@ dependencies = [ [[package]] name = "fuel-core-producer" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854ecfa61f6ff888076ff13c5912af09ee415660603b8b79c09c06316b099a81" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "async-trait", @@ -4803,8 +4831,7 @@ dependencies = [ [[package]] name = "fuel-core-relayer" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0793161971626bc9ff6c2ca0c8f771eb6ded6de4af45156a2eab645cda947e20" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "async-trait", @@ -4813,7 +4840,7 @@ dependencies = [ "ethers-contract", "ethers-core", "ethers-providers", - "fuel-core-services 0.46.0", + "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-storage 0.46.0", "fuel-core-types 0.46.0", "futures", @@ -4849,7 +4876,22 @@ checksum = "e59554b05ce13920349ca3b16169537366c2fff8e3f048f091c73c5e648c13fe" dependencies = [ "anyhow", "async-trait", - "fuel-core-metrics 0.46.0", + "fuel-core-metrics 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures", + "parking_lot", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "fuel-core-services" +version = "0.46.0" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +dependencies = [ + "anyhow", + "async-trait", + "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "futures", "parking_lot", "pin-project-lite", @@ -4861,15 +4903,14 @@ dependencies = [ [[package]] name = "fuel-core-shared-sequencer" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3683977ac19d41bfa5c659337be029c4bdfab61e75032e2ca5d4cb944a75bef5" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "async-trait", "base64 0.22.1", "cosmos-sdk-proto", "cosmrs", - "fuel-core-services 0.46.0", + "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-types 0.46.0", "fuel-sequencer-proto", "futures", @@ -4909,8 +4950,7 @@ dependencies = [ [[package]] name = "fuel-core-storage" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9794ba715ae21e0fae1c7d27715d2b9e5141d19741bd16f31ec4e39bc3d4c270" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "derive_more 0.99.20", @@ -4933,13 +4973,12 @@ dependencies = [ [[package]] name = "fuel-core-tx-status-manager" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73cfff4af5034b5f7494057de960e4a10163d68b7d8b4b368bc6f5f98c9740af" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "async-trait", - "fuel-core-metrics 0.46.0", - "fuel-core-services 0.46.0", + "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", + "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-types 0.46.0", "futures", "parking_lot", @@ -4952,14 +4991,13 @@ dependencies = [ [[package]] name = "fuel-core-txpool" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5d5a076a0b420aa3472625b34bbcd2d1926049b004d3ef0c3c874b0cc34c91" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "async-trait", "derive_more 0.99.20", - "fuel-core-metrics 0.46.0", - "fuel-core-services 0.46.0", + "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", + "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", "fuel-core-storage 0.46.0", "fuel-core-types 0.46.0", "futures", @@ -4995,8 +5033,7 @@ dependencies = [ [[package]] name = "fuel-core-types" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca27da74919063824f0826a6f707637d26db7b24ac237bf6cc1af5a866bb3a" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "anyhow", "bs58", @@ -5016,8 +5053,7 @@ dependencies = [ [[package]] name = "fuel-core-upgradable-executor" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226544750e8ef4e035618ae3c2c60a81ee0a962b0bd1fe672aef9ad66a1a2229" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "fuel-core-executor", "fuel-core-storage 0.46.0", @@ -5109,8 +5145,7 @@ dependencies = [ [[package]] name = "fuel-gas-price-algorithm" version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d734822afcc730511928425da8c1bc062e8eb62eeae4611692387b10fbba3772" +source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" dependencies = [ "serde", "thiserror 2.0.17", @@ -5492,8 +5527,8 @@ checksum = "acc96b30b63b228c87a18bcd61a9a8e5bcd1fca62f4cc5729346c3538b363e48" dependencies = [ "fuel-core-chain-config 0.46.0", "fuel-core-client 0.46.0", - "fuel-core-poa 0.46.0", - "fuel-core-services 0.46.0", + "fuel-core-poa 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fuel-core-services 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", "fuel-core-types 0.46.0", "fuel-crypto", "fuel-tx", From 34b4583e78a2b8485d8f8bacf476362ea13f576f Mon Sep 17 00:00:00 2001 From: z Date: Fri, 31 Oct 2025 14:53:06 +1300 Subject: [PATCH 09/25] forc node forking integration test contracts --- .../forc-node/tests/fork-caller/Forc.lock | 9 ++ .../forc-node/tests/fork-caller/Forc.toml | 7 ++ .../tests/fork-caller/fork-caller-abi.json | 93 ++++++++++++++++++ .../fork-caller-storage_slots.json | 1 + .../tests/fork-caller/fork-caller.bin | Bin 0 -> 3376 bytes .../forc-node/tests/fork-caller/src/main.sw | 31 ++++++ forc-plugins/forc-node/tests/fork/Forc.lock | 9 ++ forc-plugins/forc-node/tests/fork/Forc.toml | 7 ++ .../forc-node/tests/fork/fork-abi.json | 84 ++++++++++++++++ .../tests/fork/fork-storage_slots.json | 6 ++ forc-plugins/forc-node/tests/fork/fork.bin | Bin 0 -> 2216 bytes forc-plugins/forc-node/tests/fork/src/main.sw | 31 ++++++ 12 files changed, 278 insertions(+) create mode 100644 forc-plugins/forc-node/tests/fork-caller/Forc.lock create mode 100644 forc-plugins/forc-node/tests/fork-caller/Forc.toml create mode 100644 forc-plugins/forc-node/tests/fork-caller/fork-caller-abi.json create mode 100644 forc-plugins/forc-node/tests/fork-caller/fork-caller-storage_slots.json create mode 100644 forc-plugins/forc-node/tests/fork-caller/fork-caller.bin create mode 100644 forc-plugins/forc-node/tests/fork-caller/src/main.sw create mode 100644 forc-plugins/forc-node/tests/fork/Forc.lock create mode 100644 forc-plugins/forc-node/tests/fork/Forc.toml create mode 100644 forc-plugins/forc-node/tests/fork/fork-abi.json create mode 100644 forc-plugins/forc-node/tests/fork/fork-storage_slots.json create mode 100644 forc-plugins/forc-node/tests/fork/fork.bin create mode 100644 forc-plugins/forc-node/tests/fork/src/main.sw diff --git a/forc-plugins/forc-node/tests/fork-caller/Forc.lock b/forc-plugins/forc-node/tests/fork-caller/Forc.lock new file mode 100644 index 00000000000..d7ca55af820 --- /dev/null +++ b/forc-plugins/forc-node/tests/fork-caller/Forc.lock @@ -0,0 +1,9 @@ +[[package]] +name = "fork-caller" +source = "member" +dependencies = ["std"] + +[[package]] +name = "std" +version = "0.69.1" +source = "registry+std?0.69.1#QmbPunScay4xpfHKpxQ71dFKXSiyJuPP8P8YhgX5Dkmzm9!" diff --git a/forc-plugins/forc-node/tests/fork-caller/Forc.toml b/forc-plugins/forc-node/tests/fork-caller/Forc.toml new file mode 100644 index 00000000000..5fd4571e56e --- /dev/null +++ b/forc-plugins/forc-node/tests/fork-caller/Forc.toml @@ -0,0 +1,7 @@ +[project] +authors = ["z"] +entry = "main.sw" +license = "Apache-2.0" +name = "fork-caller" + +[dependencies] diff --git a/forc-plugins/forc-node/tests/fork-caller/fork-caller-abi.json b/forc-plugins/forc-node/tests/fork-caller/fork-caller-abi.json new file mode 100644 index 00000000000..d7e545ac8db --- /dev/null +++ b/forc-plugins/forc-node/tests/fork-caller/fork-caller-abi.json @@ -0,0 +1,93 @@ +{ + "programType": "contract", + "specVersion": "1.1", + "encodingVersion": "1", + "concreteTypes": [ + { + "type": "struct Adder", + "concreteTypeId": "4717fd7abcab99b1028d795354df7d1cddda94883a45770a6d7c8cae0c21173f", + "metadataTypeId": 2 + }, + { + "type": "struct std::contract_id::ContractId", + "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54", + "metadataTypeId": 3 + }, + { + "type": "u64", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "metadataTypes": [ + { + "type": "(_, _)", + "metadataTypeId": 0, + "components": [ + { + "name": "__tuple_element", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "__tuple_element", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "b256", + "metadataTypeId": 1 + }, + { + "type": "struct Adder", + "metadataTypeId": 2, + "components": [ + { + "name": "_vals", + "typeId": 0 + } + ] + }, + { + "type": "struct std::contract_id::ContractId", + "metadataTypeId": 3, + "components": [ + { + "name": "bits", + "typeId": 1 + } + ] + } + ], + "functions": [ + { + "name": "call_increment_count", + "inputs": [ + { + "name": "contract_id", + "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54" + }, + { + "name": "adder", + "concreteTypeId": "4717fd7abcab99b1028d795354df7d1cddda94883a45770a6d7c8cae0c21173f" + } + ], + "output": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0", + "attributes": null + }, + { + "name": "check_current_count", + "inputs": [ + { + "name": "contract_id", + "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54" + } + ], + "output": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0", + "attributes": null + } + ], + "loggedTypes": [], + "messagesTypes": [], + "configurables": [], + "errorCodes": {} +} \ No newline at end of file diff --git a/forc-plugins/forc-node/tests/fork-caller/fork-caller-storage_slots.json b/forc-plugins/forc-node/tests/fork-caller/fork-caller-storage_slots.json new file mode 100644 index 00000000000..0637a088a01 --- /dev/null +++ b/forc-plugins/forc-node/tests/fork-caller/fork-caller-storage_slots.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/forc-plugins/forc-node/tests/fork-caller/fork-caller.bin b/forc-plugins/forc-node/tests/fork-caller/fork-caller.bin new file mode 100644 index 0000000000000000000000000000000000000000..352b394e62d47521be1cdcac9e47dc5fe91d499b GIT binary patch literal 3376 zcmb7HUyK`P5g%W!iTj7%*WO+0ZW6kw+SEm=w0CK$Jg((9>%+19xvu52+-1LVI`t53 zy0V&Z2oQeYArGiBAmAeL$3Xuav_-p)eafTXID`;Jh^k0Dn1@I?HCFvV#6=(-zu8^q zd{t?MrPJ86GxN>-<~Q^0X(NMPBbuh*b6+ErpEK;eUQF!m@iWqHO8Ooh-n7%B8Ihu% zeO7(Z8H(RRF4;?h>gOpgGIKpy@IHY4s58`$si7gHwRJ{W9?L9C+wy)7n{C)U0vk<2 zr!uh1b=TFBfb=}ILt=)ypacJL~F(%IHGdL2lOtUD;hY zcIlt=W#lI~KWTN>;d3L5)h5I+5o;DQC39^(inSTW>hwMq>u$uFs+;tUXH6o+d?2XV z8a*g7qK8~vS!lc3j*hbpKKmTCjIz!_$u(})a zS?E6q^&P2F@X2*twFE2*orcN_J**993{d0W@%J}_bGcvpE8)z=FKOvM0S90Z)c?9| z^~uilV|JlGB}-SY0pqWs-gTVyb!oM)h4D<%{t?)BZ1}?`2A?V9E1V(y5JHWwU{~uV5&KQx_Lei0Z=)y6A$Dqvb@h%t_omV{VGl0o zzeeuAfxWBkpfA_u*gk*2zSJ4O{wJ{iDeQj+`($Vz^zli|P)k|pO>Qe0&d}B}_rp$m ze}Ha{b?DO{fivcz3B2e8;ys2Q_rW^@+~`ltQ4MwLQQg2d==C~F#QT$NjplgjQ&UgoyybDa;!&$9^{5Jk`kl&qM)cte#wBYj#)P824-^Tl>*@*ak zIjT93!0pe-zqQZrh2Js1e@OJ`kKz>VMRK)ti!`fAT5dqtZ%P$fm}5_3j)fXxHa_&2 zQ;!8T6|nQ5=kuXEKAV~`XH$rEmgtg65Av*`r@)A3ihFFF2(j=aVww}aM>XWa=gAU! zRy1I5vVHui%=EXkTY|n%$nCaH8_4y?$oa~l0q1^bB6p#s2c$k~F-KyNkI-(@*yqq^ z_|T{LOk$)aF|rFS!u^0fiFyhiW}m1oNf-IkS@M;v zAjh&PWDPy3LYA->ib~ieZ#LLRMUcOGn&zvky-Uj!!+m)e`l+MUiw$9~(#aQylE)wK zX<3)x+fqd-MDg*SUGwIhq9R!|<95ZHOBTxwnK$CVpaDA%JblO+x(|cjoSRfjCi3^T z!(4sbVXXIop&yU($E+CRy?O#ZYbw_lm~o-qB5(m1-4^4%?nQl_*~gHwVUGq>&rZ|H zECEX|;oNi&)z428@|bpR(p_p8U}Z3Vh@A*y!*@USOcZ;v|7-jGK`psfSW_4)$+3X< zU2+M%DS0N&ip#vob;UUc)IL!MtxcRY=JW&?s2SGL7|-LnDl{3pb#RWQ0nYJxhtcOF z=wm#%Z^{{SzFHpl@W{A_^%rpG*sHy;kEcmH?~*8jr$ykC_Oi$o`_8=wyZ_#hON93q z?0}TP`xE#CbJ(2V?-=`uoTqx41OC5+KZW%0bUj;j$I$GGg^6wtzw4cDPa}gKM zahIh%oYi*uUc>(7J%v5%53pzX9cq9*66An<_+2M~9X=1PJ%m|*nC$~B@VoH((9K8KJ z&cizma=Nu_Gr}e|=JWr3uUPosV&%n`Uv|E7VWqzM%IbyJoRwEEUcd?^`UDlL|L5nW v)d^= u64; + + #[storage(read, write)] + fn increment_count(adder: Adder); +} + +abi ForkCaller { + fn call_increment_count(contract_id: ContractId, adder: Adder) -> u64; + fn check_current_count(contract_id: ContractId) -> u64; +} + +impl ForkCaller for Contract { + fn check_current_count(contract_id: ContractId) -> u64 { + let fork = abi(Fork, contract_id.bits()); + fork.get_count() + } + + fn call_increment_count(contract_id: ContractId, adder: Adder) -> u64 { + let fork = abi(Fork, contract_id.bits()); + fork.increment_count(adder); + fork.get_count() + } +} diff --git a/forc-plugins/forc-node/tests/fork/Forc.lock b/forc-plugins/forc-node/tests/fork/Forc.lock new file mode 100644 index 00000000000..4f4d8660774 --- /dev/null +++ b/forc-plugins/forc-node/tests/fork/Forc.lock @@ -0,0 +1,9 @@ +[[package]] +name = "fork" +source = "member" +dependencies = ["std"] + +[[package]] +name = "std" +version = "0.69.1" +source = "registry+std?0.69.1#QmbPunScay4xpfHKpxQ71dFKXSiyJuPP8P8YhgX5Dkmzm9!" diff --git a/forc-plugins/forc-node/tests/fork/Forc.toml b/forc-plugins/forc-node/tests/fork/Forc.toml new file mode 100644 index 00000000000..1e9262852d3 --- /dev/null +++ b/forc-plugins/forc-node/tests/fork/Forc.toml @@ -0,0 +1,7 @@ +[project] +authors = ["z"] +entry = "main.sw" +license = "Apache-2.0" +name = "fork" + +[dependencies] diff --git a/forc-plugins/forc-node/tests/fork/fork-abi.json b/forc-plugins/forc-node/tests/fork/fork-abi.json new file mode 100644 index 00000000000..fddddccae5c --- /dev/null +++ b/forc-plugins/forc-node/tests/fork/fork-abi.json @@ -0,0 +1,84 @@ +{ + "programType": "contract", + "specVersion": "1.1", + "encodingVersion": "1", + "concreteTypes": [ + { + "type": "()", + "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d" + }, + { + "type": "struct Adder", + "concreteTypeId": "4717fd7abcab99b1028d795354df7d1cddda94883a45770a6d7c8cae0c21173f", + "metadataTypeId": 1 + }, + { + "type": "u64", + "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ], + "metadataTypes": [ + { + "type": "(_, _)", + "metadataTypeId": 0, + "components": [ + { + "name": "__tuple_element", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + }, + { + "name": "__tuple_element", + "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0" + } + ] + }, + { + "type": "struct Adder", + "metadataTypeId": 1, + "components": [ + { + "name": "vals", + "typeId": 0 + } + ] + } + ], + "functions": [ + { + "name": "get_count", + "inputs": [], + "output": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0", + "attributes": [ + { + "name": "storage", + "arguments": [ + "read" + ] + } + ] + }, + { + "name": "increment_count", + "inputs": [ + { + "name": "adder", + "concreteTypeId": "4717fd7abcab99b1028d795354df7d1cddda94883a45770a6d7c8cae0c21173f" + } + ], + "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d", + "attributes": [ + { + "name": "storage", + "arguments": [ + "read", + "write" + ] + } + ] + } + ], + "loggedTypes": [], + "messagesTypes": [], + "configurables": [], + "errorCodes": {} +} \ No newline at end of file diff --git a/forc-plugins/forc-node/tests/fork/fork-storage_slots.json b/forc-plugins/forc-node/tests/fork/fork-storage_slots.json new file mode 100644 index 00000000000..1d037915457 --- /dev/null +++ b/forc-plugins/forc-node/tests/fork/fork-storage_slots.json @@ -0,0 +1,6 @@ +[ + { + "key": "cbf93a9497b1d9a9fa1e5a4c96595c511ddd6d9aef9c1e485177a4834998f371", + "value": "0000000000000000000000000000000000000000000000000000000000000000" + } +] \ No newline at end of file diff --git a/forc-plugins/forc-node/tests/fork/fork.bin b/forc-plugins/forc-node/tests/fork/fork.bin new file mode 100644 index 0000000000000000000000000000000000000000..5537e870daddc78397b1babb27b9af2e5b7c9854 GIT binary patch literal 2216 zcmah~UuauZ82`GZOXj9KxK8RV-OlD(Gf=t0HueYE4L9NDdK+_M7TUR8a$uCzhs_%1 z9EuR|WsgW;K^L7z}O>zaOorKshm%1#}efZKP)>s6V~FIv^?fo zUX5k?s=%o!o5(lE@DBIQG3d*YzAW-fiBMlkh`h%_y^)m}VCC!TPGKJsmWNnia~9gt zRyYf7;ds8Zi3zhYfj7BImUcqEA)I*%?ejNeO1+)GjXaq4037_n=+1`z^R?gU1Msj@ z@epFoCnKK|z_gW_^cP zz0X;ykA&4wIVqp>!e-z>=fYV;-YkpSWrfpR3-#ujvWxuUl+5ugdg6Q3FNqqVf0mLW zzo2RieSS=Ppo42p+E0q_S9ha+EorUjsNZ#9>EQf2^tni%!*3{^qi^m2_ikl`_&~0& zrFv~3mu?M@pmrmZgq-J)>jZM;Cv%xXaBrup%syHz+eE^|z09FM(^o} zw;$YH2Y3DWO(Q%v4cuizy?#R7A*UBn-z4%ng1j(0hg9N z)ejkC_$*O!u&=76CyCjZp&+lu6lUp7^g$7GcNTm~nW27R&ZD*}j%G4EH>!5MhEj|^BRX(1(cMclshP8+SyQAr zZNe^)GCzwQ;0d)8WQUmctEc++kg5&r!LCq!2HW7?)E;AR3RtMuHG`f-J`!;%9x(U8 z%pVN=EKk7KP?(YLfMx}FQWUXc3OekD!b}{=#6HpAH=v;BX3=s$e6aMWXj9JR@HW@Ffo92{}vgLx#(xhJ2@T`=pf z$cLCY6SHS}O8Sr-^@^bvd&3!v{mYDb{>i~!1|ECiW1!y?VGW6)Uw6W$m)F^jt+S{8 z8!#L3?mP4w`V#$QqJEJ0&F4@b1DHL>gPHVpX^#lpBBxE(<*Ccuu%3M2xaW~{B#R@a#9w-i;^8fNnN70sIR9z;Mhw+eUBhkE}a!+ zU(wcB*Zu;|hAhH9TAz|7j$MeoYXirrPpKU&Mm_(2Y3Lx%o&<)H@bU4U!LH8O4MNG4 zuEf2R1%>5d_ZZkctPgX%58UVx5B?S&&P4qZf5HPrwGZb5HHqQdi|>wdhvMLwV@5ds zdwJAL;PtPbjVnA0yk8o>TE6(sdsk4$;Pdt7sp(twAHMiw|63zB&s``C{&@NB!+ZO) uh4*V8+qZvv_w6eeE8~~Pul(IBz7cxIc_?>$8Od5C??rMtl)e3tWPbwUNWhl> literal 0 HcmV?d00001 diff --git a/forc-plugins/forc-node/tests/fork/src/main.sw b/forc-plugins/forc-node/tests/fork/src/main.sw new file mode 100644 index 00000000000..175ac5d6ab1 --- /dev/null +++ b/forc-plugins/forc-node/tests/fork/src/main.sw @@ -0,0 +1,31 @@ +contract; + +storage { + counter: u64 = 0, +} + +struct Adder { + vals: (u64, u64), +} + +abi Fork { + #[storage(read)] + fn get_count() -> u64; + + #[storage(read, write)] + fn increment_count(adder: Adder); +} + +impl Fork for Contract { + #[storage(read)] + fn get_count() -> u64 { + storage.counter.read() + } + + #[storage(read, write)] + fn increment_count(adder: Adder) { + let counter = storage.counter.read(); + let new_counter = counter + adder.vals.0 + adder.vals.1; + storage.counter.write(new_counter); + } +} \ No newline at end of file From 86b1183d5cd0f7919e5fb621732feaaecbf730ea Mon Sep 17 00:00:00 2001 From: z Date: Fri, 31 Oct 2025 16:31:53 +1300 Subject: [PATCH 10/25] added comment for patch diff --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 730fbbcc08e..1ff5c189301 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -260,6 +260,7 @@ walkdir = "2.3" whoami = "1.5" wiremock = "0.6" +# https://github.com/FuelLabs/fuel-core/compare/v0.46.0...update/pub-data-source-attr [patch.crates-io] fuel-core = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } fuel-core-chain-config = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } From 250b6aea6938871b59d2517bedb27594d5c6d26a Mon Sep 17 00:00:00 2001 From: z Date: Fri, 31 Oct 2025 16:36:56 +1300 Subject: [PATCH 11/25] cargo-toml-lint fixed dependency ordering --- forc-plugins/forc-node/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forc-plugins/forc-node/Cargo.toml b/forc-plugins/forc-node/Cargo.toml index 98e11530627..77d00a4ffdf 100644 --- a/forc-plugins/forc-node/Cargo.toml +++ b/forc-plugins/forc-node/Cargo.toml @@ -19,9 +19,9 @@ path = "src/main.rs" anyhow.workspace = true clap = { workspace = true, features = ["derive", "string"] } dialoguer.workspace = true +forc-pkg.workspace = true forc-tracing.workspace = true forc-util.workspace = true -forc-pkg.workspace = true fuel-core = { workspace = true, default-features = false, features = ["relayer", "rocksdb", "test-helpers"] } fuel-core-chain-config.workspace = true fuel-core-client.workspace = true @@ -41,9 +41,9 @@ tracing.workspace = true tracing-subscriber.workspace = true [dev-dependencies] +forc-client.workspace = true fuel-tx.workspace = true fuels.workspace = true -forc-client.workspace = true portpicker.workspace = true reqwest = { workspace = true, features = ["json"] } serde_json.workspace = true From 609d0fd032c9e7f98203a5f8c9ad383641217426 Mon Sep 17 00:00:00 2001 From: z Date: Fri, 31 Oct 2025 17:09:03 +1300 Subject: [PATCH 12/25] various improvements to align contract bytecode retrieval and state retrieval --- forc-plugins/forc-node/src/local/fork.rs | 168 ++++++++++++++--------- 1 file changed, 102 insertions(+), 66 deletions(-) diff --git a/forc-plugins/forc-node/src/local/fork.rs b/forc-plugins/forc-node/src/local/fork.rs index 7eee085209c..b354e6a05cf 100644 --- a/forc-plugins/forc-node/src/local/fork.rs +++ b/forc-plugins/forc-node/src/local/fork.rs @@ -84,14 +84,10 @@ impl ForkClient { .contract_slots_values(&contract_id, block_height, vec![key]) .await }) { - Ok(slot_values) => { - for (slot_key, slot_value) in slot_values { - if slot_key == key { - return Ok(Some(slot_value)); - } - } - Ok(None) - } + Ok(slot_values) => Ok(slot_values + .into_iter() + .find(|(slot_key, _)| *slot_key == key) + .map(|(_, slot_value)| slot_value)), Err(e) => { tracing::debug!("Failed to fetch contract state: {}", e); Ok(None) @@ -270,19 +266,36 @@ where if self.inner.exists(key, column)? { return Ok(true); } - - if column == Column::ContractsRawCode { - if let Ok(contract_id) = key.try_into() { - let fork_client = self.fork_client.clone(); - match fork_client.fetch_contract_bytecode_blocking(&contract_id) { - Ok(Some(_)) => Ok(true), - _ => Ok(false), + match column { + Column::ContractsRawCode => { + if let Ok(contract_id) = key[..32].try_into() { + let exists = self + .fork_client + .fetch_contract_bytecode_blocking(&contract_id) + .map(|opt| opt.is_some()) + .unwrap_or(false); + Ok(exists) + } else { + Ok(false) } - } else { - Ok(false) } - } else { - Ok(false) + Column::ContractsState if key.len() == 64 => { + if let Ok(contract_id) = key[..32].try_into() { + if let Ok(state_key) = key[32..64].try_into() { + let exists = self + .fork_client + .fetch_contract_state_blocking(&contract_id, &state_key) + .map(|opt| opt.is_some()) + .unwrap_or(false); + Ok(exists) + } else { + Ok(false) + } + } else { + Ok(false) + } + } + _ => Ok(false), } } _ => self.inner.exists(key, column), @@ -296,11 +309,28 @@ where match column { Column::ContractsRawCode => { - if let Ok(contract_id) = key.try_into() { - let fork_client = self.fork_client.clone(); - match fork_client.fetch_contract_bytecode_blocking(&contract_id) { - Ok(Some(bytecode)) => Ok(Some(bytecode.len())), - _ => Ok(None), + if let Ok(contract_id) = key[..32].try_into() { + let size = self + .fork_client + .fetch_contract_bytecode_blocking(&contract_id) + .map(|opt| opt.map(|bytecode| bytecode.len())) + .unwrap_or(None); + Ok(size) + } else { + Ok(None) + } + } + Column::ContractsState if key.len() == 64 => { + if let Ok(contract_id) = key[..32].try_into() { + if let Ok(state_key) = key[32..64].try_into() { + let size = self + .fork_client + .fetch_contract_state_blocking(&contract_id, &state_key) + .map(|opt| opt.map(|state| state.len())) + .unwrap_or(None); + Ok(size) + } else { + Ok(None) } } else { Ok(None) @@ -325,13 +355,15 @@ where match column { Column::ContractsRawCode => { - if let Ok(contract_id) = key.try_into() { + if let Ok(contract_id) = key[..32].try_into() { tracing::info!( "ForkedView: Attempting to fetch contract {} from fork", contract_id ); - let fork_client = self.fork_client.clone(); - match fork_client.fetch_contract_bytecode_blocking(&contract_id) { + match self + .fork_client + .fetch_contract_bytecode_blocking(&contract_id) + { Ok(Some(bytecode)) => { tracing::info!( "ForkedView: Successfully fetched contract {} from fork", @@ -364,32 +396,14 @@ where Ok(None) } } - Column::ContractsAssets => Ok(None), - Column::ContractsState => { - if key.len() >= 64 { - let contract_bytes = &key[..32]; - let state_key_bytes = &key[32..64]; - - if let (Ok(contract_bytes), Ok(state_key_bytes)) = ( - <[u8; 32]>::try_from(contract_bytes), - <[u8; 32]>::try_from(state_key_bytes), - ) { - let contract_id = ContractId::from(contract_bytes); - let state_key = Bytes32::from(state_key_bytes); - tracing::info!( - "ForkedView: Attempting to fetch state for contract {} key {} from fork", - contract_id, - state_key - ); - let fork_client = self.fork_client.clone(); - - match fork_client.fetch_contract_state_blocking(&contract_id, &state_key) { + Column::ContractsState if key.len() == 64 => { + if let Ok(contract_id) = key[..32].try_into() { + if let Ok(state_key) = key[32..64].try_into() { + match self + .fork_client + .fetch_contract_state_blocking(&contract_id, &state_key) + { Ok(Some(state_data)) => { - tracing::info!( - "ForkedView: Successfully fetched state for contract {} key {} from fork", - contract_id, - state_key - ); let mut storage_key = Vec::with_capacity( contract_id.as_ref().len() + state_key.as_ref().len(), ); @@ -412,26 +426,22 @@ where } Err(e) => { tracing::warn!( - "ForkedView: Error fetching state for contract {} key {} from fork: {}", - contract_id, - state_key, - e - ); + "ForkedView: Error fetching state for contract {} key {} from fork: {}", + contract_id, + state_key, + e + ); Err(fuel_core_storage::Error::Other(e)) } } } else { - tracing::warn!("ForkedView: Failed to parse ContractsState key"); Ok(None) } } else { - tracing::warn!( - "ForkedView: ContractsState key too short: {} bytes", - key.len() - ); Ok(None) } } + Column::ContractsAssets => Ok(None), _ => Ok(None), } } @@ -449,10 +459,11 @@ where match column { Column::ContractsRawCode => { - if let Ok(contract_id) = key.try_into() { - let fork_client = self.fork_client.clone(); - - match fork_client.fetch_contract_bytecode_blocking(&contract_id) { + if let Ok(contract_id) = key[..32].try_into() { + match self + .fork_client + .fetch_contract_bytecode_blocking(&contract_id) + { Ok(Some(bytecode)) => { if offset >= bytecode.len() { return Ok(false); @@ -468,6 +479,31 @@ where Ok(false) } } + Column::ContractsState if key.len() == 64 => { + if let Ok(contract_id) = key[..32].try_into() { + if let Ok(state_key) = key[32..64].try_into() { + match self + .fork_client + .fetch_contract_state_blocking(&contract_id, &state_key) + { + Ok(Some(state_data)) => { + if offset >= state_data.len() { + return Ok(false); + } + let available = state_data.len() - offset; + let len = available.min(buf.len()); + buf[..len].copy_from_slice(&state_data[offset..offset + len]); + Ok(true) + } + _ => Ok(false), + } + } else { + Ok(false) + } + } else { + Ok(false) + } + } _ => Ok(false), } } From 8a52f6904cfcba0568d3a97c4e7256957c9528e6 Mon Sep 17 00:00:00 2001 From: z Date: Fri, 31 Oct 2025 17:18:17 +1300 Subject: [PATCH 13/25] improve combined database construction readability --- forc-plugins/forc-node/src/local/mod.rs | 39 +++++++++++++++---------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/forc-plugins/forc-node/src/local/mod.rs b/forc-plugins/forc-node/src/local/mod.rs index a4559a1e60a..5f55f2bb4ac 100644 --- a/forc-plugins/forc-node/src/local/mod.rs +++ b/forc-plugins/forc-node/src/local/mod.rs @@ -11,7 +11,7 @@ use fuel_core::{ combined_database::CombinedDatabase, database::{database_description::on_chain::OnChain, Database, RegularStage}, service::FuelService, - state::data_source::{DataSource, DataSourceType}, + state::data_source::DataSource, }; use fuel_core_types::fuel_types::BlockHeight; use std::sync::Arc; @@ -22,7 +22,7 @@ use std::sync::Arc; pub async fn run(cmd: cmd::LocalCmd, dry_run: bool) -> anyhow::Result> { check_and_update_chain_config(ChainConfig::Local).await?; - let fork_url = cmd.fork_url.clone(); + let fork_url = cmd.fork_url.to_owned(); let fork_block_number = cmd.fork_block_number; let config = fuel_core::service::Config::from(cmd); @@ -54,21 +54,28 @@ pub async fn run(cmd: cmd::LocalCmd, dry_run: bool) -> anyhow::Result = Default::default(); - let forking_storage: DataSourceType = - Arc::new(ForkingOnChainStorage::new(on_chain, fork_client)); - let data_source = DataSource::new(forking_storage, stage); - Database::from_storage_and_metadata(data_source, metadata) + // extract all attributes from combined database (as they are all private); reconstruct them in a new combined database with forked storage + let combined_database = { + let off_chain = combined_database.off_chain().to_owned(); + let relayer = combined_database.relayer().to_owned(); + let gas_price = combined_database.gas_price().to_owned(); + let compression = combined_database.compression().to_owned(); + + // reconstruct on-chain database with forked storage + let on_chain = { + let on_chain = combined_database.on_chain().to_owned(); + let (_, metadata) = on_chain.clone().into_inner(); + let data_source = DataSource::new( + Arc::new(ForkingOnChainStorage::new(on_chain, fork_client)), + RegularStage::::default(), + ); + Database::from_storage_and_metadata(data_source, metadata) + }; + + // reconstruct combined database with forked on-chain storage + CombinedDatabase::new(on_chain, off_chain, relayer, gas_price, compression) }; - let combined_database = - CombinedDatabase::new(on_chain, off_chain, relayer, gas_price, compression); + FuelService::from_combined_database(combined_database, config) .await .map_err(|e| anyhow::anyhow!("Failed to start fuel-core service: {}", e))? From df3ae8733f7064ad0e39d11114bab5ef7c88a9f4 Mon Sep 17 00:00:00 2001 From: z Date: Mon, 3 Nov 2025 13:02:58 +1300 Subject: [PATCH 14/25] non-interactive for tests --- forc-plugins/forc-node/src/chain_config.rs | 37 ++++++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/forc-plugins/forc-node/src/chain_config.rs b/forc-plugins/forc-node/src/chain_config.rs index d42d36ac5b5..c96988f4993 100644 --- a/forc-plugins/forc-node/src/chain_config.rs +++ b/forc-plugins/forc-node/src/chain_config.rs @@ -14,6 +14,7 @@ use std::{ collections::{HashMap, HashSet}, fmt::Display, fs, + io::IsTerminal, path::PathBuf, }; @@ -293,9 +294,19 @@ async fn validate_local_chainconfig(fetcher: &ConfigFetcher) -> anyhow::Result<( "Local node configuration files are missing at {}", local_conf_dir.display() )); - // Ask user if they want to update the chain config. - let update = ask_user_yes_no_question("Would you like to download network configuration?")?; - if update { + let non_interactive = !std::io::stdout().is_terminal(); + if non_interactive { + println_action_green( + "Downloading", + "local network configuration (non-interactive mode).", + ); + } + let should_download = if non_interactive { + true + } else { + ask_user_yes_no_question("Would you like to download network configuration?")? + }; + if should_download { fetcher.download_config(&ChainConfig::Local).await?; } else { bail!( @@ -324,10 +335,22 @@ async fn validate_remote_chainconfig( println_warning(&format!( "A network configuration update detected for {conf}, this might create problems while syncing with rest of the network" )); - // Ask user if they want to update the chain config. - let update = ask_user_yes_no_question("Would you like to update network configuration?")?; - if update { - println_action_green("Updating", &format!("configuration files for {conf}",)); + let non_interactive = !std::io::stdout().is_terminal(); + if non_interactive { + println_action_green( + "Updating", + &format!("configuration files for {conf} (non-interactive mode)",), + ); + } + let should_update = if non_interactive { + true + } else { + ask_user_yes_no_question("Would you like to update network configuration?")? + }; + if should_update { + if !non_interactive { + println_action_green("Updating", &format!("configuration files for {conf}",)); + } fetcher.download_config(conf).await?; println_action_green( "Finished", From 07eecf9942621146099e51cc03ebb7c888359f4d Mon Sep 17 00:00:00 2001 From: z Date: Mon, 3 Nov 2025 15:10:00 +1300 Subject: [PATCH 15/25] introduced non-interactive cmd arg instead - defaults to false --- forc-plugins/forc-node/src/chain_config.rs | 28 ++++++++++++++++------ forc-plugins/forc-node/src/ignition/cmd.rs | 4 ++++ forc-plugins/forc-node/src/ignition/op.rs | 2 +- forc-plugins/forc-node/src/local/cmd.rs | 4 ++++ forc-plugins/forc-node/src/local/mod.rs | 2 +- forc-plugins/forc-node/src/testnet/cmd.rs | 4 ++++ forc-plugins/forc-node/src/testnet/op.rs | 2 +- forc-plugins/forc-node/tests/local.rs | 2 ++ 8 files changed, 38 insertions(+), 10 deletions(-) diff --git a/forc-plugins/forc-node/src/chain_config.rs b/forc-plugins/forc-node/src/chain_config.rs index c96988f4993..0a100f77382 100644 --- a/forc-plugins/forc-node/src/chain_config.rs +++ b/forc-plugins/forc-node/src/chain_config.rs @@ -14,7 +14,6 @@ use std::{ collections::{HashMap, HashSet}, fmt::Display, fs, - io::IsTerminal, path::PathBuf, }; @@ -71,21 +70,27 @@ pub struct ConfigFetcher { client: reqwest::Client, base_url: String, config_vault: PathBuf, + non_interactive: bool, } impl Default for ConfigFetcher { /// Creates a new fetcher to interact with github. /// By default user's chain configuration vault is at: `~/.forc/chainspecs` fn default() -> Self { + Self::new(false) + } +} + +impl ConfigFetcher { + pub fn new(non_interactive: bool) -> Self { Self { client: reqwest::Client::new(), base_url: "https://api.github.com".to_string(), config_vault: user_forc_directory().join(CONFIG_FOLDER), + non_interactive, } } -} -impl ConfigFetcher { #[cfg(test)] /// Override the base url, to be used in tests. pub fn with_base_url(base_url: String) -> Self { @@ -93,6 +98,7 @@ impl ConfigFetcher { client: reqwest::Client::new(), base_url, config_vault: user_forc_directory().join(CONFIG_FOLDER), + non_interactive: false, } } @@ -102,9 +108,14 @@ impl ConfigFetcher { client: reqwest::Client::new(), base_url, config_vault, + non_interactive: false, } } + fn non_interactive(&self) -> bool { + self.non_interactive + } + fn get_base_url(&self) -> &str { &self.base_url } @@ -294,7 +305,7 @@ async fn validate_local_chainconfig(fetcher: &ConfigFetcher) -> anyhow::Result<( "Local node configuration files are missing at {}", local_conf_dir.display() )); - let non_interactive = !std::io::stdout().is_terminal(); + let non_interactive = fetcher.non_interactive(); if non_interactive { println_action_green( "Downloading", @@ -335,7 +346,7 @@ async fn validate_remote_chainconfig( println_warning(&format!( "A network configuration update detected for {conf}, this might create problems while syncing with rest of the network" )); - let non_interactive = !std::io::stdout().is_terminal(); + let non_interactive = fetcher.non_interactive(); if non_interactive { println_action_green( "Updating", @@ -366,8 +377,11 @@ async fn validate_remote_chainconfig( /// Check local state of the configuration file in the vault (if they exists) /// and compare them to the remote one in github. If a change is detected asks /// user if they want to update, and does the update for them. -pub async fn check_and_update_chain_config(conf: ChainConfig) -> anyhow::Result<()> { - let fetcher = ConfigFetcher::default(); +pub async fn check_and_update_chain_config( + conf: ChainConfig, + non_interactive: bool, +) -> anyhow::Result<()> { + let fetcher = ConfigFetcher::new(non_interactive); match conf { ChainConfig::Local => validate_local_chainconfig(&fetcher).await?, remote_config => validate_remote_chainconfig(&fetcher, &remote_config).await?, diff --git a/forc-plugins/forc-node/src/ignition/cmd.rs b/forc-plugins/forc-node/src/ignition/cmd.rs index 966e8f55ab8..a82ae97d87e 100644 --- a/forc-plugins/forc-node/src/ignition/cmd.rs +++ b/forc-plugins/forc-node/src/ignition/cmd.rs @@ -10,6 +10,10 @@ pub struct IgnitionCmd { pub db_path: PathBuf, #[clap(long, default_value_t = MAINNET_BOOTSTRAP_NODE.to_string())] pub bootstrap_node: String, + + /// Skip interactive prompts (intended for scripted/test environments). + #[clap(long, hide = true)] + pub non_interactive: bool, } fn default_ignition_db_path() -> PathBuf { diff --git a/forc-plugins/forc-node/src/ignition/op.rs b/forc-plugins/forc-node/src/ignition/op.rs index 07722321f83..3a6e7c9e022 100644 --- a/forc-plugins/forc-node/src/ignition/op.rs +++ b/forc-plugins/forc-node/src/ignition/op.rs @@ -19,7 +19,7 @@ use std::{ /// Configures the node with ignition configuration to connect the node to latest mainnet. /// Returns `None` if this is a dry_run and no child process created for fuel-core. pub async fn run(cmd: IgnitionCmd, dry_run: bool) -> anyhow::Result> { - check_and_update_chain_config(ChainConfig::Ignition).await?; + check_and_update_chain_config(ChainConfig::Ignition, cmd.non_interactive).await?; let keypair = if let (Some(peer_id), Some(secret)) = ( &cmd.connection_settings.peer_id, &cmd.connection_settings.secret, diff --git a/forc-plugins/forc-node/src/local/cmd.rs b/forc-plugins/forc-node/src/local/cmd.rs index 58bdb55de63..dc487aa719d 100644 --- a/forc-plugins/forc-node/src/local/cmd.rs +++ b/forc-plugins/forc-node/src/local/cmd.rs @@ -57,6 +57,10 @@ pub struct LocalCmd { /// Block number to fork from (latest if not specified) #[clap(long, value_name = "BLOCK")] pub fork_block_number: Option, + + /// Skip interactive prompts (intended for scripted/test environments). + #[clap(long, hide = true)] + pub non_interactive: bool, } fn get_coins_per_account( diff --git a/forc-plugins/forc-node/src/local/mod.rs b/forc-plugins/forc-node/src/local/mod.rs index 5f55f2bb4ac..3c8be220129 100644 --- a/forc-plugins/forc-node/src/local/mod.rs +++ b/forc-plugins/forc-node/src/local/mod.rs @@ -20,7 +20,7 @@ use std::sync::Arc; /// By default, the node is in `debug` mode and the db used is `in-memory`. /// Returns `None` if this is a dry_run and no service created for fuel-core. pub async fn run(cmd: cmd::LocalCmd, dry_run: bool) -> anyhow::Result> { - check_and_update_chain_config(ChainConfig::Local).await?; + check_and_update_chain_config(ChainConfig::Local, cmd.non_interactive).await?; let fork_url = cmd.fork_url.to_owned(); let fork_block_number = cmd.fork_block_number; diff --git a/forc-plugins/forc-node/src/testnet/cmd.rs b/forc-plugins/forc-node/src/testnet/cmd.rs index 03c0efbadef..7042480adc1 100644 --- a/forc-plugins/forc-node/src/testnet/cmd.rs +++ b/forc-plugins/forc-node/src/testnet/cmd.rs @@ -10,6 +10,10 @@ pub struct TestnetCmd { pub db_path: PathBuf, #[clap(long, default_value_t = TESTNET_BOOTSTRAP_NODE.to_string())] pub bootstrap_node: String, + + /// Skip interactive prompts (intended for scripted/test environments). + #[clap(long, hide = true)] + pub non_interactive: bool, } fn default_testnet_db_path() -> PathBuf { diff --git a/forc-plugins/forc-node/src/testnet/op.rs b/forc-plugins/forc-node/src/testnet/op.rs index 873cdde98ea..59a7e3e7cff 100644 --- a/forc-plugins/forc-node/src/testnet/op.rs +++ b/forc-plugins/forc-node/src/testnet/op.rs @@ -20,7 +20,7 @@ use std::{ /// Configures the node with testnet configuration to connect the node to latest testnet. /// Returns `None` if this is a dry_run and no child process created for fuel-core. pub async fn run(cmd: TestnetCmd, dry_run: bool) -> anyhow::Result> { - check_and_update_chain_config(ChainConfig::Testnet).await?; + check_and_update_chain_config(ChainConfig::Testnet, cmd.non_interactive).await?; let keypair = if let (Some(peer_id), Some(secret)) = ( &cmd.connection_settings.peer_id, &cmd.connection_settings.secret, diff --git a/forc-plugins/forc-node/tests/local.rs b/forc-plugins/forc-node/tests/local.rs index c34c5178fa7..05d9768ec9b 100644 --- a/forc-plugins/forc-node/tests/local.rs +++ b/forc-plugins/forc-node/tests/local.rs @@ -71,6 +71,7 @@ async fn run_node(fork_url: Option) -> (FuelService, String) { poa_instant: true, fork_url, fork_block_number: None, + non_interactive: true, }; let service = run(local_cmd, false).await.unwrap().unwrap(); // Wait for node to start graphql service @@ -511,6 +512,7 @@ async fn start_local_node_check_health() { poa_instant: false, fork_url: None, fork_block_number: None, + non_interactive: true, }; let _service = run(local_cmd, false).await.unwrap().unwrap(); From f1d9f38ce7d49ed6bcf9b25854940563298cfd52 Mon Sep 17 00:00:00 2001 From: z Date: Mon, 3 Nov 2025 17:48:59 +1300 Subject: [PATCH 16/25] updated forc compilation for test contracts --- .../forc-node/tests/fork-caller/Forc.lock | 4 ++-- .../tests/fork-caller/fork-caller-abi.json | 5 +++-- .../tests/fork-caller/fork-caller.bin | Bin 3376 -> 3816 bytes forc-plugins/forc-node/tests/fork/Forc.lock | 4 ++-- .../forc-node/tests/fork/fork-abi.json | 5 +++-- forc-plugins/forc-node/tests/fork/fork.bin | Bin 2216 -> 2112 bytes 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/forc-plugins/forc-node/tests/fork-caller/Forc.lock b/forc-plugins/forc-node/tests/fork-caller/Forc.lock index d7ca55af820..84ade85857b 100644 --- a/forc-plugins/forc-node/tests/fork-caller/Forc.lock +++ b/forc-plugins/forc-node/tests/fork-caller/Forc.lock @@ -5,5 +5,5 @@ dependencies = ["std"] [[package]] name = "std" -version = "0.69.1" -source = "registry+std?0.69.1#QmbPunScay4xpfHKpxQ71dFKXSiyJuPP8P8YhgX5Dkmzm9!" +version = "0.70.1" +source = "registry+std?0.70.1#QmU7w9Aqa6jvQcj72HS8uqfFk3ieiC74WsZGaRfUrW1u41!" diff --git a/forc-plugins/forc-node/tests/fork-caller/fork-caller-abi.json b/forc-plugins/forc-node/tests/fork-caller/fork-caller-abi.json index d7e545ac8db..ce988c73735 100644 --- a/forc-plugins/forc-node/tests/fork-caller/fork-caller-abi.json +++ b/forc-plugins/forc-node/tests/fork-caller/fork-caller-abi.json @@ -1,6 +1,6 @@ { "programType": "contract", - "specVersion": "1.1", + "specVersion": "1.2", "encodingVersion": "1", "concreteTypes": [ { @@ -89,5 +89,6 @@ "loggedTypes": [], "messagesTypes": [], "configurables": [], - "errorCodes": {} + "errorCodes": {}, + "panickingCalls": {} } \ No newline at end of file diff --git a/forc-plugins/forc-node/tests/fork-caller/fork-caller.bin b/forc-plugins/forc-node/tests/fork-caller/fork-caller.bin index 352b394e62d47521be1cdcac9e47dc5fe91d499b..c92344b521bdcc26766a390782a569c6e247210b 100644 GIT binary patch literal 3816 zcmai1O>7&-6@Hf3n2BX;9NR6shLLsS80x|GI*wZvy)3~Hq)MwCRuLq@S?mec+^QCP$Y1Q6kvfCuuv1_p)Mr!pnh*>7|}sm z6Cmd8+c$6Cd*7RHW}SgY?-L~`{+(L1#O8O1GTnl{leVNm>uureb z%+@277D?!4WG)iWeM4rp%dF!u$m!i6D<~-F-O5c$ikVBDui#}S5@B? zGShZdMvEY$cSSnk!_O}3WTDxG9o{#)ve5F3-120hZRIv(EsQ=wEbvv(b?f`A%xE{( z<+ilSvY#zod7E63eXRq#D%KZxK8x`*;(wyDJb$BO{B3lRhj8{>a{f;AaR1usy?@cN z^)YRHG^Q~(2OnoJ=4Gz2XnpjIkInrr_*j6Cv5HT>{I*XNWCoKWO&yurdL#>tN6wzW zS}w2kA>vtsFVtY$RWrhsxoxh8HgZ#=9$16*tzIQhQp{ZK$YNASeXryBWsGmZ=aic9 zge-2}SF>!p`N+h#*+P7-v*%$wtl0y;pW*+h%P~zjA9KEMK5#N!lDUmM$Ay?aL2U+D zGle_{&K~R$tMk|R-2w2{$Th_y^2wv#kT)>I%frKn) zfK#zqHZ|Vr#Wl_~%fQIu)zZLZ)nc>?Y_8yW663dIA=)<>ZS~|_Bdh(waEC| z_EpwL9NQALab>23IJc6fPK}+B8ef#TCf4U(-}WI7jNBXm$CSnKHsUIq{@mvN1Wv6o zeD6aqt-fdV68awW%IbGmA7r8l=y#Ai^xO{{wJ-F;UF=!k+MYxlK5W;lE&BYq-uWqP z7tMOjMc7UuX2jH-g3LX_GUr}3@^%%ur;NOzMsj}}d%=aC`J#ro9JkLs13lJnTe%Hc zdqy9%xW3@2@4yxqwyJ8DIiOXQ#kMqZTcQtqBS$-o75MDC(Dl?Tx!CvkyBB3ql<8{4@BXi^auyfBl1@LAO_H#IYu%DehpM563Ig|LK^US3Og!m2w)e-N9i2LDq zkK-R7iC;LG9;tt>b8jAVo(Y~KoC6xp8GpeX`ag3<>!h5_I_iX46?zmD*Gcs~>;v?B zQMh^NXKw@c?tTl^GkQDB3Plz?-EU2xYTj-Wy0JwRgyxKE_H%iT7)G< zvg9X&1wA=cny<=PFNxf%u)B{vemd-zU&YyQ2C-oe`FuXCqh~nQeG|LhhYq|D>$>KA zoB_wG-h}`U>t$yr#$X zf!`Ex81*}8{f^>1eS`z>E39)}6R7D+$PM>4cMQJARo@qU4}-tykvP8uSE`vft8w2T z=QUNVaXr@1KRkNqpA`ECcE^EDGCq6fv;MiI`5`XHhqzSU#rYeobPP5($hlc2Q9{p^ zkbg$!5gRzH{7TrDC*V7U{sW(2AE&+e96-Fakv<&Ob)*l+@=k~zzXd+XfWtHE9*^Lc zI&;#};M%Vq{-=Xl^I1&%P8$A-_Hp(z591!ioEfcJ{VF(wWAIQfoQKGB0eR+hl5KI< z#hy9aIaj*j-;;3<9>+c!J71dTJBTY#hs*D9A0~XqkNXhkzKeTl!pAuezSrPxI*EKw zA@@nF!~BPHR#y#|Mpb^sx*5b*McjN&@cYgv7bCCDIIm0;^D*pkMn-kmyVm|W?uPx} zti8RmT08uGyqhYybWd(80itulICk+UGl znFA(;NTVlRj6K8A(IWEWdiStCne%`-L&Rs)(%`Mzah$oRYv17xM8NU-O{=flI@P&8 zR<1%8M%KL}U)QJ1oQ7Q|&bbR5!AE>PHo#2{dw0NyZwAIkBlQ0MzA}yzb|otw-flH;opfr*zvdj1^S=f!2kdN literal 3376 zcmb7HUyK`P5g%W!iTj7%*WO+0ZW6kw+SEm=w0CK$Jg((9>%+19xvu52+-1LVI`t53 zy0V&Z2oQeYArGiBAmAeL$3Xuav_-p)eafTXID`;Jh^k0Dn1@I?HCFvV#6=(-zu8^q zd{t?MrPJ86GxN>-<~Q^0X(NMPBbuh*b6+ErpEK;eUQF!m@iWqHO8Ooh-n7%B8Ihu% zeO7(Z8H(RRF4;?h>gOpgGIKpy@IHY4s58`$si7gHwRJ{W9?L9C+wy)7n{C)U0vk<2 zr!uh1b=TFBfb=}ILt=)ypacJL~F(%IHGdL2lOtUD;hY zcIlt=W#lI~KWTN>;d3L5)h5I+5o;DQC39^(inSTW>hwMq>u$uFs+;tUXH6o+d?2XV z8a*g7qK8~vS!lc3j*hbpKKmTCjIz!_$u(})a zS?E6q^&P2F@X2*twFE2*orcN_J**993{d0W@%J}_bGcvpE8)z=FKOvM0S90Z)c?9| z^~uilV|JlGB}-SY0pqWs-gTVyb!oM)h4D<%{t?)BZ1}?`2A?V9E1V(y5JHWwU{~uV5&KQx_Lei0Z=)y6A$Dqvb@h%t_omV{VGl0o zzeeuAfxWBkpfA_u*gk*2zSJ4O{wJ{iDeQj+`($Vz^zli|P)k|pO>Qe0&d}B}_rp$m ze}Ha{b?DO{fivcz3B2e8;ys2Q_rW^@+~`ltQ4MwLQQg2d==C~F#QT$NjplgjQ&UgoyybDa;!&$9^{5Jk`kl&qM)cte#wBYj#)P824-^Tl>*@*ak zIjT93!0pe-zqQZrh2Js1e@OJ`kKz>VMRK)ti!`fAT5dqtZ%P$fm}5_3j)fXxHa_&2 zQ;!8T6|nQ5=kuXEKAV~`XH$rEmgtg65Av*`r@)A3ihFFF2(j=aVww}aM>XWa=gAU! zRy1I5vVHui%=EXkTY|n%$nCaH8_4y?$oa~l0q1^bB6p#s2c$k~F-KyNkI-(@*yqq^ z_|T{LOk$)aF|rFS!u^0fiFyhiW}m1oNf-IkS@M;v zAjh&PWDPy3LYA->ib~ieZ#LLRMUcOGn&zvky-Uj!!+m)e`l+MUiw$9~(#aQylE)wK zX<3)x+fqd-MDg*SUGwIhq9R!|<95ZHOBTxwnK$CVpaDA%JblO+x(|cjoSRfjCi3^T z!(4sbVXXIop&yU($E+CRy?O#ZYbw_lm~o-qB5(m1-4^4%?nQl_*~gHwVUGq>&rZ|H zECEX|;oNi&)z428@|bpR(p_p8U}Z3Vh@A*y!*@USOcZ;v|7-jGK`psfSW_4)$+3X< zU2+M%DS0N&ip#vob;UUc)IL!MtxcRY=JW&?s2SGL7|-LnDl{3pb#RWQ0nYJxhtcOF z=wm#%Z^{{SzFHpl@W{A_^%rpG*sHy;kEcmH?~*8jr$ykC_Oi$o`_8=wyZ_#hON93q z?0}TP`xE#CbJ(2V?-=`uoTqx41OC5+KZW%0bUj;j$I$GGg^6wtzw4cDPa}gKM zahIh%oYi*uUc>(7J%v5%53pzX9cq9*66An<_+2M~9X=1PJ%m|*nC$~B@VoH((9K8KJ z&cizma=Nu_Gr}e|=JWr3uUPosV&%n`Uv|E7VWqzM%IbyJoRwEEUcd?^`UDlL|L5nW v)d^=?wmq?E{wwTd0JtUa^g=O|U|h~s`o3GFmnzGFneG0P&I zw1KnCI_)(q*x|fkL9WGeO?%CDBsbf@5|JEy?Wcj|nMc?&_A%`k73$oz`+kOT*6x=l zi9}`u*aoqPLF`|^dKB^h=x5l!?nij_67mr8sUrD==+2Jypz;?j#26yN2zKB*0gM5x zwsz|(#;C>^EC0gy85lifo35X+iI8ulkjCnoN;wODGDoVwsqjALt#W|33S!26Gy)r? zogmIFxEANO!FM6P4ehQyVjb>LB0bPTTpQSD?_P$*c@lzJu zEA2K~q3ku_kG<1e0Dcy}fp+f^@`TMj(%u?sgm~P#)#XY)=6l|K8L?>iSiB;pD)3mY z0-I$8tR=*76}hXST(Zi!4&_c&$Fu0SY>D)AqpD{bwx74u`?=F1JkOl6MP|${W;8Jl zY>1}Y!c?{wV zy`l!uZ-ddk0oi2ZvlO2p=F!5Oc@2GiBCOBUSnJjNX}h8+fm!J-c}?xw}8hy!6vv3U!KAD z*bg&ikTWov2J(6=uY-$NA1rXMgNt`grUiXVG;%Z5eJ7|SofVR98~uU2yc%LOI+_XW zJ0#>EhI{b@*M-mYH0F3pVcsm(4$x-Y}z6Ttvz%tOULytZ1 zbDH%l-4*BPLB=q)pR*M>dlB>g66VvoLC9&p54$<{@An7U(y1Y5%#zn8@Snujhwl)0 z?ng}&W=Z+r7X4|aF0npZ-4n i(Z!n|ew-iv{mOUGzCWJLfAPatx!Zq!9=p-=?EV1|^`jsF literal 2216 zcmah~UuauZ82`GZOXj9KxK8RV-OlD(Gf=t0HueYE4L9NDdK+_M7TUR8a$uCzhs_%1 z9EuR|WsgW;K^L7z}O>zaOorKshm%1#}efZKP)>s6V~FIv^?fo zUX5k?s=%o!o5(lE@DBIQG3d*YzAW-fiBMlkh`h%_y^)m}VCC!TPGKJsmWNnia~9gt zRyYf7;ds8Zi3zhYfj7BImUcqEA)I*%?ejNeO1+)GjXaq4037_n=+1`z^R?gU1Msj@ z@epFoCnKK|z_gW_^cP zz0X;ykA&4wIVqp>!e-z>=fYV;-YkpSWrfpR3-#ujvWxuUl+5ugdg6Q3FNqqVf0mLW zzo2RieSS=Ppo42p+E0q_S9ha+EorUjsNZ#9>EQf2^tni%!*3{^qi^m2_ikl`_&~0& zrFv~3mu?M@pmrmZgq-J)>jZM;Cv%xXaBrup%syHz+eE^|z09FM(^o} zw;$YH2Y3DWO(Q%v4cuizy?#R7A*UBn-z4%ng1j(0hg9N z)ejkC_$*O!u&=76CyCjZp&+lu6lUp7^g$7GcNTm~nW27R&ZD*}j%G4EH>!5MhEj|^BRX(1(cMclshP8+SyQAr zZNe^)GCzwQ;0d)8WQUmctEc++kg5&r!LCq!2HW7?)E;AR3RtMuHG`f-J`!;%9x(U8 z%pVN=EKk7KP?(YLfMx}FQWUXc3OekD!b}{=#6HpAH=v;BX3=s$e6aMWXj9JR@HW@Ffo92{}vgLx#(xhJ2@T`=pf z$cLCY6SHS}O8Sr-^@^bvd&3!v{mYDb{>i~!1|ECiW1!y?VGW6)Uw6W$m)F^jt+S{8 z8!#L3?mP4w`V#$QqJEJ0&F4@b1DHL>gPHVpX^#lpBBxE(<*Ccuu%3M2xaW~{B#R@a#9w-i;^8fNnN70sIR9z;Mhw+eUBhkE}a!+ zU(wcB*Zu;|hAhH9TAz|7j$MeoYXirrPpKU&Mm_(2Y3Lx%o&<)H@bU4U!LH8O4MNG4 zuEf2R1%>5d_ZZkctPgX%58UVx5B?S&&P4qZf5HPrwGZb5HHqQdi|>wdhvMLwV@5ds zdwJAL;PtPbjVnA0yk8o>TE6(sdsk4$;Pdt7sp(twAHMiw|63zB&s``C{&@NB!+ZO) uh4*V8+qZvv_w6eeE8~~Pul(IBz7cxIc_?>$8Od5C??rMtl)e3tWPbwUNWhl> From 7438872ec0d5e2bb7a0b3a742f2a9777e354e208 Mon Sep 17 00:00:00 2001 From: z Date: Tue, 4 Nov 2025 21:17:49 +1300 Subject: [PATCH 17/25] docs for using forc-node with testnet as fork example --- docs/book/src/SUMMARY.md | 1 + .../src/testing/testing_with_forc_node.md | 88 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 docs/book/src/testing/testing_with_forc_node.md diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md index 6373dd938ac..2cbfd99bce3 100644 --- a/docs/book/src/SUMMARY.md +++ b/docs/book/src/SUMMARY.md @@ -59,6 +59,7 @@ - [Unit Testing](./testing/unit-testing.md) - [Testing with Rust](./testing/testing-with-rust.md) - [Testing with Forc Call](./testing/testing_with_forc_call.md) + - [Testing with Forc Node](./testing/testing_with_forc_node.md) - [Debugging](./debugging/index.md) - [Debugging with CLI](./debugging/debugging_with_cli.md) - [Debugging with IDE](./debugging/debugging_with_ide.md) diff --git a/docs/book/src/testing/testing_with_forc_node.md b/docs/book/src/testing/testing_with_forc_node.md new file mode 100644 index 00000000000..7bb68266246 --- /dev/null +++ b/docs/book/src/testing/testing_with_forc_node.md @@ -0,0 +1,88 @@ +# Testing with `forc-node` + +`forc-node` wraps the `fuel-core` library and provides a convenient CLI for starting a Fuel node. +Besides running an entirely local chain, `forc-node` can *fork* an existing node - or network (testnet or mainnet) so that you can exercise contracts against a near-real state without touching live infrastructure. + +The workflow below demonstrates how to validate contract reads against public Fuel Testnet data and then repeat the exact same call against a forked local node. + +## 1. Inspect a contract on testnet + +Fuel ships a `forc-call` binary that can read contract state directly from public infrastructure. +The example below queries the owner of the [Mira AMM](https://github.com/mira-amm/mira-v1-periphery) contract that is already deployed on testnet: + +```sh +forc-call \ + --abi https://raw.githubusercontent.com/mira-amm/mira-v1-periphery/refs/heads/main/fixtures/mira-amm/mira_amm_contract-abi.json \ + 0xd5a716d967a9137222219657d7877bd8c79c64e1edb5de9f2901c98ebe74da80 \ + owner \ + --testnet +``` + +Sample output (truncated): + +``` +… +result: Initialized(Address(std::address::Address { bits: Bits256([31, 131, 36, 111, 177, 67, 191, 23, 136, 60, 86, 168, 69, 88, 194, 77, 47, 157, 117, 51, 25, 181, 34, 234, 129, 216, 182, 250, 160, 158, 176, 83]) })) +``` + +Keep both the ABI URL and the contract ID handy—we will reuse them when pointing `forc-node` at the same network. + +## 2. Start a forked node that mirrors testnet + +Launch a local `forc-node` instance and instruct it to sync contract state from the public Testnet GraphQL endpoint. +The first time a contract or storage slot is requested, the forked node lazily retrieves the data from the remote network and caches it into the local database. + +```sh +cargo run -p forc-node -- \ + local \ + --fork-url https://testnet.fuel.network/v1/graphql \ + --db-type rocks-db \ + --db-path /tmp/.db.fork \ + --debug \ + --historical-execution \ + --poa-instant \ + --port 4000 +``` + +Key flags: + +- `--fork-url` specifies the upstream GraphQL endpoint; for Testnet this is `https://testnet.fuel.network/v1/graphql`. +- `--db-type rocks-db` and `--db-path` enable persistence so the node survives restarts; this is required for `historical-execution` to work. +- `--historical-execution` allows dry-running transactions against previous blocks—handy when replaying test cases. + - This is required for state forking to work. +- `--poa-instant` auto-produces blocks so transactions submitted against the fork finalize immediately. + +Once the node is running, its GraphQL endpoint is available at `http://127.0.0.1:4000/v1/graphql`. + +## 3. Repeat the contract call against the fork + +Now that the forked node is live, repeat the earlier `forc-call` but target the local endpoint instead of the public Testnet endpoint: + +```sh +forc-call \ + --abi https://raw.githubusercontent.com/mira-amm/mira-v1-periphery/refs/heads/main/fixtures/mira-amm/mira_amm_contract-abi.json \ + 0xd5a716d967a9137222219657d7877bd8c79c64e1edb5de9f2901c98ebe74da80 \ + owner \ + --node-url http://127.0.0.1:4000/v1/graphql +``` + +The first call hydrates the contract bytecode and storage into the RocksDB database defined earlier; subsequent reads are served locally. +You should see the same owner address as before: + +``` +… +result: Initialized(Address(std::address::Address { bits: Bits256([31, 131, 36, 111, 177, 67, 191, 23, 136, 60, 86, 168, 69, 88, 194, 77, 47, 157, 117, 51, 25, 181, 34, 234, 129, 216, 182, 250, 160, 158, 176, 83]) })) +``` + +Because the fork persists data locally, re-running the command now serves the response immediately without contacting Testnet again. +You can safely mutate state or deploy additional tooling against the fork—the remote network remains untouched. + +### Verifying fork behaviour + +- **Lazy hydration:** the first query fetches bytecode and storage from Testnet; later calls are local. +- **State isolation:** writes against the fork do not propagate back to Testnet. +- **Continued discovery:** if you reference another contract that exists on Testnet, the fork loads it on demand, letting you blend public and local-only workflows. + +## Troubleshooting and tips + +The original feature proposal and design discussion is tracked in [FuelLabs/sway#7448](https://github.com/FuelLabs/sway/issues/7448) if you need more background. From e266dd657e4f8b14e08811a98796064a7ec673fd Mon Sep 17 00:00:00 2001 From: zees-dev <63374656+zees-dev@users.noreply.github.com> Date: Wed, 12 Nov 2025 13:08:29 +1300 Subject: [PATCH 18/25] Update forc-plugins/forc-node/tests/fork/Forc.toml Co-authored-by: kaya <20915464+kayagokalp@users.noreply.github.com> --- forc-plugins/forc-node/tests/fork/Forc.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forc-plugins/forc-node/tests/fork/Forc.toml b/forc-plugins/forc-node/tests/fork/Forc.toml index 1e9262852d3..6b3af4c3393 100644 --- a/forc-plugins/forc-node/tests/fork/Forc.toml +++ b/forc-plugins/forc-node/tests/fork/Forc.toml @@ -1,5 +1,5 @@ [project] -authors = ["z"] +authors = ["Fuel Labs "] entry = "main.sw" license = "Apache-2.0" name = "fork" From 28964d86d0b184099e170deee9afc946c02dc2c9 Mon Sep 17 00:00:00 2001 From: zees-dev <63374656+zees-dev@users.noreply.github.com> Date: Wed, 12 Nov 2025 13:08:40 +1300 Subject: [PATCH 19/25] Update forc-plugins/forc-node/tests/local.rs Co-authored-by: kaya <20915464+kayagokalp@users.noreply.github.com> --- forc-plugins/forc-node/tests/local.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forc-plugins/forc-node/tests/local.rs b/forc-plugins/forc-node/tests/local.rs index 05d9768ec9b..67825cc6926 100644 --- a/forc-plugins/forc-node/tests/local.rs +++ b/forc-plugins/forc-node/tests/local.rs @@ -500,7 +500,7 @@ async fn update_transitive_contract_state() { #[tokio::test] async fn start_local_node_check_health() { - let port = portpicker::pick_unused_port().expect("pick port"); + let port = portpicker::pick_unused_port().expect("No ports free"); let local_cmd = LocalCmd { chain_config: None, port: Some(port), From b810dcc5a49cb5adce08440705e407a8a9dcc6e5 Mon Sep 17 00:00:00 2001 From: zees-dev <63374656+zees-dev@users.noreply.github.com> Date: Wed, 12 Nov 2025 13:08:54 +1300 Subject: [PATCH 20/25] Update forc-plugins/forc-node/tests/local.rs Co-authored-by: kaya <20915464+kayagokalp@users.noreply.github.com> --- forc-plugins/forc-node/tests/local.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/forc-plugins/forc-node/tests/local.rs b/forc-plugins/forc-node/tests/local.rs index 67825cc6926..4154ee2e7c4 100644 --- a/forc-plugins/forc-node/tests/local.rs +++ b/forc-plugins/forc-node/tests/local.rs @@ -444,14 +444,6 @@ async fn update_transitive_contract_state() { .expect("increment contract counter"); // update the contract A state on the forked node by calling the contract B - // let contract_instance = fork_caller::Contract::new(contract_b_id.clone(), fork_wallet); - // contract_instance - // .methods() - // .call_increment_count(contract_a_id.clone(), fork_caller::Adder { vals: increment_amount_fork }) - // .with_contract_ids(&[contract_a_id.clone()]) - // .call() - // .await - // .expect("fork-caller: update contract A state via contract B"); // verify that the contract A state was updated on the forked node let fork_result = forc_call_result( From 01dde89c8330739a78f5b38ea55ff1a11139bb48 Mon Sep 17 00:00:00 2001 From: z Date: Fri, 14 Nov 2025 16:46:24 +1300 Subject: [PATCH 21/25] using cargo.toml and cargo.lock from master --- Cargo.lock | 695 +++++++++++++++++++++++++++++++---------------------- Cargo.toml | 14 +- 2 files changed, 413 insertions(+), 296 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dd23c2e93cc..7108488ebde 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3852,7 +3852,7 @@ dependencies = [ "forc-util", "fs_extra", "fuel-abi-types 0.15.3", - "fuel-asm", + "fuel-asm 0.65.0", "hex", "rexpect", "serde", @@ -3895,15 +3895,15 @@ dependencies = [ "forc-util", "forc-wallet", "fuel-abi-types 0.15.3", - "fuel-core-client 0.46.0", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", - "fuel-crypto", - "fuel-tx", - "fuel-vm", - "fuels 0.75.1", - "fuels-accounts 0.75.1", - "fuels-core 0.75.1", + "fuel-core-client 0.47.1", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", + "fuel-crypto 0.65.0", + "fuel-tx 0.65.0", + "fuel-vm 0.65.0", + "fuels 0.76.0", + "fuels-accounts 0.76.0", + "fuels-core 0.76.0", "futures", "hex", "k256", @@ -3939,10 +3939,10 @@ dependencies = [ "criterion", "forc-tracing 0.70.1", "forc-util", - "fuel-core-types 0.46.0", - "fuel-crypto", - "fuels-accounts 0.75.1", - "fuels-core 0.75.1", + "fuel-core-types 0.47.1", + "fuel-crypto 0.65.0", + "fuels-accounts 0.76.0", + "fuels-core 0.76.0", "futures", "hex", "libp2p-identity", @@ -3973,10 +3973,10 @@ dependencies = [ "forc-tracing 0.70.1", "forc-util", "fuel-abi-types 0.15.3", - "fuel-core-client 0.46.0", - "fuel-tx", - "fuel-types", - "fuel-vm", + "fuel-core-client 0.47.1", + "fuel-tx 0.65.0", + "fuel-types 0.65.0", + "fuel-vm 0.65.0", "portpicker", "rayon", "rexpect", @@ -4060,10 +4060,10 @@ dependencies = [ "clap", "forc-client", "forc-tx", - "fuel-crypto", - "fuels 0.75.1", - "fuels-accounts 0.75.1", - "fuels-core 0.75.1", + "fuel-crypto 0.65.0", + "fuels 0.76.0", + "fuels-accounts 0.76.0", + "fuels-core 0.76.0", "hex", "rand 0.8.5", "rmcp", @@ -4105,18 +4105,12 @@ dependencies = [ "anyhow", "clap", "dialoguer", - "forc-client", - "forc-pkg", "forc-tracing 0.70.1", "forc-util", "fuel-core", - "fuel-core-chain-config 0.46.0", - "fuel-core-client 0.46.0", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", - "fuel-crypto", - "fuel-tx", - "fuels 0.75.1", + "fuel-core-chain-config 0.47.1", + "fuel-core-types 0.47.1", + "fuel-crypto 0.65.0", "libc", "libp2p-identity", "portpicker", @@ -4214,8 +4208,8 @@ dependencies = [ "forc-pkg", "forc-util", "fuel-abi-types 0.15.3", - "fuel-tx", - "fuel-vm", + "fuel-tx 0.65.0", + "fuel-vm 0.65.0", "rand 0.8.5", "rayon", "serde_json", @@ -4255,9 +4249,9 @@ dependencies = [ "clap", "devault", "forc-util", - "fuel-tx", - "fuel-types", - "fuels-core 0.75.1", + "fuel-tx 0.65.0", + "fuel-types 0.65.0", + "fuels-core 0.76.0", "serde", "serde_json", "thiserror 1.0.69", @@ -4275,9 +4269,9 @@ dependencies = [ "fd-lock", "forc-tracing 0.70.1", "fuel-abi-types 0.15.3", - "fuel-asm", - "fuel-tx", - "fuels-core 0.75.1", + "fuel-asm 0.65.0", + "fuel-tx 0.65.0", + "fuels-core 0.76.0", "hex", "mark-flaky-tests", "paste", @@ -4394,26 +4388,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8961271ed5c974d8a9f12912d87be57fe899638f24948b3ffe4d63dfdf1063f" dependencies = [ "bitflags 2.9.4", - "fuel-types", + "fuel-types 0.62.0", + "serde", + "strum 0.24.1", +] + +[[package]] +name = "fuel-asm" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49ae81d896972a39cfbe6e5659624d08aa889d30950d2831cca1c50bce95898f" +dependencies = [ + "bitflags 2.9.4", + "fuel-types 0.65.0", "serde", "strum 0.24.1", ] [[package]] name = "fuel-compression" -version = "0.62.0" +version = "0.65.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fad6effad71397dd4ac59451830652e7fc94f382be6f0cb9541027409f1a8a7" +checksum = "55258ae5ef436d6b6c024db4dbe80784c8eafc5062b8b90f365db416e6b4e7bc" dependencies = [ - "fuel-derive", - "fuel-types", + "fuel-derive 0.65.0", + "fuel-types 0.65.0", "serde", ] [[package]] name = "fuel-core" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21745e8cc9186891fdc7b7ca3eb795f81ede65c0a9a6c2893831f08b88651603" dependencies = [ "anyhow", "async-graphql", @@ -4423,24 +4430,25 @@ dependencies = [ "clap", "derive_more 0.99.20", "enum-iterator", - "fuel-core-chain-config 0.46.0", + "fuel-core-chain-config 0.47.1", "fuel-core-compression-service", "fuel-core-consensus-module", "fuel-core-database", "fuel-core-executor", "fuel-core-gas-price-service", "fuel-core-importer", - "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", + "fuel-core-metrics 0.47.1", "fuel-core-p2p", - "fuel-core-poa 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", + "fuel-core-poa 0.47.1", "fuel-core-producer", "fuel-core-relayer", - "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", + "fuel-core-services 0.47.1", "fuel-core-shared-sequencer", - "fuel-core-storage 0.46.0", + "fuel-core-storage 0.47.1", + "fuel-core-syscall", "fuel-core-tx-status-manager", "fuel-core-txpool", - "fuel-core-types 0.46.0", + "fuel-core-types 0.47.1", "fuel-core-upgradable-executor", "futures", "hex", @@ -4492,14 +4500,15 @@ dependencies = [ [[package]] name = "fuel-core-chain-config" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3dd8cd17fe300a711ef9ac6c014f1cf76a98212f68eb247e0b5e4b81108f933" dependencies = [ "anyhow", "bech32", "educe 0.6.0", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", "itertools 0.12.1", "postcard", "rand 0.8.5", @@ -4536,15 +4545,16 @@ dependencies = [ [[package]] name = "fuel-core-client" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd34ff2c9ad4ed347982759b93ee72f9d31492cd49101fe1b0189a3cb32b434" dependencies = [ "anyhow", "base64 0.22.1", "cynic", "derive_more 0.99.20", "eventsource-client", - "fuel-core-types 0.46.0", + "fuel-core-types 0.47.1", "futures", "hex", "hyper-rustls 0.24.2", @@ -4561,12 +4571,13 @@ dependencies = [ [[package]] name = "fuel-core-compression" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81ff602bf1c667f72b6f40b6e4d20ed83fceefde41276d7411beb3bccb4991b6" dependencies = [ "anyhow", "enum_dispatch", - "fuel-core-types 0.46.0", + "fuel-core-types 0.47.1", "paste", "serde", "strum 0.25.0", @@ -4575,17 +4586,18 @@ dependencies = [ [[package]] name = "fuel-core-compression-service" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3957942bf10659deebfc6501a4f74b7e4445f1e3e58e9dc8a24e5045b5b91876" dependencies = [ "anyhow", "async-trait", "enum-iterator", "fuel-core-compression", - "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-metrics 0.47.1", + "fuel-core-services 0.47.1", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", "futures", "paste", "serde", @@ -4598,52 +4610,58 @@ dependencies = [ [[package]] name = "fuel-core-consensus-module" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8554e84c7c870c4dad0fc25dbd27aff21f5f0b9915cc82ca60724d2cbfdd2c6" dependencies = [ "anyhow", - "fuel-core-chain-config 0.46.0", - "fuel-core-poa 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-chain-config 0.47.1", + "fuel-core-poa 0.47.1", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", ] [[package]] name = "fuel-core-database" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75eeea49697db3c57592eed702a4e057527a82ab5c2fa573f7b748d0d5ceee05" dependencies = [ "anyhow", "derive_more 0.99.20", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", ] [[package]] name = "fuel-core-executor" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deda6dd3f48f6a2ab2ae2db0c7decefd81338287a35bde2b025996eaf7045ac7" dependencies = [ "anyhow", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-storage 0.47.1", + "fuel-core-syscall", + "fuel-core-types 0.47.1", "parking_lot", "serde", + "sha2 0.10.9", "tracing", ] [[package]] name = "fuel-core-gas-price-service" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "888c76bba6596d70dc8f21843f57f5207048d325fca33bcce0129a37bf8004a9" dependencies = [ "anyhow", "async-trait", "enum-iterator", - "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-metrics 0.47.1", + "fuel-core-services 0.47.1", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", "fuel-gas-price-algorithm", "futures", "num_enum", @@ -4662,14 +4680,15 @@ dependencies = [ [[package]] name = "fuel-core-importer" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e890819b73c4f16a0cf82ba4b1a60912efdac3e42dbac7e45ff824d27295d68" dependencies = [ "anyhow", "derive_more 0.99.20", - "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-metrics 0.47.1", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", "mockall", "rayon", "tokio", @@ -4694,24 +4713,9 @@ dependencies = [ [[package]] name = "fuel-core-metrics" -version = "0.46.0" +version = "0.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bbaf694c40665c0cd0232a0feae9004c2c5bbd9e377dcda39ce84aa2f27686" -dependencies = [ - "once_cell", - "parking_lot", - "pin-project-lite", - "prometheus-client", - "regex", - "strum 0.25.0", - "strum_macros 0.25.3", - "tracing", -] - -[[package]] -name = "fuel-core-metrics" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +checksum = "2c1f7e57f3ed9a569c18bbc50a84ab1b203fde8e5eff0df871422ecd38f342c0" dependencies = [ "once_cell", "parking_lot", @@ -4725,16 +4729,17 @@ dependencies = [ [[package]] name = "fuel-core-p2p" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb5e92513bfdb1549b1887a65a110c2efc2cd443df5e5a0c882ea77d7c752c6" dependencies = [ "anyhow", "async-trait", - "fuel-core-chain-config 0.46.0", - "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-chain-config 0.47.1", + "fuel-core-metrics 0.47.1", + "fuel-core-services 0.47.1", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", "futures", "hex", "hickory-resolver", @@ -4776,35 +4781,16 @@ dependencies = [ [[package]] name = "fuel-core-poa" -version = "0.46.0" +version = "0.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e192252556882c140aed056f6de69c79aebf0416dd492605315870b28bd48e3d" +checksum = "c2a38e63e9579b151bc6ae2365a60b81d3098f8d753ce7a154f877ea42b80204" dependencies = [ "anyhow", "async-trait", - "fuel-core-chain-config 0.46.0", - "fuel-core-services 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", - "serde", - "serde_json", - "thiserror 2.0.17", - "tokio", - "tokio-stream", - "tracing", -] - -[[package]] -name = "fuel-core-poa" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" -dependencies = [ - "anyhow", - "async-trait", - "fuel-core-chain-config 0.46.0", - "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-chain-config 0.47.1", + "fuel-core-services 0.47.1", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", "serde", "serde_json", "thiserror 2.0.17", @@ -4815,14 +4801,15 @@ dependencies = [ [[package]] name = "fuel-core-producer" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b14eca0f2642d702eba882ba79fe6cae45661b75f53d1be2fd9c7f13af5784e" dependencies = [ "anyhow", "async-trait", "derive_more 0.99.20", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", "tokio", "tokio-rayon", "tracing", @@ -4830,8 +4817,9 @@ dependencies = [ [[package]] name = "fuel-core-relayer" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0073f5130c486fc4cfcf3c6f9c3c7b07c311734d704420731cd14367e47e9b6e" dependencies = [ "anyhow", "async-trait", @@ -4840,9 +4828,9 @@ dependencies = [ "ethers-contract", "ethers-core", "ethers-providers", - "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-services 0.47.1", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", "futures", "once_cell", "strum 0.25.0", @@ -4870,28 +4858,13 @@ dependencies = [ [[package]] name = "fuel-core-services" -version = "0.46.0" +version = "0.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e59554b05ce13920349ca3b16169537366c2fff8e3f048f091c73c5e648c13fe" -dependencies = [ - "anyhow", - "async-trait", - "fuel-core-metrics 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures", - "parking_lot", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "fuel-core-services" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +checksum = "87063898826ea367286649999a8d25c68d15b63a9cb541c4816018ef0af09bce" dependencies = [ "anyhow", "async-trait", - "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", + "fuel-core-metrics 0.47.1", "futures", "parking_lot", "pin-project-lite", @@ -4902,16 +4875,17 @@ dependencies = [ [[package]] name = "fuel-core-shared-sequencer" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85d17aa37693cbc392d2ad7bc32701c4c8a8952706c6fc62e674bfcecd6d1ffb" dependencies = [ "anyhow", "async-trait", "base64 0.22.1", "cosmos-sdk-proto", "cosmrs", - "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-types 0.46.0", + "fuel-core-services 0.47.1", + "fuel-core-types 0.47.1", "fuel-sequencer-proto", "futures", "postcard", @@ -4935,7 +4909,7 @@ dependencies = [ "derive_more 0.99.20", "enum-iterator", "fuel-core-types 0.44.0", - "fuel-vm", + "fuel-vm 0.62.0", "impl-tools", "itertools 0.12.1", "num_enum", @@ -4949,14 +4923,15 @@ dependencies = [ [[package]] name = "fuel-core-storage" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e565d1cf1a528868988bb1165a7ccbc2f410dea356ddbf01032931fbde5c11e" dependencies = [ "anyhow", "derive_more 0.99.20", "enum-iterator", - "fuel-core-types 0.46.0", - "fuel-vm", + "fuel-core-types 0.47.1", + "fuel-vm 0.65.0", "impl-tools", "itertools 0.12.1", "mockall", @@ -4970,16 +4945,28 @@ dependencies = [ "strum_macros 0.25.3", ] +[[package]] +name = "fuel-core-syscall" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "776cb22ad11c90f7b45d8cb9107627a5bad6cf5529ca868a5535e534ecbd530c" +dependencies = [ + "fuel-core-types 0.47.1", + "parking_lot", + "tracing", +] + [[package]] name = "fuel-core-tx-status-manager" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4645cbdc05002fe3db62cd9bb76052fbb84d00a41cd752ac7d6b0e4278fabdad" dependencies = [ "anyhow", "async-trait", - "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-types 0.46.0", + "fuel-core-metrics 0.47.1", + "fuel-core-services 0.47.1", + "fuel-core-types 0.47.1", "futures", "parking_lot", "postcard", @@ -4990,16 +4977,18 @@ dependencies = [ [[package]] name = "fuel-core-txpool" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f08c9d6935432e976250de1f32037fcbf6d919f5cd7f70656f2344ba3309f8db" dependencies = [ "anyhow", "async-trait", "derive_more 0.99.20", - "fuel-core-metrics 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-services 0.46.0 (git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr)", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-metrics 0.47.1", + "fuel-core-services 0.47.1", + "fuel-core-storage 0.47.1", + "fuel-core-syscall", + "fuel-core-types 0.47.1", "futures", "lru 0.13.0", "num-rational", @@ -5021,7 +5010,7 @@ dependencies = [ "ed25519", "ed25519-dalek", "educe 0.6.0", - "fuel-vm", + "fuel-vm 0.62.0", "k256", "rand 0.8.5", "secrecy", @@ -5032,8 +5021,9 @@ dependencies = [ [[package]] name = "fuel-core-types" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9726f08ebe75b92c894626b804dd0a8f8efbe5fc3f25ded79a4d292812647e3d" dependencies = [ "anyhow", "bs58", @@ -5041,8 +5031,9 @@ dependencies = [ "ed25519", "ed25519-dalek", "educe 0.6.0", - "fuel-vm", + "fuel-vm 0.65.0", "k256", + "parking_lot", "rand 0.8.5", "secrecy", "serde", @@ -5052,12 +5043,13 @@ dependencies = [ [[package]] name = "fuel-core-upgradable-executor" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aff93a61839ca8b677f4d6535e59c69812affaf5ad070ce0285a3644f29192bd" dependencies = [ "fuel-core-executor", - "fuel-core-storage 0.46.0", - "fuel-core-types 0.46.0", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", "futures", "parking_lot", ] @@ -5073,7 +5065,28 @@ dependencies = [ "coins-bip39", "ecdsa", "ed25519-dalek", - "fuel-types", + "fuel-types 0.62.0", + "k256", + "p256", + "rand 0.8.5", + "secp256k1 0.30.0", + "serde", + "sha2 0.10.9", + "zeroize", +] + +[[package]] +name = "fuel-crypto" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1bbd5d5d9809d517dab5f92a8c915403d83375efb6f3f5dd3994ff1e4ae28fe" +dependencies = [ + "base64ct", + "coins-bip32", + "coins-bip39", + "ecdsa", + "ed25519-dalek", + "fuel-types 0.65.0", "k256", "p256", "rand 0.8.5", @@ -5095,6 +5108,18 @@ dependencies = [ "synstructure 0.13.2", ] +[[package]] +name = "fuel-derive" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb4078dbab152ef822bc092bd542796270031152ff8c96008b9006fb8c52ce53" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "synstructure 0.13.2", +] + [[package]] name = "fuel-ethabi" version = "18.0.0" @@ -5144,8 +5169,9 @@ dependencies = [ [[package]] name = "fuel-gas-price-algorithm" -version = "0.46.0" -source = "git+https://github.com/FuelLabs/fuel-core?branch=update%2Fpub-data-source-attr#c5fdf0d538fac4e8ad42dd1bacee0a3ac6d835ef" +version = "0.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0839de935cc1847794fca81dc822b750981055cabb75bc6b0c0ef30fc4aa5a90" dependencies = [ "serde", "thiserror 2.0.17", @@ -5160,7 +5186,22 @@ checksum = "ec01781b757227d9553b178f788f7d922688dcc45cf616ec9c871cd1a591a910" dependencies = [ "derive_more 0.99.20", "digest 0.10.7", - "fuel-storage", + "fuel-storage 0.62.0", + "hashbrown 0.13.2", + "hex", + "serde", + "sha2 0.10.9", +] + +[[package]] +name = "fuel-merkle" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5ecc75b1771d36c86293fef3b63ebcd5fa5bafbc51d356d92ff60ebac59f636" +dependencies = [ + "derive_more 0.99.20", + "digest 0.10.7", + "fuel-storage 0.65.0", "hashbrown 0.13.2", "hex", "serde", @@ -5185,6 +5226,12 @@ version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca73c81646409e9cacac532ff790567d629bc6c512c10ff986536e2335de22c9" +[[package]] +name = "fuel-storage" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b46be43225f70c17f9e028f80a583c275fb2dec1e2a4e9100aa6385a2c86a" + [[package]] name = "fuel-tx" version = "0.62.0" @@ -5194,11 +5241,33 @@ dependencies = [ "bitflags 2.9.4", "derive_more 1.0.0", "educe 0.6.0", - "fuel-asm", + "fuel-asm 0.62.0", + "fuel-crypto 0.62.0", + "fuel-merkle 0.62.0", + "fuel-types 0.62.0", + "hashbrown 0.14.5", + "itertools 0.10.5", + "postcard", + "rand 0.8.5", + "serde", + "strum 0.24.1", + "strum_macros 0.24.3", +] + +[[package]] +name = "fuel-tx" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6c26aca0167279221e6ea9bc688f4f9688d2e5a42533c05f1bdf97f1d200b1b" +dependencies = [ + "bitflags 2.9.4", + "derive_more 1.0.0", + "educe 0.6.0", + "fuel-asm 0.65.0", "fuel-compression", - "fuel-crypto", - "fuel-merkle", - "fuel-types", + "fuel-crypto 0.65.0", + "fuel-merkle 0.65.0", + "fuel-types 0.65.0", "hashbrown 0.14.5", "itertools 0.10.5", "postcard", @@ -5214,7 +5283,20 @@ version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b07f2043e0f0cbef39c49ccf74c158609e0abd989684fa73389e5720b19f6d9" dependencies = [ - "fuel-derive", + "fuel-derive 0.62.0", + "hex", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "fuel-types" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b128048cde245d6e895cb7f7824d38d3e4d9f1b4cb5d514c7186bd79308af6a9" +dependencies = [ + "educe 0.6.0", + "fuel-derive 0.65.0", "hex", "rand 0.8.5", "serde", @@ -5233,13 +5315,48 @@ dependencies = [ "derive_more 0.99.20", "educe 0.6.0", "ethnum", - "fuel-asm", + "fuel-asm 0.62.0", + "fuel-crypto 0.62.0", + "fuel-merkle 0.62.0", + "fuel-storage 0.62.0", + "fuel-tx 0.62.0", + "fuel-types 0.62.0", + "hashbrown 0.14.5", + "itertools 0.10.5", + "libm", + "paste", + "percent-encoding", + "primitive-types", + "rand 0.8.5", + "serde", + "serde_with", + "sha3", + "static_assertions", + "strum 0.24.1", + "substrate-bn", + "tai64", +] + +[[package]] +name = "fuel-vm" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1632d884ec82f140f21f9943f0bcda8dfcdad02a94a032f67051e27eb1e8054" +dependencies = [ + "anyhow", + "async-trait", + "backtrace", + "bitflags 2.9.4", + "derive_more 0.99.20", + "educe 0.6.0", + "ethnum", + "fuel-asm 0.65.0", "fuel-compression", - "fuel-crypto", - "fuel-merkle", - "fuel-storage", - "fuel-tx", - "fuel-types", + "fuel-crypto 0.65.0", + "fuel-merkle 0.65.0", + "fuel-storage 0.65.0", + "fuel-tx 0.65.0", + "fuel-types 0.65.0", "hashbrown 0.14.5", "itertools 0.10.5", "libm", @@ -5263,8 +5380,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e13622e2d44e7814daa8242a77fb0b88ae3210b2c90108550c373fe0695c5c4" dependencies = [ "fuel-core-client 0.44.0", - "fuel-crypto", - "fuel-tx", + "fuel-crypto 0.62.0", + "fuel-tx 0.62.0", "fuels-accounts 0.74.0", "fuels-core 0.74.0", "fuels-macros 0.74.0", @@ -5274,18 +5391,18 @@ dependencies = [ [[package]] name = "fuels" -version = "0.75.1" +version = "0.76.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71925fa65411ca3d3b15f659e502b722a4f23772a1ba707ca1a47a0bca71140e" +checksum = "81901ab28bf46f0398c2b980a2343a3ea6c96ccf638a602cfeedb24db81ae31c" dependencies = [ - "fuel-core-client 0.46.0", - "fuel-crypto", - "fuel-tx", - "fuels-accounts 0.75.1", - "fuels-core 0.75.1", - "fuels-macros 0.75.1", - "fuels-programs 0.75.1", - "fuels-test-helpers 0.75.1", + "fuel-core-client 0.47.1", + "fuel-crypto 0.65.0", + "fuel-tx 0.65.0", + "fuels-accounts 0.76.0", + "fuels-core 0.76.0", + "fuels-macros 0.76.0", + "fuels-programs 0.76.0", + "fuels-test-helpers 0.76.0", ] [[package]] @@ -5299,9 +5416,9 @@ dependencies = [ "cynic", "fuel-core-client 0.44.0", "fuel-core-types 0.44.0", - "fuel-crypto", - "fuel-tx", - "fuel-types", + "fuel-crypto 0.62.0", + "fuel-tx 0.62.0", + "fuel-types 0.62.0", "fuels-core 0.74.0", "futures", "itertools 0.12.1", @@ -5316,19 +5433,19 @@ dependencies = [ [[package]] name = "fuels-accounts" -version = "0.75.1" +version = "0.76.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a093a9b8c5f008eacb8e86ae079631723bede0d795fafc5821d2f63184961" +checksum = "f0f2af2d57d6b20289978ccf81397ca385a4f0f9220111b7e27109111ba721b9" dependencies = [ "async-trait", "chrono", "cynic", - "fuel-core-client 0.46.0", - "fuel-core-types 0.46.0", - "fuel-crypto", - "fuel-tx", - "fuel-types", - "fuels-core 0.75.1", + "fuel-core-client 0.47.1", + "fuel-core-types 0.47.1", + "fuel-crypto 0.65.0", + "fuel-tx 0.65.0", + "fuel-types 0.65.0", + "fuels-core 0.76.0", "futures", "itertools 0.12.1", "k256", @@ -5358,9 +5475,9 @@ dependencies = [ [[package]] name = "fuels-code-gen" -version = "0.75.1" +version = "0.76.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d264cafc426d0c69bef87921d32e2078679b304b375ee203bca61b82f8992982" +checksum = "b5d6a0c6d15b5bbba10b5862488c34fbeb06e82036409b6e663dedd68430aec9" dependencies = [ "Inflector", "fuel-abi-types 0.15.3", @@ -5382,14 +5499,14 @@ dependencies = [ "auto_impl", "chrono", "fuel-abi-types 0.12.0", - "fuel-asm", + "fuel-asm 0.62.0", "fuel-core-chain-config 0.44.0", "fuel-core-client 0.44.0", "fuel-core-types 0.44.0", - "fuel-crypto", - "fuel-tx", - "fuel-types", - "fuel-vm", + "fuel-crypto 0.62.0", + "fuel-tx 0.62.0", + "fuel-types 0.62.0", + "fuel-vm 0.62.0", "fuels-macros 0.74.0", "hex", "itertools 0.12.1", @@ -5403,24 +5520,24 @@ dependencies = [ [[package]] name = "fuels-core" -version = "0.75.1" +version = "0.76.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5206ac929045d956700b1dcd51a4ff65a3684a8c784bf07a7b2c9754ccecbf" +checksum = "d857ff8b9a0034c86c63c53c079098ffd674d47089dd1a8c93bda3cf7e976885" dependencies = [ "async-trait", "auto_impl", "chrono", "fuel-abi-types 0.15.3", - "fuel-asm", - "fuel-core-chain-config 0.46.0", - "fuel-core-client 0.46.0", - "fuel-core-types 0.46.0", - "fuel-crypto", - "fuel-tx", - "fuel-types", - "fuel-vm", - "fuels-code-gen 0.75.1", - "fuels-macros 0.75.1", + "fuel-asm 0.65.0", + "fuel-core-chain-config 0.47.1", + "fuel-core-client 0.47.1", + "fuel-core-types 0.47.1", + "fuel-crypto 0.65.0", + "fuel-tx 0.65.0", + "fuel-types 0.65.0", + "fuel-vm 0.65.0", + "fuels-code-gen 0.76.0", + "fuels-macros 0.76.0", "hex", "itertools 0.12.1", "postcard", @@ -5446,11 +5563,11 @@ dependencies = [ [[package]] name = "fuels-macros" -version = "0.75.1" +version = "0.76.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2e6fb142046e3ea6008dbef19028e2f14fbb2bf3ce8b8b5a68444bd34d597f5" +checksum = "eb02dbec62f9441a199d08b584489f6f91f301e189b1299caeb21154c256ffeb" dependencies = [ - "fuels-code-gen 0.75.1", + "fuels-code-gen 0.76.0", "itertools 0.12.1", "proc-macro2", "quote", @@ -5465,9 +5582,9 @@ checksum = "595f83f274003d1a75b1e065433e933286375aa8cde91d14787ec803bbc91b26" dependencies = [ "async-trait", "fuel-abi-types 0.12.0", - "fuel-asm", - "fuel-tx", - "fuel-types", + "fuel-asm 0.62.0", + "fuel-tx 0.62.0", + "fuel-types 0.62.0", "fuels-accounts 0.74.0", "fuels-core 0.74.0", "itertools 0.12.1", @@ -5478,17 +5595,17 @@ dependencies = [ [[package]] name = "fuels-programs" -version = "0.75.1" +version = "0.76.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d8633dded2082dfaf004ea89b3313e342c1aeb232906a3f8ae3aec0b8ad946" +checksum = "d94a8919bc58ac98bd4376ad24b2137b75fad05eb096bf5dffe1d5438d684d1b" dependencies = [ "async-trait", "fuel-abi-types 0.15.3", - "fuel-asm", - "fuel-tx", - "fuel-types", - "fuels-accounts 0.75.1", - "fuels-core 0.75.1", + "fuel-asm 0.65.0", + "fuel-tx 0.65.0", + "fuel-types 0.65.0", + "fuels-accounts 0.76.0", + "fuels-core 0.76.0", "itertools 0.12.1", "rand 0.8.5", "serde_json", @@ -5506,9 +5623,9 @@ dependencies = [ "fuel-core-poa 0.44.0", "fuel-core-services 0.44.0", "fuel-core-types 0.44.0", - "fuel-crypto", - "fuel-tx", - "fuel-types", + "fuel-crypto 0.62.0", + "fuel-tx 0.62.0", + "fuel-types 0.62.0", "fuels-accounts 0.74.0", "fuels-core 0.74.0", "futures", @@ -5521,20 +5638,20 @@ dependencies = [ [[package]] name = "fuels-test-helpers" -version = "0.75.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acc96b30b63b228c87a18bcd61a9a8e5bcd1fca62f4cc5729346c3538b363e48" -dependencies = [ - "fuel-core-chain-config 0.46.0", - "fuel-core-client 0.46.0", - "fuel-core-poa 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fuel-core-services 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fuel-core-types 0.46.0", - "fuel-crypto", - "fuel-tx", - "fuel-types", - "fuels-accounts 0.75.1", - "fuels-core 0.75.1", +version = "0.76.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4f277d3dd44e8ebc2aa2a5234ad8fee3433c43b0b58c2a7d7f73449d1e6930c" +dependencies = [ + "fuel-core-chain-config 0.47.1", + "fuel-core-client 0.47.1", + "fuel-core-poa 0.47.1", + "fuel-core-services 0.47.1", + "fuel-core-types 0.47.1", + "fuel-crypto 0.65.0", + "fuel-tx 0.65.0", + "fuel-types 0.65.0", + "fuels-accounts 0.76.0", + "fuels-core 0.76.0", "futures", "portpicker", "rand 0.8.5", @@ -11556,7 +11673,7 @@ dependencies = [ "fuel-ethabi", "fuel-etk-asm", "fuel-etk-ops", - "fuel-vm", + "fuel-vm 0.65.0", "gimli 0.31.1", "graph-cycles", "hashbrown 0.14.5", @@ -11731,9 +11848,9 @@ dependencies = [ name = "sway-types" version = "0.70.1" dependencies = [ - "fuel-asm", - "fuel-crypto", - "fuel-tx", + "fuel-asm 0.65.0", + "fuel-crypto 0.65.0", + "fuel-tx 0.65.0", "indexmap 2.11.4", "lazy_static", "num-bigint", @@ -12190,7 +12307,7 @@ dependencies = [ "forc-test", "forc-tracing 0.70.1", "forc-util", - "fuel-vm", + "fuel-vm 0.65.0", "futures", "gag", "git2", diff --git a/Cargo.toml b/Cargo.toml index 1ff5c189301..b3aa3c3ee99 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -260,10 +260,10 @@ walkdir = "2.3" whoami = "1.5" wiremock = "0.6" -# https://github.com/FuelLabs/fuel-core/compare/v0.46.0...update/pub-data-source-attr -[patch.crates-io] -fuel-core = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } -fuel-core-chain-config = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } -fuel-core-client = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } -fuel-core-storage = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } -fuel-core-types = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } +# # https://github.com/FuelLabs/fuel-core/compare/v0.46.0...update/pub-data-source-attr +# [patch.crates-io] +# fuel-core = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } +# fuel-core-chain-config = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } +# fuel-core-client = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } +# fuel-core-storage = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } +# fuel-core-types = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } From bbf192d9c1ba917e28be4fa109904b2f4f8cdba5 Mon Sep 17 00:00:00 2001 From: z Date: Wed, 19 Nov 2025 01:00:49 +1300 Subject: [PATCH 22/25] cargo.toml and cargo.lock upd --- Cargo.lock | 1677 ++++++++++++++++++++++++++++++++++------------------ Cargo.toml | 15 +- 2 files changed, 1097 insertions(+), 595 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7108488ebde..ef1d3f76ba2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,49 +108,206 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +[[package]] +name = "alloy-chains" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ef6e7627b842406f449f83ae1a437a01cd244bc246d66f102cee9c0435ce10d" +dependencies = [ + "alloy-primitives", + "num_enum", + "strum 0.27.2", +] + +[[package]] +name = "alloy-consensus" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad704069c12f68d0c742d0cad7e0a03882b42767350584627fbf8a47b1bf1846" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-trie", + "alloy-tx-macros", + "auto_impl", + "borsh", + "c-kzg", + "derive_more 2.0.1", + "either", + "k256", + "once_cell", + "rand 0.8.5", + "secp256k1 0.30.0", + "serde", + "serde_json", + "serde_with", + "thiserror 2.0.17", +] + +[[package]] +name = "alloy-consensus-any" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc374f640a5062224d7708402728e3d6879a514ba10f377da62e7dfb14c673e6" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-eip2124" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "741bdd7499908b3aa0b159bba11e71c8cddd009a2c2eb7a06e825f1ec87900a5" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "crc", + "serde", + "thiserror 2.0.17", +] + [[package]] name = "alloy-eip2930" -version = "0.1.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +checksum = "9441120fa82df73e8959ae0e4ab8ade03de2aaae61be313fbf5746277847ce25" dependencies = [ "alloy-primitives", "alloy-rlp", + "borsh", "serde", ] [[package]] name = "alloy-eip7702" -version = "0.1.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" +checksum = "2919c5a56a1007492da313e7a3b6d45ef5edc5d33416fdec63c0d7a2702a0d20" dependencies = [ "alloy-primitives", "alloy-rlp", + "borsh", "k256", "serde", + "thiserror 2.0.17", +] + +[[package]] +name = "alloy-eips" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e867b5fd52ed0372a95016f3a37cbff95a9d5409230fbaef2d8ea00e8618098" +dependencies = [ + "alloy-eip2124", + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "auto_impl", + "borsh", + "c-kzg", + "derive_more 2.0.1", + "either", + "serde", + "serde_with", + "sha2 0.10.9", + "thiserror 2.0.17", +] + +[[package]] +name = "alloy-json-abi" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5513d5e6bd1cba6bdcf5373470f559f320c05c8c59493b6e98912fbe6733943f" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcab4c51fb1273e3b0f59078e0cdf8aa99f697925b09f0d2055c18be46b4d48c" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "http 1.3.1", + "serde", + "serde_json", + "thiserror 2.0.17", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "196d7fd3f5d414f7bbd5886a628b7c42bd98d1b126f9a7cff69dbfd72007b39c" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-any", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "derive_more 2.0.1", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.17", +] + +[[package]] +name = "alloy-network-primitives" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d3ae2777e900a7a47ad9e3b8ab58eff3d93628265e73bbdee09acf90bf68f75" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", ] [[package]] name = "alloy-primitives" -version = "0.8.25" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c77490fe91a0ce933a1f219029521f20fc28c2c0ca95d53fa4da9c00b8d9d4e" +checksum = "355bf68a433e0fd7f7d33d5a9fc2583fde70bf5c530f63b80845f8da5505cf28" dependencies = [ "alloy-rlp", "bytes", "cfg-if", "const-hex", "derive_more 2.0.1", - "foldhash", - "hashbrown 0.15.5", + "foldhash 0.2.0", + "hashbrown 0.16.0", "indexmap 2.11.4", "itoa", "k256", "keccak-asm", "paste", "proptest", - "rand 0.8.5", + "rand 0.9.2", "ruint", "rustc-hash 2.1.1", "serde", @@ -158,6 +315,45 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-provider" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9bf40c9b2a90c7677f9c39bccd9f06af457f35362439c0497a706f16557703" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-client", + "alloy-rpc-types-eth", + "alloy-signer", + "alloy-sol-types", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "async-trait", + "auto_impl", + "dashmap 6.1.0", + "either", + "futures", + "futures-utils-wasm", + "lru 0.13.0", + "parking_lot", + "pin-project", + "reqwest 0.12.23", + "serde", + "serde_json", + "thiserror 2.0.17", + "tokio", + "tracing", + "url", + "wasmtimer", +] + [[package]] name = "alloy-rlp" version = "0.3.12" @@ -180,6 +376,223 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "alloy-rpc-client" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c2630fde9ff6033a780635e1af6ef40e92d74a9cacb8af3defc1b15cfebca5" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "alloy-transport-http", + "futures", + "pin-project", + "reqwest 0.12.23", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.2", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50b8429b5b62d21bf3691eb1ae12aaae9bb496894d5a114e3cc73e27e6800ec8" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29031a6bf46177d65efce661f7ab37829ca09dd341bc40afb5194e97600655cc" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "itertools 0.14.0", + "serde", + "serde_json", + "serde_with", + "thiserror 2.0.17", +] + +[[package]] +name = "alloy-serde" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e856112bfa0d9adc85bd7c13db03fad0e71d1d6fb4c2010e475b6718108236" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a4f629da632d5279bbc5731634f0f5c9484ad9c4cad0cd974d9669dc1f46d6" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "either", + "elliptic-curve", + "k256", + "thiserror 2.0.17", +] + +[[package]] +name = "alloy-sol-macro" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3ce480400051b5217f19d6e9a82d9010cdde20f1ae9c00d53591e4a1afbb312" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d792e205ed3b72f795a8044c52877d2e6b6e9b1d13f431478121d8d4eaa9028" +dependencies = [ + "alloy-sol-macro-input", + "const-hex", + "heck 0.5.0", + "indexmap 2.11.4", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.106", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bd1247a8f90b465ef3f1207627547ec16940c35597875cdc09c49d58b19693c" +dependencies = [ + "const-hex", + "dunce", + "heck 0.5.0", + "macro-string", + "proc-macro2", + "quote", + "syn 2.0.106", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "954d1b2533b9b2c7959652df3076954ecb1122a28cc740aa84e7b0a49f6ac0a9" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70319350969a3af119da6fb3e9bddb1bce66c9ea933600cb297c8b1850ad2a3c" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe215a2f9b51d5f1aa5c8cf22c8be8cdb354934de09c9a4e37aefb79b77552fd" +dependencies = [ + "alloy-json-rpc", + "auto_impl", + "base64 0.22.1", + "derive_more 2.0.1", + "futures", + "futures-utils-wasm", + "parking_lot", + "serde", + "serde_json", + "thiserror 2.0.17", + "tokio", + "tower 0.5.2", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-transport-http" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1b37b1a30d23deb3a8746e882c70b384c574d355bc2bbea9ea918b0c31366e" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest 0.12.23", + "serde_json", + "tower 0.5.2", + "tracing", + "url", +] + +[[package]] +name = "alloy-trie" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3412d52bb97c6c6cc27ccc28d4e6e8cf605469101193b50b0bd5813b1f990b5" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arrayvec", + "derive_more 2.0.1", + "nybbles", + "serde", + "smallvec", + "tracing", +] + +[[package]] +name = "alloy-tx-macros" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ccf423f6de62e8ce1d6c7a11fb7508ae3536d02e0d68aaeb05c8669337d0937" +dependencies = [ + "darling 0.21.3", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "android_system_properties" version = "0.1.5" @@ -276,6 +689,51 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +[[package]] +name = "ark-bls12-381" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" +dependencies = [ + "ark-ec", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-bn254" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d69eab57e8d2663efa5c63135b2af4f396d66424f88954c21104125ab6b3e6bc" +dependencies = [ + "ark-ec", + "ark-ff 0.5.0", + "ark-r1cs-std", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash 0.8.12", + "ark-ff 0.5.0", + "ark-poly", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe 0.6.0", + "fnv", + "hashbrown 0.15.5", + "itertools 0.13.0", + "num-bigint", + "num-integer", + "num-traits", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.3.0" @@ -402,6 +860,50 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash 0.8.12", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe 0.6.0", + "fnv", + "hashbrown 0.15.5", +] + +[[package]] +name = "ark-r1cs-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941551ef1df4c7a401de7068758db6503598e6f01850bdb2cfdb614a1f9dbea1" +dependencies = [ + "ark-ec", + "ark-ff 0.5.0", + "ark-relations", + "ark-std 0.5.0", + "educe 0.6.0", + "num-bigint", + "num-integer", + "num-traits", + "tracing", +] + +[[package]] +name = "ark-relations" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec46ddc93e7af44bcab5230937635b06fb5744464dd6a7e7b083e80ebd274384" +dependencies = [ + "ark-ff 0.5.0", + "ark-std 0.5.0", + "tracing", + "tracing-subscriber 0.2.25", +] + [[package]] name = "ark-serialize" version = "0.3.0" @@ -429,12 +931,24 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" dependencies = [ + "ark-serialize-derive", "ark-std 0.5.0", "arrayvec", "digest 0.10.7", "num-bigint", ] +[[package]] +name = "ark-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "ark-std" version = "0.3.0" @@ -476,6 +990,9 @@ name = "arrayvec" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +dependencies = [ + "serde", +] [[package]] name = "asn1-rs" @@ -663,17 +1180,6 @@ dependencies = [ "syn 2.0.106", ] -[[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" -dependencies = [ - "futures", - "pharos", - "rustc_version 0.4.1", -] - [[package]] name = "asynchronous-codec" version = "0.7.0" @@ -1310,6 +1816,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "az" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" + [[package]] name = "backtrace" version = "0.3.76" @@ -1693,9 +2205,9 @@ dependencies = [ [[package]] name = "c-kzg" -version = "1.0.3" +version = "2.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" +checksum = "e00bf4b112b07b505472dbefd19e37e53307e2bfed5a79e0cc161d58ccd0e687" dependencies = [ "blst", "cc", @@ -1706,38 +2218,6 @@ dependencies = [ "serde", ] -[[package]] -name = "camino" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276a59bf2b2c967788139340c9f0c5b12d7fd6630315c15c217e559de85d2609" -dependencies = [ - "serde_core", -] - -[[package]] -name = "cargo-platform" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.27", - "serde", - "serde_json", - "thiserror 1.0.69", -] - [[package]] name = "caseless" version = "0.2.2" @@ -2353,6 +2833,21 @@ dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32fast" version = "1.5.0" @@ -2647,6 +3142,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", + "serde", "strsim 0.11.1", "syn 2.0.106", ] @@ -2801,6 +3297,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-where" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "derive_builder" version = "0.20.2" @@ -3113,6 +3620,7 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", + "serdect", "signature", "spki", ] @@ -3184,6 +3692,9 @@ name = "either" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] [[package]] name = "elliptic-curve" @@ -3201,6 +3712,7 @@ dependencies = [ "pkcs8", "rand_core 0.6.4", "sec1", + "serdect", "subtle", "zeroize", ] @@ -3238,24 +3750,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" -[[package]] -name = "enr" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" -dependencies = [ - "base64 0.21.7", - "bytes", - "hex", - "k256", - "log", - "rand 0.8.5", - "rlp", - "serde", - "sha3", - "zeroize", -] - [[package]] name = "entities" version = "1.0.1" @@ -3339,17 +3833,6 @@ dependencies = [ "syn 2.0.106", ] -[[package]] -name = "enumn" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.106", -] - [[package]] name = "env_filter" version = "0.1.3" @@ -3434,23 +3917,6 @@ dependencies = [ "uuid 0.8.2", ] -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror 1.0.69", - "uint", -] - [[package]] name = "ethbloom" version = "0.13.0" @@ -3459,10 +3925,8 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", - "impl-codec", "impl-rlp", "impl-serde", - "scale-info", "tiny-keccak", ] @@ -3474,138 +3938,12 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", - "impl-codec", "impl-rlp", "impl-serde", "primitive-types", - "scale-info", "uint", ] -[[package]] -name = "ethers-contract" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" -dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "futures-util", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror 1.0.69", -] - -[[package]] -name = "ethers-contract-abigen" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" -dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "eyre", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "serde", - "serde_json", - "syn 2.0.106", - "toml 0.8.23", - "walkdir", -] - -[[package]] -name = "ethers-contract-derive" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" -dependencies = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.106", -] - -[[package]] -name = "ethers-core" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" -dependencies = [ - "arrayvec", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array", - "k256", - "num_enum", - "once_cell", - "open-fastrlp", - "rand 0.8.5", - "rlp", - "serde", - "serde_json", - "strum 0.26.3", - "syn 2.0.106", - "tempfile", - "thiserror 1.0.69", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "ethers-providers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" -dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-channel", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http 0.2.12", - "instant", - "jsonwebtoken", - "once_cell", - "pin-project", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror 1.0.69", - "tokio", - "tokio-tungstenite", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", -] - [[package]] name = "ethnum" version = "1.5.2" @@ -3835,6 +4173,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "forc" version = "0.70.1" @@ -4074,7 +4418,7 @@ dependencies = [ "thiserror 1.0.69", "tokio", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.19", ] [[package]] @@ -4105,12 +4449,18 @@ dependencies = [ "anyhow", "clap", "dialoguer", + "forc-client", + "forc-pkg", "forc-tracing 0.70.1", "forc-util", "fuel-core", "fuel-core-chain-config 0.47.1", + "fuel-core-client 0.47.1", + "fuel-core-storage 0.47.1", "fuel-core-types 0.47.1", "fuel-crypto 0.65.0", + "fuel-tx 0.65.0", + "fuels 0.76.0", "libc", "libp2p-identity", "portpicker", @@ -4123,7 +4473,7 @@ dependencies = [ "termion", "tokio", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.19", "wiremock", ] @@ -4227,7 +4577,7 @@ dependencies = [ "ansiterm", "regex", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.19", ] [[package]] @@ -4237,7 +4587,7 @@ dependencies = [ "ansiterm", "regex", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.19", "tracing-test", ] @@ -4284,7 +4634,7 @@ dependencies = [ "sway-types", "sway-utils", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.3.19", "unicode-xid", ] @@ -4419,8 +4769,7 @@ dependencies = [ [[package]] name = "fuel-core" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21745e8cc9186891fdc7b7ca3eb795f81ede65c0a9a6c2893831f08b88651603" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "async-graphql", @@ -4437,12 +4786,12 @@ dependencies = [ "fuel-core-executor", "fuel-core-gas-price-service", "fuel-core-importer", - "fuel-core-metrics 0.47.1", + "fuel-core-metrics 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-p2p", - "fuel-core-poa 0.47.1", + "fuel-core-poa 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-producer", "fuel-core-relayer", - "fuel-core-services 0.47.1", + "fuel-core-services 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-shared-sequencer", "fuel-core-storage 0.47.1", "fuel-core-syscall", @@ -4455,6 +4804,7 @@ dependencies = [ "hyper 0.14.32", "indicatif", "itertools 0.12.1", + "libc", "mockall", "num_cpus", "parking_lot", @@ -4501,8 +4851,7 @@ dependencies = [ [[package]] name = "fuel-core-chain-config" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3dd8cd17fe300a711ef9ac6c014f1cf76a98212f68eb247e0b5e4b81108f933" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "bech32", @@ -4546,8 +4895,7 @@ dependencies = [ [[package]] name = "fuel-core-client" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd34ff2c9ad4ed347982759b93ee72f9d31492cd49101fe1b0189a3cb32b434" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "base64 0.22.1", @@ -4572,8 +4920,7 @@ dependencies = [ [[package]] name = "fuel-core-compression" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ff602bf1c667f72b6f40b6e4d20ed83fceefde41276d7411beb3bccb4991b6" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "enum_dispatch", @@ -4587,15 +4934,14 @@ dependencies = [ [[package]] name = "fuel-core-compression-service" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3957942bf10659deebfc6501a4f74b7e4445f1e3e58e9dc8a24e5045b5b91876" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "async-trait", "enum-iterator", "fuel-core-compression", - "fuel-core-metrics 0.47.1", - "fuel-core-services 0.47.1", + "fuel-core-metrics 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", + "fuel-core-services 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-storage 0.47.1", "fuel-core-types 0.47.1", "futures", @@ -4611,12 +4957,11 @@ dependencies = [ [[package]] name = "fuel-core-consensus-module" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8554e84c7c870c4dad0fc25dbd27aff21f5f0b9915cc82ca60724d2cbfdd2c6" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "fuel-core-chain-config 0.47.1", - "fuel-core-poa 0.47.1", + "fuel-core-poa 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-storage 0.47.1", "fuel-core-types 0.47.1", ] @@ -4624,8 +4969,7 @@ dependencies = [ [[package]] name = "fuel-core-database" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75eeea49697db3c57592eed702a4e057527a82ab5c2fa573f7b748d0d5ceee05" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "derive_more 0.99.20", @@ -4636,8 +4980,7 @@ dependencies = [ [[package]] name = "fuel-core-executor" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deda6dd3f48f6a2ab2ae2db0c7decefd81338287a35bde2b025996eaf7045ac7" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "fuel-core-storage 0.47.1", @@ -4652,14 +4995,13 @@ dependencies = [ [[package]] name = "fuel-core-gas-price-service" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "888c76bba6596d70dc8f21843f57f5207048d325fca33bcce0129a37bf8004a9" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "async-trait", "enum-iterator", - "fuel-core-metrics 0.47.1", - "fuel-core-services 0.47.1", + "fuel-core-metrics 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", + "fuel-core-services 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-storage 0.47.1", "fuel-core-types 0.47.1", "fuel-gas-price-algorithm", @@ -4681,12 +5023,11 @@ dependencies = [ [[package]] name = "fuel-core-importer" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e890819b73c4f16a0cf82ba4b1a60912efdac3e42dbac7e45ff824d27295d68" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "derive_more 0.99.20", - "fuel-core-metrics 0.47.1", + "fuel-core-metrics 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-storage 0.47.1", "fuel-core-types 0.47.1", "mockall", @@ -4727,17 +5068,31 @@ dependencies = [ "tracing", ] +[[package]] +name = "fuel-core-metrics" +version = "0.47.1" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" +dependencies = [ + "once_cell", + "parking_lot", + "pin-project-lite", + "prometheus-client", + "regex", + "strum 0.25.0", + "strum_macros 0.25.3", + "tracing", +] + [[package]] name = "fuel-core-p2p" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb5e92513bfdb1549b1887a65a110c2efc2cd443df5e5a0c882ea77d7c752c6" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "async-trait", "fuel-core-chain-config 0.47.1", - "fuel-core-metrics 0.47.1", - "fuel-core-services 0.47.1", + "fuel-core-metrics 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", + "fuel-core-services 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-storage 0.47.1", "fuel-core-types 0.47.1", "futures", @@ -4782,13 +5137,32 @@ dependencies = [ [[package]] name = "fuel-core-poa" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a38e63e9579b151bc6ae2365a60b81d3098f8d753ce7a154f877ea42b80204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a38e63e9579b151bc6ae2365a60b81d3098f8d753ce7a154f877ea42b80204" +dependencies = [ + "anyhow", + "async-trait", + "fuel-core-chain-config 0.47.1", + "fuel-core-services 0.47.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fuel-core-storage 0.47.1", + "fuel-core-types 0.47.1", + "serde", + "serde_json", + "thiserror 2.0.17", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "fuel-core-poa" +version = "0.47.1" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "async-trait", "fuel-core-chain-config 0.47.1", - "fuel-core-services 0.47.1", + "fuel-core-services 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-storage 0.47.1", "fuel-core-types 0.47.1", "serde", @@ -4802,8 +5176,7 @@ dependencies = [ [[package]] name = "fuel-core-producer" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b14eca0f2642d702eba882ba79fe6cae45661b75f53d1be2fd9c7f13af5784e" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "async-trait", @@ -4815,20 +5188,39 @@ dependencies = [ "tracing", ] +[[package]] +name = "fuel-core-provider" +version = "0.47.1" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" +dependencies = [ + "alloy-json-rpc", + "alloy-provider", + "alloy-rpc-client", + "alloy-transport", + "alloy-transport-http", + "async-trait", + "futures", + "parking_lot", + "thiserror 2.0.17", + "tokio", + "tower 0.5.2", + "url", +] + [[package]] name = "fuel-core-relayer" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0073f5130c486fc4cfcf3c6f9c3c7b07c311734d704420731cd14367e47e9b6e" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types-eth", + "alloy-sol-types", "anyhow", "async-trait", "enum-iterator", - "ethereum-types", - "ethers-contract", - "ethers-core", - "ethers-providers", - "fuel-core-services 0.47.1", + "fuel-core-provider", + "fuel-core-services 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-storage 0.47.1", "fuel-core-types 0.47.1", "futures", @@ -4864,7 +5256,22 @@ checksum = "87063898826ea367286649999a8d25c68d15b63a9cb541c4816018ef0af09bce" dependencies = [ "anyhow", "async-trait", - "fuel-core-metrics 0.47.1", + "fuel-core-metrics 0.47.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures", + "parking_lot", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "fuel-core-services" +version = "0.47.1" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" +dependencies = [ + "anyhow", + "async-trait", + "fuel-core-metrics 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "futures", "parking_lot", "pin-project-lite", @@ -4876,15 +5283,14 @@ dependencies = [ [[package]] name = "fuel-core-shared-sequencer" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85d17aa37693cbc392d2ad7bc32701c4c8a8952706c6fc62e674bfcecd6d1ffb" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "async-trait", "base64 0.22.1", "cosmos-sdk-proto", "cosmrs", - "fuel-core-services 0.47.1", + "fuel-core-services 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-types 0.47.1", "fuel-sequencer-proto", "futures", @@ -4924,8 +5330,7 @@ dependencies = [ [[package]] name = "fuel-core-storage" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e565d1cf1a528868988bb1165a7ccbc2f410dea356ddbf01032931fbde5c11e" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "derive_more 0.99.20", @@ -4948,8 +5353,7 @@ dependencies = [ [[package]] name = "fuel-core-syscall" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "776cb22ad11c90f7b45d8cb9107627a5bad6cf5529ca868a5535e534ecbd530c" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "fuel-core-types 0.47.1", "parking_lot", @@ -4959,13 +5363,12 @@ dependencies = [ [[package]] name = "fuel-core-tx-status-manager" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4645cbdc05002fe3db62cd9bb76052fbb84d00a41cd752ac7d6b0e4278fabdad" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "async-trait", - "fuel-core-metrics 0.47.1", - "fuel-core-services 0.47.1", + "fuel-core-metrics 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", + "fuel-core-services 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-types 0.47.1", "futures", "parking_lot", @@ -4978,14 +5381,13 @@ dependencies = [ [[package]] name = "fuel-core-txpool" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08c9d6935432e976250de1f32037fcbf6d919f5cd7f70656f2344ba3309f8db" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "async-trait", "derive_more 0.99.20", - "fuel-core-metrics 0.47.1", - "fuel-core-services 0.47.1", + "fuel-core-metrics 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", + "fuel-core-services 0.47.1 (git+https://github.com/FuelLabs/fuel-core?branch=master)", "fuel-core-storage 0.47.1", "fuel-core-syscall", "fuel-core-types 0.47.1", @@ -5022,8 +5424,7 @@ dependencies = [ [[package]] name = "fuel-core-types" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9726f08ebe75b92c894626b804dd0a8f8efbe5fc3f25ded79a4d292812647e3d" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "anyhow", "bs58", @@ -5044,8 +5445,7 @@ dependencies = [ [[package]] name = "fuel-core-upgradable-executor" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff93a61839ca8b677f4d6535e59c69812affaf5ad070ce0285a3644f29192bd" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "fuel-core-executor", "fuel-core-storage 0.47.1", @@ -5170,8 +5570,7 @@ dependencies = [ [[package]] name = "fuel-gas-price-algorithm" version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0839de935cc1847794fca81dc822b750981055cabb75bc6b0c0ef30fc4aa5a90" +source = "git+https://github.com/FuelLabs/fuel-core?branch=master#993040b871cdf08cb314ec2afbc17af513386e32" dependencies = [ "serde", "thiserror 2.0.17", @@ -5644,8 +6043,8 @@ checksum = "b4f277d3dd44e8ebc2aa2a5234ad8fee3433c43b0b58c2a7d7f73449d1e6930c" dependencies = [ "fuel-core-chain-config 0.47.1", "fuel-core-client 0.47.1", - "fuel-core-poa 0.47.1", - "fuel-core-services 0.47.1", + "fuel-core-poa 0.47.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fuel-core-services 0.47.1 (registry+https://github.com/rust-lang/crates.io-index)", "fuel-core-types 0.47.1", "fuel-crypto 0.65.0", "fuel-tx 0.65.0", @@ -5785,10 +6184,6 @@ name = "futures-timer" version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] [[package]] name = "futures-util" @@ -5809,13 +6204,10 @@ dependencies = [ ] [[package]] -name = "fxhash" -version = "0.2.1" +name = "futures-utils-wasm" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" [[package]] name = "gag" @@ -5993,15 +6385,13 @@ dependencies = [ ] [[package]] -name = "gloo-timers" -version = "0.2.6" +name = "gmp-mpfr-sys" +version = "1.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "60f8970a75c006bb2f8ae79c6768a116dd215fa8346a87aed99bf9d82ca43394" dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", + "libc", + "windows-sys 0.60.2", ] [[package]] @@ -6150,16 +6540,17 @@ checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", - "foldhash", + "foldhash 0.1.5", ] [[package]] -name = "hashers" -version = "1.0.1" +name = "hashbrown" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" dependencies = [ - "fxhash", + "foldhash 0.2.0", + "serde", ] [[package]] @@ -7097,20 +7488,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.7", - "pem 1.1.1", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "k256" version = "0.13.4" @@ -7121,6 +7498,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "once_cell", + "serdect", "sha2 0.10.9", "signature", ] @@ -7170,9 +7548,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.176" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libdbus-sys" @@ -7875,6 +8253,17 @@ dependencies = [ "libc", ] +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "mark-flaky-tests" version = "1.0.2" @@ -8515,6 +8904,20 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aa2c4e539b869820a2b82e1aef6ff40aa85e65decdd5185e83fb4b1249cd00f" +[[package]] +name = "nybbles" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4b5ecbd0beec843101bffe848217f770e8b8da81d8355b7d6e226f2199b3dc" +dependencies = [ + "alloy-rlp", + "cfg-if", + "proptest", + "ruint", + "serde", + "smallvec", +] + [[package]] name = "object" version = "0.36.7" @@ -8596,31 +8999,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "opener" version = "0.7.2" @@ -8892,15 +9270,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "132dca9b868d927b35b5dd728167b2dee150eb1ad686008fc71ccb298b776fca" -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - [[package]] name = "pem" version = "3.0.5" @@ -8982,23 +9351,24 @@ dependencies = [ ] [[package]] -name = "pharos" -version = "0.5.3" +name = "phf" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ - "futures", - "rustc_version 0.4.1", + "phf_macros 0.11.3", + "phf_shared 0.11.3", ] [[package]] name = "phf" -version = "0.11.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ - "phf_macros", - "phf_shared", + "phf_macros 0.13.1", + "phf_shared 0.13.1", + "serde", ] [[package]] @@ -9007,18 +9377,41 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ - "phf_shared", + "phf_shared 0.11.3", "rand 0.8.5", ] +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared 0.13.1", +] + [[package]] name = "phf_macros" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator 0.13.1", + "phf_shared 0.13.1", "proc-macro2", "quote", "syn 2.0.106", @@ -9033,6 +9426,15 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project" version = "1.1.10" @@ -9314,7 +9716,6 @@ dependencies = [ "impl-codec", "impl-rlp", "impl-serde", - "scale-info", "uint", ] @@ -9380,6 +9781,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", + "syn 2.0.106", ] [[package]] @@ -9710,6 +10112,7 @@ dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", + "serde", ] [[package]] @@ -9720,6 +10123,7 @@ checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", + "serde", ] [[package]] @@ -9758,6 +10162,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ "getrandom 0.3.3", + "serde", ] [[package]] @@ -9815,7 +10220,7 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52c4f3084aa3bc7dfbba4eff4fab2a54db4324965d8872ab933565e6fbd83bc6" dependencies = [ - "pem 3.0.5", + "pem", "ring 0.16.20", "time", "yasna", @@ -9970,126 +10375,251 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.4", "winreg", ] [[package]] -name = "reqwest" -version = "0.12.23" +name = "reqwest" +version = "0.12.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" +dependencies = [ + "base64 0.22.1", + "bytes", + "cookie", + "cookie_store", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.12", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.7.0", + "hyper-rustls 0.27.7", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls 0.23.32", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "tokio", + "tokio-native-tls", + "tokio-rustls 0.26.4", + "tokio-util", + "tower 0.5.2", + "tower-http 0.6.6", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots 1.0.2", +] + +[[package]] +name = "resolv-conf" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3789b30bd25ba102de4beabd95d21ac45b69b1be7d14522bab988c526d6799" + +[[package]] +name = "revm" +version = "33.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c85ed0028f043f87b3c88d4a4cb6f0a76440085523b6a8afe5ff003cf418054" +dependencies = [ + "revm-bytecode", + "revm-context", + "revm-context-interface", + "revm-database", + "revm-database-interface", + "revm-handler", + "revm-inspector", + "revm-interpreter", + "revm-precompile", + "revm-primitives", + "revm-state", +] + +[[package]] +name = "revm-bytecode" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2c6b5e6e8dd1e28a4a60e5f46615d4ef0809111c9e63208e55b5c7058200fb0" +dependencies = [ + "bitvec", + "phf 0.13.1", + "revm-primitives", + "serde", +] + +[[package]] +name = "revm-context" +version = "12.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f038f0c9c723393ac897a5df9140b21cfa98f5753a2cb7d0f28fa430c4118abf" +dependencies = [ + "bitvec", + "cfg-if", + "derive-where", + "revm-bytecode", + "revm-context-interface", + "revm-database-interface", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-context-interface" +version = "13.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "431c9a14e4ef1be41ae503708fd02d974f80ef1f2b6b23b5e402e8d854d1b225" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "auto_impl", + "either", + "revm-database-interface", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-database" +version = "9.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "980d8d6bba78c5dd35b83abbb6585b0b902eb25ea4448ed7bfba6283b0337191" +dependencies = [ + "alloy-eips", + "revm-bytecode", + "revm-database-interface", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-database-interface" +version = "8.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" +checksum = "8cce03e3780287b07abe58faf4a7f5d8be7e81321f93ccf3343c8f7755602bae" dependencies = [ - "base64 0.22.1", - "bytes", - "cookie", - "cookie_store", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.4.12", - "http 1.3.1", - "http-body 1.0.1", - "http-body-util", - "hyper 1.7.0", - "hyper-rustls 0.27.7", - "hyper-tls", - "hyper-util", - "js-sys", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls 0.23.32", - "rustls-pki-types", + "auto_impl", + "either", + "revm-primitives", + "revm-state", "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 1.0.2", - "tokio", - "tokio-native-tls", - "tokio-rustls 0.26.4", - "tokio-util", - "tower 0.5.2", - "tower-http 0.6.6", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "webpki-roots 1.0.2", ] [[package]] -name = "resolv-conf" -version = "0.7.5" +name = "revm-handler" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3789b30bd25ba102de4beabd95d21ac45b69b1be7d14522bab988c526d6799" +checksum = "d44f8f6dbeec3fecf9fe55f78ef0a758bdd92ea46cd4f1ca6e2a946b32c367f3" +dependencies = [ + "auto_impl", + "derive-where", + "revm-bytecode", + "revm-context", + "revm-context-interface", + "revm-database-interface", + "revm-interpreter", + "revm-precompile", + "revm-primitives", + "revm-state", + "serde", +] [[package]] -name = "revm" -version = "14.0.3" +name = "revm-inspector" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "641702b12847f9ed418d552f4fcabe536d867a2c980e96b6e7e25d7b992f929f" +checksum = "5617e49216ce1ca6c8826bcead0386bc84f49359ef67cde6d189961735659f93" dependencies = [ "auto_impl", - "cfg-if", - "dyn-clone", + "either", + "revm-context", + "revm-database-interface", + "revm-handler", "revm-interpreter", - "revm-precompile", + "revm-primitives", + "revm-state", "serde", "serde_json", ] [[package]] name = "revm-interpreter" -version = "10.0.3" +version = "31.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5e14002afae20b5bf1566f22316122f42f57517000e559c55b25bf7a49cba2" +checksum = "26ec36405f7477b9dccdc6caa3be19adf5662a7a0dffa6270cdb13a090c077e5" dependencies = [ + "revm-bytecode", + "revm-context-interface", "revm-primitives", + "revm-state", "serde", ] [[package]] name = "revm-precompile" -version = "11.0.3" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3198c06247e8d4ad0d1312591edf049b0de4ddffa9fecb625c318fd67db8639b" +checksum = "9a62958af953cc4043e93b5be9b8497df84cc3bd612b865c49a7a7dfa26a84e2" dependencies = [ + "ark-bls12-381", + "ark-bn254", + "ark-ec", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "arrayref", "aurora-engine-modexp", "blst", "c-kzg", "cfg-if", "k256", - "once_cell", + "p256", "revm-primitives", "ripemd", - "secp256k1 0.29.1", + "rug", + "secp256k1 0.31.1", "sha2 0.10.9", - "substrate-bn", ] [[package]] name = "revm-primitives" -version = "10.0.0" +version = "21.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f1525851a03aff9a9d6a1d018b414d76252d6802ab54695b27093ecd7e7a101" +checksum = "29e161db429d465c09ba9cbff0df49e31049fe6b549e28eb0b7bd642fcbd4412" dependencies = [ - "alloy-eip2930", - "alloy-eip7702", "alloy-primitives", - "auto_impl", + "num_enum", + "once_cell", + "serde", +] + +[[package]] +name = "revm-state" +version = "8.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d8be953b7e374dbdea0773cf360debed8df394ea8d82a8b240a6b5da37592fc" +dependencies = [ "bitflags 2.9.4", - "bitvec", - "c-kzg", - "cfg-if", - "dyn-clone", - "enumn", - "hex", + "revm-bytecode", + "revm-primitives", "serde", ] @@ -10218,21 +10748,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", - "rlp-derive", "rustc-hex", ] -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "rmcp" version = "0.2.1" @@ -10391,6 +10909,18 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rug" +version = "1.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58ad2e973fe3c3214251a840a621812a4f40468da814b1a3d6947d433c2af11f" +dependencies = [ + "az", + "gmp-mpfr-sys", + "libc", + "libm", +] + [[package]] name = "ruint" version = "1.17.0" @@ -10694,30 +11224,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scale-info" -version = "2.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" -dependencies = [ - "cfg-if", - "derive_more 1.0.0", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" -dependencies = [ - "proc-macro-crate 3.4.0", - "proc-macro2", - "quote", - "syn 2.0.106", -] - [[package]] name = "scc" version = "2.4.0" @@ -10861,6 +11367,7 @@ dependencies = [ "der", "generic-array", "pkcs8", + "serdect", "subtle", "zeroize", ] @@ -10876,23 +11383,25 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.29.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" dependencies = [ + "bitcoin_hashes", "rand 0.8.5", "secp256k1-sys 0.10.1", + "serde", ] [[package]] name = "secp256k1" -version = "0.30.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +checksum = "2c3c81b43dc2d8877c216a3fccf76677ee1ebccd429566d3e67447290d0c42b2" dependencies = [ "bitcoin_hashes", - "rand 0.8.5", - "secp256k1-sys 0.10.1", + "rand 0.9.2", + "secp256k1-sys 0.11.0", ] [[package]] @@ -10913,6 +11422,15 @@ dependencies = [ "cc", ] +[[package]] +name = "secp256k1-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb913707158fadaf0d8702c2db0e857de66eb003ccfdda5924b5f5ac98efb38" +dependencies = [ + "cc", +] + [[package]] name = "secrecy" version = "0.8.0" @@ -10986,18 +11504,6 @@ dependencies = [ "pest", ] -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" - -[[package]] -name = "send_wrapper" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" - [[package]] name = "serde" version = "1.0.228" @@ -11161,6 +11667,16 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + [[package]] name = "serial_test" version = "3.2.0" @@ -11325,18 +11841,6 @@ version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" -[[package]] -name = "simple_asn1" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror 2.0.17", - "time", -] - [[package]] name = "siphasher" version = "1.0.1" @@ -11383,6 +11887,9 @@ name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] [[package]] name = "smartstring" @@ -11577,6 +12084,15 @@ dependencies = [ "strum_macros 0.26.4", ] +[[package]] +name = "strum" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +dependencies = [ + "strum_macros 0.27.2", +] + [[package]] name = "strum_macros" version = "0.24.3" @@ -11616,6 +12132,18 @@ dependencies = [ "syn 2.0.106", ] +[[package]] +name = "strum_macros" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "substrate-bn" version = "0.6.0" @@ -11834,7 +12362,7 @@ dependencies = [ "insta", "num-bigint", "num-traits", - "phf", + "phf 0.11.3", "sway-ast", "sway-error", "sway-features", @@ -11917,6 +12445,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff790eb176cc81bb8936aed0f7b9f14fc4670069a2d371b3e3b0ecce908b2cb3" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.106", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -12614,21 +13154,6 @@ dependencies = [ "tokio-util", ] -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "rustls 0.21.12", - "tokio", - "tokio-rustls 0.24.1", - "tungstenite", - "webpki-roots 0.25.4", -] - [[package]] name = "tokio-util" version = "0.7.16" @@ -12990,6 +13515,15 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-subscriber" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" +dependencies = [ + "tracing-core", +] + [[package]] name = "tracing-subscriber" version = "0.3.19" @@ -13018,7 +13552,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "557b891436fe0d5e0e363427fc7f217abf9ccd510d5136549847bdcbcd011d68" dependencies = [ "tracing-core", - "tracing-subscriber", + "tracing-subscriber 0.3.19", "tracing-test-macro", ] @@ -13038,26 +13572,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.12", - "httparse", - "log", - "rand 0.8.5", - "rustls 0.21.12", - "sha1", - "thiserror 1.0.69", - "url", - "utf-8", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -13236,12 +13750,6 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - [[package]] name = "utf8-width" version = "0.1.7" @@ -13505,6 +14013,20 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmtimer" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c598d6b99ea013e35844697fc4670d08339d5cda15588f193c6beedd12f644b" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] + [[package]] name = "web-sys" version = "0.3.81" @@ -14014,25 +14536,6 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" -[[package]] -name = "ws_stream_wasm" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c173014acad22e83f16403ee360115b38846fe754e735c5d9d3803fe70c6abc" -dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version 0.4.1", - "send_wrapper 0.6.0", - "thiserror 2.0.17", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wyz" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index 8770c52aa79..22efa0e021b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -207,7 +207,7 @@ rayon-cond = "0.3" regex = "1.10" reqwest = "0.12" rexpect = "0.6" -revm = "14.0" +revm = { version = "33.1", default-features = false, features = ["std", "secp256k1", "portable", "blst"] } rmcp = "0.2" ropey = "1.5" rpassword = "7.2" @@ -260,10 +260,9 @@ walkdir = "2.3" whoami = "1.5" wiremock = "0.6" -# # https://github.com/FuelLabs/fuel-core/compare/v0.46.0...update/pub-data-source-attr -# [patch.crates-io] -# fuel-core = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } -# fuel-core-chain-config = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } -# fuel-core-client = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } -# fuel-core-storage = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } -# fuel-core-types = { git = "https://github.com/FuelLabs/fuel-core", branch = "update/pub-data-source-attr" } +[patch.crates-io] +fuel-core = { git = "https://github.com/FuelLabs/fuel-core", branch = "master" } +fuel-core-chain-config = { git = "https://github.com/FuelLabs/fuel-core", branch = "master" } +fuel-core-client = { git = "https://github.com/FuelLabs/fuel-core", branch = "master" } +fuel-core-storage = { git = "https://github.com/FuelLabs/fuel-core", branch = "master" } +fuel-core-types = { git = "https://github.com/FuelLabs/fuel-core", branch = "master" } From f1bf8a5103011a8b0d94ead25078334cb941e3fb Mon Sep 17 00:00:00 2001 From: z Date: Wed, 19 Nov 2025 01:19:32 +1300 Subject: [PATCH 23/25] fixed compilation errors in tests --- test/src/e2e_vm_tests/harness.rs | 63 +++++++++++++++++++------------- test/src/e2e_vm_tests/mod.rs | 14 +++---- 2 files changed, 45 insertions(+), 32 deletions(-) diff --git a/test/src/e2e_vm_tests/harness.rs b/test/src/e2e_vm_tests/harness.rs index ca65ecd0230..88c8a1851e4 100644 --- a/test/src/e2e_vm_tests/harness.rs +++ b/test/src/e2e_vm_tests/harness.rs @@ -19,6 +19,15 @@ use futures::Future; use rand::rngs::StdRng; use rand::{Rng, SeedableRng}; use regex::{Captures, Regex}; +use revm::{ + context::{ + result::{ExecutionResult as RevmExecutionResult, Output as RevmOutput}, + Context, TxEnv, + }, + database::InMemoryDB, + handler::{ExecuteCommitEvm, MainBuilder, MainContext}, + primitives::TxKind, +}; use std::{fs, io::Read, path::PathBuf}; use sway_core::{asm_generation::ProgramABI, BuildTarget, Observer}; @@ -150,7 +159,7 @@ pub(crate) async fn runs_on_node( pub(crate) enum VMExecutionResult { Fuel(ProgramState, Vec, Box), - Evm(revm::primitives::result::ExecutionResult), + Evm(RevmExecutionResult), } /// Very basic check that code does indeed run in the VM. @@ -224,37 +233,41 @@ pub(crate) fn runs_in_vm( )) } BuildTarget::EVM => { - let mut evm = revm::EvmBuilder::default() - .with_db(revm::InMemoryDB::default()) - .with_clear_env() - .build(); + let mut evm = Context::mainnet() + .with_db(InMemoryDB::default()) + .build_mainnet(); // Transaction to create the smart contract + let create_tx = TxEnv { + kind: TxKind::Create, + data: script.bytecode.bytes.clone().into(), + ..Default::default() + }; + let result = evm - .transact_commit() + .transact_commit(create_tx) .map_err(|e| anyhow::anyhow!("Could not create smart contract on EVM: {e:?}"))?; match result { - revm::primitives::ExecutionResult::Revert { .. } - | revm::primitives::ExecutionResult::Halt { .. } => todo!(), - revm::primitives::ExecutionResult::Success { ref output, .. } => match output { - revm::primitives::result::Output::Call(_) => todo!(), - revm::primitives::result::Output::Create(_bytes, address_opt) => { - match address_opt { - None => todo!(), - Some(address) => { - evm.tx_mut().data = script.bytecode.bytes.into(); - evm.tx_mut().transact_to = - revm::interpreter::primitives::TransactTo::Call(*address); - - let result = evm - .transact_commit() - .map_err(|e| anyhow::anyhow!("Failed call on EVM: {e:?}"))?; - - Ok(VMExecutionResult::Evm(result)) - } + RevmExecutionResult::Revert { .. } | RevmExecutionResult::Halt { .. } => todo!(), + RevmExecutionResult::Success { ref output, .. } => match output { + RevmOutput::Call(_) => todo!(), + RevmOutput::Create(_bytes, address_opt) => match address_opt { + None => todo!(), + Some(address) => { + let call_tx = TxEnv { + data: script.bytecode.bytes.clone().into(), + kind: TxKind::Call(*address), + ..Default::default() + }; + + let result = evm + .transact_commit(call_tx) + .map_err(|e| anyhow::anyhow!("Failed call on EVM: {e:?}"))?; + + Ok(VMExecutionResult::Evm(result)) } - } + }, }, } } diff --git a/test/src/e2e_vm_tests/mod.rs b/test/src/e2e_vm_tests/mod.rs index 310257eee5e..9c64607cde0 100644 --- a/test/src/e2e_vm_tests/mod.rs +++ b/test/src/e2e_vm_tests/mod.rs @@ -20,6 +20,7 @@ use fuel_vm::prelude::*; use git2::Repository; use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; use regex::Regex; +use revm::context::result::{ExecutionResult as RevmExecutionResult, SuccessReason}; use std::borrow::Cow; use std::collections::{BTreeMap, HashSet}; use std::fs::File; @@ -584,14 +585,13 @@ impl TestContext { } } harness::VMExecutionResult::Evm(state) => match state { - revm::primitives::ExecutionResult::Success { reason, .. } => match reason { - revm::primitives::SuccessReason::Stop => TestResult::Result(0), - revm::primitives::SuccessReason::Return => todo!(), - revm::primitives::SuccessReason::SelfDestruct => todo!(), - revm::primitives::SuccessReason::EofReturnContract => todo!(), + RevmExecutionResult::Success { reason, .. } => match reason { + SuccessReason::Stop => TestResult::Result(0), + SuccessReason::Return => todo!(), + SuccessReason::SelfDestruct => todo!(), }, - revm::primitives::ExecutionResult::Revert { .. } => TestResult::Result(0), - revm::primitives::ExecutionResult::Halt { reason, .. } => { + RevmExecutionResult::Revert { .. } => TestResult::Result(0), + RevmExecutionResult::Halt { reason, .. } => { panic!("EVM exited with unhandled reason: {reason:?}"); } }, From dce3d6bb5e84037d15b3c9bd04bb33bccda0dddb Mon Sep 17 00:00:00 2001 From: z Date: Wed, 19 Nov 2025 10:46:18 +1300 Subject: [PATCH 24/25] fixed spellchack and markdown lint issues --- docs/book/spell-check-custom-words.txt | 1 + docs/book/src/testing/testing_with_forc_node.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/book/spell-check-custom-words.txt b/docs/book/spell-check-custom-words.txt index 733ba3f73e7..36085f78560 100644 --- a/docs/book/spell-check-custom-words.txt +++ b/docs/book/spell-check-custom-words.txt @@ -1,5 +1,6 @@ ABI ABIs +AMM ASM IDE IDEs diff --git a/docs/book/src/testing/testing_with_forc_node.md b/docs/book/src/testing/testing_with_forc_node.md index 7bb68266246..15324166b70 100644 --- a/docs/book/src/testing/testing_with_forc_node.md +++ b/docs/book/src/testing/testing_with_forc_node.md @@ -20,7 +20,7 @@ forc-call \ Sample output (truncated): -``` +```text … result: Initialized(Address(std::address::Address { bits: Bits256([31, 131, 36, 111, 177, 67, 191, 23, 136, 60, 86, 168, 69, 88, 194, 77, 47, 157, 117, 51, 25, 181, 34, 234, 129, 216, 182, 250, 160, 158, 176, 83]) })) ``` @@ -69,7 +69,7 @@ forc-call \ The first call hydrates the contract bytecode and storage into the RocksDB database defined earlier; subsequent reads are served locally. You should see the same owner address as before: -``` +```text … result: Initialized(Address(std::address::Address { bits: Bits256([31, 131, 36, 111, 177, 67, 191, 23, 136, 60, 86, 168, 69, 88, 194, 77, 47, 157, 117, 51, 25, 181, 34, 234, 129, 216, 182, 250, 160, 158, 176, 83]) })) ``` From d6c6bd980d157bf73133c72139421fff19060d86 Mon Sep 17 00:00:00 2001 From: z Date: Wed, 19 Nov 2025 10:48:11 +1300 Subject: [PATCH 25/25] fixed spellcheck --- docs/book/spell-check-custom-words.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/book/spell-check-custom-words.txt b/docs/book/spell-check-custom-words.txt index 36085f78560..e8e0251dce8 100644 --- a/docs/book/spell-check-custom-words.txt +++ b/docs/book/spell-check-custom-words.txt @@ -111,6 +111,7 @@ relayer relayers repo repos +RocksDB runnable stateful struct