/
state.metadata.v1.rs
347 lines (347 loc) · 15.1 KB
/
state.metadata.v1.rs
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Time {
#[prost(uint64, tag = "1")]
pub time_nanos: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeTopology {
#[prost(string, tag = "1")]
pub ip_address: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub http_port: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubnetTopologyEntry {
#[prost(message, optional, tag = "1")]
pub node_id: ::core::option::Option<super::super::super::types::v1::NodeId>,
#[prost(message, optional, tag = "2")]
pub node_topology: ::core::option::Option<NodeTopology>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubnetTopology {
#[prost(message, repeated, tag = "1")]
pub nodes: ::prost::alloc::vec::Vec<SubnetTopologyEntry>,
/// The public key of the subnet (a DER-encoded BLS key, see
/// <https://sdk.dfinity.org/docs/interface-spec/index.html#certification>)
#[prost(bytes = "vec", tag = "2")]
pub public_key: ::prost::alloc::vec::Vec<u8>,
#[prost(
enumeration = "super::super::super::registry::subnet::v1::SubnetType",
tag = "3"
)]
pub subnet_type: i32,
#[prost(message, optional, tag = "4")]
pub subnet_features:
::core::option::Option<super::super::super::registry::subnet::v1::SubnetFeatures>,
#[prost(message, repeated, tag = "5")]
pub ecdsa_keys_held:
::prost::alloc::vec::Vec<super::super::super::registry::crypto::v1::EcdsaKeyId>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubnetsEntry {
#[prost(message, optional, tag = "1")]
pub subnet_id: ::core::option::Option<super::super::super::types::v1::SubnetId>,
#[prost(message, optional, tag = "2")]
pub subnet_topology: ::core::option::Option<SubnetTopology>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EcdsaKeyEntry {
#[prost(message, optional, tag = "3")]
pub key_id: ::core::option::Option<super::super::super::registry::crypto::v1::EcdsaKeyId>,
#[prost(message, repeated, tag = "2")]
pub subnet_ids: ::prost::alloc::vec::Vec<super::super::super::types::v1::SubnetId>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkTopology {
#[prost(message, repeated, tag = "1")]
pub subnets: ::prost::alloc::vec::Vec<SubnetsEntry>,
#[prost(message, optional, tag = "2")]
pub routing_table:
::core::option::Option<super::super::super::registry::routing_table::v1::RoutingTable>,
#[prost(message, optional, tag = "3")]
pub nns_subnet_id: ::core::option::Option<super::super::super::types::v1::SubnetId>,
#[prost(message, optional, tag = "4")]
pub canister_migrations: ::core::option::Option<
super::super::super::registry::routing_table::v1::CanisterMigrations,
>,
#[prost(message, repeated, tag = "5")]
pub ecdsa_signing_subnets: ::prost::alloc::vec::Vec<EcdsaKeyEntry>,
#[prost(message, repeated, tag = "6")]
pub bitcoin_testnet_canister_ids:
::prost::alloc::vec::Vec<super::super::super::types::v1::CanisterId>,
#[prost(message, repeated, tag = "7")]
pub bitcoin_mainnet_canister_ids:
::prost::alloc::vec::Vec<super::super::super::types::v1::CanisterId>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetupInitialDkgContext {
#[prost(message, optional, tag = "1")]
pub request: ::core::option::Option<super::super::queues::v1::Request>,
#[prost(message, repeated, tag = "2")]
pub nodes_in_subnet: ::prost::alloc::vec::Vec<super::super::super::types::v1::NodeId>,
#[prost(bytes = "vec", tag = "4")]
pub target_id: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "5")]
pub registry_version: u64,
#[prost(message, optional, tag = "6")]
pub time: ::core::option::Option<Time>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetupInitialDkgContextTree {
#[prost(uint64, tag = "1")]
pub callback_id: u64,
#[prost(message, optional, tag = "2")]
pub context: ::core::option::Option<SetupInitialDkgContext>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignWithEcdsaContext {
#[prost(message, optional, tag = "1")]
pub request: ::core::option::Option<super::super::queues::v1::Request>,
#[prost(bytes = "vec", tag = "2")]
pub pseudo_random_id: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub message_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "5")]
pub batch_time: u64,
#[prost(bytes = "vec", repeated, tag = "6")]
pub derivation_path_vec: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(message, optional, tag = "7")]
pub key_id: ::core::option::Option<super::super::super::registry::crypto::v1::EcdsaKeyId>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignWithEcdsaContextTree {
#[prost(uint64, tag = "1")]
pub callback_id: u64,
#[prost(message, optional, tag = "2")]
pub context: ::core::option::Option<SignWithEcdsaContext>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpHeader {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CanisterHttpRequestContext {
#[prost(message, optional, tag = "1")]
pub request: ::core::option::Option<super::super::queues::v1::Request>,
#[prost(string, tag = "2")]
pub url: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub body: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
#[prost(message, optional, tag = "4")]
pub transform_method_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "HttpMethod", tag = "8")]
pub http_method: i32,
#[prost(uint64, tag = "6")]
pub time: u64,
#[prost(message, repeated, tag = "7")]
pub headers: ::prost::alloc::vec::Vec<HttpHeader>,
#[prost(uint64, optional, tag = "9")]
pub max_response_bytes: ::core::option::Option<u64>,
#[prost(message, optional, tag = "10")]
pub transform_context: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CanisterHttpRequestContextTree {
#[prost(uint64, tag = "1")]
pub callback_id: u64,
#[prost(message, optional, tag = "2")]
pub context: ::core::option::Option<CanisterHttpRequestContext>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EcdsaDealingsContext {
#[prost(message, optional, tag = "1")]
pub request: ::core::option::Option<super::super::queues::v1::Request>,
#[prost(message, repeated, tag = "3")]
pub nodes: ::prost::alloc::vec::Vec<super::super::super::types::v1::NodeId>,
#[prost(uint64, tag = "4")]
pub registry_version: u64,
#[prost(message, optional, tag = "5")]
pub key_id: ::core::option::Option<super::super::super::registry::crypto::v1::EcdsaKeyId>,
#[prost(message, optional, tag = "6")]
pub time: ::core::option::Option<Time>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EcdsaDealingsContextTree {
#[prost(uint64, tag = "1")]
pub callback_id: u64,
#[prost(message, optional, tag = "2")]
pub context: ::core::option::Option<EcdsaDealingsContext>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BitcoinGetSuccessorsContext {
#[prost(message, optional, tag = "1")]
pub request: ::core::option::Option<super::super::queues::v1::Request>,
#[prost(message, optional, tag = "2")]
pub payload: ::core::option::Option<
super::super::super::bitcoin::v1::CanisterGetSuccessorsRequestInitial,
>,
#[prost(message, optional, tag = "3")]
pub time: ::core::option::Option<Time>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BitcoinGetSuccessorsContextTree {
#[prost(uint64, tag = "1")]
pub callback_id: u64,
#[prost(message, optional, tag = "2")]
pub context: ::core::option::Option<BitcoinGetSuccessorsContext>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BitcoinSendTransactionInternalContext {
#[prost(message, optional, tag = "1")]
pub request: ::core::option::Option<super::super::queues::v1::Request>,
#[prost(message, optional, tag = "2")]
pub payload:
::core::option::Option<super::super::super::bitcoin::v1::CanisterSendTransactionRequest>,
#[prost(message, optional, tag = "3")]
pub time: ::core::option::Option<Time>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BitcoinSendTransactionInternalContextTree {
#[prost(uint64, tag = "1")]
pub callback_id: u64,
#[prost(message, optional, tag = "2")]
pub context: ::core::option::Option<BitcoinSendTransactionInternalContext>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubnetCallContextManager {
#[prost(uint64, tag = "1")]
pub next_callback_id: u64,
#[prost(message, repeated, tag = "3")]
pub setup_initial_dkg_contexts: ::prost::alloc::vec::Vec<SetupInitialDkgContextTree>,
#[prost(message, repeated, tag = "4")]
pub sign_with_ecdsa_contexts: ::prost::alloc::vec::Vec<SignWithEcdsaContextTree>,
#[prost(message, repeated, tag = "6")]
pub canister_http_request_contexts: ::prost::alloc::vec::Vec<CanisterHttpRequestContextTree>,
#[prost(message, repeated, tag = "7")]
pub ecdsa_dealings_contexts: ::prost::alloc::vec::Vec<EcdsaDealingsContextTree>,
#[prost(message, repeated, tag = "8")]
pub bitcoin_get_successors_contexts: ::prost::alloc::vec::Vec<BitcoinGetSuccessorsContextTree>,
#[prost(message, repeated, tag = "9")]
pub bitcoin_send_transaction_internal_contexts:
::prost::alloc::vec::Vec<BitcoinSendTransactionInternalContextTree>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubnetMetrics {
#[prost(message, optional, tag = "1")]
pub consumed_cycles_by_deleted_canisters:
::core::option::Option<super::super::super::types::v1::NominalCycles>,
#[prost(message, optional, tag = "2")]
pub consumed_cycles_http_outcalls:
::core::option::Option<super::super::super::types::v1::NominalCycles>,
#[prost(message, optional, tag = "3")]
pub consumed_cycles_ecdsa_outcalls:
::core::option::Option<super::super::super::types::v1::NominalCycles>,
#[prost(uint64, optional, tag = "4")]
pub ecdsa_signature_agreements: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BitcoinGetSuccessorsFollowUpResponses {
#[prost(message, optional, tag = "1")]
pub sender: ::core::option::Option<super::super::super::types::v1::CanisterId>,
#[prost(bytes = "vec", repeated, tag = "2")]
pub payloads: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SystemMetadata {
#[prost(message, optional, tag = "2")]
pub prev_state_hash: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
#[prost(uint64, tag = "3")]
pub batch_time_nanos: u64,
#[prost(message, optional, tag = "4")]
pub ingress_history: ::core::option::Option<super::super::ingress::v1::IngressHistoryState>,
#[prost(message, repeated, tag = "5")]
pub streams: ::prost::alloc::vec::Vec<super::super::queues::v1::StreamEntry>,
#[prost(message, optional, tag = "6")]
pub network_topology: ::core::option::Option<NetworkTopology>,
#[prost(message, optional, tag = "7")]
pub own_subnet_id: ::core::option::Option<super::super::super::types::v1::SubnetId>,
#[prost(message, optional, tag = "8")]
pub subnet_call_context_manager: ::core::option::Option<SubnetCallContextManager>,
/// Canister ID ranges allocated (exclusively) to this subnet, to generate
/// canister IDs from.
#[prost(message, optional, tag = "16")]
pub canister_allocation_ranges:
::core::option::Option<super::super::super::registry::routing_table::v1::CanisterIdRanges>,
/// The last generated canister ID; or `None` if no canister ID has yet been
/// generated by this subnet.
///
/// If present, must be within the first `CanisterIdRange` in
/// `canister_allocation_ranges` (and the latter may not be empty).
#[prost(message, optional, tag = "17")]
pub last_generated_canister_id:
::core::option::Option<super::super::super::types::v1::CanisterId>,
/// Version of the StateSync protocol that should be used to compute
/// checkpoint manifests and transmit state.
#[prost(uint32, tag = "9")]
pub state_sync_version: u32,
/// Version of the certification protocol that should be used to
/// certify this state.
#[prost(uint32, tag = "10")]
pub certification_version: u32,
#[prost(uint64, tag = "11")]
pub heap_delta_estimate: u64,
#[prost(message, optional, tag = "13")]
pub own_subnet_features:
::core::option::Option<super::super::super::registry::subnet::v1::SubnetFeatures>,
#[prost(message, optional, tag = "15")]
pub subnet_metrics: ::core::option::Option<SubnetMetrics>,
#[prost(message, repeated, tag = "18")]
pub bitcoin_get_successors_follow_up_responses:
::prost::alloc::vec::Vec<BitcoinGetSuccessorsFollowUpResponses>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StableMemory {
#[prost(bytes = "vec", tag = "1")]
pub memory: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HttpMethod {
Unspecified = 0,
Get = 1,
Post = 2,
Head = 3,
}
impl HttpMethod {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
HttpMethod::Unspecified => "HTTP_METHOD_UNSPECIFIED",
HttpMethod::Get => "HTTP_METHOD_GET",
HttpMethod::Post => "HTTP_METHOD_POST",
HttpMethod::Head => "HTTP_METHOD_HEAD",
}
}
}