Skip to content

chore: begin nr constant cleanup - #25014

Merged
nventuro merged 6 commits into
merge-train/fairiesfrom
nv/constant-cleanup
Jul 29, 2026
Merged

chore: begin nr constant cleanup#25014
nventuro merged 6 commits into
merge-train/fairiesfrom
nv/constant-cleanup

Conversation

@nventuro

Copy link
Copy Markdown
Contributor

This deletes some old unused constants, moves some from the protocol into aztec-nr, and creates the aztec-nr infra required for testing that we're not colliding with the protocol's (e.g. not colliding with any domain separator). This is not complete - some aztecnr constants (and app constants) remain in protocol, specifically those that are also used in TS, as that'd require also changing transpilation.

@nventuro
nventuro requested a review from nchamo July 27, 2026 17:53
@nventuro
nventuro requested a review from LeilaWang as a code owner July 27, 2026 17:53
Comment thread docs/docs-developers/docs/resources/migration_notes.md
Comment thread noir-projects/labs/aztec-nr/aztec/src/note/mod.nr
nventuro added 6 commits July 29, 2026 20:56
Remove 22 unused constants from the noir-protocol-circuits types crate (and
their generated mirror in constants.gen.ts). None are referenced by any
circuit, contract, TypeScript, C++, PIL, or Solidity code.

13 are directly unreferenced. The other 9 are only used to build the removed
ones, so they become dead in the same pass -- e.g. PRIVATE_ACCUMULATED_DATA_LENGTH
and PRIVATE_VALIDATION_REQUESTS_LENGTH fed only PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH.

Also drop the two ContractClassRegistry function-broadcast magic values along
with their assertions in constants_tests.nr, shrinking the HashedValueTester
capacity from 78 to 76.
Seven of the domain separators moved into aztec-nr are only used within the
aztec crate (and its test), so they don't belong on the external API. Downgrade
them from pub to pub(crate). PARTIAL_NOTE_COMMITMENT and NOTE_COMPLETION_LOG_TAG
stay pub, since the uint-note crate and nft_contract import them.
This is a node-level DoS-mitigation default (max AVM debug-log memory reads
during public tx simulation), not a protocol constant, and it is consumed
only by TypeScript. Define it in stdlib's avm.ts next to CollectionLimitsConfig
and drop it from constants.nr and the generated C++/TS copies.
…tants

Document the relocation of nine DOM_SEP__* domain separators from the
protocol constants module into the aztec crate: two stay public under
aztec::note::partial_note, the other seven become pub(crate).
@nventuro
nventuro force-pushed the nv/constant-cleanup branch from 2aa0f55 to f51fbcb Compare July 29, 2026 21:00
@nventuro
nventuro enabled auto-merge (squash) July 29, 2026 21:43
@nventuro
nventuro merged commit a713e8a into merge-train/fairies Jul 29, 2026
12 checks passed
@nventuro
nventuro deleted the nv/constant-cleanup branch July 29, 2026 21:46
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request Aug 5, 2026
BEGIN_COMMIT_OVERRIDE
fix(pxe): validate a BoundedVec against its storage array on
deserialization (AztecProtocol#25035)
chore: add disclaimers on poc contracts (AztecProtocol#24975)
chore: begin nr constant cleanup (AztecProtocol#25014)
fix(txe): authorize sync_state utility calls in inlined contexts
(AztecProtocol#25034)
refactor(stdlib): a function's return type is a single optional AbiType
(AztecProtocol#25066)
feat(pxe): hash-pinned node read cache (AztecProtocol#24969)
feat(noir-projects): publish compiled protocol artifacts to npm (AztecProtocol#25075)
fix(ci): trim GitHub commit API response in upload_benchmarks to avoid
E2BIG on large merge commits (AztecProtocol#25077)
END_COMMIT_OVERRIDE
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.

2 participants