refactor!: rename L1->L2 message content/secret to public_content_hash/private_content - #25374
Draft
benesjan wants to merge 2 commits into
Draft
refactor!: rename L1->L2 message content/secret to public_content_hash/private_content#25374benesjan wants to merge 2 commits into
benesjan wants to merge 2 commits into
Conversation
benesjan
marked this pull request as ready for review
September 1, 2026 10:59
benesjan
requested review from
a team,
LeilaWang,
just-mitch and
nventuro
as code owners
September 1, 2026 11:00
… a patch The labs components (yarn-project, aztec-nr, noir-contracts, docs) are built from the labs/ submodule, not the in-tree copies, so the rename has to reach them through the labs-patches series. Patch 0004 is the labs side of this change; the in-tree copies remain updated for consistency.
benesjan
marked this pull request as draft
September 1, 2026 13:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the rename agreed in governance discussion #52. The Inbox data model is unchanged; the names now describe what the fields are:
contentpublicContentHashpublic_content_hashsecretprivateContent(Fr[])private_content([Field; N])secretHashprivateContentHashprivate_content_hashcomputeSecretHash/compute_secret_hashcomputePrivateContentHashcompute_private_content_hashDOM_SEP__SECRET_HASH("secret_hash")DomainSeparator.PRIVATE_CONTENT_HASHDOM_SEP__PRIVATE_CONTENT_HASH("private_content_hash")Breaking changes
Inbox.sendL2Message(_recipient, _publicContentHash, _privateContentHash),L1ToL2Msgstruct /MessageSentevent fields,Inbox__PublicContentHashTooLarge/Inbox__PrivateContentHashTooLarge(new selectors),FeeJuicePortal.depositToAztecPublic(..., _privateContentHash)and its event, referenceTokenPortal/UniswapPortal.consume_l1_to_l2_message(public_content_hash, private_content, sender, leaf_index),compute_private_content_hash,compute_l1_to_l2_message_{hash,nullifier}params, TXEsend_l1_to_l2_message/send_l1_to_l2_message_from_private_content_hash. Applied to bothaztec-nrand theaztec_sublibcopy.FeeJuice.claim/TokenBridge.claim_*keep theirsecretparams (used as the message's private content).L1ToL2Message.{publicContentHash,privateContentHash},computePrivateContentHash(privateContent: Fr[])(mirrors Noir;computeSecretHashtook a single field),computeFeeJuiceMessageNullifier/getNonNullifiedL1ToL2MessageWitnesstakeprivateContent: Fr[].generateClaimSecretremoved — useFr.random()+computePrivateContentHash.L2Claim.claimSecret/claimSecretHashkeep their names; bot store schema bumped.get-l1-to-l2-message-witness --private-content.claimSecret=payment arg andgenerate-secret-and-hashunchanged (hash values differ).Migration notes added. Out of scope: L2→L1 messages (
L2ToL1Msg.contentetc.),TransparentNote.secret_hash(app-level; only itscompute_private_content_hashcall updated), versioned docs.Labs submodule
The labs components (yarn-project, aztec-nr, noir-contracts, docs) are built from the
labs/submodule, so the labs side of the rename is carried aslabs-patches/0004-refactor-rename-L1-L2-message-content-secret-to-publ.patch(the same diff as the in-tree copies, minus the already-removedgenerate-secret-and-hashCLI command). It needs to be upstreamed to aztec-node (labs-patches/bootstrap.sh upstream 4).Testing
forge testfor Inbox, buckets, fee portal, portals, rollup suites: green.nargo testfor protocolconstants_tests(derives the new separator) and aztec-nr hash vector: green.yarn buildin yarn-project: clean. Unit tests instdlib(hash/messaging),bot,txe: green.private_execution.test.tsL1→L2 cases, TXE-backedl1_to_l2_messages.nrtests and the cross-chain e2e suites.