diff --git a/yarn-project/aztec-nr/aztec/src/context.nr b/yarn-project/aztec-nr/aztec/src/context.nr index 00f4892d0d9..ebd5fc51f90 100644 --- a/yarn-project/aztec-nr/aztec/src/context.nr +++ b/yarn-project/aztec-nr/aztec/src/context.nr @@ -377,10 +377,26 @@ impl PrivateContext { let mut reader = Reader::new(fields); + // Note: Not using PublicCirclePublicInputs::deserialize here, because everything bellow args_hash is 0 and + // there is no more data in fields because there is only ENQUEUE_PUBLIC_FUNCTION_CALL_RETURN_SIZE fields! let item = PublicCallStackItem { contract_address: AztecAddress::from_field(reader.read()), function_data: reader.read_struct(FunctionData::deserialize), - public_inputs: reader.read_struct(PublicCircuitPublicInputs::deserialize), + public_inputs: PublicCircuitPublicInputs { + call_context: reader.read_struct(CallContext::deserialize), + args_hash: reader.read(), + return_values: [0; RETURN_VALUES_LENGTH], + contract_storage_update_requests: [StorageUpdateRequest::empty(); MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL], + contract_storage_reads: [StorageRead::empty(); MAX_PUBLIC_DATA_READS_PER_CALL], + public_call_stack_hashes: [0; MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL], + new_commitments: [SideEffect::empty(); MAX_NEW_COMMITMENTS_PER_CALL], + new_nullifiers: [SideEffectLinkedToNoteHash::empty(); MAX_NEW_NULLIFIERS_PER_CALL], + new_l2_to_l1_msgs:[0; MAX_NEW_L2_TO_L1_MSGS_PER_CALL], + unencrypted_logs_hash:[0; NUM_FIELDS_PER_SHA256], + unencrypted_log_preimages_length: 0, + historical_header: Header::empty(), + prover_address: AztecAddress::zero(), + }, is_execution_request: true, }; reader.finish(); diff --git a/yarn-project/aztec-nr/aztec/src/utils.nr b/yarn-project/aztec-nr/aztec/src/utils.nr index 808f32c719f..a0936a3015b 100644 --- a/yarn-project/aztec-nr/aztec/src/utils.nr +++ b/yarn-project/aztec-nr/aztec/src/utils.nr @@ -42,6 +42,7 @@ impl Reader { result } + // TODO(#4394) pub fn read_struct(&mut self, deserialise: fn([Field; K]) -> T) -> T { let result = deserialise(self.read_array([0; K])); result diff --git a/yarn-project/noir-protocol-circuits/src/crates/types/src/utils/reader.nr b/yarn-project/noir-protocol-circuits/src/crates/types/src/utils/reader.nr index cd796ac3cf4..10bfc050fb8 100644 --- a/yarn-project/noir-protocol-circuits/src/crates/types/src/utils/reader.nr +++ b/yarn-project/noir-protocol-circuits/src/crates/types/src/utils/reader.nr @@ -22,6 +22,7 @@ impl Reader { result } + // TODO(#4394) pub fn read_struct(&mut self, deserialise: fn([Field; K]) -> T) -> T { let result = deserialise(self.read_array([0; K])); result