Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename capture to end_setup #6008

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion noir-projects/aztec-nr/authwit/src/account.nr
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl AccountActions {
let fee_hash = fee_payload.hash();
assert(valid_fn(private_context, fee_hash));
fee_payload.execute_calls(private_context);
private_context.capture_min_revertible_side_effect_counter();
private_context.end_setup();

let app_hash = app_payload.hash();
assert(valid_fn(private_context, app_hash));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl PrivateContext {
priv_circuit_pub_inputs
}

pub fn capture_min_revertible_side_effect_counter(&mut self) {
pub fn end_setup(&mut self) {
self.min_revertible_side_effect_counter = self.side_effect_counter;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ contract AppSubscription {

GasToken::at(storage.gas_token_address.read_private()).pay_fee(42).enqueue(&mut context);

context.capture_min_revertible_side_effect_counter();
context.end_setup();

AppSubscription::at(context.this_address()).assert_not_expired(note.expiry_block_number).enqueue(&mut context);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl PrivateKernelTailToPublicCircuitPrivateInputs {
self.sorted_encrypted_log_hashes,
self.sorted_encrypted_log_hashes_indexes,
self.sorted_unencrypted_log_hashes,
self.sorted_unencrypted_log_hashes_indexes,
self.sorted_unencrypted_log_hashes_indexes
);
composer.compose_public().finish_to_public()
}
Expand Down Expand Up @@ -196,7 +196,7 @@ mod tests {
sorted_encrypted_log_hashes_indexes,
sorted_unencrypted_log_hashes,
sorted_unencrypted_log_hashes_indexes,
master_nullifier_secret_keys: [GrumpkinPrivateKey::empty(); MAX_NULLIFIER_KEY_VALIDATION_REQUESTS_PER_TX],
master_nullifier_secret_keys: [GrumpkinPrivateKey::empty(); MAX_NULLIFIER_KEY_VALIDATION_REQUESTS_PER_TX]
};
kernel.execute()
}
Expand Down Expand Up @@ -465,7 +465,7 @@ mod tests {
let mut builder = PrivateKernelTailToPublicInputsBuilder::new();
// expect 3 non-revertible nullifiers: the tx nullifier + 2 new ones
builder.previous_kernel.append_new_nullifiers(2);
builder.previous_kernel.capture_min_revertible_side_effect_counter();
builder.previous_kernel.end_setup();

// expect 2 revertible nullifiers
builder.previous_kernel.append_new_nullifiers(2);
Expand Down Expand Up @@ -494,7 +494,7 @@ mod tests {

// expect 2 non-revertible commitments
builder.previous_kernel.append_new_note_hashes(2);
builder.previous_kernel.capture_min_revertible_side_effect_counter();
builder.previous_kernel.end_setup();

// expect 2 revertible commitments
builder.previous_kernel.append_new_note_hashes(2);
Expand Down Expand Up @@ -525,7 +525,7 @@ mod tests {

// add one hash in non-revertible part
builder.previous_kernel.append_new_note_hashes(1);
builder.previous_kernel.capture_min_revertible_side_effect_counter();
builder.previous_kernel.end_setup();

// nullify it in revertible part
builder.previous_kernel.append_new_nullifiers(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ impl FixtureBuilder {
self.public_call_stack.push(call_stack_item);
}

pub fn capture_min_revertible_side_effect_counter(&mut self) {
pub fn end_setup(&mut self) {
self.min_revertible_side_effect_counter = self.counter;
}

Expand Down
Loading