Skip to content

Commit

Permalink
chore: rename capture to end_setup (#6008)
Browse files Browse the repository at this point in the history
rename capture_min_revertible_side_effect_counter to end_setup
  • Loading branch information
just-mitch authored Apr 25, 2024
1 parent 4b563cd commit 61e61ab
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
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 @@ -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 @@ -377,7 +377,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

0 comments on commit 61e61ab

Please sign in to comment.