mithril_common/entities/
snapshot.rs

1use crate::entities::{CardanoDbBeacon, CompressionAlgorithm};
2use serde::{Deserialize, Serialize};
3
4/// Snapshot represents a snapshot file and its metadata
5#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
6pub struct Snapshot {
7    /// Digest that is signed by the signer participants
8    pub digest: String,
9
10    /// Cardano network
11    pub network: String,
12
13    /// Mithril beacon on the Cardano chain
14    pub beacon: CardanoDbBeacon,
15
16    /// Size of the immutables snapshot file in Bytes
17    pub size: u64,
18
19    /// Size of the ancillary files in Bytes
20    #[serde(skip_serializing_if = "Option::is_none")]
21    pub ancillary_size: Option<u64>,
22
23    /// Locations where the snapshot of the immutable files can be retrieved
24    pub locations: Vec<String>,
25
26    /// Locations where the snapshot of the ancillary files can be retrieved
27    #[serde(skip_serializing_if = "Option::is_none")]
28    pub ancillary_locations: Option<Vec<String>>,
29
30    /// Compression algorithm of the snapshot archive
31    pub compression_algorithm: CompressionAlgorithm,
32
33    /// Version of the Cardano node used to create snapshot archive.
34    pub cardano_node_version: String,
35}