Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

feat(acvm)!: Add circuit: &Circuit to eth_contract_from_vk function signature #420

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

jp4g
Copy link
Contributor

@jp4g jp4g commented Jul 10, 2023

Description

Adds circuit: &Circuit to the eth_contract_from_vk function signature in the SmartContract trait for ACVM backends

Problem*

Halo2 Backend needs to know the number of public inputs to generate the smart contract verifier for proofs. With the ACVM backend API, there is currently no way to pass this value into eth_contract_from_vk.

Resolves: #411

Summary*

Minimal changes- see description

Will require that acvm-backend-barretenberg passes in the ACIR even though it doesn't need it:
https://github.com/noir-lang/acvm-backend-barretenberg/blob/master/src/acvm_interop/smart_contract.rs#L12-L16

And that nargo supplies the ACIR when calling eth_contract_from_vk from the backend:
https://github.com/noir-lang/noir/blob/master/crates/nargo/src/ops/codegen_verifier.rs#L3-L9

Additional Context

NA

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@TomAFrench TomAFrench changed the title add circuit: &Circuit to eth_contract_from_vk function signature feat(acvm)!: Add circuit: &Circuit to eth_contract_from_vk function signature Jul 10, 2023
acvm/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. LGTM

@kevaundray kevaundray enabled auto-merge July 10, 2023 18:17
@kevaundray kevaundray added this pull request to the merge queue Jul 10, 2023
Merged via the queue into noir-lang:master with commit 744e9da Jul 10, 2023
@kevaundray kevaundray mentioned this pull request Jul 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eth_contract_from_vk assumes the backend serializes public input data in the vkey
3 participants