Skip to content

Commit

Permalink
fix: use the correct identity verification logic (#313)
Browse files Browse the repository at this point in the history
* fix: use the correct identity verification logic

Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>

* chore: add CHANGELOG entry

Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>

---------

Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
  • Loading branch information
bhgomes authored Jan 30, 2023
1 parent 4323cac commit 6824ecb
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added
- [\#289](https://github.com/Manta-Network/manta-rs/pull/289) AssetMetadata upgrade and NFT support.
- [\#310](https://github.com/Manta-Network/manta-rs/pull/310) Add identity verification algorithm using ToPublic circuit

### Changed

### Deprecated

### Removed

### Fixed
- [\#313](https://github.com/Manta-Network/manta-rs/pull/313) Use correct failure case for identity verification

### Security

Expand Down
3 changes: 1 addition & 2 deletions manta-accounting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cocoon-fs = [
"cocoon/std",
"fs",
"manta-crypto/getrandom",
"rand_chacha",
"manta-crypto/rand_chacha",
"std",
]

Expand Down Expand Up @@ -64,7 +64,6 @@ indexmap = { version = "1.9.2", optional = true, default-features = false }
manta-crypto = { path = "../manta-crypto", default-features = false, features = ["arkworks"] }
manta-util = { path = "../manta-util", default-features = false, features = ["alloc"] }
parking_lot = { version = "0.12.1", optional = true, default-features = false }
rand_chacha = { version = "0.3.1", optional = true, default-features = false }
statrs = { version = "0.16.0", optional = true, default-features = false }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion manta-parameters/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ std = ["anyhow?/std"]
anyhow = { version = "1.0.68", optional = true, default-features = false }
attohttpc = { version = "0.24.0", optional = true }
blake3 = { version = "1.3.3", default-features = false }
git2 = { version = "0.15.0", optional = true, default-features = false }
git2 = { version = "0.16.1", optional = true, default-features = false }

[dev-dependencies]
hex = { version = "0.4.3", default-features = false, features = ["std"] }
Expand Down
2 changes: 1 addition & 1 deletion manta-pay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ num-bigint = { version = "0.4.3", optional = true, default-features = false }
parking_lot = { version = "0.12.1", optional = true, default-features = false }
scale-codec = { package = "parity-scale-codec", version = "3.1.2", optional = true, default-features = false, features = ["derive", "max-encoded-len"] }
scale-info = { version = "2.1.2", optional = true, default-features = false, features = ["derive"] }
serde_json = { version = "1.0.85", optional = true, default-features = false, features = ["alloc"] }
serde_json = { version = "1.0.91", optional = true, default-features = false, features = ["alloc"] }
tempfile = { version = "3.3.0", optional = true, default-features = false }
tokio = { version = "1.24.1", optional = true, default-features = false }
tokio-tungstenite = { version = "0.18.0", optional = true, default-features = false, features = ["native-tls"] }
Expand Down
4 changes: 2 additions & 2 deletions manta-pay/src/signer/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use manta_crypto::{
arkworks::{
constraint::fp::Fp,
ed_on_bn254::FrParameters,
ff::{Fp256, PrimeField},
ff::{Fp256, PrimeField, Zero},
},
merkle_tree::{self, forest::Configuration},
rand::ChaCha20Rng,
Expand Down Expand Up @@ -209,7 +209,7 @@ pub fn identity_verification(
virtual_asset: IdentifiedAsset,
address: Address,
) -> Result<(), IdentityVerificationError> {
if virtual_asset.identifier.is_transparent || virtual_asset.asset.is_empty(&mut ()) {
if virtual_asset.identifier.is_transparent || virtual_asset.asset.id.0.is_zero() {
return Err(IdentityVerificationError::InvalidVirtualAsset);
}
identity_proof.identity_verification::<UtxoAccumulator>(
Expand Down
6 changes: 3 additions & 3 deletions manta-trusted-setup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ceremony = [
"reqwest",
"serde",
"tiny-bip39",
"tokio"
"tokio",
]

# Trusted Setup Client
Expand All @@ -71,7 +71,7 @@ client = [
]

# Trusted Setup Coordinator
coordinator = ["client", "memmap", "parking_lot", "serde_json", "std",]
coordinator = ["client", "memmap", "parking_lot", "serde_json", "std"]

# CSV for Ceremony Registries
csv = ["dep:csv", "serde", "std"]
Expand All @@ -88,7 +88,7 @@ serde = [
"manta-crypto/serde",
"manta-util/serde",
"manta-util/serde-alloc",
"manta-util/serde-array"
"manta-util/serde-array",
]

# Standard Library
Expand Down
4 changes: 2 additions & 2 deletions manta-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ std = ["alloc", "crossbeam-channel?/std", "serde?/std"]

[dependencies]
crossbeam-channel = { version = "0.5.6", optional = true, default-features = false }
rayon = { version = "1.5.3", optional = true, default-features = false }
reqwest = { version = "0.11.13", optional = true, default-features = false, features = ["default-tls", "json"] }
rayon = { version = "1.6.1", optional = true, default-features = false }
reqwest = { version = "0.11.14", optional = true, default-features = false, features = ["default-tls", "json"] }
serde = { version = "1.0.152", optional = true, default-features = false, features = ["derive"] }
serde_with = { version = "1.14.0", optional = true, default-features = false, features = ["macros"] }
tide = { version = "0.16.0", optional = true, default-features = false, features = ["h1-server"] }

0 comments on commit 6824ecb

Please sign in to comment.