forked from hyperledger/fabric-x-committer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoordinator.proto
More file actions
52 lines (41 loc) · 1.85 KB
/
Copy pathcoordinator.proto
File metadata and controls
52 lines (41 loc) · 1.85 KB
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
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
syntax = "proto3";
option go_package = "github.com/hyperledger/fabric-x-committer/api/protocoordinatorservice";
package protocoordinatorservice;
import "api/protoblocktx/block_tx.proto";
import "google/protobuf/empty.proto";
service Coordinator {
rpc BlockProcessing(stream Batch) returns (stream protoblocktx.TransactionsStatus);
rpc SetLastCommittedBlockNumber (protoblocktx.BlockInfo) returns (google.protobuf.Empty) {};
rpc GetLastCommittedBlockNumber (google.protobuf.Empty) returns (protoblocktx.LastCommittedBlock) {};
rpc GetNextExpectedBlockNumber (google.protobuf.Empty) returns (protoblocktx.BlockInfo) {};
rpc GetTransactionsStatus(protoblocktx.QueryStatus) returns (protoblocktx.TransactionsStatus);
rpc GetConfigTransaction(google.protobuf.Empty) returns (protoblocktx.ConfigTransaction) {};
rpc NumberOfWaitingTransactionsForStatus(google.protobuf.Empty) returns (WaitingTransactions);
}
// A committer's representation of a block in the blockchain.
message Batch {
repeated Tx txs = 1; // List of transactions within the block.
repeated TxStatusInfo rejected = 2; // Rejected transactions.
}
// A committer's representation of a TX in the blockchain.
message Tx {
TxRef ref = 1; // The TX reference.
protoblocktx.Tx content = 2; // The TX content.
}
message TxStatusInfo {
TxRef ref = 1; // The TX reference.
protoblocktx.Status status = 2; // The reject reason.
}
// The TX reference with respect to the block generated by the orderer.
message TxRef {
uint64 block_num = 1; // The block number.
uint32 tx_num = 2; // Transaction number within the block
string tx_id = 3; // Transaction ID within the block.
}
message WaitingTransactions {
int32 count = 1;
}