Skip to main content

miden_node_proto/generated/
blockchain.rs

1// This file is @generated by prost-build.
2/// Represents a block.
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct Block {
5    /// Block data encoded using \[winter_utils::Serializable\] implementation for
6    /// \[miden_protocol::block::Block\].
7    #[prost(bytes = "vec", tag = "1")]
8    pub block: ::prost::alloc::vec::Vec<u8>,
9}
10/// Represents a proposed block.
11#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12pub struct ProposedBlock {
13    /// Block data encoded using \[winter_utils::Serializable\] implementation for
14    /// \[miden_protocol::block::ProposedBlock\].
15    #[prost(bytes = "vec", tag = "1")]
16    pub proposed_block: ::prost::alloc::vec::Vec<u8>,
17}
18/// Represents a block or nothing.
19#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
20pub struct MaybeBlock {
21    /// The requested block data encoded using \[winter_utils::Serializable\] implementation for
22    /// \[miden_protocol::block::Block\].
23    #[prost(bytes = "vec", optional, tag = "1")]
24    pub block: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
25}
26/// Represents a block number.
27#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
28pub struct BlockNumber {
29    /// The block number of the target block.
30    #[prost(fixed32, tag = "1")]
31    pub block_num: u32,
32}
33/// Represents a block number or nothing.
34#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
35pub struct MaybeBlockNumber {
36    /// The block number of the target block.
37    #[prost(fixed32, optional, tag = "1")]
38    pub block_num: ::core::option::Option<u32>,
39}
40/// Represents a block header.
41#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
42pub struct BlockHeader {
43    /// Specifies the version of the protocol.
44    #[prost(uint32, tag = "1")]
45    pub version: u32,
46    /// The commitment of the previous blocks header.
47    #[prost(message, optional, tag = "2")]
48    pub prev_block_commitment: ::core::option::Option<super::primitives::Digest>,
49    /// A unique sequential number of the current block.
50    #[prost(fixed32, tag = "3")]
51    pub block_num: u32,
52    /// A commitment to an MMR of the entire chain where each block is a leaf.
53    #[prost(message, optional, tag = "4")]
54    pub chain_commitment: ::core::option::Option<super::primitives::Digest>,
55    /// A commitment to account database.
56    #[prost(message, optional, tag = "5")]
57    pub account_root: ::core::option::Option<super::primitives::Digest>,
58    /// A commitment to the nullifier database.
59    #[prost(message, optional, tag = "6")]
60    pub nullifier_root: ::core::option::Option<super::primitives::Digest>,
61    /// A commitment to all notes created in the current block.
62    #[prost(message, optional, tag = "7")]
63    pub note_root: ::core::option::Option<super::primitives::Digest>,
64    /// A commitment to a set of IDs of transactions which affected accounts in this block.
65    #[prost(message, optional, tag = "8")]
66    pub tx_commitment: ::core::option::Option<super::primitives::Digest>,
67    /// The validator's ECDSA public key.
68    #[prost(message, optional, tag = "9")]
69    pub validator_key: ::core::option::Option<ValidatorPublicKey>,
70    /// A commitment to all transaction kernels supported by this block.
71    #[prost(message, optional, tag = "10")]
72    pub tx_kernel_commitment: ::core::option::Option<super::primitives::Digest>,
73    /// Fee parameters for block processing.
74    #[prost(message, optional, tag = "11")]
75    pub fee_parameters: ::core::option::Option<FeeParameters>,
76    /// The time when the block was created.
77    #[prost(fixed32, tag = "12")]
78    pub timestamp: u32,
79}
80/// Validator ECDSA public key.
81#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
82pub struct ValidatorPublicKey {
83    /// Signature encoded using \[winter_utils::Serializable\] implementation for
84    /// \[crypto::dsa::ecdsa_k256_keccak::PublicKey\].
85    #[prost(bytes = "vec", tag = "1")]
86    pub validator_key: ::prost::alloc::vec::Vec<u8>,
87}
88/// Block ECDSA Signature.
89#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
90pub struct BlockSignature {
91    /// Signature encoded using \[winter_utils::Serializable\] implementation for
92    /// \[crypto::dsa::ecdsa_k256_keccak::Signature\].
93    #[prost(bytes = "vec", tag = "1")]
94    pub signature: ::prost::alloc::vec::Vec<u8>,
95}
96/// Definition of the fee parameters.
97#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
98pub struct FeeParameters {
99    /// The faucet account ID which is used for native fee assets.
100    #[prost(message, optional, tag = "1")]
101    pub native_asset_id: ::core::option::Option<super::account::AccountId>,
102    /// The base fee (in base units) capturing the cost for the verification of a transaction.
103    #[prost(fixed32, tag = "2")]
104    pub verification_base_fee: u32,
105}
106/// Represents a block body.
107#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
108pub struct BlockBody {
109    /// Block body data encoded using \[winter_utils::Serializable\] implementation for
110    /// \[miden_protocol::block::BlockBody\].
111    #[prost(bytes = "vec", tag = "1")]
112    pub block_body: ::prost::alloc::vec::Vec<u8>,
113}