From 373c18fc05edf673cfec9e8bbb78bd7d7514999e Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 22 Feb 2023 15:17:54 +0000 Subject: [PATCH] feat(acvm): add `eth_contract_from_vk` to `SmartContract (#113) feat(acvm)!: add `eth_contract_from_vk` to `SmartContract chore: deprecate `eth_contract_from_cs` chore: re-add note on multiple platforms --- acvm/src/lib.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/acvm/src/lib.rs b/acvm/src/lib.rs index 52fe34b46..4e2cdf0fd 100644 --- a/acvm/src/lib.rs +++ b/acvm/src/lib.rs @@ -115,12 +115,7 @@ pub trait PartialWitnessGenerator { } pub trait SmartContract { - // Takes a verification key and produces a smart contract - // The platform indicator allows a backend to support multiple smart contract platforms - // - // fn verification_key(&self, platform: u8, vk: &[u8]) -> &[u8] { - // todo!("currently the backend is not configured to use this.") - // } + // TODO: Allow a backend to support multiple smart contract platforms /// Takes an ACIR circuit, the number of witnesses and the number of public inputs /// Then returns an Ethereum smart contract @@ -129,7 +124,11 @@ pub trait SmartContract { /// This deprecation may happen in two stages: /// The first stage will remove `num_witnesses` and `num_public_inputs` parameters. /// If we cannot avoid `num_witnesses`, it can be added into the Circuit struct. + #[deprecated] fn eth_contract_from_cs(&self, circuit: Circuit) -> String; + + /// Returns an Ethereum smart contract to verify proofs against a given verification key. + fn eth_contract_from_vk(&self, verification_key: &[u8]) -> String; } pub trait ProofSystemCompiler {