From c3b5d62ea603076d99d6a74e4a227fc868a85df5 Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Mon, 11 Aug 2025 08:55:08 +0300 Subject: [PATCH 1/2] fix: comments fix --- common/src/rpc_primitives/requests.rs | 2 - common/src/sequencer_client/json.rs | 2 - common/src/sequencer_client/mod.rs | 6 +-- .../wallet_config.json} | 2 +- integration_tests/src/lib.rs | 17 ++++--- sc_core/src/proofs_circuits.rs | 12 ----- sc_core/src/public_context.rs | 11 +--- sequencer_core/src/lib.rs | 36 ++++--------- sequencer_rpc/src/process.rs | 6 +-- wallet/src/chain_storage/accounts_store.rs | 16 +++--- wallet/src/chain_storage/mod.rs | 40 +++++---------- wallet/src/config.rs | 2 +- wallet/src/helperfunctions.rs | 23 ++------- wallet/src/lib.rs | 51 ++++++++----------- wallet/src/requests_structs.rs | 33 ------------ 15 files changed, 72 insertions(+), 187 deletions(-) rename integration_tests/configs/debug/{node/node_config.json => wallet/wallet_config.json} (99%) delete mode 100644 wallet/src/requests_structs.rs diff --git a/common/src/rpc_primitives/requests.rs b/common/src/rpc_primitives/requests.rs index 29612c5..f19f6ea 100644 --- a/common/src/rpc_primitives/requests.rs +++ b/common/src/rpc_primitives/requests.rs @@ -19,8 +19,6 @@ pub struct RegisterAccountRequest { #[derive(Serialize, Deserialize, Debug)] pub struct SendTxRequest { pub transaction: Transaction, - ///UTXO Commitment Root, Pub Tx Root - pub tx_roots: [[u8; 32]; 2], } #[derive(Serialize, Deserialize, Debug)] diff --git a/common/src/sequencer_client/json.rs b/common/src/sequencer_client/json.rs index 3fbb3c6..5f6798a 100644 --- a/common/src/sequencer_client/json.rs +++ b/common/src/sequencer_client/json.rs @@ -7,8 +7,6 @@ use crate::transaction::Transaction; #[derive(Serialize, Deserialize, Debug)] pub struct SendTxRequest { pub transaction: Transaction, - ///UTXO Commitment Root, Pub Tx Root - pub tx_roots: [[u8; 32]; 2], } //Responses diff --git a/common/src/sequencer_client/mod.rs b/common/src/sequencer_client/mod.rs index 796ff1e..d7d3123 100644 --- a/common/src/sequencer_client/mod.rs +++ b/common/src/sequencer_client/mod.rs @@ -91,12 +91,8 @@ impl SequencerClient { pub async fn send_tx( &self, transaction: Transaction, - tx_roots: [[u8; 32]; 2], ) -> Result { - let tx_req = SendTxRequest { - transaction, - tx_roots, - }; + let tx_req = SendTxRequest { transaction }; let req = serde_json::to_value(tx_req)?; diff --git a/integration_tests/configs/debug/node/node_config.json b/integration_tests/configs/debug/wallet/wallet_config.json similarity index 99% rename from integration_tests/configs/debug/node/node_config.json rename to integration_tests/configs/debug/wallet/wallet_config.json index ef07b4f..a1edc2f 100644 --- a/integration_tests/configs/debug/node/node_config.json +++ b/integration_tests/configs/debug/wallet/wallet_config.json @@ -1,5 +1,5 @@ { - "home": "./node", + "home": "./wallet", "override_rust_log": null, "sequencer_addr": "http://127.0.0.1:3040", "seq_poll_timeout_secs": 10, diff --git a/integration_tests/src/lib.rs b/integration_tests/src/lib.rs index f863f54..c323c3b 100644 --- a/integration_tests/src/lib.rs +++ b/integration_tests/src/lib.rs @@ -66,20 +66,21 @@ pub async fn post_test(residual: (ServerHandle, JoinHandle>, TempDir) sequencer_loop_handle.abort(); seq_http_server_handle.stop(true).await; - //At this point all of the references to node_core and sequencer_core must be lost. + //At this point all of the references to sequencer_core must be lost. //So they are dropped and tempdirs will be dropped too, } pub async fn test_success() { let command = Command::SendNativeTokenTransfer { from: ACC_SENDER.to_string(), + nonce: 0, to: ACC_RECEIVER.to_string(), amount: 100, }; - let node_config = fetch_config().unwrap(); + let wallet_config = fetch_config().unwrap(); - let seq_client = SequencerClient::new(node_config.sequencer_addr.clone()).unwrap(); + let seq_client = SequencerClient::new(wallet_config.sequencer_addr.clone()).unwrap(); wallet::execute_subcommand(command).await.unwrap(); @@ -110,13 +111,14 @@ pub async fn test_success_move_to_another_account() { let command = Command::SendNativeTokenTransfer { from: ACC_SENDER.to_string(), + nonce: 0, to: hex_acc_receiver_new_acc.clone(), amount: 100, }; - let node_config = fetch_config().unwrap(); + let wallet_config = fetch_config().unwrap(); - let seq_client = SequencerClient::new(node_config.sequencer_addr.clone()).unwrap(); + let seq_client = SequencerClient::new(wallet_config.sequencer_addr.clone()).unwrap(); wallet::execute_subcommand(command).await.unwrap(); @@ -145,13 +147,14 @@ pub async fn test_success_move_to_another_account() { pub async fn test_failure() { let command = Command::SendNativeTokenTransfer { from: ACC_SENDER.to_string(), + nonce: 0, to: ACC_RECEIVER.to_string(), amount: 1000000, }; - let node_config = fetch_config().unwrap(); + let wallet_config = fetch_config().unwrap(); - let seq_client = SequencerClient::new(node_config.sequencer_addr.clone()).unwrap(); + let seq_client = SequencerClient::new(wallet_config.sequencer_addr.clone()).unwrap(); wallet::execute_subcommand(command).await.unwrap(); diff --git a/sc_core/src/proofs_circuits.rs b/sc_core/src/proofs_circuits.rs index 5143922..08ce431 100644 --- a/sc_core/src/proofs_circuits.rs +++ b/sc_core/src/proofs_circuits.rs @@ -98,12 +98,6 @@ pub fn private_circuit( )); } - for nullifier in in_nullifiers.iter() { - let nullifier: [u8; 32] = nullifier.clone().try_into().unwrap(); - - assert!(!public_context.nullifiers_set.contains(&nullifier)); - } - (in_nullifiers, generate_commitments(output_utxos)) } @@ -147,12 +141,6 @@ pub fn deshielded_circuit( )); } - for nullifier in in_nullifiers.iter() { - let nullifier: [u8; 32] = nullifier.clone().try_into().unwrap(); - - assert!(!public_context.nullifiers_set.contains(&nullifier)); - } - in_nullifiers } diff --git a/sc_core/src/public_context.rs b/sc_core/src/public_context.rs index cf55f30..e225513 100644 --- a/sc_core/src/public_context.rs +++ b/sc_core/src/public_context.rs @@ -1,4 +1,4 @@ -use std::collections::{BTreeMap, HashSet}; +use std::collections::BTreeMap; use accounts::account_core::{address::AccountAddress, AccountPublicMask}; use common::merkle_tree_public::{merkle_tree::UTXOCommitmentsMerkleTree, TreeHashType}; @@ -20,9 +20,7 @@ pub struct PublicSCContext { pub caller_balance: u64, pub account_masks: BTreeMap, pub comitment_store_root: TreeHashType, - pub pub_tx_store_root: TreeHashType, pub commitments_tree: UTXOCommitmentsMerkleTree, - pub nullifiers_set: HashSet<[u8; 32]>, } impl Serialize for PublicSCContext { @@ -44,9 +42,7 @@ impl Serialize for PublicSCContext { s.serialize_field(ACCOUNT_MASKS_KEYS_SORTED, &account_masks_keys)?; s.serialize_field(ACCOUNT_MASKS_VALUES_SORTED, &account_mask_values)?; s.serialize_field(COMMITMENT_STORE_ROOT, &self.comitment_store_root)?; - s.serialize_field(PUT_TX_STORE_ROOT, &self.pub_tx_store_root)?; s.serialize_field(COMMITMENT_TREE, &self.commitments_tree)?; - s.serialize_field(NULLIFIERS_SET, &self.nullifiers_set)?; s.end() } @@ -100,12 +96,9 @@ mod tests { fn create_test_context() -> PublicSCContext { let caller_address = [1; 32]; let comitment_store_root = [3; 32]; - let pub_tx_store_root = [4; 32]; let commitments_tree = UTXOCommitmentsMerkleTree::new(vec![UTXOCommitment { hash: [5; 32] }]); - let mut nullifiers_set = HashSet::new(); - nullifiers_set.insert([6; 32]); let mut account_masks = BTreeMap::new(); @@ -122,9 +115,7 @@ mod tests { caller_balance: 100, account_masks, comitment_store_root, - pub_tx_store_root, commitments_tree, - nullifiers_set, } } diff --git a/sequencer_core/src/lib.rs b/sequencer_core/src/lib.rs index 6f3f27e..810166d 100644 --- a/sequencer_core/src/lib.rs +++ b/sequencer_core/src/lib.rs @@ -80,7 +80,6 @@ impl SequencerCore { pub fn transaction_pre_check( &mut self, tx: Transaction, - tx_roots: [[u8; 32]; 2], ) -> Result { let tx = tx .into_authenticated() @@ -103,16 +102,6 @@ impl SequencerCore { return Err(TransactionMalformationErrorKind::MempoolFullForRound { tx: tx_hash }); } - let curr_sequencer_roots = self.get_tree_roots(); - - if tx_roots != curr_sequencer_roots { - return Err( - TransactionMalformationErrorKind::ChainStateFurtherThanTransactionState { - tx: tx_hash, - }, - ); - } - //Sanity check match tx_kind { TxKind::Public => { @@ -197,7 +186,6 @@ impl SequencerCore { pub fn push_tx_into_mempool_pre_check( &mut self, transaction: Transaction, - tx_roots: [[u8; 32]; 2], ) -> Result<(), TransactionMalformationErrorKind> { let mempool_size = self.mempool.len(); if mempool_size >= self.sequencer_config.max_num_tx_in_block { @@ -206,7 +194,7 @@ impl SequencerCore { }); } - let authenticated_tx = self.transaction_pre_check(transaction, tx_roots)?; + let authenticated_tx = self.transaction_pre_check(transaction)?; self.mempool.push_item(authenticated_tx.into()); @@ -526,8 +514,8 @@ mod tests { vec![[71; 32]], vec![[81; 32]], ); - let tx_roots = sequencer.get_tree_roots(); - let result = sequencer.transaction_pre_check(tx, tx_roots); + + let result = sequencer.transaction_pre_check(tx); assert!(result.is_ok()); } @@ -553,8 +541,8 @@ mod tests { let tx = common::test_utils::create_dummy_transaction_native_token_transfer( acc1, 0, acc2, 10, sign_key1, ); - let tx_roots = sequencer.get_tree_roots(); - let result = sequencer.transaction_pre_check(tx, tx_roots); + + let result = sequencer.transaction_pre_check(tx); assert!(result.is_ok()); } @@ -580,8 +568,8 @@ mod tests { let tx = common::test_utils::create_dummy_transaction_native_token_transfer( acc1, 0, acc2, 10, sign_key2, ); - let tx_roots = sequencer.get_tree_roots(); - let result = sequencer.transaction_pre_check(tx, tx_roots); + + let result = sequencer.transaction_pre_check(tx); assert_eq!( result.err().unwrap(), @@ -610,8 +598,8 @@ mod tests { let tx = common::test_utils::create_dummy_transaction_native_token_transfer( acc1, 0, acc2, 10000000, sign_key1, ); - let tx_roots = sequencer.get_tree_roots(); - let result = sequencer.transaction_pre_check(tx, tx_roots); + + let result = sequencer.transaction_pre_check(tx); //Passed pre-check assert!(result.is_ok()); @@ -673,7 +661,6 @@ mod tests { vec![[72; 32]], vec![[82; 32]], ); - let tx_roots = sequencer.get_tree_roots(); // Fill the mempool let dummy_tx = MempoolTransaction { @@ -681,7 +668,7 @@ mod tests { }; sequencer.mempool.push_item(dummy_tx); - let result = sequencer.push_tx_into_mempool_pre_check(tx, tx_roots); + let result = sequencer.push_tx_into_mempool_pre_check(tx); assert!(matches!( result, @@ -701,9 +688,8 @@ mod tests { vec![[73; 32]], vec![[83; 32]], ); - let tx_roots = sequencer.get_tree_roots(); - let result = sequencer.push_tx_into_mempool_pre_check(tx, tx_roots); + let result = sequencer.push_tx_into_mempool_pre_check(tx); assert!(result.is_ok()); assert_eq!(sequencer.mempool.len(), 1); } diff --git a/sequencer_rpc/src/process.rs b/sequencer_rpc/src/process.rs index 4e7c011..eadfe55 100644 --- a/sequencer_rpc/src/process.rs +++ b/sequencer_rpc/src/process.rs @@ -88,7 +88,7 @@ impl JsonHandler { { let mut state = self.sequencer_state.lock().await; - state.push_tx_into_mempool_pre_check(send_tx_req.transaction, send_tx_req.tx_roots)?; + state.push_tx_into_mempool_pre_check(send_tx_req.transaction)?; } let helperstruct = SendTxResponse { @@ -290,9 +290,7 @@ mod tests { }; let tx = Transaction::new(tx_body, SignaturePrivateKey::from_slice(&[1; 32]).unwrap()); - sequencer_core - .push_tx_into_mempool_pre_check(tx, [[0; 32]; 2]) - .unwrap(); + sequencer_core.push_tx_into_mempool_pre_check(tx).unwrap(); sequencer_core .produce_new_block_with_mempool_transactions() .unwrap(); diff --git a/wallet/src/chain_storage/accounts_store.rs b/wallet/src/chain_storage/accounts_store.rs index fa9dc99..cd46a6f 100644 --- a/wallet/src/chain_storage/accounts_store.rs +++ b/wallet/src/chain_storage/accounts_store.rs @@ -1,11 +1,11 @@ use accounts::account_core::{address::AccountAddress, Account}; use std::collections::HashMap; -pub struct NodeAccountsStore { +pub struct WalletAccountsStore { pub accounts: HashMap, } -impl NodeAccountsStore { +impl WalletAccountsStore { pub fn new() -> Self { Self { accounts: HashMap::new(), @@ -21,7 +21,7 @@ impl NodeAccountsStore { } } -impl Default for NodeAccountsStore { +impl Default for WalletAccountsStore { fn default() -> Self { Self::new() } @@ -45,13 +45,13 @@ mod tests { #[test] fn test_create_empty_store() { - let store = NodeAccountsStore::new(); + let store = WalletAccountsStore::new(); assert!(store.accounts.is_empty()); } #[test] fn test_register_account() { - let mut store = NodeAccountsStore::new(); + let mut store = WalletAccountsStore::new(); let account = create_sample_account(100); let account_addr = account.address; @@ -65,7 +65,7 @@ mod tests { #[test] fn test_unregister_account() { - let mut store = NodeAccountsStore::new(); + let mut store = WalletAccountsStore::new(); let account = create_sample_account(100); let account_addr = account.address; @@ -79,7 +79,7 @@ mod tests { #[test] fn test_unregister_nonexistent_account() { - let mut store = NodeAccountsStore::new(); + let mut store = WalletAccountsStore::new(); let account_addr: [u8; 32] = pad_to_32("nonexistent".to_string().as_bytes()); store.unregister_account(account_addr); @@ -89,7 +89,7 @@ mod tests { #[test] fn test_register_multiple_accounts() { - let mut store = NodeAccountsStore::new(); + let mut store = WalletAccountsStore::new(); let account1 = create_sample_account(100); let account2 = create_sample_account(200); diff --git a/wallet/src/chain_storage/mod.rs b/wallet/src/chain_storage/mod.rs index 446df2f..4d5e7ab 100644 --- a/wallet/src/chain_storage/mod.rs +++ b/wallet/src/chain_storage/mod.rs @@ -1,15 +1,12 @@ -use std::collections::{BTreeMap, HashMap, HashSet}; +use std::collections::{BTreeMap, HashMap}; use accounts::account_core::{address::AccountAddress, Account}; use anyhow::Result; -use common::{ - merkle_tree_public::merkle_tree::{PublicTransactionMerkleTree, UTXOCommitmentsMerkleTree}, - nullifier::UTXONullifier, -}; +use common::merkle_tree_public::merkle_tree::UTXOCommitmentsMerkleTree; use sc_core::public_context::PublicSCContext; use serde::{Deserialize, Serialize}; -use crate::config::NodeConfig; +use crate::config::WalletConfig; pub mod accounts_store; @@ -39,27 +36,21 @@ impl From for HashMap<[u8; 32], Account> { } } -pub struct NodeChainStore { +pub struct WalletChainStore { pub acc_map: HashMap, - pub nullifier_store: HashSet, pub utxo_commitments_store: UTXOCommitmentsMerkleTree, - pub pub_tx_store: PublicTransactionMerkleTree, - pub node_config: NodeConfig, + pub wallet_config: WalletConfig, } -impl NodeChainStore { - pub fn new(config: NodeConfig) -> Result { +impl WalletChainStore { + pub fn new(config: WalletConfig) -> Result { let acc_map = HashMap::new(); - let nullifier_store = HashSet::new(); let utxo_commitments_store = UTXOCommitmentsMerkleTree::new(vec![]); - let pub_tx_store = PublicTransactionMerkleTree::new(vec![]); Ok(Self { acc_map, - nullifier_store, utxo_commitments_store, - pub_tx_store, - node_config: config, + wallet_config: config, }) } @@ -75,12 +66,6 @@ impl NodeChainStore { caller_balance: self.acc_map.get(&caller).unwrap().balance, account_masks, comitment_store_root: self.utxo_commitments_store.get_root().unwrap_or([0; 32]), - pub_tx_store_root: self.pub_tx_store.get_root().unwrap_or([0; 32]), - nullifiers_set: self - .nullifier_store - .iter() - .map(|item| item.utxo_hash) - .collect(), commitments_tree: self.utxo_commitments_store.clone(), } } @@ -267,8 +252,8 @@ mod tests { initial_accounts } - fn create_sample_node_config(home: PathBuf) -> NodeConfig { - NodeConfig { + fn create_sample_wallet_config(home: PathBuf) -> WalletConfig { + WalletConfig { home, override_rust_log: None, sequencer_addr: "http://127.0.0.1".to_string(), @@ -282,12 +267,11 @@ mod tests { let temp_dir = tempdir().unwrap(); let path = temp_dir.path(); - let config = create_sample_node_config(path.to_path_buf()); + let config = create_sample_wallet_config(path.to_path_buf()); - let store = NodeChainStore::new(config.clone()).unwrap(); + let store = WalletChainStore::new(config.clone()).unwrap(); assert!(store.acc_map.is_empty()); - assert!(store.nullifier_store.is_empty()); assert_eq!( store.utxo_commitments_store.get_root().unwrap_or([0; 32]), [0; 32] diff --git a/wallet/src/config.rs b/wallet/src/config.rs index 29a22f9..d2c3a78 100644 --- a/wallet/src/config.rs +++ b/wallet/src/config.rs @@ -37,7 +37,7 @@ impl From for zkvm::gas_calculator::GasCalculator { } #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct NodeConfig { +pub struct WalletConfig { ///Home dir of sequencer storage pub home: PathBuf, ///Override rust log (env var logging level) diff --git a/wallet/src/helperfunctions.rs b/wallet/src/helperfunctions.rs index 8f6af22..aefb331 100644 --- a/wallet/src/helperfunctions.rs +++ b/wallet/src/helperfunctions.rs @@ -2,24 +2,7 @@ use std::{fs::File, io::BufReader, path::PathBuf, str::FromStr}; use anyhow::{anyhow, Result}; -use crate::{config::NodeConfig, HOME_DIR_ENV_VAR}; - -pub fn vec_u8_to_vec_u64(bytes: Vec) -> Vec { - // Pad with zeros to make sure it's a multiple of 8 - let mut padded = bytes.clone(); - while !padded.len().is_multiple_of(8) { - padded.push(0); - } - - padded - .chunks(8) - .map(|chunk| { - let mut array = [0u8; 8]; - array.copy_from_slice(chunk); - u64::from_le_bytes(array) - }) - .collect() -} +use crate::{config::WalletConfig, HOME_DIR_ENV_VAR}; ///Get home dir for wallet. Env var `NSSA_WALLET_HOME_DIR` must be set before execution to succeed. pub fn get_home() -> Result { @@ -27,9 +10,9 @@ pub fn get_home() -> Result { } ///Fetch config from `NSSA_WALLET_HOME_DIR` -pub fn fetch_config() -> Result { +pub fn fetch_config() -> Result { let config_home = get_home()?; - let file = File::open(config_home.join("node_config.json"))?; + let file = File::open(config_home.join("wallet_config.json"))?; let reader = BufReader::new(file); Ok(serde_json::from_reader(reader)?) diff --git a/wallet/src/lib.rs b/wallet/src/lib.rs index 81cf14e..57c5647 100644 --- a/wallet/src/lib.rs +++ b/wallet/src/lib.rs @@ -9,9 +9,9 @@ use common::{ use accounts::account_core::{address::AccountAddress, Account}; use anyhow::Result; -use chain_storage::NodeChainStore; +use chain_storage::WalletChainStore; use common::transaction::TransactionBody; -use config::NodeConfig; +use config::WalletConfig; use log::info; use sc_core::proofs_circuits::pedersen_commitment_vec; use tokio::sync::RwLock; @@ -26,19 +26,18 @@ pub const BLOCK_GEN_DELAY_SECS: u64 = 20; pub mod chain_storage; pub mod config; pub mod helperfunctions; -pub mod requests_structs; -pub struct NodeCore { - pub storage: Arc>, - pub node_config: NodeConfig, +pub struct WalletCore { + pub storage: Arc>, + pub wallet_config: WalletConfig, pub sequencer_client: Arc, } -impl NodeCore { - pub async fn start_from_config_update_chain(config: NodeConfig) -> Result { +impl WalletCore { + pub async fn start_from_config_update_chain(config: WalletConfig) -> Result { let client = Arc::new(SequencerClient::new(config.sequencer_addr.clone())?); - let mut storage = NodeChainStore::new(config.clone())?; + let mut storage = WalletChainStore::new(config.clone())?; for acc in config.clone().initial_accounts { storage.acc_map.insert(acc.address, acc); } @@ -47,19 +46,11 @@ impl NodeCore { Ok(Self { storage: wrapped_storage, - node_config: config.clone(), + wallet_config: config.clone(), sequencer_client: client.clone(), }) } - pub async fn get_roots(&self) -> [[u8; 32]; 2] { - let storage = self.storage.read().await; - [ - storage.utxo_commitments_store.get_root().unwrap_or([0; 32]), - storage.pub_tx_store.get_root().unwrap_or([0; 32]), - ] - } - pub async fn create_new_account(&mut self) -> AccountAddress { let account = Account::new(); account.log(); @@ -82,8 +73,6 @@ impl NodeCore { to: AccountAddress, balance_to_move: u64, ) -> Result { - let tx_roots = self.get_roots().await; - let public_context = { let read_guard = self.storage.read().await; @@ -123,10 +112,7 @@ impl NodeCore { let signed_transaction = Transaction::new(tx, key_to_sign_transaction); - Ok(self - .sequencer_client - .send_tx(signed_transaction, tx_roots) - .await?) + Ok(self.sequencer_client.send_tx(signed_transaction).await?) } else { Err(ExecutionFailureKind::AmountMismatchError) } @@ -142,6 +128,9 @@ pub enum Command { ///from - valid 32 byte hex string #[arg(long)] from: String, + ///nonce - u64 integer + #[arg(long)] + nonce: u64, ///to - valid 32 byte hex string #[arg(long)] to: String, @@ -162,17 +151,21 @@ pub struct Args { pub async fn execute_subcommand(command: Command) -> Result<()> { match command { - Command::SendNativeTokenTransfer { from, to, amount } => { - let node_config = fetch_config()?; + Command::SendNativeTokenTransfer { + from, + nonce, + to, + amount, + } => { + let wallet_config = fetch_config()?; let from = produce_account_addr_from_hex(from)?; let to = produce_account_addr_from_hex(to)?; - let wallet_core = NodeCore::start_from_config_update_chain(node_config).await?; + let wallet_core = WalletCore::start_from_config_update_chain(wallet_config).await?; - //ToDo: Nonce management let res = wallet_core - .send_public_native_token_transfer(from, 0, to, amount) + .send_public_native_token_transfer(from, nonce, to, amount) .await?; info!("Results of tx send is {res:#?}"); diff --git a/wallet/src/requests_structs.rs b/wallet/src/requests_structs.rs deleted file mode 100644 index e7bb935..0000000 --- a/wallet/src/requests_structs.rs +++ /dev/null @@ -1,33 +0,0 @@ -use accounts::account_core::address::AccountAddress; -use serde::{Deserialize, Serialize}; -use utxo::utxo_core::UTXO; - -#[derive(Debug, Serialize, Deserialize)] -pub struct MintMoneyPublicTx { - pub acc: AccountAddress, - pub amount: u128, -} - -#[derive(Debug, Serialize, Deserialize)] -pub struct SendMoneyShieldedTx { - pub acc_sender: AccountAddress, - pub amount: u128, -} - -#[derive(Debug, Serialize, Deserialize)] -pub struct SendMoneyDeshieldedTx { - pub receiver_data: Vec<(u128, AccountAddress)>, -} - -#[derive(Debug, Serialize, Deserialize)] -pub struct UTXOPublication { - pub utxos: Vec, -} - -#[derive(Debug, Serialize, Deserialize)] -pub enum ActionData { - MintMoneyPublicTx(MintMoneyPublicTx), - SendMoneyShieldedTx(SendMoneyShieldedTx), - SendMoneyDeshieldedTx(SendMoneyDeshieldedTx), - UTXOPublication(UTXOPublication), -} From b5011d6b1dd28953a1f8921d0022a7677c6262a0 Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Mon, 11 Aug 2025 10:03:20 +0300 Subject: [PATCH 2/2] fix: ci fix 1 --- ci_scripts/test-ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci_scripts/test-ubuntu.sh b/ci_scripts/test-ubuntu.sh index 90aa19e..db14402 100644 --- a/ci_scripts/test-ubuntu.sh +++ b/ci_scripts/test-ubuntu.sh @@ -6,5 +6,5 @@ source env.sh cargo test --release cd integration_tests -export NSSA_WALLET_HOME_DIR=$(pwd)/configs/debug/node/ +export NSSA_WALLET_HOME_DIR=$(pwd)/configs/debug/wallet/ cargo run $(pwd)/configs/debug all \ No newline at end of file