-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'phated/acvm-0.12.0' into phated/witness-map
* phated/acvm-0.12.0: (45 commits) chore!: Update to ACVM 0.12.0 official release of backend feat: use dummy constructor for bb call chore: add missing `?` chore: use `try_vecmap` in old `vecmap` locations chore: update `acvm-backend-barretenberg` to 0.1.0 commit latest master fix: improve variable resolution test: re enabled sort test chore: update cargo tomls feat: adapted to heterogeneous bb calls remove unneeded import fix grep problems chore: replace long `Backend` type parameters with `B` update to latest commit chore: Make CliError generic over a Backend chore: Update nargo core to return backend errors chore!: Update to acvm 0.11.0 chore(parser): Parser error optimisation (#1292) chore(ssa refactor): Implement function inlining (#1293) ...
- Loading branch information
Showing
155 changed files
with
2,711 additions
and
1,038 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Add/remove 'doc needed' label if issue/PR contains the line '- [x] This PR requires documentation updates when merged.' | ||
"doc needed": | ||
- '- \[x\] This PR requires documentation updates when merged.' | ||
- '- \[(x|X)\] This PR requires documentation updates when merged.' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
use acvm::SmartContract; | ||
|
||
use crate::NargoError; | ||
|
||
pub fn codegen_verifier( | ||
backend: &impl SmartContract, | ||
pub fn codegen_verifier<B: SmartContract>( | ||
backend: &B, | ||
verification_key: &[u8], | ||
) -> Result<String, NargoError> { | ||
Ok(backend.eth_contract_from_vk(verification_key)) | ||
) -> Result<String, B::Error> { | ||
backend.eth_contract_from_vk(verification_key) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
use acvm::acir::{circuit::Circuit, native_types::WitnessMap}; | ||
use acvm::ProofSystemCompiler; | ||
|
||
use crate::NargoError; | ||
|
||
pub fn prove_execution( | ||
backend: &impl ProofSystemCompiler, | ||
pub fn prove_execution<B: ProofSystemCompiler>( | ||
backend: &B, | ||
circuit: &Circuit, | ||
solved_witness: WitnessMap, | ||
proving_key: &[u8], | ||
) -> Result<Vec<u8>, NargoError> { | ||
let proof = backend.prove_with_pk(circuit, solved_witness, proving_key); | ||
|
||
Ok(proof) | ||
) -> Result<Vec<u8>, B::Error> { | ||
backend.prove_with_pk(circuit, solved_witness, proving_key) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
use acvm::acir::{circuit::Circuit, native_types::WitnessMap}; | ||
use acvm::ProofSystemCompiler; | ||
|
||
use crate::NargoError; | ||
|
||
pub fn verify_proof( | ||
backend: &impl ProofSystemCompiler, | ||
pub fn verify_proof<B: ProofSystemCompiler>( | ||
backend: &B, | ||
circuit: &Circuit, | ||
proof: &[u8], | ||
public_inputs: WitnessMap, | ||
verification_key: &[u8], | ||
) -> Result<bool, NargoError> { | ||
let valid_proof = backend.verify_with_vk(proof, public_inputs, circuit, verification_key); | ||
|
||
Ok(valid_proof) | ||
) -> Result<bool, B::Error> { | ||
backend.verify_with_vk(proof, public_inputs, circuit, verification_key) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.