Skip to content

Commit

Permalink
No changes in wallet-core
Browse files Browse the repository at this point in the history
  • Loading branch information
Daksh14 committed Sep 10, 2024
1 parent 679f47c commit edd8cf9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions wallet-core/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
//
// Copyright (c) DUSK NETWORK. All rights reserved.

//! Implementations of basic wallet functionalities to create phoenix
//! transactions.
//! Implementations of basic wallet functionalities to create transactions.
use alloc::vec::Vec;

Expand All @@ -30,7 +29,16 @@ use execution_core::{
BlsScalar, ContractId, Error, JubJubScalar,
};

/// Generate a phoenix-transaction with a given prover.
/// An unproven-transaction is nearly identical to a [`PhoenixTransaction`] with
/// the only difference being that it carries a serialized [`TxCircuitVec`]
/// instead of the proof bytes.
/// This way it is possible to delegate the proof generation of the
/// [`TxCircuitVec`] after the unproven transaction was created while at the
/// same time ensuring non-malleability of the transaction, as the transaction's
/// payload-hash is part of the public inputs of the circuit.
/// Once the proof is generated from the [`TxCircuitVec`] bytes, it can
/// replace the serialized circuit in the transaction by calling
/// [`Transaction::replace_proof`].
///
/// # Errors
/// The creation of a transaction is not possible and will error if:
Expand All @@ -40,7 +48,6 @@ use execution_core::{
/// - the `inputs` vector contains duplicate `Note`s
/// - the `Prove` trait is implemented incorrectly
/// - the Memo provided with `data` is too large
/// - the transaction-data is incorrect
#[allow(clippy::too_many_arguments)]
pub fn phoenix<R: RngCore + CryptoRng, P: Prove>(
rng: &mut R,
Expand Down

0 comments on commit edd8cf9

Please sign in to comment.