Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo: Err::InconsistentOwneResourceId -> InconsistentOwnedResourceId #262

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion taiga_halo2/src/circuit/vp_bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions taiga_halo2/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}")),
Expand Down
8 changes: 4 additions & 4 deletions taiga_halo2/src/shielded_ptx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand All @@ -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(())
Expand Down
4 changes: 2 additions & 2 deletions taiga_halo2/src/transparent_ptx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ 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);
}
}

for (vp, cm) in self.output_resource_app.iter().zip(compliance_cms.iter()) {
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);
}
}

Expand Down
Loading