Skip to content

Commit 78c2c28

Browse files
AztecBotTomAFrench
andcommitted
feat: Sync from noir (#8466)
Automated pull of development from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: suggest trait attributes in LSP (noir-lang/noir#5972) fix: Error when `quote` is used in runtime code (noir-lang/noir#5978) chore: document HashMap (noir-lang/noir#5984) fix: Restrict keccak256_injective test input to 8 bits (noir-lang/noir#5977) fix: Error when comptime functions are used in runtime code (noir-lang/noir#5976) chore: document BoundedVec (noir-lang/noir#5974) feat: add `Expr::as_let` (noir-lang/noir#5964) chore: remove 3 unused functions warnings in the stdlib (noir-lang/noir#5973) feat: let `nargo` and LSP work well in the stdlib (noir-lang/noir#5969) feat: show doc comments in LSP (noir-lang/noir#5968) feat: add a `panic` method to the stdlib (noir-lang/noir#5966) fix: LSP document symbol didn't work for primitive impls (noir-lang/noir#5970) fix(mem2reg): Handle aliases in function last store cleanup and additional alias unit test (noir-lang/noir#5967) fix: let `derive(Eq)` work for empty structs (noir-lang/noir#5965) feat: add `FunctionDefinition` methods `is_unconstrained` and `set_unconstrained` (noir-lang/noir#5962) feat: LSP autocompletion for attributes (noir-lang/noir#5963) feat: `Module::add_item` (noir-lang/noir#5947) feat: Add `StructDefinition::add_generic` (noir-lang/noir#5961) feat: Add `StructDefinition::name` (noir-lang/noir#5960) fix(mem2reg): Handle aliases better when setting a known value for a load (noir-lang/noir#5959) feat: Arithmetic Generics (noir-lang/noir#5950) feat: add `FunctionDefinition::module` and `StructDefinition::module` (noir-lang/noir#5956) feat: LSP now suggests self fields and methods (noir-lang/noir#5955) END_COMMIT_OVERRIDE --------- Co-authored-by: Tom French <tom@tomfren.ch>
1 parent 4be77a0 commit 78c2c28

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

authwit/src/auth.nr

+16-3
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,11 @@ pub fn assert_current_call_valid_authwit(context: &mut PrivateContext, on_behalf
215215
* @param on_behalf_of The address that have authorized the current call
216216
* @param inner_hash The hash of the message to authorize
217217
*/
218-
pub fn assert_inner_hash_valid_authwit(context: &mut PrivateContext, on_behalf_of: AztecAddress, inner_hash: Field) {
218+
pub fn assert_inner_hash_valid_authwit(
219+
context: &mut PrivateContext,
220+
on_behalf_of: AztecAddress,
221+
inner_hash: Field
222+
) {
219223
// We perform a static call here and not a standard one to ensure that the account contract cannot re-enter.
220224
let result: Field = context.static_call_private_function(
221225
on_behalf_of,
@@ -262,7 +266,11 @@ pub fn assert_current_call_valid_authwit_public(context: &mut PublicContext, on_
262266
*
263267
* @param on_behalf_of The address that have authorized the `inner_hash`
264268
*/
265-
pub fn assert_inner_hash_valid_authwit_public(context: &mut PublicContext, on_behalf_of: AztecAddress, inner_hash: Field) {
269+
pub fn assert_inner_hash_valid_authwit_public(
270+
context: &mut PublicContext,
271+
on_behalf_of: AztecAddress,
272+
inner_hash: Field
273+
) {
266274
let result: Field = context.call_public_function(
267275
CANONICAL_AUTH_REGISTRY_ADDRESS,
268276
comptime {
@@ -338,7 +346,12 @@ pub fn compute_authwit_nullifier(on_behalf_of: AztecAddress, inner_hash: Field)
338346
* @param version The version of the chain that the message is being consumed on
339347
* @param inner_hash The hash of the "inner" message that is being consumed
340348
*/
341-
pub fn compute_authwit_message_hash(consumer: AztecAddress, chain_id: Field, version: Field, inner_hash: Field) -> Field {
349+
pub fn compute_authwit_message_hash(
350+
consumer: AztecAddress,
351+
chain_id: Field,
352+
version: Field,
353+
inner_hash: Field
354+
) -> Field {
342355
poseidon2_hash_with_separator(
343356
[
344357
consumer.to_field(),

aztec/src/encrypted_logs/incoming_body.nr

+4-4
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ mod test {
137137
}
138138
};
139139

140-
/// 1. `EncryptedLogIncomingBody::from_note` calls `note.to_be_bytes(storage_slot)` function which serializes
141-
/// the note to bytes - note that in the case of `AddressNote` the `to_be_bytes` function was automatically
142-
/// implemented by Aztec macros.
140+
// 1. `EncryptedLogIncomingBody::from_note` calls `note.to_be_bytes(storage_slot)` function which serializes
141+
// the note to bytes - note that in the case of `AddressNote` the `to_be_bytes` function was automatically
142+
// implemented by Aztec macros.
143143
let body = EncryptedLogIncomingBody::from_note(note, storage_slot);
144144

145-
/// 2. `body.compute_ciphertext(...)` function then derives symmetric key from `eph_sk` and `ivpk` and encrypts
145+
// 2. `body.compute_ciphertext(...)` function then derives symmetric key from `eph_sk` and `ivpk` and encrypts
146146
// the note plaintext using AES-128.
147147
let ciphertext = body.compute_ciphertext(eph_sk, ivpk);
148148

0 commit comments

Comments
 (0)