Skip to content

feat(aztec-nr)!: domain-separated tags on log emission#21910

Merged
nchamo merged 7 commits into
merge-train/fairiesfrom
feat/domain-separated-log-tags
Mar 26, 2026
Merged

feat(aztec-nr)!: domain-separated tags on log emission#21910
nchamo merged 7 commits into
merge-train/fairiesfrom
feat/domain-separated-log-tags

Conversation

@nchamo

@nchamo nchamo commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

What changed

All logs emitted through the framework now include a domain-separated tag at fields[0]. Each log category uses its own domain separator via compute_log_tag(raw_tag, dom_sep):

  • Events (DOM_SEP__EVENT_LOG_TAG): the event type ID is the raw tag
  • Message delivery (DOM_SEP__UNCONSTRAINED_MSG_LOG_TAG): the discovery tag is the raw tag, separator chosen based on delivery mode
  • Partial note completion logs (DOM_SEP__NOTE_COMPLETION_LOG_TAG): the partial note commitment is the raw tag

The low-level emit methods now take tag as an explicit first parameter and have been renamed with an _unsafe suffix to signal that calling them directly bypasses the framework's tagging:

  • emit_private_log_unsafe(tag, log, length)
  • emit_raw_note_log_unsafe(tag, log, length, note_hash_counter)
  • emit_public_log_unsafe(tag, log)

On the TypeScript side, computeLogTag and SiloedTag.compute apply the appropriate domain separator, and getPublicEvents filters by domain-separated event tag server-side.

Fixes F-424
Fixes F-224.

@nchamo nchamo self-assigned this Mar 23, 2026
@nchamo nchamo changed the title feat!(aztec-nr): domain-separated tags on log emission feat(aztec-nr)!: domain-separated tags on log emission Mar 23, 2026
Comment thread yarn-project/aztec.js/src/api/events.ts
Comment thread noir-projects/aztec-nr/aztec/src/messages/logs/utils.nr
@nchamo nchamo added the ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure label Mar 23, 2026
@nchamo nchamo force-pushed the feat/domain-separated-log-tags branch from c5cbeee to 7e1b1f5 Compare March 23, 2026 22:12
Comment thread noir-projects/aztec-nr/aztec/src/event/event_emission.nr
Comment thread noir-projects/aztec-nr/aztec/src/messages/logs/partial_note.nr
Comment thread noir-projects/aztec-nr/aztec/src/messages/processing/mod.nr
Comment thread noir-projects/noir-protocol-circuits/crates/types/src/hash.nr
@nchamo nchamo marked this pull request as draft March 24, 2026 17:38
@nchamo nchamo added the ci-draft Run CI on draft PRs. label Mar 24, 2026
Comment thread yarn-project/end-to-end/src/e2e_block_building.test.ts
…omain-separated-log-tags

# Conflicts:
#	docs/docs-developers/docs/resources/migration_notes.md
@nchamo nchamo marked this pull request as ready for review March 24, 2026 18:12
Comment thread docs/docs-developers/docs/resources/migration_notes.md Outdated
Comment thread docs/docs-developers/docs/resources/migration_notes.md
Comment thread noir-projects/aztec-nr/aztec/src/context/private_context.nr Outdated
Comment thread noir-projects/aztec-nr/aztec/src/event/event_emission.nr
Comment thread noir-projects/aztec-nr/aztec/src/messages/processing/mod.nr
nchamo added 2 commits March 25, 2026 20:17
…omain-separated-log-tags

# Conflicts:
#	docs/docs-developers/docs/resources/migration_notes.md
#	noir-projects/aztec-nr/aztec/src/messages/logs/partial_note.nr
#	noir-projects/aztec-nr/uint-note/src/uint_note.nr
#	noir-projects/noir-contracts/contracts/app/nft_contract/src/types/nft_note.nr
#	noir-projects/noir-protocol-circuits/crates/types/src/constants_tests.nr
@nchamo nchamo enabled auto-merge (squash) March 25, 2026 23:30
@nchamo nchamo merged commit 8c88e11 into merge-train/fairies Mar 26, 2026
19 of 23 checks passed
@nchamo nchamo deleted the feat/domain-separated-log-tags branch March 26, 2026 00:16
@AztecBot

Copy link
Copy Markdown
Collaborator

❌ Failed to cherry-pick to v4-next due to conflicts. (🤖) View backport run.

AztecBot pushed a commit that referenced this pull request Mar 26, 2026
nchamo added a commit that referenced this pull request Mar 26, 2026
github-merge-queue Bot pushed a commit that referenced this pull request Mar 26, 2026
BEGIN_COMMIT_OVERRIDE
feat(aztec-nr): add initialization check to utility functions (#21751)
refactor(aztec-nr): remove storage from init_test_contract (#21996)
chore: remove claude file (#22012)
refactor!: more consistent oracle names (#22018)
feat(aztec-nr)!: app-silo getSharedSecret oracle (#22020)
fix: disallow infinite pubkeys (#22026)
feat: aztecnr log prefixing (#22027)
feat(aztec-nr)!: domain-separated tags on log emission (#21910)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v4-next ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants