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: update comment on transient nullification #7001

Merged
merged 4 commits into from
Jun 11, 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
11 changes: 6 additions & 5 deletions noir-projects/aztec-nr/aztec/src/note/lifecycle.nr
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ pub fn destroy_note<Note, N, M>(

// We also need the note hash corresponding to the "nullifier"
let header = note.get_header();
// `consumed_note_hash` is used to inform the kernel which pending note hash
// the nullifier corresponds to so they can be matched and both squashed/deleted.
// nonzero nonce implies "persistable" nullifier (nullifies a persistent/in-tree
// note hash) in which case `consumed_note_hash` is not used since the kernel
// just siloes and forwards the nullifier to its output.

// A non-zero note hash counter implies that we're nullifying a transient note (i.e. one that has not yet been
// persisted in the trees and is instead if the pending new commitments array). In such a case we compute its hash
// to inform the kernel which note we're nullifyng so that it can find it and squash both the note and the
// nullifier. This value is unused when nullifying non transient notes - in that case the kernel simply persists
// the nullifier in the tree.
if (header.note_hash_counter != 0) {
// TODO(1718): Can we reuse the note hash computed in `compute_nullifier`?
consumed_note_hash = compute_note_hash_for_consumption(note);
Expand Down
5 changes: 3 additions & 2 deletions scripts/earthly-ci
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ while [ $ATTEMPT_COUNT -lt $MAX_ATTEMPTS ]; do
elif grep 'The container name "/earthly-buildkitd" is already in use by container' $OUTPUT_FILE >/dev/null; then
echo "Detected earthly bootstrap happening in parallel and failing, waiting and trying again."
sleep 20
elif grep 'status 125: docker: Error response from daemon: layer does not exist.' $OUTPUT_FILE >/dev/null; then
elif grep 'status 125: docker: Error response from daemon: layer does not exist.' $OUTPUT_FILE >/dev/null || grep 'could not determine buildkit address - is Docker or Podman running?' $OUTPUT_FILE >/dev/null ; then
echo "Detected corrupted docker images. Wiping and trying again."
# Based on https://stackoverflow.com/a/75849307
# wipe everything but volumes where we have earthly cache
sudo rm -rf /var/lib/docker/{buildkit,containers,image,network,overlay2,plugins.runtimes,swarm,tmp,trust}/*
sudo service docker stop
sudo bash -c 'rm -rf /var/lib/docker/{buildkit,containers,image,network,overlay2,plugins.runtimes,swarm,tmp,trust}/*'
# restart docker - might take down builds, but we need to recover anyway
sudo service docker restart
# wait for other docker restarts
Expand Down
Loading