Function zebra_state::service::check::nullifier::tx_no_duplicates_in_chain
source · pub(crate) fn tx_no_duplicates_in_chain(
finalized_chain: &ZebraDb,
non_finalized_chain: Option<&Arc<Chain>>,
transaction: &Arc<Transaction>,
) -> Result<(), ValidateContextError>
Expand description
Reject double-spends of nullifiers:
- one from this
Transaction
, and the other already committed to the provided non-finalizedChain
orZebraDb
.
§Consensus
A nullifier MUST NOT repeat either within a transaction, or across transactions in a valid blockchain. Sprout and Sapling and Orchard nullifiers are considered disjoint, even if they have the same bit pattern.