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

feat(acvm): add eth_contract_from_vk to `SmartContract #113

Merged
merged 2 commits into from
Feb 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions acvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down