Skip to main content

miden_protocol/block/
block_proof.rs

1use crate::utils::serde::{
2    ByteReader,
3    ByteWriter,
4    Deserializable,
5    DeserializationError,
6    Serializable,
7};
8
9/// Represents a proof of a block in the chain.
10///
11/// NOTE: Block proving is not yet implemented. This is a placeholder struct.
12#[derive(Debug, Clone, PartialEq, Eq)]
13pub struct BlockProof {}
14
15impl BlockProof {
16    /// Creates a dummy `BlockProof` for testing purposes only.
17    #[cfg(any(test, feature = "testing"))]
18    pub fn new_dummy() -> Self {
19        Self {}
20    }
21}
22
23// SERIALIZATION
24// ================================================================================================
25
26impl Serializable for BlockProof {
27    fn write_into<W: ByteWriter>(&self, _target: &mut W) {
28        // TODO: Implement serialization for BlockProof when fields exist.
29    }
30}
31
32impl Deserializable for BlockProof {
33    fn read_from<R: ByteReader>(_source: &mut R) -> Result<Self, DeserializationError> {
34        // TODO: Implement deserialization for BlockProof when fields exist.
35        let block = Self {};
36
37        Ok(block)
38    }
39}