Input

实际是个普邓森见证。

和输出的关系:当前输入,就是上一区块的输出。

A reference to an output being spent by a transaction.

/// The input for a transaction, which spends a pre-existing unspent output.
/// The input commitment is a reproduction of the commitment of the output
/// being spent. Input must also provide the original output features and the
/// hash of the block the output originated from.
  • OutputFeatures # 来源标记。来自普通交易,还是 Coinbase?根据来源不同,成熟时间不同。
  • Commitment # 之前输出的 Commitment
/// A transaction input.
///
/// Primarily a reference to an output being spent by the transaction.
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Input {
    /// The features of the output being spent.
    /// We will check maturity for coinbase output.
    pub features: OutputFeatures,
    /// The commit referencing the output being spent.
    pub commit: Commitment,
}

An input must provide -

  • the commitment (to lookup the output in the MMR)
  • the output features (hash in output MMR dependent on features|commitment)
  • a merkle proof showing inclusion of the output in the originating block
  • the block hash of originating blocks
    • [tbd - maintain index based on merkle proof?]

results matching ""

    No results matching ""