@@ -201,16 +201,6 @@ namespace tx;
201201 pol commit should_process_call_request;
202202 should_process_call_request = is_public_call_request * (1 - is_padded);
203203
204- // When sending a call to execution, next context id is incremented by one, since we use next_context_id for the call.
205- pol commit next_context_id_sent_to_enqueued_call;
206- // When coming back from a call, the next context id may have incremented an amount we can't predict from the tx trace.
207- pol commit next_context_id_from_enqueued_call;
208-
209- // When issuing a call, context id is used for the call, making the next context id it plus one.
210- should_process_call_request * ((next_context_id + 1) - next_context_id_sent_to_enqueued_call) = 0;
211- // When comming back from the call, the newly available context id is the next_context_id that comes from the end of the call.
212- should_process_call_request * (next_context_id_from_enqueued_call - next_context_id') = 0;
213-
214204 pol commit is_teardown_phase; // TODO: Constrain
215205 is_teardown_phase * (1 - is_teardown_phase) = 0;
216206
@@ -229,116 +219,114 @@ namespace tx;
229219
230220 // Public Call Requests are dispatch to the execution trace
231221 // We match the values to the start of an enqueued call in the execution trace
232- // Commented out for now since we dont have enqueued call flags in execution set
233- // #[DISPATCH_EXEC_START]
234- // should_process_call_request {
235- // next_context_id,
236- // next_context_id_sent_to_enqueued_call,
237- // discard,
238- // msg_sender,
239- // contract_addr,
240- // fee,
241- // is_static,
242- // // Tree State
243- // prev_note_hash_tree_root,
244- // prev_note_hash_tree_size,
245- // prev_num_note_hashes_emitted,
246- // prev_nullifier_tree_size,
247- // prev_num_nullifiers_emitted,
248- // prev_public_data_tree_root,
249- // prev_public_data_tree_size,
250- // prev_written_public_data_slots_tree_root,
251- // prev_written_public_data_slots_tree_size,
252- // l1_l2_tree_root,
253- // // Side Effect States
254- // prev_num_unencrypted_logs,
255- // prev_num_l2_to_l1_messages,
256- // // Gas Info
257- // prev_l2_gas_used_sent_to_enqueued_call,
258- // prev_da_gas_used_sent_to_enqueued_call,
259- // l2_gas_limit,
260- // da_gas_limit
261- // } in
262- // execution.enqueued_call_start {
263- // execution.context_id,
264- // execution.next_context_id,
265- // execution.discard,
266- // execution.msg_sender,
267- // execution.contract_address,
268- // execution.transaction_fee,
269- // execution.is_static,
270- // // Tree State
271- // execution.prev_note_hash_tree_root,
272- // execution.prev_note_hash_tree_size,
273- // execution.prev_num_note_hashes_emitted,
274- // execution.prev_nullifier_tree_size,
275- // execution.prev_num_nullifiers_emitted,
276- // execution.prev_public_data_tree_root,
277- // execution.prev_public_data_tree_size,
278- // execution.prev_written_public_data_slots_tree_root,
279- // execution.prev_written_public_data_slots_tree_size,
280- // execution.l1_l2_tree_root,
281- // // Side Effect States
282- // execution.prev_num_unencrypted_logs,
283- // execution.prev_num_l2_to_l1_messages,
284- // // Gas Info
285- // execution.prev_l2_gas_used_sent_to_enqueued_call,
286- // execution.prev_da_gas_used_sent_to_enqueued_call,
287- // execution.l2_gas_limit,
288- // execution.da_gas_limit
289- // };
222+ #[DISPATCH_EXEC_START]
223+ should_process_call_request {
224+ next_context_id,
225+ discard,
226+ msg_sender,
227+ contract_addr,
228+ fee,
229+ is_static,
230+ // Tree State
231+ prev_note_hash_tree_root,
232+ prev_note_hash_tree_size,
233+ prev_num_note_hashes_emitted,
234+ prev_nullifier_tree_root,
235+ prev_nullifier_tree_size,
236+ prev_num_nullifiers_emitted,
237+ prev_public_data_tree_root,
238+ prev_public_data_tree_size,
239+ prev_written_public_data_slots_tree_root,
240+ prev_written_public_data_slots_tree_size,
241+ l1_l2_tree_root,
242+ // Side Effect States
243+ prev_num_unencrypted_logs,
244+ prev_num_l2_to_l1_messages,
245+ // Gas Info
246+ prev_l2_gas_used_sent_to_enqueued_call,
247+ prev_da_gas_used_sent_to_enqueued_call,
248+ l2_gas_limit,
249+ da_gas_limit
250+ } in
251+ execution.enqueued_call_start {
252+ execution.context_id, // next_context_id must be constrained in the execution trace on enqueued_call_start
253+ execution.discard,
254+ execution.msg_sender,
255+ execution.contract_address,
256+ execution.transaction_fee,
257+ execution.is_static,
258+ // Tree State
259+ execution.prev_note_hash_tree_root,
260+ execution.prev_note_hash_tree_size,
261+ execution.prev_num_note_hashes_emitted,
262+ execution.prev_nullifier_tree_root,
263+ execution.prev_nullifier_tree_size,
264+ execution.prev_num_nullifiers_emitted,
265+ execution.prev_public_data_tree_root,
266+ execution.prev_public_data_tree_size,
267+ execution.prev_written_public_data_slots_tree_root,
268+ execution.prev_written_public_data_slots_tree_size,
269+ execution.l1_l2_tree_root,
270+ // Side Effect States
271+ execution.prev_num_unencrypted_logs,
272+ execution.prev_num_l2_to_l1_messages,
273+ // Gas Info
274+ execution.prev_l2_gas_used,
275+ execution.prev_da_gas_used,
276+ execution.l2_gas_limit,
277+ execution.da_gas_limit
278+ };
290279
291280 // We retrieve the return values at the end of an enqueued call in the execution trace
292- // Commented out for now since we dont have enqueued call flags in execution set
293- //#[DISPATCH_EXEC_GET_REVERT]
294- //should_process_call_request {
295- // next_context_id,
296- // next_context_id_from_enqueued_call,
297- // reverted,
298- // discard,
299- // // Tree State
300- // next_note_hash_tree_root,
301- // next_note_hash_tree_size,
302- // next_num_note_hashes_emitted,
303- // next_nullifier_tree_root,
304- // next_nullifier_tree_size,
305- // next_num_nullifiers_emitted,
306- // next_public_data_tree_root,
307- // next_public_data_tree_size,
308- // next_written_public_data_slots_tree_root,
309- // next_written_public_data_slots_tree_size,
310- // l1_l2_tree_root,
311- // // Side Effect States
312- // next_num_unencrypted_logs,
313- // next_num_l2_to_l1_messages,
314- // // Gas Info
315- // next_l2_gas_used_sent_to_enqueued_call,
316- // next_da_gas_used_sent_to_enqueued_call
317- //} in
318- //execution.enqueued_call_end {
319- // execution.context_id,
320- // execution.next_context_id,
321- // execution.sel_error,
322- // execution.discard,
323- // // Tree State
324- // execution.note_hash_tree_root,
325- // execution.note_hash_tree_size,
326- // execution.num_note_hashes_emitted,
327- // execution.nullifier_tree_root,
328- // execution.nullifier_tree_size,
329- // execution.num_nullifiers_emitted,
330- // execution.public_data_tree_root,
331- // execution.public_data_tree_size,
332- // execution.written_public_data_slots_tree_root,
333- // execution.written_public_data_slots_tree_size,
334- // execution.l1_l2_tree_root,
335- // // Side Effect States
336- // execution.num_unencrypted_logs,
337- // execution.num_l2_to_l1_messages,
338- // // Gas Info
339- // execution.l2_gas_used_sent_to_enqueued_call,
340- // execution.da_gas_used_sent_to_enqueued_call
341- //};
281+ #[DISPATCH_EXEC_END]
282+ should_process_call_request {
283+ next_context_id,
284+ next_context_id', // The context id of the next row must be the one after the execution of the enqueued call
285+ reverted,
286+ discard,
287+ // Tree State
288+ next_note_hash_tree_root,
289+ next_note_hash_tree_size,
290+ next_num_note_hashes_emitted,
291+ next_nullifier_tree_root,
292+ next_nullifier_tree_size,
293+ next_num_nullifiers_emitted,
294+ next_public_data_tree_root,
295+ next_public_data_tree_size,
296+ next_written_public_data_slots_tree_root,
297+ next_written_public_data_slots_tree_size,
298+ l1_l2_tree_root,
299+ // Side Effect States
300+ next_num_unencrypted_logs,
301+ next_num_l2_to_l1_messages,
302+ // Gas Info
303+ next_l2_gas_used_sent_to_enqueued_call,
304+ next_da_gas_used_sent_to_enqueued_call
305+ } in
306+ execution.enqueued_call_end {
307+ execution.context_id,
308+ execution.next_context_id,
309+ execution.sel_error,
310+ execution.discard,
311+ // Tree State
312+ execution.note_hash_tree_root,
313+ execution.note_hash_tree_size,
314+ execution.num_note_hashes_emitted,
315+ execution.nullifier_tree_root,
316+ execution.nullifier_tree_size,
317+ execution.num_nullifiers_emitted,
318+ execution.public_data_tree_root,
319+ execution.public_data_tree_size,
320+ execution.written_public_data_slots_tree_root,
321+ execution.written_public_data_slots_tree_size,
322+ execution.l1_l2_tree_root,
323+ // Side Effect States
324+ execution.num_unencrypted_logs,
325+ execution.num_l2_to_l1_messages,
326+ // Gas Info
327+ execution.l2_gas_used,
328+ execution.da_gas_used
329+ };
342330
343331 // === PRIVATE SIDE EFFECT INSERTIONS ===
344332 pol commit sel_revertible_append_note_hash;
0 commit comments