Skip to content

Commit

Permalink
rusk: Remove PublicInput
Browse files Browse the repository at this point in the history
  • Loading branch information
moCello committed Jul 23, 2024
1 parent 54a8c8c commit f5315bf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions rusk/src/lib/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ pub static VD_EXEC_4_2: LazyLock<Vec<u8>> =

/// Verifies the proof of the incoming transaction.
pub fn verify_proof(tx: &PhoenixTransaction) -> Result<bool> {
let pi: Vec<rusk_abi::PublicInput> =
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();

Expand All @@ -46,7 +43,11 @@ pub fn verify_proof(tx: &PhoenixTransaction) -> Result<bool> {

// 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.
Expand Down

0 comments on commit f5315bf

Please sign in to comment.