Skip to content

refactor!: rename L1->L2 message content/secret to public_content_hash/private_content - #25288

Draft
benesjan wants to merge 1 commit into
merge-train/spartanfrom
jb/rename-l1-to-l2-message-fields
Draft

refactor!: rename L1->L2 message content/secret to public_content_hash/private_content#25288
benesjan wants to merge 1 commit into
merge-train/spartanfrom
jb/rename-l1-to-l2-message-fields

Conversation

@benesjan

Copy link
Copy Markdown
Contributor

Implements the rename agreed in governance discussion #52. The Inbox data model is unchanged; the names now describe what the fields are:

Concept Old Solidity / TS Noir
hashed public payload content publicContentHash public_content_hash
L2-side preimage secret privateContent private_content
its commitment secretHash privateContentHash private_content_hash
hash helper computeSecretHash / compute_secret_hash computePrivateContentHash compute_private_content_hash
domain separator DOM_SEP__SECRET_HASH ("secret_hash") DomainSeparator.PRIVATE_CONTENT_HASH DOM_SEP__PRIVATE_CONTENT_HASH ("private_content_hash")

Breaking changes

  • Protocol: the domain separator string was renamed, so the private content hash value changes (41996529381309912954). Pending L1→L2 messages whose hash was computed with the old helper cannot be consumed with the new one. TS↔Noir test vectors regenerated.
  • L1: Inbox.sendL2Message(_recipient, _publicContentHash, _privateContentHash), L1ToL2Msg struct / MessageSent event fields, Inbox__PublicContentHashTooLarge / Inbox__PrivateContentHashTooLarge (new selectors), FeeJuicePortal.depositToAztecPublic(..., _privateContentHash) and its event, reference TokenPortal / UniswapPortal.
  • Aztec.nr: 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, TXE send_l1_to_l2_message / send_l1_to_l2_message_from_private_content_hash. Applied to both aztec-nr and the aztec_sublib copy. FeeJuice.claim / TokenBridge.claim_* / uniswap params renamed.
  • Aztec.js / stdlib: L1ToL2Message.{publicContentHash,privateContentHash}, L2Claim.{claimPrivateContent,claimPrivateContentHash}, generateClaimPrivateContent, computePrivateContentHash; bot store schema bumped to v2.
  • CLI: get-l1-to-l2-message-witness --private-content, --payment ...,claimPrivateContent=, claimPrivateContent JSON/log key.

Migration notes added under "TBD". Out of scope: L2→L1 messages (L2ToL1Msg.content etc.), TransparentNote.secret_hash (app-level; only its compute_private_content_hash call updated), versioned docs.

Testing

  • forge test for Inbox, buckets, fee portal, portals, rollup suites: green.
  • nargo test for protocol constants_tests (derives the new separator) and aztec-nr hash vector: green.
  • yarn build in yarn-project: clean. Unit tests in stdlib (hash/messaging), bot, txe: green.
  • Not yet verified locally (artifact rebuild was in progress when I opened this): PXE private_execution.test.ts L1→L2 cases and TXE-backed l1_to_l2_messages.nr tests — these depend on freshly compiled contract artifacts; relying on CI for them and the cross-chain e2e suites.

@benesjan
benesjan requested review from a team, LeilaWang, just-mitch and nventuro as code owners August 21, 2026 16:43
@benesjan
benesjan marked this pull request as draft August 21, 2026 16:43
@benesjan
benesjan removed request for a team, LeilaWang, just-mitch and nventuro August 21, 2026 16:43
@benesjan
benesjan changed the base branch from next to merge-train/spartan August 21, 2026 16:44
…h/private_content

Renames the fields of the L1->L2 message per governance discussion #52:
content -> publicContentHash, secretHash -> privateContentHash, and the
L2-side preimage secret -> privateContent. Applied across the L1 Inbox
and portals, aztec-nr (and its protocol sublib copy), protocol and app
contracts, stdlib/aztec.js/CLI, and docs.

The domain separator string secret_hash was renamed to
private_content_hash, so the private content hash value changes
(protocol break). TS<->Noir test vectors regenerated.
@benesjan
benesjan force-pushed the jb/rename-l1-to-l2-message-fields branch from 636144e to b1b4db3 Compare August 21, 2026 16:45
@benesjan
benesjan marked this pull request as ready for review August 21, 2026 16:46
@benesjan
benesjan marked this pull request as draft August 21, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant