@@ -10,6 +10,18 @@ pub struct Request {
10
10
pub fork_steps : :: prost:: alloc:: vec:: Vec < i32 > ,
11
11
#[ prost( string, tag="5" ) ]
12
12
pub irreversibility_condition : :: prost:: alloc:: string:: String ,
13
+ /// By default, the engine runs in developer mode, with richer and deeper output,
14
+ /// * support for multiple `output_modules`, of `store` and `map` kinds
15
+ /// * support for `initial_store_snapshot_for_modules`
16
+ /// * log outputs for output modules
17
+ ///
18
+ /// With `production_mode`, however, you trade off functionality for high speed, where it:
19
+ /// * restricts the possible requested `output_modules` to a single mapper module,
20
+ /// * turns off support for `initial_store_snapshot_for_modules`,
21
+ /// * still streams output linearly, with a cursor, but at higher speeds
22
+ /// * and purges log outputs from responses.
23
+ #[ prost( bool , tag="9" ) ]
24
+ pub production_mode : bool ,
13
25
#[ prost( message, optional, tag="6" ) ]
14
26
pub modules : :: core:: option:: Option < Modules > ,
15
27
#[ prost( string, repeated, tag="7" ) ]
@@ -19,13 +31,16 @@ pub struct Request {
19
31
}
20
32
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
21
33
pub struct Response {
22
- #[ prost( oneof="response::Message" , tags="1, 2, 3, 4" ) ]
34
+ #[ prost( oneof="response::Message" , tags="5, 1, 2, 3, 4" ) ]
23
35
pub message : :: core:: option:: Option < response:: Message > ,
24
36
}
25
37
/// Nested message and enum types in `Response`.
26
38
pub mod response {
27
39
#[ derive( Clone , PartialEq , :: prost:: Oneof ) ]
28
40
pub enum Message {
41
+ /// Always sent first
42
+ #[ prost( message, tag="5" ) ]
43
+ Session ( super :: SessionInit ) ,
29
44
/// Progress of data preparation, before sending in the stream of `data` events.
30
45
#[ prost( message, tag="1" ) ]
31
46
Progress ( super :: ModulesProgress ) ,
@@ -38,6 +53,11 @@ pub mod response {
38
53
}
39
54
}
40
55
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
56
+ pub struct SessionInit {
57
+ #[ prost( string, tag="1" ) ]
58
+ pub trace_id : :: prost:: alloc:: string:: String ,
59
+ }
60
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
41
61
pub struct InitialSnapshotComplete {
42
62
#[ prost( string, tag="1" ) ]
43
63
pub cursor : :: prost:: alloc:: string:: String ,
@@ -69,11 +89,13 @@ pub struct ModuleOutput {
69
89
#[ prost( string, tag="1" ) ]
70
90
pub name : :: prost:: alloc:: string:: String ,
71
91
#[ prost( string, repeated, tag="4" ) ]
72
- pub logs : :: prost:: alloc:: vec:: Vec < :: prost:: alloc:: string:: String > ,
92
+ pub debug_logs : :: prost:: alloc:: vec:: Vec < :: prost:: alloc:: string:: String > ,
73
93
/// LogsTruncated is a flag that tells you if you received all the logs or if they
74
94
/// were truncated because you logged too much (fixed limit currently is set to 128 KiB).
75
95
#[ prost( bool , tag="5" ) ]
76
- pub logs_truncated : bool ,
96
+ pub debug_logs_truncated : bool ,
97
+ #[ prost( bool , tag="6" ) ]
98
+ pub cached : bool ,
77
99
#[ prost( oneof="module_output::Data" , tags="2, 3" ) ]
78
100
pub data : :: core:: option:: Option < module_output:: Data > ,
79
101
}
@@ -83,10 +105,26 @@ pub mod module_output {
83
105
pub enum Data {
84
106
#[ prost( message, tag="2" ) ]
85
107
MapOutput ( :: prost_types:: Any ) ,
108
+ /// StoreDeltas are produced for store modules in development mode.
109
+ /// It is not possible to retrieve store models in production, with parallelization
110
+ /// enabled. If you need the deltas directly, write a pass through mapper module
111
+ /// that will get them down to you.
86
112
#[ prost( message, tag="3" ) ]
87
- StoreDeltas ( super :: StoreDeltas ) ,
113
+ DebugStoreDeltas ( super :: StoreDeltas ) ,
88
114
}
89
115
}
116
+ // think about:
117
+ // message ModuleOutput { ...
118
+ // ModuleOutputDebug debug_info = 6;
119
+ // ...}
120
+ //message ModuleOutputDebug {
121
+ // StoreDeltas store_deltas = 3;
122
+ // repeated string logs = 4;
123
+ // // LogsTruncated is a flag that tells you if you received all the logs or if they
124
+ // // were truncated because you logged too much (fixed limit currently is set to 128 KiB).
125
+ // bool logs_truncated = 5;
126
+ //}
127
+
90
128
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
91
129
pub struct ModulesProgress {
92
130
#[ prost( message, repeated, tag="1" ) ]
@@ -143,9 +181,9 @@ pub mod module_progress {
143
181
}
144
182
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
145
183
pub struct BlockRange {
146
- #[ prost( uint64, tag="1" ) ]
147
- pub start_block : u64 ,
148
184
#[ prost( uint64, tag="2" ) ]
185
+ pub start_block : u64 ,
186
+ #[ prost( uint64, tag="3" ) ]
149
187
pub end_block : u64 ,
150
188
}
151
189
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -258,6 +296,8 @@ pub mod module {
258
296
Min = 4 ,
259
297
/// Provides a store where you can `max_*()` keys, where two stores merge by leaving the maximum value.
260
298
Max = 5 ,
299
+ /// Provides a store where you can `append()` keys, where two stores merge by concatenating the bytes in order.
300
+ Append = 6 ,
261
301
}
262
302
}
263
303
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -320,15 +360,6 @@ pub mod module {
320
360
}
321
361
}
322
362
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
323
- pub struct Clock {
324
- #[ prost( string, tag="1" ) ]
325
- pub id : :: prost:: alloc:: string:: String ,
326
- #[ prost( uint64, tag="2" ) ]
327
- pub number : u64 ,
328
- #[ prost( message, optional, tag="3" ) ]
329
- pub timestamp : :: core:: option:: Option < :: prost_types:: Timestamp > ,
330
- }
331
- #[ derive( Clone , PartialEq , :: prost:: Message ) ]
332
363
pub struct Package {
333
364
/// Needs to be one so this file can be used _directly_ as a
334
365
/// buf `Image` andor a ProtoSet for grpcurl and other tools
@@ -362,6 +393,15 @@ pub struct ModuleMetadata {
362
393
#[ prost( string, tag="2" ) ]
363
394
pub doc : :: prost:: alloc:: string:: String ,
364
395
}
396
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
397
+ pub struct Clock {
398
+ #[ prost( string, tag="1" ) ]
399
+ pub id : :: prost:: alloc:: string:: String ,
400
+ #[ prost( uint64, tag="2" ) ]
401
+ pub number : u64 ,
402
+ #[ prost( message, optional, tag="3" ) ]
403
+ pub timestamp : :: core:: option:: Option < :: prost_types:: Timestamp > ,
404
+ }
365
405
#[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , PartialOrd , Ord , :: prost:: Enumeration ) ]
366
406
#[ repr( i32 ) ]
367
407
pub enum ForkStep {
0 commit comments