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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
use mina_serialization_types_macros::AutoFrom;
use serde::{Deserialize, Serialize};
use crate::{
delta_transition_chain_proof::DeltaTransitionChainProofJson,
protocol_state::ProtocolStateJson,
protocol_state_proof::ProtocolStateProofBase64Json,
protocol_version::ProtocolVersionJson,
staged_ledger_diff::StagedLedgerDiffJson,
v1::{
DeltaTransitionChainProof, ProtocolStateProofV1, ProtocolStateV1, ProtocolVersionV1,
StagedLedgerDiffV1,
},
};
use versioned::*;
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
pub struct ExternalTransition {
pub protocol_state: ProtocolStateV1,
pub protocol_state_proof: ProtocolStateProofV1,
pub staged_ledger_diff: StagedLedgerDiffV1,
pub delta_transition_chain_proof: DeltaTransitionChainProof,
pub current_protocol_version: ProtocolVersionV1,
pub proposed_protocol_version_opt: Option<ProtocolVersionV1>,
pub validation_callback: (),
}
pub type ExternalTransitionV1 = Versioned<ExternalTransition, 1>;
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq, AutoFrom)]
#[auto_from(ExternalTransition)]
pub struct ExternalTransitionJson {
pub protocol_state: ProtocolStateJson,
pub protocol_state_proof: ProtocolStateProofBase64Json,
pub staged_ledger_diff: StagedLedgerDiffJson,
pub delta_transition_chain_proof: DeltaTransitionChainProofJson,
#[serde(skip)]
pub current_protocol_version: ProtocolVersionJson,
#[serde(skip)]
pub proposed_protocol_version_opt: Option<ProtocolVersionJson>,
#[serde(skip)]
pub validation_callback: (),
}