generated from microsoft/ccf-app-template
-
Notifications
You must be signed in to change notification settings - Fork 6
/
lskvserver.proto
97 lines (85 loc) · 2.25 KB
/
lskvserver.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
syntax = "proto3";
import "etcd.proto";
package lskvserverpb;
message ReceiptClaims
{
oneof request
{
etcdserverpb.PutRequest request_put = 1;
etcdserverpb.DeleteRangeRequest request_delete_range = 2;
etcdserverpb.TxnRequest request_txn = 3;
}
oneof response
{
etcdserverpb.PutResponse response_put = 4;
etcdserverpb.DeleteRangeResponse response_delete_range = 5;
etcdserverpb.TxnResponse response_txn = 6;
}
}
message SignatureReceipt { string leaf = 1; }
message Proof
{
string left = 1;
string right = 2;
}
message LeafComponents
{
string claims_digest = 1;
string commit_evidence = 2;
string write_set_digest = 3;
}
message TxReceipt
{
LeafComponents leaf_components = 1;
repeated Proof proof = 2;
}
message Receipt
{
string cert = 1;
bytes signature = 2;
string node_id = 3;
oneof receipt_extras
{
TxReceipt tx_receipt = 4;
SignatureReceipt signature_receipt = 5;
}
}
message GetReceiptRequest
{
int64 revision = 1;
uint64 raft_term = 2;
}
message GetReceiptResponse
{
etcdserverpb.ResponseHeader header = 1;
Receipt receipt = 2;
}
// https://microsoft.github.io/CCF/main/use_apps/verify_tx.html#checking-for-commit
message TxStatusRequest
{
int64 revision = 1;
uint64 raft_term = 2;
}
message TxStatusResponse
{
etcdserverpb.ResponseHeader header = 1;
enum Status {
// This node has not received this transaction, and knows nothing about it
Unknown = 0;
// This node has this transaction locally, but has not yet heard that the
// transaction has been committed by the distributed consensus
Pending = 1;
// This node has seen that this transaction is committed, it is an
// irrevocable and durable part of the service's transaction history
Committed = 2;
// This node knows that the given transaction cannot be committed. This may
// mean there has been a view change, and a previously pending transaction
// has been lost (the original request should be resubmitted and will be
// given a new Transaction ID). This also describes IDs which are known to
// be impossible given the currently committed IDs
Invalid = 3;
}
Status status = 2;
}