syntax = "proto3";
package block;

import "digest.proto";
import "merkle.proto";

// Represents a block header.
message BlockHeader {
    // Specifies the version of the protocol.
    uint32 version = 1;

    // The commitment of the previous blocks header.
    digest.Digest prev_block_commitment = 2;

    // A unique sequential number of the current block.
    fixed32 block_num = 3;

    // A commitment to an MMR of the entire chain where each block is a leaf.
    digest.Digest chain_commitment = 4;

    // A commitment to account database.
    digest.Digest account_root = 5;

    // A commitment to the nullifier database.
    digest.Digest nullifier_root = 6;

    // A commitment to all notes created in the current block.
    digest.Digest note_root = 7;

    // A commitment to a set of IDs of transactions which affected accounts in this block.
    digest.Digest tx_commitment = 8;

    // A commitment to a STARK proof attesting to the correct state transition.
    digest.Digest proof_commitment = 9;

    // A commitment to all transaction kernels supported by this block.
    digest.Digest tx_kernel_commitment = 10;

    // The time when the block was created.
    fixed32 timestamp = 11;
}
