Skip to content

Commit 20b7577

Browse files
1. updated proof deserialization to skip validation for performance improvements by setting Validate::No.
2. removed commented-out unused variables in the prover logic.
1 parent f67f79f commit 20b7577

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/api/method/get_validity_proof/prover/gnark.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub fn negate_proof(proof: ProofABC) -> CompressedProof {
7676
let proof_a: G1 = G1::deserialize_with_mode(
7777
&*[&change_endianness(&proof.a), &[0u8][..]].concat(),
7878
Compress::No,
79-
Validate::Yes,
79+
Validate::No,
8080
)
8181
.unwrap();
8282

src/api/method/get_validity_proof/prover/prove.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,6 @@ pub(crate) async fn generate_proof(
176176
path_index: addr_proof.lowElementLeafIndex,
177177
merkle_tree_id: addr_proof.merkleTree.to_string(),
178178
tree_info,
179-
// next_index: addr_proof.nextIndex,
180-
// lower_range_address_hex: pubkey_to_hex(&addr_proof.lowerRangeAddress),
181-
// higher_range_address_hex: pubkey_to_hex(&addr_proof.higherRangeAddress),
182179
});
183180
}
184181

0 commit comments

Comments
 (0)