From e0fd94152ada7926fb613dd9e76881072b907141 Mon Sep 17 00:00:00 2001 From: Sergio Chouhy Date: Fri, 17 Oct 2025 15:35:06 -0300 Subject: [PATCH] remove outdated common/sec/nullifier.rs file --- common/src/lib.rs | 1 - common/src/nullifier.rs | 10 ---------- common/src/transaction.rs | 6 +++--- 3 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 common/src/nullifier.rs diff --git a/common/src/lib.rs b/common/src/lib.rs index 67d628d..59b384b 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -5,7 +5,6 @@ use sha2::{Digest, Sha256, digest::FixedOutput}; pub mod block; pub mod commitment; pub mod execution_input; -pub mod nullifier; pub mod rpc_primitives; pub mod sequencer_client; pub mod transaction; diff --git a/common/src/nullifier.rs b/common/src/nullifier.rs deleted file mode 100644 index f277efd..0000000 --- a/common/src/nullifier.rs +++ /dev/null @@ -1,10 +0,0 @@ -use serde::{Deserialize, Serialize}; - -use crate::TreeHashType; - -//ToDo: Update Nullifier model, when it is clear -#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)] -///General nullifier object -pub struct UTXONullifier { - pub utxo_hash: TreeHashType, -} diff --git a/common/src/transaction.rs b/common/src/transaction.rs index 4820300..610b229 100644 --- a/common/src/transaction.rs +++ b/common/src/transaction.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; use sha2::{Digest, digest::FixedOutput}; -pub type TreeHashType = [u8; 32]; +pub type HashType = [u8; 32]; #[derive(Debug, Clone, PartialEq, Eq)] pub enum NSSATransaction { @@ -72,11 +72,11 @@ impl TryFrom<&EncodedTransaction> for NSSATransaction { impl EncodedTransaction { /// Computes and returns the SHA-256 hash of the JSON-serialized representation of `self`. - pub fn hash(&self) -> TreeHashType { + pub fn hash(&self) -> HashType { let bytes_to_hash = borsh::to_vec(&self).unwrap(); let mut hasher = sha2::Sha256::new(); hasher.update(&bytes_to_hash); - TreeHashType::from(hasher.finalize_fixed()) + HashType::from(hasher.finalize_fixed()) } pub fn log(&self) {