From 6c4e61c19613560af8aedba03531958f8471bb62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Venturo?= Date: Tue, 11 Jun 2024 18:09:23 +0100 Subject: [PATCH] chore: update comment on transient nullification (#7001) This is just an outdated comment that needed updating. --- noir-projects/aztec-nr/aztec/src/note/lifecycle.nr | 11 ++++++----- scripts/earthly-ci | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/noir-projects/aztec-nr/aztec/src/note/lifecycle.nr b/noir-projects/aztec-nr/aztec/src/note/lifecycle.nr index 12683945fc4..851fb53e1bd 100644 --- a/noir-projects/aztec-nr/aztec/src/note/lifecycle.nr +++ b/noir-projects/aztec-nr/aztec/src/note/lifecycle.nr @@ -64,11 +64,12 @@ pub fn destroy_note( // 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); diff --git a/scripts/earthly-ci b/scripts/earthly-ci index 4e1791347e4..0cbc5846205 100755 --- a/scripts/earthly-ci +++ b/scripts/earthly-ci @@ -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