diff --git a/src/commands.rs b/src/commands.rs index 3310be709..db377fc4d 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -795,12 +795,4 @@ pub enum Commands { #[arg(long)] addr_vk: Option, }, - - /// Print the proof in hexadecimal - #[command(name = "print-proof-hex")] - PrintProofHex { - /// The path to the proof file - #[arg(long, default_value = DEFAULT_PROOF)] - proof_path: PathBuf, - }, } diff --git a/src/execute.rs b/src/execute.rs index 91b1aec48..ab0bdcbe8 100644 --- a/src/execute.rs +++ b/src/execute.rs @@ -440,7 +440,6 @@ pub async fn run(command: Commands) -> Result> { addr_da, addr_vk, } => verify_evm(proof_path, addr_verifier, rpc_url, addr_da, addr_vk).await, - Commands::PrintProofHex { proof_path } => print_proof_hex(proof_path), } } @@ -1169,16 +1168,6 @@ pub(crate) fn mock( Ok(String::new()) } -pub(crate) fn print_proof_hex(proof_path: PathBuf) -> Result> { - let proof = Snark::load::>(&proof_path)?; - for instance in proof.instances { - println!("{:?}", instance); - } - let hex_str = hex::encode(proof.proof); - info!("0x{}", hex_str); - Ok(format!("0x{}", hex_str)) -} - #[cfg(feature = "render")] pub(crate) fn render( model: PathBuf, diff --git a/src/python.rs b/src/python.rs index 521271dd9..9c36bc352 100644 --- a/src/python.rs +++ b/src/python.rs @@ -15,7 +15,7 @@ use crate::graph::{ use crate::pfsys::evm::aggregation::AggregationCircuit; use crate::pfsys::{ load_pk, load_vk, save_params, save_vk, srs::gen_srs as ezkl_gen_srs, srs::load_srs, ProofType, - Snark, TranscriptType, + TranscriptType, }; use crate::RunArgs; use ethers::types::H160; @@ -1097,16 +1097,6 @@ fn create_evm_verifier_aggr( Ok(true) } -/// print hex representation of a proof -#[pyfunction(signature = (proof_path))] -fn print_proof_hex(proof_path: PathBuf) -> Result { - let proof = Snark::load::>(&proof_path) - .map_err(|_| PyIOError::new_err("Failed to load proof"))?; - - let hex_str = hex::encode(proof.proof); - Ok(format!("0x{}", hex_str)) -} - // Python Module #[pymodule] fn ezkl(_py: Python<'_>, m: &PyModule) -> PyResult<()> { @@ -1145,7 +1135,6 @@ fn ezkl(_py: Python<'_>, m: &PyModule) -> PyResult<()> { m.add_function(wrap_pyfunction!(deploy_vk_evm, m)?)?; m.add_function(wrap_pyfunction!(deploy_da_evm, m)?)?; m.add_function(wrap_pyfunction!(verify_evm, m)?)?; - m.add_function(wrap_pyfunction!(print_proof_hex, m)?)?; m.add_function(wrap_pyfunction!(setup_test_evm_witness, m)?)?; m.add_function(wrap_pyfunction!(create_evm_verifier_aggr, m)?)?; m.add_function(wrap_pyfunction!(create_evm_data_attestation, m)?)?; diff --git a/tests/python/binding_tests.py b/tests/python/binding_tests.py index 3e3aac8e8..307f044b5 100644 --- a/tests/python/binding_tests.py +++ b/tests/python/binding_tests.py @@ -392,9 +392,7 @@ def test_prove_evm(): assert res['transcript_type'] == 'EVM' assert os.path.isfile(proof_path) - res = ezkl.print_proof_hex(proof_path) - # to figure out a better way of testing print_proof_hex - assert type(res) == str + def test_create_evm_verifier(): diff --git a/tests/wasm.rs b/tests/wasm.rs index f1f93b44a..ecff4a718 100644 --- a/tests/wasm.rs +++ b/tests/wasm.rs @@ -258,15 +258,6 @@ mod wasm32 { assert!(value); } - #[wasm_bindgen_test] - async fn print_proof_hex_test() { - let proof = printProofHex(wasm_bindgen::Clamped(PROOF.to_vec())) - .map_err(|_| "failed") - .unwrap(); - - assert!(proof.len() > 0); - } - #[wasm_bindgen_test] async fn verify_validations() { // Run witness validation on network (should fail)