miden-protocol 0.17.0

Core components of the Miden protocol
Documentation
use {BlockCommitment} from miden::protocol_utils::types

#! Sequential commitment to the ordered batch IDs in a block.
type BatchesCommitment = word

#! Commitment to the nullifiers created in a block.
type NullifierCommitment = word

# MAIN
# =================================================================================================

#! Block kernel program (skeleton).
#!
#! A block aggregates a set of independently-proven transaction batches into the next block of the
#! chain. This program defines the public input/output contract that the block kernel will
#! eventually verify, but currently does not yet perform any verification: it drops its inputs and
#! exits, leaving the all-zero word output region as the stack's initial padding zeros.
#!
#! Inputs:  [PREV_BLOCK_COMMITMENT, BATCHES_COMMITMENT, pad(8)]
#! Outputs: [BLOCK_COMMITMENT, NULLIFIER_COMMITMENT, pad(8)]
#!
#! Where:
#! - PREV_BLOCK_COMMITMENT is the commitment of the block header this block builds on top of.
#! - BATCHES_COMMITMENT is the sequential hash over the `BatchId`s of the batches in this block. It
#!   pins both which batches the block contains and the order they appear in.
#! - BLOCK_COMMITMENT is the commitment of the newly created block header, which in turn
#!   commits to the block's account root, nullifier root, note root, chain commitment and
#!   transaction commitment. In this skeleton it is the empty word.
#! - NULLIFIER_COMMITMENT is the commitment to the set of nullifiers created in this block. In
#!   this skeleton it is the empty word.
#!
proc main(prev_block_commitment: BlockCommitment, batches_commitment: BatchesCommitment, padding: [felt; 8]) -> (BlockCommitment, NullifierCommitment, [felt; 8])
    dropw dropw
    # => [pad(16)]
end

begin
    exec.main
end