1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
use mina_serialization_types_macros::AutoFrom;
use serde::{Deserialize, Serialize};
use versioned::Versioned;
use crate::{
common::{U32Json, U64Json},
v1::{BlockTimeV1, LengthV1},
};
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
pub struct ProtocolConstants {
pub k: LengthV1,
pub slots_per_epoch: LengthV1,
pub slots_per_sub_window: LengthV1,
pub delta: LengthV1,
pub genesis_state_timestamp: BlockTimeV1,
}
pub type ProtocolConstantsV1 = Versioned<Versioned<ProtocolConstants, 1>, 1>;
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq, AutoFrom)]
#[auto_from(ProtocolConstants)]
pub struct ProtocolConstantsJson {
pub k: U32Json,
pub slots_per_epoch: U32Json,
pub slots_per_sub_window: U32Json,
pub delta: U32Json,
pub genesis_state_timestamp: U64Json,
}