Line data Source code
1 : /* Automatically generated nanopb header */
2 : /* Generated by nanopb-0.4.8-dev */
3 :
4 : #ifndef PB_ORG_SOLANA_SEALEVEL_V1_VM_PB_H_INCLUDED
5 : #define PB_ORG_SOLANA_SEALEVEL_V1_VM_PB_H_INCLUDED
6 :
7 : #include "../../../nanopb/pb_firedancer.h"
8 : #include "invoke.pb.h"
9 : #include "context.pb.h"
10 : #include "metadata.pb.h"
11 :
12 : #if PB_PROTO_HEADER_VERSION != 40
13 : #error Regenerate this file with the current version of nanopb generator.
14 : #endif
15 :
16 : /* Enum definitions */
17 : /* We are only concerned with these error kinds as the syscall/VM fuzzers don't
18 : hit higher level error kinds (e.g., transaction errors) */
19 : typedef enum fd_exec_test_err_kind {
20 : FD_EXEC_TEST_ERR_KIND_UNSPECIFIED = 0,
21 : FD_EXEC_TEST_ERR_KIND_EBPF = 1,
22 : FD_EXEC_TEST_ERR_KIND_SYSCALL = 2,
23 : FD_EXEC_TEST_ERR_KIND_INSTRUCTION = 3
24 : } fd_exec_test_err_kind_t;
25 :
26 : /* Struct definitions */
27 : /* Describes an input data region. Agave's memory mapping sets up a series of
28 : memory mapped regions, which combine to make the input data region. */
29 : typedef struct fd_exec_test_input_data_region {
30 : /* Offset from the start of the input data segment (0x400000000) */
31 : uint64_t offset;
32 : /* Content of the memory region */
33 : pb_bytes_array_t *content;
34 : /* If the memory region is writable or not */
35 : bool is_writable;
36 : } fd_exec_test_input_data_region_t;
37 :
38 : typedef PB_BYTES_ARRAY_T(1400) fd_exec_test_syscall_invocation_function_name_t;
39 : /* A single invocation of a syscall */
40 : typedef struct fd_exec_test_syscall_invocation {
41 : /* The sBPF function name of the syscall */
42 : fd_exec_test_syscall_invocation_function_name_t function_name;
43 : /* The initial portion of the heap, for example to store syscall inputs */
44 : pb_bytes_array_t *heap_prefix;
45 : /* The initial portion of the stack, for example to store syscall inputs */
46 : pb_bytes_array_t *stack_prefix;
47 : } fd_exec_test_syscall_invocation_t;
48 :
49 : /* The effects of executing a SyscallContext. */
50 : typedef struct fd_exec_test_syscall_effects {
51 : /* EBPF error code, if the invocation was unsuccessful */
52 : int64_t error;
53 : /* Registers */
54 : uint64_t r0; /* Result of a successful execution */
55 : /* CU's remaining */
56 : uint64_t cu_avail;
57 : /* Memory regions */
58 : pb_bytes_array_t *heap;
59 : pb_bytes_array_t *stack;
60 : pb_bytes_array_t *inputdata; /* deprecated, use input_data_regions */
61 : /* Current number of stack frames pushed */
62 : uint64_t frame_count;
63 : /* Syscall log */
64 : pb_bytes_array_t *log;
65 : pb_bytes_array_t *rodata;
66 : /* VM state */
67 : uint64_t pc;
68 : pb_size_t input_data_regions_count;
69 : struct fd_exec_test_input_data_region *input_data_regions;
70 : /* Error Kind (should be used along with error code) */
71 : fd_exec_test_err_kind_t error_kind;
72 : } fd_exec_test_syscall_effects_t;
73 :
74 : /* Effects of fd_vm_validate */
75 : typedef struct fd_exec_test_validate_vm_effects {
76 : int32_t result;
77 : /* if result is 0 (success), protobuf will be empty!! */
78 : bool success;
79 : } fd_exec_test_validate_vm_effects_t;
80 :
81 : typedef struct fd_exec_test_return_data {
82 : pb_bytes_array_t *program_id;
83 : pb_bytes_array_t *data;
84 : } fd_exec_test_return_data_t;
85 :
86 : /* Information sufficient to allow the fuzzer to generate a fd_vm_t context for
87 : execution inside the VM (excluding the instruction context).
88 :
89 : TODO: this currently only includes fields necessary for executing syscalls,
90 : executing sBPF code will require the rest of the fields in fd_vm_t to be set. */
91 : typedef struct fd_exec_test_vm_context {
92 : /* Maximum heap size in bytes */
93 : uint64_t heap_max;
94 : /* Program read-only data */
95 : pb_bytes_array_t *rodata;
96 : /* Offset of the text section from the start of the program rodata segment
97 : (0x100000000) */
98 : uint64_t rodata_text_section_offset;
99 : /* Length of the text section in the program rodata region, in bytes. */
100 : uint64_t rodata_text_section_length;
101 : /* The input data regions */
102 : pb_size_t input_data_regions_count;
103 : struct fd_exec_test_input_data_region *input_data_regions;
104 : /* Registers */
105 : uint64_t r0;
106 : uint64_t r1;
107 : uint64_t r2;
108 : uint64_t r3;
109 : uint64_t r4;
110 : uint64_t r5;
111 : uint64_t r6;
112 : uint64_t r7;
113 : uint64_t r8;
114 : uint64_t r9;
115 : uint64_t r10;
116 : uint64_t r11;
117 : bool check_align;
118 : bool check_size;
119 : /* for vm execution */
120 : uint64_t entry_pc;
121 : /* Bitset of valid call destinations (in terms of pc).
122 : This model is used by the Firedancer VM for CALL_IMMs */
123 : pb_bytes_array_t *call_whitelist;
124 : bool tracing_enabled;
125 : bool has_return_data;
126 : fd_exec_test_return_data_t return_data;
127 : } fd_exec_test_vm_context_t;
128 :
129 : /* Execution context for a VM Syscall execution. */
130 : typedef struct fd_exec_test_syscall_context {
131 : bool has_vm_ctx;
132 : fd_exec_test_vm_context_t vm_ctx;
133 : /* InflightInstruction - contain temporary fields that live for the duration of an instructions execution, and is needed if we have overhanging context from a previous instruction */
134 : bool has_instr_ctx;
135 : fd_exec_test_instr_context_t instr_ctx;
136 : bool has_syscall_invocation;
137 : fd_exec_test_syscall_invocation_t syscall_invocation;
138 : /* For CPI, we want to control the effects of a program invocation */
139 : bool has_exec_effects;
140 : fd_exec_test_instr_effects_t exec_effects;
141 : } fd_exec_test_syscall_context_t;
142 :
143 : /* A syscall processing test fixture. */
144 : typedef struct fd_exec_test_syscall_fixture {
145 : bool has_metadata;
146 : fd_exec_test_fixture_metadata_t metadata;
147 : bool has_input;
148 : fd_exec_test_syscall_context_t input;
149 : bool has_output;
150 : fd_exec_test_syscall_effects_t output;
151 : } fd_exec_test_syscall_fixture_t;
152 :
153 : /* Everything needed to setup a fd_vm_t */
154 : typedef struct fd_exec_test_full_vm_context {
155 : bool has_vm_ctx;
156 : fd_exec_test_vm_context_t vm_ctx;
157 : /* InstrContext instr_ctx = 2; */
158 : bool has_features;
159 : fd_exec_test_feature_set_t features;
160 : } fd_exec_test_full_vm_context_t;
161 :
162 : /* Fixture for fd_vm_validate fuzz harness */
163 : typedef struct fd_exec_test_validate_vm_fixture {
164 : bool has_metadata;
165 : fd_exec_test_fixture_metadata_t metadata;
166 : bool has_input;
167 : fd_exec_test_full_vm_context_t input;
168 : bool has_output;
169 : fd_exec_test_validate_vm_effects_t output;
170 : } fd_exec_test_validate_vm_fixture_t;
171 :
172 :
173 : #ifdef __cplusplus
174 : extern "C" {
175 : #endif
176 :
177 : /* Helper constants for enums */
178 11217 : #define _FD_EXEC_TEST_ERR_KIND_MIN FD_EXEC_TEST_ERR_KIND_UNSPECIFIED
179 : #define _FD_EXEC_TEST_ERR_KIND_MAX FD_EXEC_TEST_ERR_KIND_INSTRUCTION
180 : #define _FD_EXEC_TEST_ERR_KIND_ARRAYSIZE ((fd_exec_test_err_kind_t)(FD_EXEC_TEST_ERR_KIND_INSTRUCTION+1))
181 :
182 :
183 :
184 :
185 :
186 : #define fd_exec_test_syscall_effects_t_error_kind_ENUMTYPE fd_exec_test_err_kind_t
187 :
188 :
189 :
190 :
191 :
192 :
193 :
194 : /* Initializer values for message structs */
195 : #define FD_EXEC_TEST_INPUT_DATA_REGION_INIT_DEFAULT {0, NULL, 0}
196 : #define FD_EXEC_TEST_VM_CONTEXT_INIT_DEFAULT {0, NULL, 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, false, FD_EXEC_TEST_RETURN_DATA_INIT_DEFAULT}
197 : #define FD_EXEC_TEST_SYSCALL_INVOCATION_INIT_DEFAULT {{0, {0}}, NULL, NULL}
198 : #define FD_EXEC_TEST_SYSCALL_CONTEXT_INIT_DEFAULT {false, FD_EXEC_TEST_VM_CONTEXT_INIT_DEFAULT, false, FD_EXEC_TEST_INSTR_CONTEXT_INIT_DEFAULT, false, FD_EXEC_TEST_SYSCALL_INVOCATION_INIT_DEFAULT, false, FD_EXEC_TEST_INSTR_EFFECTS_INIT_DEFAULT}
199 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_INIT_DEFAULT {0, 0, 0, NULL, NULL, NULL, 0, NULL, NULL, 0, 0, NULL, _FD_EXEC_TEST_ERR_KIND_MIN}
200 : #define FD_EXEC_TEST_SYSCALL_FIXTURE_INIT_DEFAULT {false, FD_EXEC_TEST_FIXTURE_METADATA_INIT_DEFAULT, false, FD_EXEC_TEST_SYSCALL_CONTEXT_INIT_DEFAULT, false, FD_EXEC_TEST_SYSCALL_EFFECTS_INIT_DEFAULT}
201 : #define FD_EXEC_TEST_FULL_VM_CONTEXT_INIT_DEFAULT {false, FD_EXEC_TEST_VM_CONTEXT_INIT_DEFAULT, false, FD_EXEC_TEST_FEATURE_SET_INIT_DEFAULT}
202 : #define FD_EXEC_TEST_VALIDATE_VM_EFFECTS_INIT_DEFAULT {0, 0}
203 : #define FD_EXEC_TEST_VALIDATE_VM_FIXTURE_INIT_DEFAULT {false, FD_EXEC_TEST_FIXTURE_METADATA_INIT_DEFAULT, false, FD_EXEC_TEST_FULL_VM_CONTEXT_INIT_DEFAULT, false, FD_EXEC_TEST_VALIDATE_VM_EFFECTS_INIT_DEFAULT}
204 : #define FD_EXEC_TEST_RETURN_DATA_INIT_DEFAULT {NULL, NULL}
205 : #define FD_EXEC_TEST_INPUT_DATA_REGION_INIT_ZERO {0, NULL, 0}
206 : #define FD_EXEC_TEST_VM_CONTEXT_INIT_ZERO {0, NULL, 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, false, FD_EXEC_TEST_RETURN_DATA_INIT_ZERO}
207 : #define FD_EXEC_TEST_SYSCALL_INVOCATION_INIT_ZERO {{0, {0}}, NULL, NULL}
208 : #define FD_EXEC_TEST_SYSCALL_CONTEXT_INIT_ZERO {false, FD_EXEC_TEST_VM_CONTEXT_INIT_ZERO, false, FD_EXEC_TEST_INSTR_CONTEXT_INIT_ZERO, false, FD_EXEC_TEST_SYSCALL_INVOCATION_INIT_ZERO, false, FD_EXEC_TEST_INSTR_EFFECTS_INIT_ZERO}
209 11217 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_INIT_ZERO {0, 0, 0, NULL, NULL, NULL, 0, NULL, NULL, 0, 0, NULL, _FD_EXEC_TEST_ERR_KIND_MIN}
210 : #define FD_EXEC_TEST_SYSCALL_FIXTURE_INIT_ZERO {false, FD_EXEC_TEST_FIXTURE_METADATA_INIT_ZERO, false, FD_EXEC_TEST_SYSCALL_CONTEXT_INIT_ZERO, false, FD_EXEC_TEST_SYSCALL_EFFECTS_INIT_ZERO}
211 : #define FD_EXEC_TEST_FULL_VM_CONTEXT_INIT_ZERO {false, FD_EXEC_TEST_VM_CONTEXT_INIT_ZERO, false, FD_EXEC_TEST_FEATURE_SET_INIT_ZERO}
212 : #define FD_EXEC_TEST_VALIDATE_VM_EFFECTS_INIT_ZERO {0, 0}
213 : #define FD_EXEC_TEST_VALIDATE_VM_FIXTURE_INIT_ZERO {false, FD_EXEC_TEST_FIXTURE_METADATA_INIT_ZERO, false, FD_EXEC_TEST_FULL_VM_CONTEXT_INIT_ZERO, false, FD_EXEC_TEST_VALIDATE_VM_EFFECTS_INIT_ZERO}
214 : #define FD_EXEC_TEST_RETURN_DATA_INIT_ZERO {NULL, NULL}
215 :
216 : /* Field tags (for use in manual encoding/decoding) */
217 : #define FD_EXEC_TEST_INPUT_DATA_REGION_OFFSET_TAG 1
218 : #define FD_EXEC_TEST_INPUT_DATA_REGION_CONTENT_TAG 2
219 : #define FD_EXEC_TEST_INPUT_DATA_REGION_IS_WRITABLE_TAG 3
220 : #define FD_EXEC_TEST_SYSCALL_INVOCATION_FUNCTION_NAME_TAG 1
221 : #define FD_EXEC_TEST_SYSCALL_INVOCATION_HEAP_PREFIX_TAG 2
222 : #define FD_EXEC_TEST_SYSCALL_INVOCATION_STACK_PREFIX_TAG 3
223 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_ERROR_TAG 1
224 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_R0_TAG 2
225 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_CU_AVAIL_TAG 3
226 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_HEAP_TAG 4
227 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_STACK_TAG 5
228 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_INPUTDATA_TAG 6
229 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_FRAME_COUNT_TAG 7
230 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_LOG_TAG 8
231 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_RODATA_TAG 9
232 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_PC_TAG 10
233 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_INPUT_DATA_REGIONS_TAG 11
234 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_ERROR_KIND_TAG 12
235 : #define FD_EXEC_TEST_VALIDATE_VM_EFFECTS_RESULT_TAG 1
236 : #define FD_EXEC_TEST_VALIDATE_VM_EFFECTS_SUCCESS_TAG 2
237 : #define FD_EXEC_TEST_RETURN_DATA_PROGRAM_ID_TAG 1
238 : #define FD_EXEC_TEST_RETURN_DATA_DATA_TAG 2
239 : #define FD_EXEC_TEST_VM_CONTEXT_HEAP_MAX_TAG 1
240 : #define FD_EXEC_TEST_VM_CONTEXT_RODATA_TAG 2
241 : #define FD_EXEC_TEST_VM_CONTEXT_RODATA_TEXT_SECTION_OFFSET_TAG 3
242 : #define FD_EXEC_TEST_VM_CONTEXT_RODATA_TEXT_SECTION_LENGTH_TAG 4
243 : #define FD_EXEC_TEST_VM_CONTEXT_INPUT_DATA_REGIONS_TAG 5
244 : #define FD_EXEC_TEST_VM_CONTEXT_R0_TAG 6
245 : #define FD_EXEC_TEST_VM_CONTEXT_R1_TAG 7
246 : #define FD_EXEC_TEST_VM_CONTEXT_R2_TAG 8
247 : #define FD_EXEC_TEST_VM_CONTEXT_R3_TAG 9
248 : #define FD_EXEC_TEST_VM_CONTEXT_R4_TAG 10
249 : #define FD_EXEC_TEST_VM_CONTEXT_R5_TAG 11
250 : #define FD_EXEC_TEST_VM_CONTEXT_R6_TAG 12
251 : #define FD_EXEC_TEST_VM_CONTEXT_R7_TAG 13
252 : #define FD_EXEC_TEST_VM_CONTEXT_R8_TAG 14
253 : #define FD_EXEC_TEST_VM_CONTEXT_R9_TAG 15
254 : #define FD_EXEC_TEST_VM_CONTEXT_R10_TAG 16
255 : #define FD_EXEC_TEST_VM_CONTEXT_R11_TAG 17
256 : #define FD_EXEC_TEST_VM_CONTEXT_CHECK_ALIGN_TAG 18
257 : #define FD_EXEC_TEST_VM_CONTEXT_CHECK_SIZE_TAG 19
258 : #define FD_EXEC_TEST_VM_CONTEXT_ENTRY_PC_TAG 20
259 : #define FD_EXEC_TEST_VM_CONTEXT_CALL_WHITELIST_TAG 21
260 : #define FD_EXEC_TEST_VM_CONTEXT_TRACING_ENABLED_TAG 22
261 : #define FD_EXEC_TEST_VM_CONTEXT_RETURN_DATA_TAG 23
262 : #define FD_EXEC_TEST_SYSCALL_CONTEXT_VM_CTX_TAG 1
263 : #define FD_EXEC_TEST_SYSCALL_CONTEXT_INSTR_CTX_TAG 2
264 : #define FD_EXEC_TEST_SYSCALL_CONTEXT_SYSCALL_INVOCATION_TAG 3
265 : #define FD_EXEC_TEST_SYSCALL_CONTEXT_EXEC_EFFECTS_TAG 4
266 : #define FD_EXEC_TEST_SYSCALL_FIXTURE_METADATA_TAG 1
267 : #define FD_EXEC_TEST_SYSCALL_FIXTURE_INPUT_TAG 2
268 : #define FD_EXEC_TEST_SYSCALL_FIXTURE_OUTPUT_TAG 3
269 : #define FD_EXEC_TEST_FULL_VM_CONTEXT_VM_CTX_TAG 1
270 : #define FD_EXEC_TEST_FULL_VM_CONTEXT_FEATURES_TAG 3
271 : #define FD_EXEC_TEST_VALIDATE_VM_FIXTURE_METADATA_TAG 1
272 : #define FD_EXEC_TEST_VALIDATE_VM_FIXTURE_INPUT_TAG 2
273 : #define FD_EXEC_TEST_VALIDATE_VM_FIXTURE_OUTPUT_TAG 3
274 :
275 : /* Struct field encoding specification for nanopb */
276 : #define FD_EXEC_TEST_INPUT_DATA_REGION_FIELDLIST(X, a) \
277 : X(a, STATIC, SINGULAR, UINT64, offset, 1) \
278 : X(a, POINTER, SINGULAR, BYTES, content, 2) \
279 : X(a, STATIC, SINGULAR, BOOL, is_writable, 3)
280 : #define FD_EXEC_TEST_INPUT_DATA_REGION_CALLBACK NULL
281 : #define FD_EXEC_TEST_INPUT_DATA_REGION_DEFAULT NULL
282 :
283 : #define FD_EXEC_TEST_VM_CONTEXT_FIELDLIST(X, a) \
284 : X(a, STATIC, SINGULAR, UINT64, heap_max, 1) \
285 : X(a, POINTER, SINGULAR, BYTES, rodata, 2) \
286 : X(a, STATIC, SINGULAR, UINT64, rodata_text_section_offset, 3) \
287 : X(a, STATIC, SINGULAR, UINT64, rodata_text_section_length, 4) \
288 : X(a, POINTER, REPEATED, MESSAGE, input_data_regions, 5) \
289 : X(a, STATIC, SINGULAR, UINT64, r0, 6) \
290 : X(a, STATIC, SINGULAR, UINT64, r1, 7) \
291 : X(a, STATIC, SINGULAR, UINT64, r2, 8) \
292 : X(a, STATIC, SINGULAR, UINT64, r3, 9) \
293 : X(a, STATIC, SINGULAR, UINT64, r4, 10) \
294 : X(a, STATIC, SINGULAR, UINT64, r5, 11) \
295 : X(a, STATIC, SINGULAR, UINT64, r6, 12) \
296 : X(a, STATIC, SINGULAR, UINT64, r7, 13) \
297 : X(a, STATIC, SINGULAR, UINT64, r8, 14) \
298 : X(a, STATIC, SINGULAR, UINT64, r9, 15) \
299 : X(a, STATIC, SINGULAR, UINT64, r10, 16) \
300 : X(a, STATIC, SINGULAR, UINT64, r11, 17) \
301 : X(a, STATIC, SINGULAR, BOOL, check_align, 18) \
302 : X(a, STATIC, SINGULAR, BOOL, check_size, 19) \
303 : X(a, STATIC, SINGULAR, UINT64, entry_pc, 20) \
304 : X(a, POINTER, SINGULAR, BYTES, call_whitelist, 21) \
305 : X(a, STATIC, SINGULAR, BOOL, tracing_enabled, 22) \
306 : X(a, STATIC, OPTIONAL, MESSAGE, return_data, 23)
307 : #define FD_EXEC_TEST_VM_CONTEXT_CALLBACK NULL
308 : #define FD_EXEC_TEST_VM_CONTEXT_DEFAULT NULL
309 : #define fd_exec_test_vm_context_t_input_data_regions_MSGTYPE fd_exec_test_input_data_region_t
310 : #define fd_exec_test_vm_context_t_return_data_MSGTYPE fd_exec_test_return_data_t
311 :
312 : #define FD_EXEC_TEST_SYSCALL_INVOCATION_FIELDLIST(X, a) \
313 : X(a, STATIC, SINGULAR, BYTES, function_name, 1) \
314 : X(a, POINTER, SINGULAR, BYTES, heap_prefix, 2) \
315 : X(a, POINTER, SINGULAR, BYTES, stack_prefix, 3)
316 : #define FD_EXEC_TEST_SYSCALL_INVOCATION_CALLBACK NULL
317 : #define FD_EXEC_TEST_SYSCALL_INVOCATION_DEFAULT NULL
318 :
319 : #define FD_EXEC_TEST_SYSCALL_CONTEXT_FIELDLIST(X, a) \
320 : X(a, STATIC, OPTIONAL, MESSAGE, vm_ctx, 1) \
321 : X(a, STATIC, OPTIONAL, MESSAGE, instr_ctx, 2) \
322 : X(a, STATIC, OPTIONAL, MESSAGE, syscall_invocation, 3) \
323 : X(a, STATIC, OPTIONAL, MESSAGE, exec_effects, 4)
324 : #define FD_EXEC_TEST_SYSCALL_CONTEXT_CALLBACK NULL
325 : #define FD_EXEC_TEST_SYSCALL_CONTEXT_DEFAULT NULL
326 : #define fd_exec_test_syscall_context_t_vm_ctx_MSGTYPE fd_exec_test_vm_context_t
327 : #define fd_exec_test_syscall_context_t_instr_ctx_MSGTYPE fd_exec_test_instr_context_t
328 : #define fd_exec_test_syscall_context_t_syscall_invocation_MSGTYPE fd_exec_test_syscall_invocation_t
329 : #define fd_exec_test_syscall_context_t_exec_effects_MSGTYPE fd_exec_test_instr_effects_t
330 :
331 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_FIELDLIST(X, a) \
332 : X(a, STATIC, SINGULAR, INT64, error, 1) \
333 : X(a, STATIC, SINGULAR, UINT64, r0, 2) \
334 : X(a, STATIC, SINGULAR, UINT64, cu_avail, 3) \
335 : X(a, POINTER, SINGULAR, BYTES, heap, 4) \
336 : X(a, POINTER, SINGULAR, BYTES, stack, 5) \
337 : X(a, POINTER, SINGULAR, BYTES, inputdata, 6) \
338 : X(a, STATIC, SINGULAR, UINT64, frame_count, 7) \
339 : X(a, POINTER, SINGULAR, BYTES, log, 8) \
340 : X(a, POINTER, SINGULAR, BYTES, rodata, 9) \
341 : X(a, STATIC, SINGULAR, UINT64, pc, 10) \
342 : X(a, POINTER, REPEATED, MESSAGE, input_data_regions, 11) \
343 : X(a, STATIC, SINGULAR, UENUM, error_kind, 12)
344 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_CALLBACK NULL
345 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_DEFAULT NULL
346 : #define fd_exec_test_syscall_effects_t_input_data_regions_MSGTYPE fd_exec_test_input_data_region_t
347 :
348 : #define FD_EXEC_TEST_SYSCALL_FIXTURE_FIELDLIST(X, a) \
349 : X(a, STATIC, OPTIONAL, MESSAGE, metadata, 1) \
350 : X(a, STATIC, OPTIONAL, MESSAGE, input, 2) \
351 : X(a, STATIC, OPTIONAL, MESSAGE, output, 3)
352 : #define FD_EXEC_TEST_SYSCALL_FIXTURE_CALLBACK NULL
353 : #define FD_EXEC_TEST_SYSCALL_FIXTURE_DEFAULT NULL
354 : #define fd_exec_test_syscall_fixture_t_metadata_MSGTYPE fd_exec_test_fixture_metadata_t
355 : #define fd_exec_test_syscall_fixture_t_input_MSGTYPE fd_exec_test_syscall_context_t
356 : #define fd_exec_test_syscall_fixture_t_output_MSGTYPE fd_exec_test_syscall_effects_t
357 :
358 : #define FD_EXEC_TEST_FULL_VM_CONTEXT_FIELDLIST(X, a) \
359 : X(a, STATIC, OPTIONAL, MESSAGE, vm_ctx, 1) \
360 : X(a, STATIC, OPTIONAL, MESSAGE, features, 3)
361 : #define FD_EXEC_TEST_FULL_VM_CONTEXT_CALLBACK NULL
362 : #define FD_EXEC_TEST_FULL_VM_CONTEXT_DEFAULT NULL
363 : #define fd_exec_test_full_vm_context_t_vm_ctx_MSGTYPE fd_exec_test_vm_context_t
364 : #define fd_exec_test_full_vm_context_t_features_MSGTYPE fd_exec_test_feature_set_t
365 :
366 : #define FD_EXEC_TEST_VALIDATE_VM_EFFECTS_FIELDLIST(X, a) \
367 : X(a, STATIC, SINGULAR, INT32, result, 1) \
368 : X(a, STATIC, SINGULAR, BOOL, success, 2)
369 : #define FD_EXEC_TEST_VALIDATE_VM_EFFECTS_CALLBACK NULL
370 : #define FD_EXEC_TEST_VALIDATE_VM_EFFECTS_DEFAULT NULL
371 :
372 : #define FD_EXEC_TEST_VALIDATE_VM_FIXTURE_FIELDLIST(X, a) \
373 : X(a, STATIC, OPTIONAL, MESSAGE, metadata, 1) \
374 : X(a, STATIC, OPTIONAL, MESSAGE, input, 2) \
375 : X(a, STATIC, OPTIONAL, MESSAGE, output, 3)
376 : #define FD_EXEC_TEST_VALIDATE_VM_FIXTURE_CALLBACK NULL
377 : #define FD_EXEC_TEST_VALIDATE_VM_FIXTURE_DEFAULT NULL
378 : #define fd_exec_test_validate_vm_fixture_t_metadata_MSGTYPE fd_exec_test_fixture_metadata_t
379 : #define fd_exec_test_validate_vm_fixture_t_input_MSGTYPE fd_exec_test_full_vm_context_t
380 : #define fd_exec_test_validate_vm_fixture_t_output_MSGTYPE fd_exec_test_validate_vm_effects_t
381 :
382 : #define FD_EXEC_TEST_RETURN_DATA_FIELDLIST(X, a) \
383 : X(a, POINTER, SINGULAR, BYTES, program_id, 1) \
384 : X(a, POINTER, SINGULAR, BYTES, data, 2)
385 : #define FD_EXEC_TEST_RETURN_DATA_CALLBACK NULL
386 : #define FD_EXEC_TEST_RETURN_DATA_DEFAULT NULL
387 :
388 : extern const pb_msgdesc_t fd_exec_test_input_data_region_t_msg;
389 : extern const pb_msgdesc_t fd_exec_test_vm_context_t_msg;
390 : extern const pb_msgdesc_t fd_exec_test_syscall_invocation_t_msg;
391 : extern const pb_msgdesc_t fd_exec_test_syscall_context_t_msg;
392 : extern const pb_msgdesc_t fd_exec_test_syscall_effects_t_msg;
393 : extern const pb_msgdesc_t fd_exec_test_syscall_fixture_t_msg;
394 : extern const pb_msgdesc_t fd_exec_test_full_vm_context_t_msg;
395 : extern const pb_msgdesc_t fd_exec_test_validate_vm_effects_t_msg;
396 : extern const pb_msgdesc_t fd_exec_test_validate_vm_fixture_t_msg;
397 : extern const pb_msgdesc_t fd_exec_test_return_data_t_msg;
398 :
399 : /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
400 : #define FD_EXEC_TEST_INPUT_DATA_REGION_FIELDS &fd_exec_test_input_data_region_t_msg
401 : #define FD_EXEC_TEST_VM_CONTEXT_FIELDS &fd_exec_test_vm_context_t_msg
402 : #define FD_EXEC_TEST_SYSCALL_INVOCATION_FIELDS &fd_exec_test_syscall_invocation_t_msg
403 : #define FD_EXEC_TEST_SYSCALL_CONTEXT_FIELDS &fd_exec_test_syscall_context_t_msg
404 : #define FD_EXEC_TEST_SYSCALL_EFFECTS_FIELDS &fd_exec_test_syscall_effects_t_msg
405 : #define FD_EXEC_TEST_SYSCALL_FIXTURE_FIELDS &fd_exec_test_syscall_fixture_t_msg
406 : #define FD_EXEC_TEST_FULL_VM_CONTEXT_FIELDS &fd_exec_test_full_vm_context_t_msg
407 : #define FD_EXEC_TEST_VALIDATE_VM_EFFECTS_FIELDS &fd_exec_test_validate_vm_effects_t_msg
408 : #define FD_EXEC_TEST_VALIDATE_VM_FIXTURE_FIELDS &fd_exec_test_validate_vm_fixture_t_msg
409 : #define FD_EXEC_TEST_RETURN_DATA_FIELDS &fd_exec_test_return_data_t_msg
410 :
411 : /* Maximum encoded size of messages (where known) */
412 : /* fd_exec_test_InputDataRegion_size depends on runtime parameters */
413 : /* fd_exec_test_VmContext_size depends on runtime parameters */
414 : /* fd_exec_test_SyscallInvocation_size depends on runtime parameters */
415 : /* fd_exec_test_SyscallContext_size depends on runtime parameters */
416 : /* fd_exec_test_SyscallEffects_size depends on runtime parameters */
417 : /* fd_exec_test_SyscallFixture_size depends on runtime parameters */
418 : /* fd_exec_test_FullVmContext_size depends on runtime parameters */
419 : /* fd_exec_test_ValidateVmFixture_size depends on runtime parameters */
420 : /* fd_exec_test_ReturnData_size depends on runtime parameters */
421 : #define FD_EXEC_TEST_VALIDATE_VM_EFFECTS_SIZE 13
422 : #define ORG_SOLANA_SEALEVEL_V1_VM_PB_H_MAX_SIZE FD_EXEC_TEST_VALIDATE_VM_EFFECTS_SIZE
423 :
424 : /* Mapping from canonical names (mangle_names or overridden package name) */
425 : #define org_solana_sealevel_v1_ErrKind fd_exec_test_ErrKind
426 : #define org_solana_sealevel_v1_InputDataRegion fd_exec_test_InputDataRegion
427 : #define org_solana_sealevel_v1_VmContext fd_exec_test_VmContext
428 : #define org_solana_sealevel_v1_SyscallInvocation fd_exec_test_SyscallInvocation
429 : #define org_solana_sealevel_v1_SyscallContext fd_exec_test_SyscallContext
430 : #define org_solana_sealevel_v1_SyscallEffects fd_exec_test_SyscallEffects
431 : #define org_solana_sealevel_v1_SyscallFixture fd_exec_test_SyscallFixture
432 : #define org_solana_sealevel_v1_FullVmContext fd_exec_test_FullVmContext
433 : #define org_solana_sealevel_v1_ValidateVmEffects fd_exec_test_ValidateVmEffects
434 : #define org_solana_sealevel_v1_ValidateVmFixture fd_exec_test_ValidateVmFixture
435 : #define org_solana_sealevel_v1_ReturnData fd_exec_test_ReturnData
436 : #define _ORG_SOLANA_SEALEVEL_V1_ERR_KIND_MIN _FD_EXEC_TEST_ERR_KIND_MIN
437 : #define _ORG_SOLANA_SEALEVEL_V1_ERR_KIND_MAX _FD_EXEC_TEST_ERR_KIND_MAX
438 : #define _ORG_SOLANA_SEALEVEL_V1_ERR_KIND_ARRAYSIZE _FD_EXEC_TEST_ERR_KIND_ARRAYSIZE
439 : #define ORG_SOLANA_SEALEVEL_V1_INPUT_DATA_REGION_INIT_DEFAULT FD_EXEC_TEST_INPUT_DATA_REGION_INIT_DEFAULT
440 : #define ORG_SOLANA_SEALEVEL_V1_VM_CONTEXT_INIT_DEFAULT FD_EXEC_TEST_VM_CONTEXT_INIT_DEFAULT
441 : #define ORG_SOLANA_SEALEVEL_V1_SYSCALL_INVOCATION_INIT_DEFAULT FD_EXEC_TEST_SYSCALL_INVOCATION_INIT_DEFAULT
442 : #define ORG_SOLANA_SEALEVEL_V1_SYSCALL_CONTEXT_INIT_DEFAULT FD_EXEC_TEST_SYSCALL_CONTEXT_INIT_DEFAULT
443 : #define ORG_SOLANA_SEALEVEL_V1_SYSCALL_EFFECTS_INIT_DEFAULT FD_EXEC_TEST_SYSCALL_EFFECTS_INIT_DEFAULT
444 : #define ORG_SOLANA_SEALEVEL_V1_SYSCALL_FIXTURE_INIT_DEFAULT FD_EXEC_TEST_SYSCALL_FIXTURE_INIT_DEFAULT
445 : #define ORG_SOLANA_SEALEVEL_V1_FULL_VM_CONTEXT_INIT_DEFAULT FD_EXEC_TEST_FULL_VM_CONTEXT_INIT_DEFAULT
446 : #define ORG_SOLANA_SEALEVEL_V1_VALIDATE_VM_EFFECTS_INIT_DEFAULT FD_EXEC_TEST_VALIDATE_VM_EFFECTS_INIT_DEFAULT
447 : #define ORG_SOLANA_SEALEVEL_V1_VALIDATE_VM_FIXTURE_INIT_DEFAULT FD_EXEC_TEST_VALIDATE_VM_FIXTURE_INIT_DEFAULT
448 : #define ORG_SOLANA_SEALEVEL_V1_RETURN_DATA_INIT_DEFAULT FD_EXEC_TEST_RETURN_DATA_INIT_DEFAULT
449 : #define ORG_SOLANA_SEALEVEL_V1_INPUT_DATA_REGION_INIT_ZERO FD_EXEC_TEST_INPUT_DATA_REGION_INIT_ZERO
450 : #define ORG_SOLANA_SEALEVEL_V1_VM_CONTEXT_INIT_ZERO FD_EXEC_TEST_VM_CONTEXT_INIT_ZERO
451 : #define ORG_SOLANA_SEALEVEL_V1_SYSCALL_INVOCATION_INIT_ZERO FD_EXEC_TEST_SYSCALL_INVOCATION_INIT_ZERO
452 : #define ORG_SOLANA_SEALEVEL_V1_SYSCALL_CONTEXT_INIT_ZERO FD_EXEC_TEST_SYSCALL_CONTEXT_INIT_ZERO
453 : #define ORG_SOLANA_SEALEVEL_V1_SYSCALL_EFFECTS_INIT_ZERO FD_EXEC_TEST_SYSCALL_EFFECTS_INIT_ZERO
454 : #define ORG_SOLANA_SEALEVEL_V1_SYSCALL_FIXTURE_INIT_ZERO FD_EXEC_TEST_SYSCALL_FIXTURE_INIT_ZERO
455 : #define ORG_SOLANA_SEALEVEL_V1_FULL_VM_CONTEXT_INIT_ZERO FD_EXEC_TEST_FULL_VM_CONTEXT_INIT_ZERO
456 : #define ORG_SOLANA_SEALEVEL_V1_VALIDATE_VM_EFFECTS_INIT_ZERO FD_EXEC_TEST_VALIDATE_VM_EFFECTS_INIT_ZERO
457 : #define ORG_SOLANA_SEALEVEL_V1_VALIDATE_VM_FIXTURE_INIT_ZERO FD_EXEC_TEST_VALIDATE_VM_FIXTURE_INIT_ZERO
458 : #define ORG_SOLANA_SEALEVEL_V1_RETURN_DATA_INIT_ZERO FD_EXEC_TEST_RETURN_DATA_INIT_ZERO
459 :
460 : #ifdef __cplusplus
461 : } /* extern "C" */
462 : #endif
463 :
464 : #endif
|