Line data Source code
1 : /* Automatically generated nanopb header */
2 : /* Generated by nanopb-0.4.9.1 */
3 :
4 : #ifndef PB_ORG_SOLANA_SEALEVEL_V1_COST_PB_H_INCLUDED
5 : #define PB_ORG_SOLANA_SEALEVEL_V1_COST_PB_H_INCLUDED
6 :
7 : #include "../../../../ballet/nanopb/pb_firedancer.h"
8 : #include "context.pb.h"
9 : #include "txn.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 : typedef enum fd_exec_test_txn_cost_mode {
18 : FD_EXEC_TEST_TXN_COST_MODE_ESTIMATE = 0,
19 : FD_EXEC_TEST_TXN_COST_MODE_ACTUAL = 1
20 : } fd_exec_test_txn_cost_mode_t;
21 :
22 : /* Struct definitions */
23 : typedef struct fd_exec_test_cost_context {
24 : bool has_tx;
25 : fd_exec_test_sanitized_transaction_t tx;
26 : bool has_features;
27 : fd_exec_test_feature_set_t features;
28 : fd_exec_test_txn_cost_mode_t mode;
29 : uint32_t actual_programs_execution_cost;
30 : uint32_t actual_loaded_accounts_data_size_bytes;
31 : } fd_exec_test_cost_context_t;
32 :
33 : typedef struct fd_exec_test_cost_result {
34 : bool has_cost;
35 : uint64_t signature_cost;
36 : uint64_t write_lock_cost;
37 : uint64_t data_bytes_cost;
38 : uint64_t programs_execution_cost;
39 : uint64_t loaded_accounts_data_size_cost;
40 : uint64_t allocated_accounts_data_size;
41 : uint64_t total_cost;
42 : } fd_exec_test_cost_result_t;
43 :
44 : typedef struct fd_exec_test_cost_fixture {
45 : bool has_metadata;
46 : fd_exec_test_fixture_metadata_t metadata;
47 : bool has_input;
48 : fd_exec_test_cost_context_t input;
49 : bool has_output;
50 : fd_exec_test_cost_result_t output;
51 : } fd_exec_test_cost_fixture_t;
52 :
53 :
54 : #ifdef __cplusplus
55 : extern "C" {
56 : #endif
57 :
58 : /* Helper constants for enums */
59 0 : #define _FD_EXEC_TEST_TXN_COST_MODE_MIN FD_EXEC_TEST_TXN_COST_MODE_ESTIMATE
60 : #define _FD_EXEC_TEST_TXN_COST_MODE_MAX FD_EXEC_TEST_TXN_COST_MODE_ACTUAL
61 : #define _FD_EXEC_TEST_TXN_COST_MODE_ARRAYSIZE ((fd_exec_test_txn_cost_mode_t)(FD_EXEC_TEST_TXN_COST_MODE_ACTUAL+1))
62 :
63 : #define fd_exec_test_cost_context_t_mode_ENUMTYPE fd_exec_test_txn_cost_mode_t
64 :
65 :
66 :
67 :
68 : /* Initializer values for message structs */
69 : #define FD_EXEC_TEST_COST_CONTEXT_INIT_DEFAULT {false, FD_EXEC_TEST_SANITIZED_TRANSACTION_INIT_DEFAULT, false, FD_EXEC_TEST_FEATURE_SET_INIT_DEFAULT, _FD_EXEC_TEST_TXN_COST_MODE_MIN, 0, 0}
70 : #define FD_EXEC_TEST_COST_RESULT_INIT_DEFAULT {0, 0, 0, 0, 0, 0, 0, 0}
71 : #define FD_EXEC_TEST_COST_FIXTURE_INIT_DEFAULT {false, FD_EXEC_TEST_FIXTURE_METADATA_INIT_DEFAULT, false, FD_EXEC_TEST_COST_CONTEXT_INIT_DEFAULT, false, FD_EXEC_TEST_COST_RESULT_INIT_DEFAULT}
72 0 : #define FD_EXEC_TEST_COST_CONTEXT_INIT_ZERO {false, FD_EXEC_TEST_SANITIZED_TRANSACTION_INIT_ZERO, false, FD_EXEC_TEST_FEATURE_SET_INIT_ZERO, _FD_EXEC_TEST_TXN_COST_MODE_MIN, 0, 0}
73 0 : #define FD_EXEC_TEST_COST_RESULT_INIT_ZERO {0, 0, 0, 0, 0, 0, 0, 0}
74 : #define FD_EXEC_TEST_COST_FIXTURE_INIT_ZERO {false, FD_EXEC_TEST_FIXTURE_METADATA_INIT_ZERO, false, FD_EXEC_TEST_COST_CONTEXT_INIT_ZERO, false, FD_EXEC_TEST_COST_RESULT_INIT_ZERO}
75 :
76 : /* Field tags (for use in manual encoding/decoding) */
77 : #define FD_EXEC_TEST_COST_CONTEXT_TX_TAG 1
78 : #define FD_EXEC_TEST_COST_CONTEXT_FEATURES_TAG 2
79 : #define FD_EXEC_TEST_COST_CONTEXT_MODE_TAG 3
80 : #define FD_EXEC_TEST_COST_CONTEXT_ACTUAL_PROGRAMS_EXECUTION_COST_TAG 4
81 : #define FD_EXEC_TEST_COST_CONTEXT_ACTUAL_LOADED_ACCOUNTS_DATA_SIZE_BYTES_TAG 5
82 : #define FD_EXEC_TEST_COST_RESULT_HAS_COST_TAG 1
83 : #define FD_EXEC_TEST_COST_RESULT_SIGNATURE_COST_TAG 2
84 : #define FD_EXEC_TEST_COST_RESULT_WRITE_LOCK_COST_TAG 3
85 : #define FD_EXEC_TEST_COST_RESULT_DATA_BYTES_COST_TAG 4
86 : #define FD_EXEC_TEST_COST_RESULT_PROGRAMS_EXECUTION_COST_TAG 5
87 : #define FD_EXEC_TEST_COST_RESULT_LOADED_ACCOUNTS_DATA_SIZE_COST_TAG 6
88 : #define FD_EXEC_TEST_COST_RESULT_ALLOCATED_ACCOUNTS_DATA_SIZE_TAG 7
89 : #define FD_EXEC_TEST_COST_RESULT_TOTAL_COST_TAG 8
90 : #define FD_EXEC_TEST_COST_FIXTURE_METADATA_TAG 1
91 : #define FD_EXEC_TEST_COST_FIXTURE_INPUT_TAG 2
92 : #define FD_EXEC_TEST_COST_FIXTURE_OUTPUT_TAG 3
93 :
94 : /* Struct field encoding specification for nanopb */
95 : #define FD_EXEC_TEST_COST_CONTEXT_FIELDLIST(X, a) \
96 : X(a, STATIC, OPTIONAL, MESSAGE, tx, 1) \
97 : X(a, STATIC, OPTIONAL, MESSAGE, features, 2) \
98 : X(a, STATIC, SINGULAR, UENUM, mode, 3) \
99 : X(a, STATIC, SINGULAR, UINT32, actual_programs_execution_cost, 4) \
100 : X(a, STATIC, SINGULAR, UINT32, actual_loaded_accounts_data_size_bytes, 5)
101 : #define FD_EXEC_TEST_COST_CONTEXT_CALLBACK NULL
102 : #define FD_EXEC_TEST_COST_CONTEXT_DEFAULT NULL
103 : #define fd_exec_test_cost_context_t_tx_MSGTYPE fd_exec_test_sanitized_transaction_t
104 : #define fd_exec_test_cost_context_t_features_MSGTYPE fd_exec_test_feature_set_t
105 :
106 : #define FD_EXEC_TEST_COST_RESULT_FIELDLIST(X, a) \
107 : X(a, STATIC, SINGULAR, BOOL, has_cost, 1) \
108 : X(a, STATIC, SINGULAR, UINT64, signature_cost, 2) \
109 : X(a, STATIC, SINGULAR, UINT64, write_lock_cost, 3) \
110 : X(a, STATIC, SINGULAR, UINT64, data_bytes_cost, 4) \
111 : X(a, STATIC, SINGULAR, UINT64, programs_execution_cost, 5) \
112 : X(a, STATIC, SINGULAR, UINT64, loaded_accounts_data_size_cost, 6) \
113 : X(a, STATIC, SINGULAR, UINT64, allocated_accounts_data_size, 7) \
114 : X(a, STATIC, SINGULAR, UINT64, total_cost, 8)
115 : #define FD_EXEC_TEST_COST_RESULT_CALLBACK NULL
116 : #define FD_EXEC_TEST_COST_RESULT_DEFAULT NULL
117 :
118 : #define FD_EXEC_TEST_COST_FIXTURE_FIELDLIST(X, a) \
119 : X(a, STATIC, OPTIONAL, MESSAGE, metadata, 1) \
120 : X(a, STATIC, OPTIONAL, MESSAGE, input, 2) \
121 : X(a, STATIC, OPTIONAL, MESSAGE, output, 3)
122 : #define FD_EXEC_TEST_COST_FIXTURE_CALLBACK NULL
123 : #define FD_EXEC_TEST_COST_FIXTURE_DEFAULT NULL
124 : #define fd_exec_test_cost_fixture_t_metadata_MSGTYPE fd_exec_test_fixture_metadata_t
125 : #define fd_exec_test_cost_fixture_t_input_MSGTYPE fd_exec_test_cost_context_t
126 : #define fd_exec_test_cost_fixture_t_output_MSGTYPE fd_exec_test_cost_result_t
127 :
128 : extern const pb_msgdesc_t fd_exec_test_cost_context_t_msg;
129 : extern const pb_msgdesc_t fd_exec_test_cost_result_t_msg;
130 : extern const pb_msgdesc_t fd_exec_test_cost_fixture_t_msg;
131 :
132 : /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
133 : #define FD_EXEC_TEST_COST_CONTEXT_FIELDS &fd_exec_test_cost_context_t_msg
134 : #define FD_EXEC_TEST_COST_RESULT_FIELDS &fd_exec_test_cost_result_t_msg
135 : #define FD_EXEC_TEST_COST_FIXTURE_FIELDS &fd_exec_test_cost_fixture_t_msg
136 :
137 : /* Maximum encoded size of messages (where known) */
138 : #if defined(fd_exec_test_SanitizedTransaction_size) && defined(fd_exec_test_FeatureSet_size)
139 : #define FD_EXEC_TEST_COST_CONTEXT_SIZE (26 + fd_exec_test_SanitizedTransaction_size + fd_exec_test_FeatureSet_size)
140 : #define FD_EXEC_TEST_COST_FIXTURE_SIZE (247 + fd_exec_test_SanitizedTransaction_size + fd_exec_test_FeatureSet_size)
141 : #define ORG_SOLANA_SEALEVEL_V1_COST_PB_H_MAX_SIZE FD_EXEC_TEST_COST_FIXTURE_SIZE
142 : #endif
143 : #define FD_EXEC_TEST_COST_RESULT_SIZE 79
144 :
145 : /* Mapping from canonical names (mangle_names or overridden package name) */
146 : #define org_solana_sealevel_v1_TxnCostMode fd_exec_test_TxnCostMode
147 : #define org_solana_sealevel_v1_CostContext fd_exec_test_CostContext
148 : #define org_solana_sealevel_v1_CostResult fd_exec_test_CostResult
149 : #define org_solana_sealevel_v1_CostFixture fd_exec_test_CostFixture
150 : #define _ORG_SOLANA_SEALEVEL_V1_TXN_COST_MODE_MIN _FD_EXEC_TEST_TXN_COST_MODE_MIN
151 : #define _ORG_SOLANA_SEALEVEL_V1_TXN_COST_MODE_MAX _FD_EXEC_TEST_TXN_COST_MODE_MAX
152 : #define _ORG_SOLANA_SEALEVEL_V1_TXN_COST_MODE_ARRAYSIZE _FD_EXEC_TEST_TXN_COST_MODE_ARRAYSIZE
153 : #define ORG_SOLANA_SEALEVEL_V1_COST_CONTEXT_INIT_DEFAULT FD_EXEC_TEST_COST_CONTEXT_INIT_DEFAULT
154 : #define ORG_SOLANA_SEALEVEL_V1_COST_RESULT_INIT_DEFAULT FD_EXEC_TEST_COST_RESULT_INIT_DEFAULT
155 : #define ORG_SOLANA_SEALEVEL_V1_COST_FIXTURE_INIT_DEFAULT FD_EXEC_TEST_COST_FIXTURE_INIT_DEFAULT
156 : #define ORG_SOLANA_SEALEVEL_V1_COST_CONTEXT_INIT_ZERO FD_EXEC_TEST_COST_CONTEXT_INIT_ZERO
157 : #define ORG_SOLANA_SEALEVEL_V1_COST_RESULT_INIT_ZERO FD_EXEC_TEST_COST_RESULT_INIT_ZERO
158 : #define ORG_SOLANA_SEALEVEL_V1_COST_FIXTURE_INIT_ZERO FD_EXEC_TEST_COST_FIXTURE_INIT_ZERO
159 :
160 : #ifdef __cplusplus
161 : } /* extern "C" */
162 : #endif
163 :
164 : #endif
|