From f5315bfcd47d1628769b36b6b073129e83f8ca03 Mon Sep 17 00:00:00 2001 From: moana Date: Tue, 23 Jul 2024 15:45:37 +0200 Subject: [PATCH] rusk: Remove `PublicInput` --- rusk/src/lib/verifier.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rusk/src/lib/verifier.rs b/rusk/src/lib/verifier.rs index 3e884c52e9..107a57ce36 100644 --- a/rusk/src/lib/verifier.rs +++ b/rusk/src/lib/verifier.rs @@ -28,9 +28,6 @@ pub static VD_EXEC_4_2: LazyLock> = /// Verifies the proof of the incoming transaction. pub fn verify_proof(tx: &PhoenixTransaction) -> Result { - let pi: Vec = - tx.public_inputs().iter().map(|pi| pi.into()).collect(); - let inputs_len = tx.payload().tx_skeleton.nullifiers.len(); let outputs_len = tx.payload().tx_skeleton.outputs.len(); @@ -46,7 +43,11 @@ pub fn verify_proof(tx: &PhoenixTransaction) -> Result { // Maybe we want to handle internal serialization error too, // currently they map to `false`. - Ok(rusk_abi::verify_proof(vd.to_vec(), tx.proof().to_vec(), pi)) + Ok(rusk_abi::verify_proof( + vd.to_vec(), + tx.proof().to_vec(), + tx.public_inputs(), + )) } /// Verifies the signature of the incoming transaction.