Skip to content

Commit e6207ff

Browse files
authored
Merge f435c39 into 9b99126
2 parents 9b99126 + f435c39 commit e6207ff

File tree

1,069 files changed

+2526
-90888
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,069 files changed

+2526
-90888
lines changed

.noir-sync-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3c488f4b272f460383341c51270b87bfe2b94468
1+
db28cb9ffb710c286b54dbfcf57292ae3dffb03d

noir-projects/aztec-nr/authwit/src/cheatcodes.nr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ where
1717
C: CallInterface<M>,
1818
{
1919
let target = call_interface.get_contract_address();
20-
let inputs = cheatcodes::get_private_context_inputs(get_block_number());
20+
let inputs = unsafe { cheatcodes::get_private_context_inputs(get_block_number()) };
2121
let chain_id = inputs.tx_context.chain_id;
2222
let version = inputs.tx_context.version;
2323
let args_hash = hash_args(call_interface.get_args());
2424
let selector = call_interface.get_selector();
2525
let inner_hash =
2626
compute_inner_authwit_hash([caller.to_field(), selector.to_field(), args_hash]);
2727
let message_hash = compute_authwit_message_hash(target, chain_id, version, inner_hash);
28-
cheatcodes::add_authwit(on_behalf_of, message_hash);
28+
unsafe { cheatcodes::add_authwit(on_behalf_of, message_hash) };
2929
}
3030

3131
pub unconstrained fn add_public_authwit_from_call_interface<C, let M: u32>(

noir-projects/aztec-nr/aztec/src/context/private_context.nr

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -494,13 +494,15 @@ impl PrivateContext {
494494
// new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.
495495
// We don't validate or compute it in the circuit because a) it's harder to do with slices, and
496496
// b) this is only temporary.
497-
let args_hash = enqueue_public_function_call_internal(
498-
contract_address,
499-
function_selector,
500-
args_hash,
501-
counter,
502-
is_static_call,
503-
);
497+
let args_hash = unsafe {
498+
enqueue_public_function_call_internal(
499+
contract_address,
500+
function_selector,
501+
args_hash,
502+
counter,
503+
is_static_call,
504+
)
505+
};
504506

505507
// Public calls are rerouted through the dispatch function.
506508
let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };
@@ -548,13 +550,15 @@ impl PrivateContext {
548550
// new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.
549551
// We don't validate or compute it in the circuit because a) it's harder to do with slices, and
550552
// b) this is only temporary.
551-
let args_hash = set_public_teardown_function_call_internal(
552-
contract_address,
553-
function_selector,
554-
args_hash,
555-
counter,
556-
is_static_call,
557-
);
553+
let args_hash = unsafe {
554+
set_public_teardown_function_call_internal(
555+
contract_address,
556+
function_selector,
557+
args_hash,
558+
counter,
559+
is_static_call,
560+
)
561+
};
558562

559563
let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };
560564

noir-projects/aztec-nr/aztec/src/oracle/get_contract_instance.nr

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,24 @@ pub unconstrained fn get_contract_instance_initialization_hash_internal_avm(
5959
}
6060

6161
pub fn get_contract_instance_deployer_avm(address: AztecAddress) -> Option<AztecAddress> {
62-
let (member, exists) = get_contract_instance_deployer_internal_avm(address);
62+
let (member, exists) = unsafe { get_contract_instance_deployer_internal_avm(address) };
6363
if exists {
6464
Option::some(AztecAddress::from_field(member))
6565
} else {
6666
Option::none()
6767
}
6868
}
6969
pub fn get_contract_instance_class_id_avm(address: AztecAddress) -> Option<ContractClassId> {
70-
let (member, exists) = get_contract_instance_class_id_internal_avm(address);
70+
let (member, exists) = unsafe { get_contract_instance_class_id_internal_avm(address) };
7171
if exists {
7272
Option::some(ContractClassId::from_field(member))
7373
} else {
7474
Option::none()
7575
}
7676
}
7777
pub fn get_contract_instance_initialization_hash_avm(address: AztecAddress) -> Option<Field> {
78-
let (member, exists) = get_contract_instance_initialization_hash_internal_avm(address);
78+
let (member, exists) =
79+
unsafe { get_contract_instance_initialization_hash_internal_avm(address) };
7980
if exists {
8081
Option::some(member)
8182
} else {

noir-projects/noir-contracts/contracts/contract_class_registerer_contract/src/main.nr

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ contract ContractClassRegisterer {
4848
// TODO: We should be able to remove public_bytecode_commitment from the input if it's calculated in this function
4949
// docs:start:pop_capsule
5050
let packed_public_bytecode: [Field; MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS] =
51-
pop_capsule();
51+
unsafe { pop_capsule() };
5252
// docs:end:pop_capsule
5353
// First field element contains the length of the bytecode
5454
let bytecode_length_in_bytes: u32 = packed_public_bytecode[0] as u32;
@@ -121,7 +121,7 @@ contract ContractClassRegisterer {
121121
function_data: InnerPrivateFunction,
122122
) {
123123
let private_bytecode: [Field; MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS] =
124-
pop_capsule();
124+
unsafe { pop_capsule() };
125125

126126
let event = ClassPrivateFunctionBroadcasted {
127127
contract_class_id,
@@ -162,7 +162,7 @@ contract ContractClassRegisterer {
162162
function_data: InnerUnconstrainedFunction,
163163
) {
164164
let unconstrained_bytecode: [Field; MAX_PACKED_BYTECODE_SIZE_PER_UNCONSTRAINED_FUNCTION_IN_FIELDS] =
165-
pop_capsule();
165+
unsafe { pop_capsule() };
166166
let event = ClassUnconstrainedFunctionBroadcasted {
167167
contract_class_id,
168168
artifact_metadata_hash,
@@ -203,7 +203,8 @@ contract ContractClassRegisterer {
203203
// cannot prove non-registration. Therefore, it is possible that a malicious oracle might prevent sequencers
204204
// from including transactions with calls to certain badly-broadcasted contracts.
205205
// TODO(#8978): review correctness
206-
let log_hash = emit_contract_class_unencrypted_log_private(contract_address, log, counter);
206+
let log_hash =
207+
unsafe { emit_contract_class_unencrypted_log_private(contract_address, log, counter) };
207208

208209
// 40 = addr (32) + raw log len (4) + processed log len (4)
209210
context.contract_class_logs_hashes.push(
Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
use dep::aztec::{
2-
note::{note_getter::{MAX_NOTES_PER_PAGE, view_notes}, note_viewer_options::NoteViewerOptions},
3-
prelude::AztecAddress,
4-
protocol_types::storage::map::derive_storage_slot_in_map,
5-
test::helpers::test_environment::TestEnvironment,
6-
};
1+
use dep::aztec::{prelude::AztecAddress, test::helpers::test_environment::TestEnvironment};
72

83
use crate::EasyPrivateVoting;
94

105
pub fn setup() -> (&mut TestEnvironment, AztecAddress, AztecAddress) {
11-
let mut env = TestEnvironment::new();
6+
let mut env = unsafe { TestEnvironment::new() };
127

13-
let admin = env.create_account();
8+
let admin = unsafe { env.create_account() };
149

1510
let initializer_call_interface = EasyPrivateVoting::interface().constructor(admin);
16-
let voting_contract = env.deploy_self("EasyPrivateVoting").with_public_void_initializer(
17-
initializer_call_interface,
18-
);
11+
let voting_contract = unsafe {
12+
env.deploy_self("EasyPrivateVoting").with_public_void_initializer(initializer_call_interface)
13+
};
1914
// std::println(voting_contract);
2015
(&mut env, voting_contract.to_address(), admin)
2116
}

noir/noir-repo/.github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/aztec-nr.failures.jsonl.does_not_compile

Whitespace-only changes.

noir/noir-repo/.github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/noir-contracts.failures.jsonl.does_not_compile

Whitespace-only changes.

noir/noir-repo/.github/critical_libraries_status/noir-lang/noir-edwards/.failures.jsonl.does_not_compile

Whitespace-only changes.

noir/noir-repo/.github/critical_libraries_status/noir-lang/noir_bigcurve/.failures.jsonl.does_not_compile

Whitespace-only changes.

0 commit comments

Comments
 (0)