Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
avm_inputs.test.cpp
Go to the documentation of this file.
1#include <gmock/gmock.h>
2#include <gtest/gtest.h>
3
5
6#include <cstdint>
7
11
12namespace bb::avm2 {
13namespace {
14
15using ::testing::SizeIs;
16
17TEST(AvmInputsTest, Deserialization)
18{
19 // cwd is expected to be barretenberg/cpp/build.
20 auto data = read_file("../src/barretenberg/vm2/testing/avm_inputs.testdata.bin");
21 // We only check that deserialization does not crash.
22 // Correctness of the deserialization itself is assumed via MessagePack.
23 // What we are testing here is that the structure of the inputs in TS matches the C++ structs
24 // that we have here. If someone changes the structure of the inputs in TS, this test would
25 // force them to update the C++ structs as well (and therefore any usage of these structs).
27}
28
29TEST(AvmInputsTest, FormatTransformations)
30{
31 using ::testing::AllOf;
32 using ::testing::ElementsAre;
33
34 PublicInputs pi = testing::get_minimal_trace_with_pi().second;
35 auto as_cols = pi.to_columns();
36 auto flattened = PublicInputs::columns_to_flat(as_cols);
37 auto unflattened = PublicInputs::flat_to_columns(flattened);
38
39 EXPECT_THAT(as_cols, SizeIs(AVM_NUM_PUBLIC_INPUT_COLUMNS));
40 for (size_t i = 0; i < AVM_NUM_PUBLIC_INPUT_COLUMNS; ++i) {
41 EXPECT_THAT(as_cols[i], SizeIs(AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH));
42 }
43 EXPECT_THAT(flattened, SizeIs(AVM_PUBLIC_INPUTS_COLUMNS_COMBINED_LENGTH));
44
45 EXPECT_EQ(as_cols, unflattened);
46}
47
48TEST(AvmInputsTest, ValuesInColumns)
49{
50 // Create a test PublicInputs with specific values in different parts of the struct
51 PublicInputs pi;
52
53 // Set global variables
54 pi.globalVariables.chainId = 123;
55 pi.globalVariables.version = 456;
56 pi.globalVariables.blockNumber = 12345;
57 pi.globalVariables.slotNumber = 67890;
58 pi.globalVariables.timestamp = 789000;
59 pi.globalVariables.coinbase = 123123;
60 pi.globalVariables.feeRecipient = 9876;
61
62 // Set gas fees
63 pi.globalVariables.gasFees.feePerDaGas = 111;
64 pi.globalVariables.gasFees.feePerL2Gas = 222;
65
66 // Set start tree snapshots
67 pi.startTreeSnapshots.l1ToL2MessageTree.root = 1000;
68 pi.startTreeSnapshots.l1ToL2MessageTree.nextAvailableLeafIndex = 2000;
69 pi.startTreeSnapshots.noteHashTree.root = 3000;
70 pi.startTreeSnapshots.noteHashTree.nextAvailableLeafIndex = 4000;
71 pi.startTreeSnapshots.nullifierTree.root = 5000;
72 pi.startTreeSnapshots.nullifierTree.nextAvailableLeafIndex = 6000;
73 pi.startTreeSnapshots.publicDataTree.root = 7000;
74 pi.startTreeSnapshots.publicDataTree.nextAvailableLeafIndex = 8000;
75
76 // Set gas used
77 pi.startGasUsed.daGas = 100;
78 pi.startGasUsed.l2Gas = 200;
79
80 // Set gas settings
81 pi.gasSettings.gasLimits.daGas = 1234;
82 pi.gasSettings.gasLimits.l2Gas = 5678;
83 pi.gasSettings.teardownGasLimits.daGas = 9012;
84 pi.gasSettings.teardownGasLimits.l2Gas = 3456;
85 pi.gasSettings.maxFeesPerGas.feePerDaGas = 7890;
86 pi.gasSettings.maxFeesPerGas.feePerL2Gas = 1234;
87 pi.gasSettings.maxPriorityFeesPerGas.feePerDaGas = 5678;
88 pi.gasSettings.maxPriorityFeesPerGas.feePerL2Gas = 9012;
89
90 // Set fee payer
91 pi.feePayer = 12345;
92
93 // Set Public Call Request Array Lengths
94 pi.publicCallRequestArrayLengths.setupCalls = 2;
95 pi.publicCallRequestArrayLengths.appLogicCalls = 3;
96 pi.publicCallRequestArrayLengths.teardownCall = true;
97
98 // Set call requests (using all 4 columns)
99 pi.publicSetupCallRequests[0].msgSender = 1111;
100 pi.publicSetupCallRequests[0].contractAddress = 2222;
101 pi.publicSetupCallRequests[0].isStaticCall = true;
102 pi.publicSetupCallRequests[0].calldataHash = 3333;
103
104 pi.publicAppLogicCallRequests[1].msgSender = 4444;
105 pi.publicAppLogicCallRequests[1].contractAddress = 5555;
106 pi.publicAppLogicCallRequests[1].isStaticCall = false;
107 pi.publicAppLogicCallRequests[1].calldataHash = 6666;
108
109 pi.publicTeardownCallRequest.msgSender = 7777;
110 pi.publicTeardownCallRequest.contractAddress = 8888;
111 pi.publicTeardownCallRequest.isStaticCall = true;
112 pi.publicTeardownCallRequest.calldataHash = 9999;
113
114 // Set accumulated data array lengths
115 pi.previousNonRevertibleAccumulatedDataArrayLengths.noteHashes = 10;
116 pi.previousNonRevertibleAccumulatedDataArrayLengths.nullifiers = 20;
117 pi.previousNonRevertibleAccumulatedDataArrayLengths.l2ToL1Msgs = 30;
118
119 pi.previousRevertibleAccumulatedDataArrayLengths.noteHashes = 40;
120 pi.previousRevertibleAccumulatedDataArrayLengths.nullifiers = 50;
121 pi.previousRevertibleAccumulatedDataArrayLengths.l2ToL1Msgs = 60;
122
123 // Set l2 to l1 messages (using 3 columns)
124 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].message.recipient = 1234;
125 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].message.content = 1357;
126 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].contractAddress = 3579;
127
128 // Set accumulated data elements
129 pi.accumulatedData.noteHashes[2] = 54321;
130 pi.accumulatedData.nullifiers[3] = 98765;
131
132 // Set l2 to l1 messages in accumulated data
133 pi.accumulatedData.l2ToL1Msgs[1].message.recipient = 3333;
134 pi.accumulatedData.l2ToL1Msgs[1].message.content = 7531;
135 pi.accumulatedData.l2ToL1Msgs[1].contractAddress = 9753;
136
137 // Set public logs (spans multiple rows per log)
138 pi.accumulatedData.publicLogs[0].contractAddress = 11223;
139 pi.accumulatedData.publicLogs[0].emittedLength = PUBLIC_LOG_SIZE_IN_FIELDS;
140 for (size_t j = 0; j < PUBLIC_LOG_SIZE_IN_FIELDS; ++j) {
141 pi.accumulatedData.publicLogs[0].fields[j] = 10000 + j;
142 }
143
144 // Set public data writes
145 pi.accumulatedData.publicDataWrites[1].leafSlot = 5555;
146 pi.accumulatedData.publicDataWrites[1].value = 6666;
147
148 // Set end gas used
149 pi.endGasUsed.daGas = 5000;
150 pi.endGasUsed.l2Gas = 7000;
151
152 // Set end tree snapshots
153 pi.endTreeSnapshots.l1ToL2MessageTree.root = 10000;
154 pi.endTreeSnapshots.l1ToL2MessageTree.nextAvailableLeafIndex = 20000;
155 pi.endTreeSnapshots.noteHashTree.root = 30000;
156 pi.endTreeSnapshots.noteHashTree.nextAvailableLeafIndex = 40000;
157 pi.endTreeSnapshots.nullifierTree.root = 50000;
158 pi.endTreeSnapshots.nullifierTree.nextAvailableLeafIndex = 60000;
159 pi.endTreeSnapshots.publicDataTree.root = 70000;
160 pi.endTreeSnapshots.publicDataTree.nextAvailableLeafIndex = 80000;
161
162 // Set transaction fee
163 pi.transactionFee = 9876;
164
165 // Set accumulated data array lengths
166 pi.accumulatedDataArrayLengths.noteHashes = 3;
167 pi.accumulatedDataArrayLengths.nullifiers = 4;
168 pi.accumulatedDataArrayLengths.l2ToL1Msgs = 2;
169 pi.accumulatedDataArrayLengths.publicLogs = 1;
170 pi.accumulatedDataArrayLengths.publicDataWrites = 5;
171
172 // Set reverted flag
173 pi.reverted = true;
174
175 // Get the columns representation
176 auto columns = pi.to_columns();
177
178 // Convert to flat array for easier testing
179 auto flat = PublicInputs::columns_to_flat(columns);
180 EXPECT_THAT(flat, SizeIs(AVM_PUBLIC_INPUTS_COLUMNS_COMBINED_LENGTH));
181
182 // Define column offsets based on the total number of rows per column
183 const size_t col0_offset = 0;
184 const size_t col1_offset = static_cast<size_t>(AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH);
185 const size_t col2_offset = static_cast<size_t>(2 * AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH);
186 const size_t col3_offset = static_cast<size_t>(3 * AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH);
187
188 // Verify that some specific values are at the expected positions
189
190 // Global variables
191 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_CHAIN_ID_ROW_IDX], pi.globalVariables.chainId);
192 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_VERSION_ROW_IDX], pi.globalVariables.version);
194 pi.globalVariables.blockNumber);
195 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_SLOT_NUMBER_ROW_IDX],
196 pi.globalVariables.slotNumber);
197 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_TIMESTAMP_ROW_IDX], pi.globalVariables.timestamp);
199 pi.globalVariables.feeRecipient);
200 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_GAS_FEES_ROW_IDX],
201 pi.globalVariables.gasFees.feePerDaGas);
202 EXPECT_EQ(flat[col1_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_GAS_FEES_ROW_IDX],
203 pi.globalVariables.gasFees.feePerL2Gas);
204 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_COINBASE_ROW_IDX], pi.globalVariables.coinbase);
205
206 // Start tree snapshots
208 pi.startTreeSnapshots.l1ToL2MessageTree.root);
210 pi.startTreeSnapshots.l1ToL2MessageTree.nextAvailableLeafIndex);
212 pi.startTreeSnapshots.noteHashTree.root);
214 pi.startTreeSnapshots.noteHashTree.nextAvailableLeafIndex);
216 pi.startTreeSnapshots.nullifierTree.root);
218 pi.startTreeSnapshots.nullifierTree.nextAvailableLeafIndex);
220 pi.startTreeSnapshots.publicDataTree.root);
222 pi.startTreeSnapshots.publicDataTree.nextAvailableLeafIndex);
223
224 // Gas used
225 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_START_GAS_USED_ROW_IDX], pi.startGasUsed.daGas);
226 EXPECT_EQ(flat[col1_offset + AVM_PUBLIC_INPUTS_START_GAS_USED_ROW_IDX], pi.startGasUsed.l2Gas);
227
228 // Gas settings
229 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_GAS_SETTINGS_GAS_LIMITS_ROW_IDX], pi.gasSettings.gasLimits.daGas);
230 EXPECT_EQ(flat[col1_offset + AVM_PUBLIC_INPUTS_GAS_SETTINGS_GAS_LIMITS_ROW_IDX], pi.gasSettings.gasLimits.l2Gas);
232 pi.gasSettings.teardownGasLimits.daGas);
234 pi.gasSettings.teardownGasLimits.l2Gas);
236 pi.gasSettings.maxFeesPerGas.feePerDaGas);
238 pi.gasSettings.maxFeesPerGas.feePerL2Gas);
240 pi.gasSettings.maxPriorityFeesPerGas.feePerDaGas);
242 pi.gasSettings.maxPriorityFeesPerGas.feePerL2Gas);
243
244 // Fee payer
245 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_FEE_PAYER_ROW_IDX], pi.feePayer);
246
247 // Public Call Request Array Lengths
249 pi.publicCallRequestArrayLengths.setupCalls);
251 pi.publicCallRequestArrayLengths.appLogicCalls);
253 static_cast<uint8_t>(pi.publicCallRequestArrayLengths.teardownCall));
254
255 // Public call requests (testing use of all 4 columns)
257 EXPECT_EQ(flat[col0_offset + setup_row], pi.publicSetupCallRequests[0].msgSender);
258 EXPECT_EQ(flat[col1_offset + setup_row], pi.publicSetupCallRequests[0].contractAddress);
259 EXPECT_EQ(flat[col2_offset + setup_row], static_cast<uint8_t>(pi.publicSetupCallRequests[0].isStaticCall));
260 EXPECT_EQ(flat[col3_offset + setup_row], pi.publicSetupCallRequests[0].calldataHash);
261
262 size_t app_logic_row = AVM_PUBLIC_INPUTS_PUBLIC_APP_LOGIC_CALL_REQUESTS_ROW_IDX + 1; // Using the second one
263 EXPECT_EQ(flat[col0_offset + app_logic_row], pi.publicAppLogicCallRequests[1].msgSender);
264 EXPECT_EQ(flat[col1_offset + app_logic_row], pi.publicAppLogicCallRequests[1].contractAddress);
265 EXPECT_EQ(flat[col2_offset + app_logic_row], static_cast<uint8_t>(pi.publicAppLogicCallRequests[1].isStaticCall));
266 EXPECT_EQ(flat[col3_offset + app_logic_row], pi.publicAppLogicCallRequests[1].calldataHash);
267
269 EXPECT_EQ(flat[col0_offset + teardown_row], pi.publicTeardownCallRequest.msgSender);
270 EXPECT_EQ(flat[col1_offset + teardown_row], pi.publicTeardownCallRequest.contractAddress);
271 EXPECT_EQ(flat[col2_offset + teardown_row], static_cast<uint8_t>(pi.publicTeardownCallRequest.isStaticCall));
272 EXPECT_EQ(flat[col3_offset + teardown_row], pi.publicTeardownCallRequest.calldataHash);
273
274 // Test previous accumulated data array lengths
275 EXPECT_EQ(flat[col0_offset +
277 pi.previousNonRevertibleAccumulatedDataArrayLengths.noteHashes);
278 EXPECT_EQ(
280 pi.previousNonRevertibleAccumulatedDataArrayLengths.nullifiers);
281 EXPECT_EQ(flat[col0_offset +
283 pi.previousNonRevertibleAccumulatedDataArrayLengths.l2ToL1Msgs);
284
285 // Test previous revertible accumulated data array lengths
286 EXPECT_EQ(
288 pi.previousRevertibleAccumulatedDataArrayLengths.noteHashes);
289 EXPECT_EQ(
291 pi.previousRevertibleAccumulatedDataArrayLengths.nullifiers);
292 EXPECT_EQ(
294 pi.previousRevertibleAccumulatedDataArrayLengths.l2ToL1Msgs);
295
296 // Accumulated Data Array Lengths
298 pi.accumulatedDataArrayLengths.noteHashes);
300 pi.accumulatedDataArrayLengths.nullifiers);
302 pi.accumulatedDataArrayLengths.l2ToL1Msgs);
304 pi.accumulatedDataArrayLengths.publicLogs);
306 pi.accumulatedDataArrayLengths.publicDataWrites);
307
308 // Test l2ToL1Msgs (which use 3 columns)
310 EXPECT_EQ(flat[col0_offset + l2_to_l1_msg_row],
311 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].message.recipient);
312 EXPECT_EQ(flat[col1_offset + l2_to_l1_msg_row],
313 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].message.content);
314 EXPECT_EQ(flat[col2_offset + l2_to_l1_msg_row],
315 pi.previousNonRevertibleAccumulatedData.l2ToL1Msgs[0].contractAddress);
316
317 // End tree snapshots
319 pi.endTreeSnapshots.l1ToL2MessageTree.root);
321 pi.endTreeSnapshots.l1ToL2MessageTree.nextAvailableLeafIndex);
323 pi.endTreeSnapshots.noteHashTree.root);
325 pi.endTreeSnapshots.noteHashTree.nextAvailableLeafIndex);
326
327 // End gas used
328 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_END_GAS_USED_ROW_IDX], pi.endGasUsed.daGas);
329 EXPECT_EQ(flat[col1_offset + AVM_PUBLIC_INPUTS_END_GAS_USED_ROW_IDX], pi.endGasUsed.l2Gas);
330
331 // Test note hashes and nullifiers
332 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_NOTE_HASHES_ROW_IDX + 2],
333 pi.accumulatedData.noteHashes[2]);
334 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_NULLIFIERS_ROW_IDX + 3],
335 pi.accumulatedData.nullifiers[3]);
336
337 // Test accumulated l2ToL1Msgs
338 size_t acc_l2_to_l1_msg_row = AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_L2_TO_L1_MSGS_ROW_IDX + 1; // Using second one
339 EXPECT_EQ(flat[col0_offset + acc_l2_to_l1_msg_row], pi.accumulatedData.l2ToL1Msgs[1].message.recipient);
340 EXPECT_EQ(flat[col1_offset + acc_l2_to_l1_msg_row], pi.accumulatedData.l2ToL1Msgs[1].message.content);
341 EXPECT_EQ(flat[col2_offset + acc_l2_to_l1_msg_row], pi.accumulatedData.l2ToL1Msgs[1].contractAddress);
342
343 // Test public logs
345 for (size_t j = 0; j < 3; ++j) {
346 EXPECT_EQ(flat[col0_offset + first_log_row + j], pi.accumulatedData.publicLogs[0].contractAddress);
347 EXPECT_EQ(flat[col1_offset + first_log_row + j], pi.accumulatedData.publicLogs[0].emittedLength);
348 EXPECT_EQ(flat[col2_offset + first_log_row + j], pi.accumulatedData.publicLogs[0].fields[j]);
349 }
350
351 // Public data writes (uses 2 columns)
353 EXPECT_EQ(flat[col0_offset + public_data_write_row], pi.accumulatedData.publicDataWrites[1].leafSlot);
354 EXPECT_EQ(flat[col1_offset + public_data_write_row], pi.accumulatedData.publicDataWrites[1].value);
355
356 // Transaction fee
357 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_TRANSACTION_FEE_ROW_IDX], pi.transactionFee);
358
359 // Reverted status
360 EXPECT_EQ(flat[col0_offset + AVM_PUBLIC_INPUTS_REVERTED_ROW_IDX], static_cast<uint8_t>(pi.reverted));
361}
362
363} // namespace
364} // namespace bb::avm2
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_APP_LOGIC_CALL_REQUESTS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_GAS_FEES_ROW_IDX
#define AVM_PUBLIC_INPUTS_COLUMNS_COMBINED_LENGTH
#define AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_L1_TO_L2_MESSAGE_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_TEARDOWN_CALL_REQUEST_ROW_IDX
#define AVM_PUBLIC_INPUTS_FEE_PAYER_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_FEE_RECIPIENT_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_COINBASE_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GAS_SETTINGS_TEARDOWN_GAS_LIMITS_ROW_IDX
#define AVM_PUBLIC_INPUTS_TRANSACTION_FEE_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_END_GAS_USED_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_PUBLIC_DATA_WRITES_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_L1_TO_L2_MESSAGE_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_BLOCK_NUMBER_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_SETUP_CALL_REQUESTS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_CALL_REQUEST_ARRAY_LENGTHS_APP_LOGIC_CALLS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NULLIFIERS_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_NOTE_HASH_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_ARRAY_LENGTHS_PUBLIC_LOGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_END_TREE_SNAPSHOTS_NOTE_HASH_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_SLOT_NUMBER_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_VERSION_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_PUBLIC_DATA_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_REVERTED_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_CALL_REQUEST_ARRAY_LENGTHS_TEARDOWN_CALL_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_TIMESTAMP_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_L2_TO_L1_MSGS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GAS_SETTINGS_MAX_FEES_PER_GAS_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_TREE_SNAPSHOTS_NULLIFIER_TREE_ROW_IDX
#define AVM_PUBLIC_INPUTS_START_GAS_USED_ROW_IDX
#define AVM_PUBLIC_INPUTS_PUBLIC_CALL_REQUEST_ARRAY_LENGTHS_SETUP_CALLS_ROW_IDX
#define AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_ARRAY_LENGTHS_NOTE_HASHES_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_PUBLIC_DATA_WRITES_ROW_IDX
#define AVM_PUBLIC_INPUTS_GLOBAL_VARIABLES_CHAIN_ID_ROW_IDX
#define AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_PUBLIC_LOGS_ROW_IDX
#define AVM_NUM_PUBLIC_INPUT_COLUMNS
#define AVM_PUBLIC_INPUTS_GAS_SETTINGS_GAS_LIMITS_ROW_IDX
#define AVM_PUBLIC_INPUTS_GAS_SETTINGS_MAX_PRIORITY_FEES_PER_GAS_ROW_IDX
#define PUBLIC_LOG_SIZE_IN_FIELDS
#define AVM_PUBLIC_INPUTS_COLUMNS_MAX_LENGTH
const std::vector< FF > data
TEST(EmitUnencryptedLogTest, Basic)
std::pair< tracegen::TraceContainer, PublicInputs > get_minimal_trace_with_pi()
Definition fixtures.cpp:182
std::vector< uint8_t > read_file(const std::string &filename, size_t bytes=0)
Definition file_io.hpp:29
static AvmProvingInputs from(const std::vector< uint8_t > &data)
static std::vector< FF > columns_to_flat(std::vector< std::vector< FF > > const &columns)
static std::vector< std::vector< FF_ > > flat_to_columns(const std::vector< FF_ > &input)