From d2454f4ab7e0d972ee1050dd10d071a46ccd0dae Mon Sep 17 00:00:00 2001 From: David Rusu Date: Sat, 23 Mar 2024 09:43:04 +0400 Subject: [PATCH] typo: Err::InconsistentOwneResourceId -> InconsistentOwnedResourceId --- taiga_halo2/src/circuit/vp_bytecode.rs | 2 +- taiga_halo2/src/error.rs | 4 ++-- taiga_halo2/src/shielded_ptx.rs | 8 ++++---- taiga_halo2/src/transparent_ptx.rs | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/taiga_halo2/src/circuit/vp_bytecode.rs b/taiga_halo2/src/circuit/vp_bytecode.rs index 2b91d503..10b9653f 100644 --- a/taiga_halo2/src/circuit/vp_bytecode.rs +++ b/taiga_halo2/src/circuit/vp_bytecode.rs @@ -250,7 +250,7 @@ impl ApplicationByteCode { let id = dynamic_vp.verify_transparently(compliance_nfs, compliance_cms)?; // check: the app_vp and dynamic_vps belong to the resource if id != owned_resource_id { - return Err(TransactionError::InconsistentOwneResourceID); + return Err(TransactionError::InconsistentOwnedResourceID); } } Ok(owned_resource_id) diff --git a/taiga_halo2/src/error.rs b/taiga_halo2/src/error.rs index 4ac000a3..c583dc11 100644 --- a/taiga_halo2/src/error.rs +++ b/taiga_halo2/src/error.rs @@ -15,7 +15,7 @@ pub enum TransactionError { /// Output resource commitment is not consistent between the compliance and the vp. InconsistentOutputResourceCommitment, /// Owned resource id is not consistent between the compliance and the vp. - InconsistentOwneResourceID, + InconsistentOwnedResourceID, /// IO error IoError(std::io::Error), /// Transparent resource nullifier key is missing @@ -41,7 +41,7 @@ impl Display for TransactionError { InconsistentOutputResourceCommitment => f.write_str( "Output resource commitment is not consistent between the compliance and the vp", ), - InconsistentOwneResourceID => { + InconsistentOwnedResourceID => { f.write_str("Owned resource id is not consistent between the compliance and the vp") } IoError(e) => f.write_str(&format!("IoError error: {e}")), diff --git a/taiga_halo2/src/shielded_ptx.rs b/taiga_halo2/src/shielded_ptx.rs index c20399ac..68b1735d 100644 --- a/taiga_halo2/src/shielded_ptx.rs +++ b/taiga_halo2/src/shielded_ptx.rs @@ -182,13 +182,13 @@ impl ShieldedPartialTransaction { let owned_resource_id = vp_info.app_vp_verifying_info.get_owned_resource_id(); for logic_vp_verifying_info in vp_info.app_dynamic_vp_verifying_info.iter() { if owned_resource_id != logic_vp_verifying_info.get_owned_resource_id() { - return Err(TransactionError::InconsistentOwneResourceID); + return Err(TransactionError::InconsistentOwnedResourceID); } } // Check the owned_resource_id that vp uses is consistent with the nf from the compliance circuit if owned_resource_id != compliance_nf.inner() { - return Err(TransactionError::InconsistentOwneResourceID); + return Err(TransactionError::InconsistentOwnedResourceID); } } Ok(()) @@ -214,13 +214,13 @@ impl ShieldedPartialTransaction { let owned_resource_id = vp_info.app_vp_verifying_info.get_owned_resource_id(); for logic_vp_verifying_info in vp_info.app_dynamic_vp_verifying_info.iter() { if owned_resource_id != logic_vp_verifying_info.get_owned_resource_id() { - return Err(TransactionError::InconsistentOwneResourceID); + return Err(TransactionError::InconsistentOwnedResourceID); } } // Check the owned_resource_id that vp uses is consistent with the cm from the compliance circuit if owned_resource_id != compliance_cm.inner() { - return Err(TransactionError::InconsistentOwneResourceID); + return Err(TransactionError::InconsistentOwnedResourceID); } } Ok(()) diff --git a/taiga_halo2/src/transparent_ptx.rs b/taiga_halo2/src/transparent_ptx.rs index 99085aea..e074b859 100644 --- a/taiga_halo2/src/transparent_ptx.rs +++ b/taiga_halo2/src/transparent_ptx.rs @@ -50,7 +50,7 @@ impl Executable for TransparentPartialTransaction { let owned_resource_id = vp.verify_transparently(&compliance_nfs, &compliance_cms)?; // Check all resources are checked if owned_resource_id != nf.inner() { - return Err(TransactionError::InconsistentOwneResourceID); + return Err(TransactionError::InconsistentOwnedResourceID); } } @@ -58,7 +58,7 @@ impl Executable for TransparentPartialTransaction { let owned_resource_id = vp.verify_transparently(&compliance_nfs, &compliance_cms)?; // Check all resources are checked if owned_resource_id != cm.inner() { - return Err(TransactionError::InconsistentOwneResourceID); + return Err(TransactionError::InconsistentOwnedResourceID); } }