Module grin_core::core::transaction

source ·
Expand description

Transactions

Structs§

  • We need to wrap commitments so they can be sorted with hashable_ord.
  • Fee fields as in fix-fees RFC: { future_use: 20, fee_shift: 4, fee: 40 }
  • A transaction input.
  • Relative height field on NRD kernel variant. u16 representing a height between 1 and MAX (consensus::WEEK_HEIGHT).
  • Output for a transaction, defining the new ownership of coins that are being transferred. The commitment is a blinded value for the output while the range proof guarantees the commitment includes a positive value without overflow and the ownership of the private key.
  • An output_identifier can be build from either an input or an output and contains everything we need to uniquely identify an output being spent. Needed because it is not sufficient to pass a commitment around.
  • A transaction
  • TransactionBody is a common abstraction for transaction and block
  • A proof that a transaction sums to zero. Includes both the transaction’s Pedersen commitment and the signature, that guarantees that the commitments amount to zero. The signature signs the fee_fields and the lock_height, which are retained for signature validation.

Enums§

Functions§

  • Aggregate a vec of txs into a multi-kernel tx with cut_through.
  • Takes a slice of inputs and a slice of outputs and applies “cut-through” eliminating any input/output pairs with input spending output. Returns new slices with cut-through elements removed. Also returns slices of the cut-through elements themselves. Note: Takes slices of anything that is AsRef for greater flexibility. So we can cut_through inputs and outputs but we can also cut_through inputs and output identifiers. Or we can get crazy and cut_through inputs with other inputs to identify intersection and difference etc.
  • Attempt to deaggregate a multi-kernel transaction based on multiple transactions