From 6ccddd6c071e27b776465a3c6e8fed2f5e4fce98 Mon Sep 17 00:00:00 2001 From: nol4lej Date: Thu, 26 Mar 2026 19:50:55 -0300 Subject: [PATCH 1/3] feat: add asset balances to pool statistics and related API updates --- client/rpc-v2/src/orbinum/ORBINUM_RPC_API.md | 1 + .../rpc-v2/src/orbinum/application/dto/mod.rs | 2 +- .../application/dto/pool_stats_response.rs | 40 ++++++++++++++++++- client/rpc-v2/src/orbinum/application/mod.rs | 4 +- .../services/merkle_proof_service.rs | 6 +-- .../services/pool_query_service.rs | 33 ++++++++++++--- .../domain/entities/pool_statistics.rs | 25 +++++++++++- .../src/orbinum/domain/ports/pool_query.rs | 28 +++++++++++++ .../adapters/substrate_storage_adapter.rs | 40 ++++++++++++++----- .../infrastructure/storage/storage_keys.rs | 12 +++--- client/rpc-v2/src/orbinum/presentation/api.rs | 5 ++- .../handlers/merkle_root_handler.rs | 7 ++++ .../handlers/pool_stats_handler.rs | 20 +++++++++- .../rpc-v2/src/orbinum/presentation/server.rs | 10 +++++ 14 files changed, 199 insertions(+), 34 deletions(-) diff --git a/client/rpc-v2/src/orbinum/ORBINUM_RPC_API.md b/client/rpc-v2/src/orbinum/ORBINUM_RPC_API.md index 75bb60d3..4225e287 100644 --- a/client/rpc-v2/src/orbinum/ORBINUM_RPC_API.md +++ b/client/rpc-v2/src/orbinum/ORBINUM_RPC_API.md @@ -40,6 +40,7 @@ Method names use the `privacy_` prefix. - `merkle_root`: `string` - `commitment_count`: `u32` - `total_balance`: `u128` (minimum units) + - `asset_balances`: `Array<{ asset_id: u32, balance: u128 }>` (solo balances no-cero) - `tree_depth`: `u32` ## Usage Notes diff --git a/client/rpc-v2/src/orbinum/application/dto/mod.rs b/client/rpc-v2/src/orbinum/application/dto/mod.rs index 6aa8bd0b..62e9bcf6 100644 --- a/client/rpc-v2/src/orbinum/application/dto/mod.rs +++ b/client/rpc-v2/src/orbinum/application/dto/mod.rs @@ -11,4 +11,4 @@ mod pool_stats_response; pub use merkle_proof_response::MerkleProofResponse; pub use nullifier_status_response::NullifierStatusResponse; -pub use pool_stats_response::PoolStatsResponse; +pub use pool_stats_response::{AssetBalanceResponse, PoolStatsResponse}; diff --git a/client/rpc-v2/src/orbinum/application/dto/pool_stats_response.rs b/client/rpc-v2/src/orbinum/application/dto/pool_stats_response.rs index b2937c9d..259783d3 100644 --- a/client/rpc-v2/src/orbinum/application/dto/pool_stats_response.rs +++ b/client/rpc-v2/src/orbinum/application/dto/pool_stats_response.rs @@ -5,6 +5,14 @@ use serde::{Deserialize, Serialize}; /// Response DTO for pool statistics. /// /// Maps from `domain::PoolStatistics` into JSON-friendly fields. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct AssetBalanceResponse { + /// Asset identifier. + pub asset_id: u32, + /// Asset balance in minimum units. + pub balance: u128, +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct PoolStatsResponse { /// Merkle tree root (hex string). @@ -13,22 +21,33 @@ pub struct PoolStatsResponse { pub commitment_count: u32, /// Total pool balance (in minimum units). pub total_balance: u128, + /// Non-zero balances grouped by asset. + pub asset_balances: Vec, /// Tree depth. pub tree_depth: u32, } +impl AssetBalanceResponse { + /// Creates a new `AssetBalanceResponse`. + pub fn new(asset_id: u32, balance: u128) -> Self { + Self { asset_id, balance } + } +} + impl PoolStatsResponse { /// Creates a new `PoolStatsResponse`. pub fn new( merkle_root: String, commitment_count: u32, total_balance: u128, + asset_balances: Vec, tree_depth: u32, ) -> Self { Self { merkle_root, commitment_count, total_balance, + asset_balances, tree_depth, } } @@ -40,11 +59,25 @@ mod tests { #[test] fn should_create_pool_stats_response() { - let response = PoolStatsResponse::new("0x1234".to_string(), 42, 1_000_000u128, 32); + let response = PoolStatsResponse::new( + "0x1234".to_string(), + 42, + 1_000_000u128, + vec![ + AssetBalanceResponse::new(0, 900_000), + AssetBalanceResponse::new(1, 100_000), + ], + 32, + ); assert_eq!(response.merkle_root, "0x1234"); assert_eq!(response.commitment_count, 42); assert_eq!(response.total_balance, 1_000_000u128); + assert_eq!(response.asset_balances.len(), 2); + assert_eq!( + response.asset_balances[0], + AssetBalanceResponse::new(0, 900_000) + ); assert_eq!(response.tree_depth, 32); } @@ -56,6 +89,11 @@ mod tests { fn assert_debug() {} fn assert_eq_trait() {} + assert_serialize::(); + assert_deserialize::(); + assert_clone::(); + assert_debug::(); + assert_eq_trait::(); assert_serialize::(); assert_deserialize::(); assert_clone::(); diff --git a/client/rpc-v2/src/orbinum/application/mod.rs b/client/rpc-v2/src/orbinum/application/mod.rs index 69363644..5c0f65a3 100644 --- a/client/rpc-v2/src/orbinum/application/mod.rs +++ b/client/rpc-v2/src/orbinum/application/mod.rs @@ -12,7 +12,9 @@ pub mod services; pub use services::{MerkleProofService, NullifierService, PoolQueryService}; // DTO re-exports -pub use dto::{MerkleProofResponse, NullifierStatusResponse, PoolStatsResponse}; +pub use dto::{ + AssetBalanceResponse, MerkleProofResponse, NullifierStatusResponse, PoolStatsResponse, +}; /// Application layer error type. #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/client/rpc-v2/src/orbinum/application/services/merkle_proof_service.rs b/client/rpc-v2/src/orbinum/application/services/merkle_proof_service.rs index dcaf393d..29fe9b10 100644 --- a/client/rpc-v2/src/orbinum/application/services/merkle_proof_service.rs +++ b/client/rpc-v2/src/orbinum/application/services/merkle_proof_service.rs @@ -6,7 +6,7 @@ use crate::orbinum::{ }; // Import zero-hash function from the pallet -use pallet_shielded_pool::infrastructure::merkle_tree::get_zero_hash_cached; +use pallet_shielded_pool::{infrastructure::merkle_tree::get_zero_hash_cached, DEFAULT_TREE_DEPTH}; // Logging extern crate log; @@ -162,7 +162,7 @@ where let block_hash = self.query.best_hash()?; let root = self.query.get_merkle_root(block_hash)?; let size = self.query.get_tree_size(block_hash)?; - let depth = TreeDepth::from_tree_size(size.value()); + let depth = TreeDepth::new(DEFAULT_TREE_DEPTH as u32); Ok((root, size, depth)) } @@ -282,6 +282,6 @@ mod tests { assert_eq!(root, Commitment::new([3u8; 32])); assert_eq!(size.value(), 5); - assert_eq!(depth.value(), TreeDepth::from_tree_size(5).value()); + assert_eq!(depth.value(), DEFAULT_TREE_DEPTH as u32); } } diff --git a/client/rpc-v2/src/orbinum/application/services/pool_query_service.rs b/client/rpc-v2/src/orbinum/application/services/pool_query_service.rs index 7ac14890..4374dd6c 100644 --- a/client/rpc-v2/src/orbinum/application/services/pool_query_service.rs +++ b/client/rpc-v2/src/orbinum/application/services/pool_query_service.rs @@ -7,6 +7,7 @@ use crate::orbinum::{ TreeDepth, TreeSize, }, }; +use pallet_shielded_pool::DEFAULT_TREE_DEPTH; /// Service for querying shielded pool statistics. /// @@ -49,15 +50,17 @@ where // 5. Query total balance let total_balance = self.query.get_total_balance(block_hash)?; + let asset_balances = self.query.get_all_asset_balances(block_hash)?; - // 6. Compute tree depth - let tree_depth = TreeDepth::from_tree_size(tree_size.value()); + // 6. Use the pallet's fixed Merkle depth for circuit compatibility. + let tree_depth = TreeDepth::new(DEFAULT_TREE_DEPTH as u32); // 7. Build PoolStatistics Ok(PoolStatistics::new( merkle_root, tree_size, total_balance, + asset_balances, tree_depth, )) } @@ -104,6 +107,13 @@ where let balance = self.query.get_asset_balance(block_hash, asset_id)?; Ok(balance) } + + /// Returns non-zero balances for all known assets. + pub fn get_all_asset_balances(&self) -> ApplicationResult> { + let block_hash = self.query.best_hash()?; + let balances = self.query.get_all_asset_balances(block_hash)?; + Ok(balances) + } } #[cfg(test)] @@ -158,6 +168,13 @@ mod tests { ) -> DomainResult { Ok((asset_id.inner() as u128) * 10) } + + fn get_all_asset_balances( + &self, + _block_hash: BlockHash, + ) -> DomainResult> { + Ok(vec![(AssetId::new(0), self.total_balance)]) + } } #[test] @@ -189,10 +206,8 @@ mod tests { assert_eq!(stats.merkle_root(), root); assert_eq!(stats.commitment_count().value(), 5); assert_eq!(stats.total_balance(), 1_500); - assert_eq!( - stats.tree_depth().value(), - TreeDepth::from_tree_size(5).value() - ); + assert_eq!(stats.asset_balances(), &[(AssetId::new(0), 1_500)]); + assert_eq!(stats.tree_depth().value(), DEFAULT_TREE_DEPTH as u32); } #[test] @@ -227,5 +242,11 @@ mod tests { .expect("asset balance query must succeed"), 70 ); + assert_eq!( + service + .get_all_asset_balances() + .expect("all asset balances query must succeed"), + vec![(AssetId::new(0), 999)] + ); } } diff --git a/client/rpc-v2/src/orbinum/domain/entities/pool_statistics.rs b/client/rpc-v2/src/orbinum/domain/entities/pool_statistics.rs index 4ecae239..2117d10f 100644 --- a/client/rpc-v2/src/orbinum/domain/entities/pool_statistics.rs +++ b/client/rpc-v2/src/orbinum/domain/entities/pool_statistics.rs @@ -1,6 +1,6 @@ //! PoolStatistics entity - Shielded pool statistics -use crate::orbinum::domain::{ports::PoolBalance, Commitment, TreeDepth, TreeSize}; +use crate::orbinum::domain::{ports::PoolBalance, AssetId, Commitment, TreeDepth, TreeSize}; /// Aggregated shielded pool statistics. /// @@ -20,6 +20,8 @@ pub struct PoolStatistics { commitment_count: TreeSize, /// Total pool balance. total_balance: PoolBalance, + /// Non-zero balances by asset. + asset_balances: Vec<(AssetId, PoolBalance)>, /// Tree depth. tree_depth: TreeDepth, } @@ -36,12 +38,14 @@ impl PoolStatistics { merkle_root: Commitment, commitment_count: TreeSize, total_balance: PoolBalance, + asset_balances: Vec<(AssetId, PoolBalance)>, tree_depth: TreeDepth, ) -> Self { Self { merkle_root, commitment_count, total_balance, + asset_balances, tree_depth, } } @@ -61,6 +65,11 @@ impl PoolStatistics { self.total_balance } + /// Returns the balances by asset. + pub fn asset_balances(&self) -> &[(AssetId, PoolBalance)] { + &self.asset_balances + } + /// Returns the tree depth. pub fn tree_depth(&self) -> TreeDepth { self.tree_depth @@ -84,11 +93,21 @@ mod tests { #[test] fn should_create_and_read_pool_statistics() { let root = Commitment::new([4u8; 32]); - let stats = PoolStatistics::new(root, TreeSize::new(10), 2_500, TreeDepth::new(4)); + let stats = PoolStatistics::new( + root, + TreeSize::new(10), + 2_500, + vec![(AssetId::new(0), 2_000), (AssetId::new(1), 500)], + TreeDepth::new(4), + ); assert_eq!(stats.merkle_root(), root); assert_eq!(stats.commitment_count().value(), 10); assert_eq!(stats.total_balance(), 2_500); + assert_eq!( + stats.asset_balances(), + &[(AssetId::new(0), 2_000), (AssetId::new(1), 500)] + ); assert_eq!(stats.tree_depth().value(), 4); } @@ -98,12 +117,14 @@ mod tests { Commitment::new([1u8; 32]), TreeSize::new(1), 100, + vec![(AssetId::new(0), 100)], TreeDepth::new(1), ); let empty = PoolStatistics::new( Commitment::new([2u8; 32]), TreeSize::new(0), 0, + Vec::new(), TreeDepth::new(0), ); diff --git a/client/rpc-v2/src/orbinum/domain/ports/pool_query.rs b/client/rpc-v2/src/orbinum/domain/ports/pool_query.rs index d79ec826..5f9bee89 100644 --- a/client/rpc-v2/src/orbinum/domain/ports/pool_query.rs +++ b/client/rpc-v2/src/orbinum/domain/ports/pool_query.rs @@ -31,6 +31,12 @@ pub trait PoolQuery: Send + Sync { block_hash: BlockHash, asset_id: AssetId, ) -> DomainResult; + + /// Returns non-zero balances for all known assets in the pool. + fn get_all_asset_balances( + &self, + block_hash: BlockHash, + ) -> DomainResult>; } #[cfg(test)] @@ -52,6 +58,13 @@ mod tests { ) -> DomainResult { Ok((asset_id.inner() as u128) * 100) } + + fn get_all_asset_balances( + &self, + _block_hash: BlockHash, + ) -> DomainResult> { + Ok(vec![(AssetId::new(0), 1_000), (AssetId::new(7), 700)]) + } } #[test] @@ -77,4 +90,19 @@ mod tests { assert_eq!(balance, 700); } + + #[test] + fn should_query_all_asset_balances() { + let query = MockPoolQuery; + let block_hash = BlockHash::new([6u8; 32]); + + let balances = query + .get_all_asset_balances(block_hash) + .expect("all asset balances query should succeed"); + + assert_eq!( + balances, + vec![(AssetId::new(0), 1_000), (AssetId::new(7), 700)] + ); + } } diff --git a/client/rpc-v2/src/orbinum/infrastructure/adapters/substrate_storage_adapter.rs b/client/rpc-v2/src/orbinum/infrastructure/adapters/substrate_storage_adapter.rs index f20eb980..3d38b3db 100644 --- a/client/rpc-v2/src/orbinum/infrastructure/adapters/substrate_storage_adapter.rs +++ b/client/rpc-v2/src/orbinum/infrastructure/adapters/substrate_storage_adapter.rs @@ -179,17 +179,16 @@ where BE: sc_client_api::Backend + Send + Sync, { fn get_total_balance(&self, block_hash: BlockHash) -> DomainResult { - let storage_key = storage_keys::pool_balance(); - let data = self - .storage_at(block_hash, &storage_key)? - .ok_or(DomainError::PoolNotInitialized)?; - - // Decode balance (`u128`) - let balance = u128::decode(&mut &data[..]).map_err(|e| { - DomainError::StorageDecodeError(format!("Failed to decode pool balance: {e}")) - })?; + let mut total_balance = 0u128; + for (_, asset_balance) in self.get_all_asset_balances(block_hash)? { + total_balance = total_balance.checked_add(asset_balance).ok_or_else(|| { + DomainError::CalculationError( + "Pool balance overflow while aggregating per-asset balances".to_string(), + ) + })?; + } - Ok(balance) + Ok(total_balance) } fn get_asset_balance(&self, block_hash: BlockHash, asset_id: AssetId) -> DomainResult { @@ -207,6 +206,27 @@ where Ok(balance) } + + fn get_all_asset_balances(&self, block_hash: BlockHash) -> DomainResult> { + let next_asset_id_key = storage_keys::next_asset_id(); + let next_asset_id_data = self + .storage_at(block_hash, &next_asset_id_key)? + .ok_or(DomainError::PoolNotInitialized)?; + + let next_asset_id = u32::decode(&mut &next_asset_id_data[..]).map_err(|e| { + DomainError::StorageDecodeError(format!("Failed to decode next asset id: {e}")) + })?; + + let mut balances = Vec::new(); + for asset_id in 0..next_asset_id { + let balance = self.get_asset_balance(block_hash, AssetId::new(asset_id))?; + if balance > 0 { + balances.push((AssetId::new(asset_id), balance)); + } + } + + Ok(balances) + } } #[cfg(test)] diff --git a/client/rpc-v2/src/orbinum/infrastructure/storage/storage_keys.rs b/client/rpc-v2/src/orbinum/infrastructure/storage/storage_keys.rs index 4403aac5..2a4e4a12 100644 --- a/client/rpc-v2/src/orbinum/infrastructure/storage/storage_keys.rs +++ b/client/rpc-v2/src/orbinum/infrastructure/storage/storage_keys.rs @@ -64,17 +64,17 @@ pub fn merkle_leaf(index: u32) -> Vec { key } -/// Builds the storage key for `PoolBalance` (`StorageValue`). +/// Builds the storage key for `NextAssetId` (`StorageValue`). /// /// # Storage Item -/// `pallet_shielded_pool::PoolBalance::` +/// `pallet_shielded_pool::NextAssetId::` /// /// # Returns -/// `twox_128("ShieldedPool") + twox_128("PoolBalance")` -pub fn pool_balance() -> Vec { +/// `twox_128("ShieldedPool") + twox_128("NextAssetId")` +pub fn next_asset_id() -> Vec { twox_128(PALLET_SHIELDED_POOL) .iter() - .chain(twox_128(b"PoolBalance").iter()) + .chain(twox_128(b"NextAssetId").iter()) .copied() .collect() } @@ -173,7 +173,7 @@ mod tests { #[test] fn should_build_pool_balance_keys_with_expected_lengths() { - let total = pool_balance(); + let total = next_asset_id(); let per_asset = pool_balance_per_asset(7); assert_eq!(total.len(), 32); diff --git a/client/rpc-v2/src/orbinum/presentation/api.rs b/client/rpc-v2/src/orbinum/presentation/api.rs index b74dd80c..029bcc5b 100644 --- a/client/rpc-v2/src/orbinum/presentation/api.rs +++ b/client/rpc-v2/src/orbinum/presentation/api.rs @@ -68,7 +68,8 @@ pub trait PrivacyApi { /// "result": { /// "path": ["0x1234...", "0x5678..."], /// "leaf_index": 5, - /// "tree_depth": 10 + /// "tree_depth": 20 + /// "asset_balances": [{ "asset_id": 0, "balance": "1000000000000000000" }], /// }, /// "id": 1 /// } @@ -131,7 +132,7 @@ pub trait PrivacyApi { /// "merkle_root": "0x1234...abcd", /// "commitment_count": 100, /// "total_balance": "1000000000000000000", - /// "tree_depth": 10 + /// "tree_depth": 20 /// }, /// "id": 1 /// } diff --git a/client/rpc-v2/src/orbinum/presentation/handlers/merkle_root_handler.rs b/client/rpc-v2/src/orbinum/presentation/handlers/merkle_root_handler.rs index 5162bed7..f4119beb 100644 --- a/client/rpc-v2/src/orbinum/presentation/handlers/merkle_root_handler.rs +++ b/client/rpc-v2/src/orbinum/presentation/handlers/merkle_root_handler.rs @@ -100,6 +100,13 @@ mod tests { ) -> DomainResult { Ok(0) } + + fn get_all_asset_balances( + &self, + _block_hash: BlockHash, + ) -> DomainResult> { + Ok(Vec::new()) + } } #[test] diff --git a/client/rpc-v2/src/orbinum/presentation/handlers/pool_stats_handler.rs b/client/rpc-v2/src/orbinum/presentation/handlers/pool_stats_handler.rs index ee634b2c..1bb5486a 100644 --- a/client/rpc-v2/src/orbinum/presentation/handlers/pool_stats_handler.rs +++ b/client/rpc-v2/src/orbinum/presentation/handlers/pool_stats_handler.rs @@ -5,7 +5,7 @@ use std::sync::Arc; use jsonrpsee::core::RpcResult; use crate::orbinum::{ - application::{PoolQueryService, PoolStatsResponse}, + application::{AssetBalanceResponse, PoolQueryService, PoolStatsResponse}, infrastructure::mappers::CommitmentMapper, presentation::validation::RpcError, }; @@ -47,6 +47,11 @@ where merkle_root_hex, stats.commitment_count().value(), stats.total_balance(), + stats + .asset_balances() + .iter() + .map(|(asset_id, balance)| AssetBalanceResponse::new(asset_id.inner(), *balance)) + .collect(), stats.tree_depth().value(), ); @@ -109,6 +114,13 @@ mod tests { ) -> DomainResult { Ok(0) } + + fn get_all_asset_balances( + &self, + _block_hash: BlockHash, + ) -> DomainResult> { + Ok(vec![(AssetId::new(0), self.total_balance)]) + } } #[test] @@ -126,9 +138,13 @@ mod tests { assert_eq!(response.merkle_root, format!("0x{}", "cc".repeat(32))); assert_eq!(response.commitment_count, 8); assert_eq!(response.total_balance, 1_234); + assert_eq!( + response.asset_balances, + vec![AssetBalanceResponse::new(0, 1_234)] + ); assert_eq!( response.tree_depth, - crate::orbinum::domain::TreeDepth::from_tree_size(8).value() + pallet_shielded_pool::DEFAULT_TREE_DEPTH as u32 ); } diff --git a/client/rpc-v2/src/orbinum/presentation/server.rs b/client/rpc-v2/src/orbinum/presentation/server.rs index 762fc3c4..b62c0f96 100644 --- a/client/rpc-v2/src/orbinum/presentation/server.rs +++ b/client/rpc-v2/src/orbinum/presentation/server.rs @@ -188,6 +188,13 @@ mod tests { ) -> DomainResult { Ok(0) } + + fn get_all_asset_balances( + &self, + _block_hash: BlockHash, + ) -> DomainResult> { + Ok(vec![(AssetId::new(0), self.total_balance)]) + } } #[test] @@ -218,6 +225,9 @@ mod tests { assert_eq!(proof.tree_depth, 20); assert!(nullifier.is_spent); assert_eq!(stats.total_balance, 777); + assert_eq!(stats.asset_balances.len(), 1); + assert_eq!(stats.asset_balances[0].asset_id, 0); + assert_eq!(stats.asset_balances[0].balance, 777); } #[test] From 0ac6322cb6e5d3d7238ee80418af103fc3412805 Mon Sep 17 00:00:00 2001 From: nol4lej Date: Thu, 26 Mar 2026 19:58:16 -0300 Subject: [PATCH 2/3] chore: remove unused dependencies from Cargo.lock --- Cargo.lock | 117 +++++------------------------------------------------ 1 file changed, 11 insertions(+), 106 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e553e0be..63a120b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,12 +108,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anes" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" - [[package]] name = "anstream" version = "0.6.21" @@ -1392,12 +1386,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" -[[package]] -name = "cast" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" - [[package]] name = "cc" version = "1.2.56" @@ -1500,33 +1488,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "ciborium" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" -dependencies = [ - "ciborium-io", - "ciborium-ll", - "serde", -] - -[[package]] -name = "ciborium-io" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" - -[[package]] -name = "ciborium-ll" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" -dependencies = [ - "ciborium-io", - "half", -] - [[package]] name = "cid" version = "0.9.0" @@ -1957,40 +1918,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "criterion" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" -dependencies = [ - "anes", - "cast", - "ciborium", - "clap", - "criterion-plot", - "is-terminal", - "itertools 0.10.5", - "num-traits", - "once_cell", - "oorandom", - "regex", - "serde", - "serde_derive", - "serde_json", - "tinytemplate", - "walkdir", -] - -[[package]] -name = "criterion-plot" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" -dependencies = [ - "cast", - "itertools 0.10.5", -] - [[package]] name = "critical-section" version = "1.2.0" @@ -2488,7 +2415,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ab67060fc6b8ef687992d439ca0fa36e7ed17e9a0b16b25b601e8757df720de" dependencies = [ "data-encoding", - "syn 2.0.116", + "syn 1.0.109", ] [[package]] @@ -4505,17 +4432,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "half" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" -dependencies = [ - "cfg-if", - "crunchy", - "zerocopy", -] - [[package]] name = "handlebars" version = "5.1.2" @@ -7179,12 +7095,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" -[[package]] -name = "oorandom" -version = "11.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" - [[package]] name = "opaque-debug" version = "0.2.3" @@ -7831,9 +7741,14 @@ dependencies = [ "frame-support", "frame-system", "pallet-account-mapping", + "pallet-balances", "pallet-evm", + "pallet-timestamp", + "parity-scale-codec", "precompile-utils", + "scale-info", "sp-core", + "sp-io", "sp-runtime", "sp-std", ] @@ -9566,7 +9481,7 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "itertools 0.14.0", "log", "multimap", @@ -10195,7 +10110,7 @@ dependencies = [ "once_cell", "ring 0.17.14", "rustls-pki-types", - "rustls-webpki 0.103.9", + "rustls-webpki 0.103.10", "subtle 2.6.1", "zeroize", ] @@ -10236,7 +10151,7 @@ dependencies = [ "rustls", "rustls-native-certs", "rustls-platform-verifier-android", - "rustls-webpki 0.103.9", + "rustls-webpki 0.103.10", "security-framework", "security-framework-sys", "webpki-root-certs 0.26.11", @@ -10261,9 +10176,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.9" +version = "0.103.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef" dependencies = [ "ring 0.17.14", "rustls-pki-types", @@ -14025,16 +13940,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "tinyvec" version = "1.10.0" From e22959f331ef5a101baecb9884f093d620c98e51 Mon Sep 17 00:00:00 2001 From: nol4lej Date: Mon, 6 Apr 2026 10:22:20 -0400 Subject: [PATCH 3/3] feat: add run-dev target to Makefile for development mode execution --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index fe25c6d3..bb8a76ed 100644 --- a/Makefile +++ b/Makefile @@ -75,6 +75,11 @@ benchmark-pallet: cargo build --release --features=runtime-benchmarks ./target/release/orbinum-node benchmark pallet --chain=dev --pallet=$(PALLET) --extrinsic='*' --steps=50 --repeat=20 --output=./frame/$(PALLET)/src/weights.rs --template=./scripts/frame-weight-template.hbs +.PHONY: run-dev +# Run node in development mode with temporary storage +run-dev: + ./target/release/orbinum-node --dev --tmp + .PHONY: audit # Run security audit (ignoring known Polkadot SDK transitive dependencies via deny.toml) audit: