可做为公钥,可做为见证,可进行数学/密码学上的求和。
由两部分组成,表示了钱、拥有权。
/// The size of a Pedersen commitment
pub const PEDERSEN_COMMITMENT_SIZE: usize = 33;
/// A Pedersen commitment
pub struct Commitment(pub [u8; constants::PEDERSEN_COMMITMENT_SIZE]);
Committed
Commitment 的求和。
/// Implemented by types that hold inputs and outputs (and kernels)
/// containing Pedersen commitments.
/// Handles the collection of the commitments as well as their
/// summing, taking potential explicit overages of fees into account.
verify_kernel_sums
/// Verify the sum of the kernel excesses equals the
/// sum of the outputs, taking into account both
/// the kernel_offset and overage.
sum_commitments
/// Gathers commitments and sum them.
/// Utility to sum positive and negative commitments, eliminating zero values
sum_kernel_excesses
/// Gather the kernel excesses and sum them.
/// Utility function to take sets of positive and negative kernel offsets as
/// blinding factors, convert them to private key filtering zero values and
/// summing all of them. Useful to build blocks.