This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 764
/
Copy pathclient_batch.proto
86 lines (78 loc) · 2.88 KB
/
client_batch.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
// Copyright 2017 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// -----------------------------------------------------------------------------
syntax = "proto3";
option java_multiple_files = true;
option java_package = "sawtooth.sdk.protobuf";
option go_package = "client_batch_pb2";
import "batch.proto";
import "client_list_control.proto";
// A request to return a list of batches from the validator. May include the id
// of a particular block to be the `head` of the chain being requested. In that
// case the list will include the batches from that block, and all batches
// previous to that block on the chain. Filter with specific `batch_ids`.
message ClientBatchListRequest {
string head_id = 1;
repeated string batch_ids = 2;
ClientPagingControls paging = 3;
repeated ClientSortControls sorting = 4;
}
// A response that lists batches from newest to oldest.
//
// Statuses:
// * OK - everything worked as expected
// * INTERNAL_ERROR - general error, such as protobuf failing to deserialize
// * NOT_READY - the validator does not yet have a genesis block
// * NO_ROOT - the head block specified was not found
// * NO_RESOURCE - no batches were found with the parameters specified
// * INVALID_PAGING - the paging controls were malformed or out of range
// * INVALID_SORT - the sorting controls were malformed or invalid
message ClientBatchListResponse {
enum Status {
STATUS_UNSET = 0;
OK = 1;
INTERNAL_ERROR = 2;
NOT_READY = 3;
NO_ROOT = 4;
NO_RESOURCE = 5;
INVALID_PAGING = 6;
INVALID_SORT = 7;
INVALID_ID = 8;
}
Status status = 1;
repeated Batch batches = 2;
string head_id = 3;
ClientPagingResponse paging = 4;
}
// Fetches a specific batch by its id (header_signature) from the blockchain.
message ClientBatchGetRequest {
string batch_id = 1;
}
// A response that returns the batch specified by a ClientBatchGetRequest.
//
// Statuses:
// * OK - everything worked as expected, batch has been fetched
// * INTERNAL_ERROR - general error, such as protobuf failing to deserialize
// * NO_RESOURCE - no batch with the specified id exists
message ClientBatchGetResponse {
enum Status {
STATUS_UNSET = 0;
OK = 1;
INTERNAL_ERROR = 2;
NO_RESOURCE = 5;
INVALID_ID = 8;
}
Status status = 1;
Batch batch = 2;
}