-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathschedule_get_info.proto
239 lines (218 loc) · 8.34 KB
/
schedule_get_info.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
/**
* # Schedule Get Information
* Query body and response to retrieve information about a scheduled
* transaction.
*
* ### Keywords
* The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
* "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
* document are to be interpreted as described in
* [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in
* [RFC8174](https://www.ietf.org/rfc/rfc8174).
*/
syntax = "proto3";
package proto;
/*
* Copyright (C) 2018-2024 Hedera Hashgraph, LLC
*
* 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.
*/
option java_package = "com.hederahashgraph.api.proto.java";
// <<<pbj.java_package = "com.hedera.hapi.node.scheduled">>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;
import "basic_types.proto";
import "timestamp.proto";
import "query_header.proto";
import "response_header.proto";
import "schedulable_transaction_body.proto";
/**
* Request for information about a scheduled transaction.
*
* If the requested schedule does not exist, the network SHALL respond
* with `INVALID_SCHEDULE_ID`.
*/
message ScheduleGetInfoQuery {
/**
* Standard information sent with every query operation.<br/>
* This includes the signed payment and what kind of response is requested
* (cost, state proof, both, or neither).
*/
QueryHeader header = 1;
/**
* A schedule identifier.
* <p>
* This SHALL identify the schedule to retrieve.<br/>
* This field is REQUIRED.
*/
ScheduleID scheduleID = 2;
}
/**
* Information summarizing schedule state
*/
message ScheduleInfo {
/**
* A schedule identifier.
* <p>
* This SHALL identify the schedule retrieved.
*/
ScheduleID scheduleID = 1;
oneof data {
/**
* A deletion timestamp.
* <p>
* If the schedule was deleted, this SHALL be set to the consensus
* timestamp of the `deleteSchedule` transaction.<br/>
* If the schedule is _not_ deleted, this field SHALL NOT be set.
*/
Timestamp deletion_time = 2;
/**
* An execution timestamp.
* <p>
* If the schedule was completed, and the _scheduled_ transaction
* executed, this SHALL be set to the consensus timestamp of the
* transaction that initiated that execution.<br/>
* If the schedule is _not_ complete, this field SHALL NOT be set.
*/
Timestamp execution_time = 3;
}
/**
* An expiration timestamp.<br/>
* This represents the time at which the schedule will expire. For a
* long-term schedule (if enabled) this is when the schedule will be
* executed, assuming it meets signature requirements at that time.
* For a short-term schedule, this is the deadline to complete the
* signature requirements for the scheduled transaction to execute.
* Regardless of schedule type, the schedule will be removed from
* state when it expires.
* <p>
* A schedule SHALL be removed from state when it expires.<br/>
* A short-term schedule MUST meet signature requirements strictly
* before expiration or it SHALL NOT be executed.<br/>
* A long-term schedule SHALL be executed if, and only if, all signature
* requirements for the scheduled transaction are met at expiration.<br/>
* A long-term schedule SHALL NOT be executed if any signature requirement
* for the scheduled transaction are not met at expiration.<br/>
*/
Timestamp expirationTime = 4;
/**
* A scheduled transaction.
* <p>
* This SHALL be a transaction type enabled in the network property
* `scheduling.whitelist`, and SHALL NOT be any other
* transaction type.<br/>
* This transaction SHALL be executed if the schedule meets all signature
* and execution time requirements for this transaction.<br/>
* The signature requirements for this transaction SHALL be evaluated
* at schedule creation, SHALL be reevaluated with each `signSchedule`
* transaction, and, for long-term schedules, SHALL be reevaluated when
* the schedule expires.<br/>
*/
SchedulableTransactionBody scheduledTransactionBody = 5;
/**
* A short description for this schedule.
* <p>
* This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
* (default 100) bytes when encoded as UTF-8.
*/
string memo = 6;
/**
* The key used to delete the schedule from state
*/
Key adminKey = 7;
/**
* A list of "valid" signatures for this schedule.<br/>
* This list contains only "primitive" (i.e. cryptographic or contract)
* signatures. The full signature requirements for the scheduled
* transaction are evaluated as if this list of keys had signed the
* scheduled transaction directly.
* <p>
* This list SHALL contain every "primitive" key that has signed the
* original `createSchedule`, or any subsequent
* `signSchedule` transaction.<br/>
* This list MAY elide any signature not likely to be required by the
* scheduled transaction. Such requirement SHOULD be evaluated when the
* signature is presented (i.e. during evaluation of a `createSchedule` or
* `signSchedule` transaction).
*/
KeyList signers = 8;
/**
* An account identifier.
* <p>
* This SHALL identify the account that created this schedule.
*/
AccountID creatorAccountID = 9;
/**
* An account identifier.
* <p>
* The identified account SHALL pay the full transaction fee for the
* scheduled transaction _when it executes_.
*/
AccountID payerAccountID = 10;
/**
* A transaction identifier.
* <p>
* This SHALL be recorded as the transaction identifier for the
* _scheduled_ transaction, if (and when) it is executed.
*/
TransactionID scheduledTransactionID = 11;
/**
* The ledger ID of the network that generated this response.
* <p>
* This value SHALL identify the distributed ledger that responded to
* this query.
*/
bytes ledger_id = 12;
/**
* A flag indicating this schedule will execute when it expires.
* <p>
* If this field is set
* <ul>
* <li>This schedule SHALL be considered a "long-term" schedule.</li>
* <li>This schedule SHALL be evaluated when the network consensus time
* reaches the `expirationTime`, and if the signature requirements
* for the scheduled transaction are met at that time, the
* scheduled transaction SHALL be executed.</li>
* <li>This schedule SHALL NOT be executed before the network consensus
* time reaches the `expirationTime`.</li>
* </ul>
* If this field is not set
* <ul>
* <li>This schedule SHALL be considered a "short-term" schedule.</li>
* <li>This schedule SHALL be evaluated when created, and reevaluated
* with each `signSchedule` transaction, and if the signature
* requirements for the scheduled transaction are met at that time,
* the scheduled transaction SHALL be executed immediately.</li>
* <li>This schedule SHALL be executed as soon as the signature
* requirements are met, and MUST be executed before the network
* consensus time reaches the `expirationTime`, if at all.</li>
* </ul>
*/
bool wait_for_expiry = 13;
}
/**
* A response message for a `getScheduleInfo` query.
*/
message ScheduleGetInfoResponse {
/**
* The standard response information for queries.<br/>
* This includes the values requested in the `QueryHeader`
* (cost, state proof, both, or neither).
*/
ResponseHeader header = 1;
/**
* Detail information for a schedule.
* <p>
* This field SHALL contain all available schedule detail.
*/
ScheduleInfo scheduleInfo = 2;
}