@@ -72,6 +72,8 @@ struct PrivateContext {
7272 inputs : PrivateContextInputs ,
7373 side_effect_counter : u32 ,
7474
75+ meta_hwm : u32 ,
76+
7577 args_hash : Field ,
7678 return_values : BoundedVec <Field , RETURN_VALUES_LENGTH >,
7779
@@ -101,6 +103,7 @@ impl PrivateContext {
101103 PrivateContext {
102104 inputs : inputs ,
103105 side_effect_counter : inputs .call_context .start_side_effect_counter ,
106+ meta_hwm : 0 ,
104107
105108 args_hash : args_hash ,
106109 return_values : BoundedVec ::new (0 ),
@@ -172,6 +175,7 @@ impl PrivateContext {
172175 call_context : self .inputs .call_context ,
173176 args_hash : self .args_hash ,
174177 return_values : self .return_values .storage ,
178+ meta_hwm : self .meta_hwm ,
175179 read_requests : self .read_requests .storage ,
176180 nullifier_key_validation_requests : self .nullifier_key_validation_requests .storage ,
177181 new_commitments : self .new_commitments .storage ,
@@ -239,7 +243,7 @@ impl PrivateContext {
239243 }
240244
241245 // docs:start:context_message_portal
242- pub fn message_portal (&mut self , content : Field )
246+ pub fn message_portal (&mut self , content : Field )
243247 // docs:end:context_message_portal
244248 {
245249 self .new_l2_to_l1_msgs .push (content );
@@ -254,7 +258,7 @@ impl PrivateContext {
254258 msg_key : Field ,
255259 content : Field ,
256260 secret : Field
257- )
261+ )
258262 // docs:end:context_consume_l1_to_l2_message
259263 {
260264 let nullifier = process_l1_to_l2_message (self .historical_header .state .l1_to_l2_message_tree .root , self .this_address (), self .this_portal_address (), self .chain_id (), self .version (), msg_key , content , secret );
@@ -278,8 +282,8 @@ impl PrivateContext {
278282
279283 pub fn call_private_function <ARGS_COUNT >(
280284 &mut self ,
281- contract_address : AztecAddress ,
282- function_selector : FunctionSelector ,
285+ contract_address : AztecAddress ,
286+ function_selector : FunctionSelector ,
283287 args : [Field ; ARGS_COUNT ]
284288 ) -> [Field ; RETURN_VALUES_LENGTH ] {
285289 let args_hash = hash_args (args );
@@ -289,8 +293,8 @@ impl PrivateContext {
289293
290294 pub fn call_private_function_no_args (
291295 &mut self ,
292- contract_address : AztecAddress ,
293- function_selector : FunctionSelector ,
296+ contract_address : AztecAddress ,
297+ function_selector : FunctionSelector ,
294298 ) -> [Field ; RETURN_VALUES_LENGTH ] {
295299 self .call_private_function_with_packed_args (contract_address , function_selector , 0 )
296300 }
@@ -303,14 +307,14 @@ impl PrivateContext {
303307 ) -> [Field ; RETURN_VALUES_LENGTH ] {
304308 let item = call_private_function_internal (
305309 contract_address ,
306- function_selector ,
310+ function_selector ,
307311 args_hash ,
308312 self .side_effect_counter ,
309313 );
310314
311315 assert_eq (item .public_inputs .call_context .start_side_effect_counter , self .side_effect_counter );
312316 self .side_effect_counter = item .public_inputs .end_side_effect_counter + 1 ;
313-
317+
314318 assert (contract_address .eq (item .contract_address ));
315319 assert (function_selector .eq (item .function_data .selector ));
316320
@@ -333,8 +337,8 @@ impl PrivateContext {
333337
334338 pub fn call_public_function <ARGS_COUNT >(
335339 &mut self ,
336- contract_address : AztecAddress ,
337- function_selector : FunctionSelector ,
340+ contract_address : AztecAddress ,
341+ function_selector : FunctionSelector ,
338342 args : [Field ; ARGS_COUNT ]
339343 ) {
340344 let args_hash = hash_args (args );
@@ -344,7 +348,7 @@ impl PrivateContext {
344348
345349 pub fn call_public_function_no_args (
346350 &mut self ,
347- contract_address : AztecAddress ,
351+ contract_address : AztecAddress ,
348352 function_selector : FunctionSelector ,
349353 ) {
350354 self .call_public_function_with_packed_args (contract_address , function_selector , 0 )
@@ -357,8 +361,8 @@ impl PrivateContext {
357361 args_hash : Field
358362 ) {
359363 let fields = enqueue_public_function_call_internal (
360- contract_address ,
361- function_selector ,
364+ contract_address ,
365+ function_selector ,
362366 args_hash ,
363367 self .side_effect_counter
364368 );
@@ -395,7 +399,7 @@ impl PrivateContext {
395399 assert_eq (item .public_inputs .call_context .start_side_effect_counter , self .side_effect_counter );
396400 // We increment the sideffect counter by one, to account for the call itself being a side effect.
397401 self .side_effect_counter = self .side_effect_counter + 1 ;
398-
402+
399403 assert (args_hash == item .public_inputs .args_hash );
400404
401405 // Assert that the call context of the enqueued call generated by the oracle matches our request.
@@ -457,7 +461,7 @@ impl PublicContext {
457461
458462 new_l2_to_l1_msgs : BoundedVec ::new (0 ),
459463
460-
464+
461465 unencrypted_logs_hash : BoundedVec ::new (0 ),
462466 unencrypted_logs_preimages_length : 0 ,
463467
@@ -574,27 +578,27 @@ impl PublicContext {
574578
575579 pub fn call_public_function <ARGS_COUNT >(
576580 _self : Self ,
577- contract_address : AztecAddress ,
581+ contract_address : AztecAddress ,
578582 function_selector : FunctionSelector ,
579583 args : [Field ; ARGS_COUNT ],
580584 ) -> [Field ; RETURN_VALUES_LENGTH ] {
581585 let args_hash = hash_args (args );
582586 assert (args_hash == arguments:: pack_arguments (args ));
583587 call_public_function_internal (
584- contract_address ,
585- function_selector ,
588+ contract_address ,
589+ function_selector ,
586590 args_hash ,
587591 )
588592 }
589593
590594 pub fn call_public_function_no_args (
591595 _self : Self ,
592- contract_address : AztecAddress ,
596+ contract_address : AztecAddress ,
593597 function_selector : FunctionSelector ,
594598 ) -> [Field ; RETURN_VALUES_LENGTH ] {
595599 call_public_function_internal (
596- contract_address ,
597- function_selector ,
600+ contract_address ,
601+ function_selector ,
598602 0 ,
599603 )
600604 }
0 commit comments