f1r3fly_models/rust/casper/protocol/
casper_message.rs1use crate::ByteString;
2
3pub struct BlockMessage {
5 pub block_hash: Vec<u8>,
6 pub header: Header,
7 pub body: Body,
8 pub justifications: Vec<Justification>,
9 pub sender: Vec<u8>,
10 pub seq_num: i32,
11 pub sig: Vec<u8>,
12 pub sig_algorithm: String,
13 pub shard_id: String,
14 pub extra_bytes: Vec<u8>,
15}
16
17pub struct Header {
18 pub parents_hash_list: Vec<ByteString>,
19 pub timestamp: i64,
20 pub version: i64,
21 pub extra_bytes: ByteString,
22}
23
24pub struct Body {
25 pub state: F1r3flyState,
26 }
28
29pub struct Justification {
30 }
33
34pub struct F1r3flyState {
35 pub pre_state_hash: ByteString,
36 pub post_state_hash: ByteString,
37 pub bonds: Vec<Bond>,
38 pub block_number: i64,
39}
40
41pub struct ProcessedDeploy {
42 }
48
49pub struct DeployData {
50 }
57
58pub struct Peek {
59 }
61
62pub enum Event {
63 Produce(ProduceEvent),
64 Consume(ConsumeEvent),
65 Comm(CommEvent),
66}
67
68pub struct ProduceEvent {
69 pub channels_hash: ByteString,
70 pub hash: ByteString,
71 pub persistent: bool,
72 pub times_repeated: i32,
73}
74
75pub struct ConsumeEvent {
76 pub channels_hashes: Vec<ByteString>,
77 pub hash: ByteString,
78 pub persistent: bool,
79}
80
81pub struct CommEvent {
82 pub consume: ConsumeEvent,
83 pub produces: Vec<ProduceEvent>,
84 pub peeks: Vec<Peek>,
85}
86
87pub struct Bond {
88 }