This repository has been archived by the owner on Jun 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstreamlet.proto
63 lines (47 loc) · 1.58 KB
/
streamlet.proto
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
syntax = "proto3";
// Streamlet service interface
service Streamlet {
// Used by nodes to notify other nodes of their vote
rpc NotifyVote(Vote) returns (Response) {}
// Used by epoch leader to propse. Mostly the same as above
// but explicit code path to verify the leader and epoch and
// to facilitate implementing and testing different
// interpretations of the protocol description
rpc ProposeBlock(Proposal) returns (Response) {}
}
// Response type can be used to respond with information.
// Empty for now because no response is needed in the
// protocol as described in the paper.
message Response {
}
message Block {
// Epoch number of parent block
uint64 parent = 1;
// SHA-256 of parent block
bytes phash = 2;
// Epoch number
uint64 epoch = 3;
// Block data as binary values, opaque to Streamlet service,
// and to be interpreted by application
bytes txns = 4;
}
message Vote {
// Node ID corresponding to some "address:port" in the configuration file
uint32 node = 1;
// ED25519 signature on block's hash included below
bytes signature = 2;
// Epoch number of parent block
uint64 parent = 3;
// Epoch number
uint64 epoch = 4;
// SHA-256 of block. The actual block is sent by the leader in its proposal.
bytes hash = 5;
}
message Proposal {
// Node ID corresponding to some "address:port" in the configuration file
uint32 node = 1;
// ED25519 signature on propsed block
bytes signature = 2;
// Block being voted on and to be verified by node
Block block = 3;
}