feat(aztec)!: add counter template for aztec init#22751
Merged
Conversation
critesjosh
reviewed
Apr 23, 2026
| #[storage] | ||
| struct Storage<Context> { | ||
| // Each owner has their own counter, stored as private encrypted notes. | ||
| // Owned: only the owner can interact with their own counter. |
Contributor
There was a problem hiding this comment.
it might be worth clarifying that "ownership" is achieved via readability (encryption) rather than access control (e.g. "Owned dictates who will receive the encrypted notes")
Contributor
Author
There was a problem hiding this comment.
You are right, definitely worth mentioning
dbanks12
reviewed
Apr 23, 2026
dbanks12
left a comment
Contributor
There was a problem hiding this comment.
LGTM once @critesjosh and others are happy!
critesjosh
approved these changes
Apr 24, 2026
mverzilli
approved these changes
Apr 24, 2026
AztecBot
pushed a commit
that referenced
this pull request
Apr 24, 2026
Collaborator
|
✅ Successfully backported to backport-to-v4-next-staging #22763. |
AztecBot
added a commit
that referenced
this pull request
Apr 27, 2026
BEGIN_COMMIT_OVERRIDE feat(aztec)!: add counter template for aztec init (#22751) cherry-pick: fix(pxe): restrict setSenderForTags override to current call (F-564) (#22672) (with conflicts) fix: backport restrict setSenderForTags override to current call (#22672) (#22767) fix(pxe): backport anchor header threading from #22679 to v4-next (#22705) END_COMMIT_OVERRIDE
aminsammara
added a commit
that referenced
this pull request
May 15, 2026
First release candidate for the v4.3 minor.
## What's in this PR
1. **Merge commit `68a4f598` brings v4-next into v4** — 223 non-merge
commits accumulated on `v4-next` since `v4.2.1`. Merged cleanly, no
conflicts.
2. **Release-prep commit `792385e9`:**
- `CHANGELOG.md` — prepended a v4.3.0-rc.1 entry. 162 commits
auto-categorized into BREAKING / Features / Bug Fixes / Documentation /
Miscellaneous, with PR and commit links. Descriptions are raw commit
subjects (uncurated).
- `release-notes-4.3.0-rc.1.md` — narrative GitHub release body with
Summary, Breaking Changes, Highlights (PXE/Wallet, Aztec.nr/TXE, CLI,
Docs), and Notable Bug Fixes. Needs a curation pass before the
release is published.
- `docs/docs-developers/docs/resources/migration_notes.md` — renamed
` ## TBD` to ` ## 4.3.0-rc.1`; new empty ` ## TBD` left at the top
for the next cycle.
3. **Follow-up commit `73d4c80c`:** corrects the framing of the SQLite
kv-store change. Per engineer feedback, this is an opt-in additional
backend (alongside LMDB / IndexedDB), not a forced migration. Removed
from Breaking Changes; moved to PXE/Wallet highlights.
## Breaking changes
- `aztec init` / `aztec new` counter template (#22751)
- Shared protocol-circuit utilities in the history module (refactor!)
## Companion PR
`bump-v4-next-to-4.4.0` opens v4-next's next minor cycle. Merge order
doesn't matter, but both should land before the v4.3.0-rc.1 tag is cut.
critesjosh
added a commit
that referenced
this pull request
May 20, 2026
…or items Backfills v4.3.0 docs with items from the official release notes that weren't carried into the migration notes, framework docs, tutorials, or operator changelog: - migration_notes: add '[CLI] aztec init now scaffolds a Counter example template' under v4.3.0 (#22751). aztec new continues to scaffold blank. - contract_structure: rewrite Directory structure for the 2-crate workspace; drop the stale --name reference removed in v4.3.0. - token_contract tutorial: fix 'aztec init created...' wording to 'aztec new' (the command shown is aztec new bob_token); update live copy from single-crate to 2-crate layout. - recursive_verification tutorial: replace removed 'aztec new --name X Y' with 'aztec new ValueNotEqual'; fix the workspace layout, package name (ValueNotEqual_contract), ccc script, and artifact paths. - v4.3 operator changelog: add 'Other notable changes' for the three non-breaking release-notes items (sequencer last-block signing #22117, stdlib package.json stamping #23393, macOS aztec-up install fixes #23310 / #23335).
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.
Why we are doing this
The default project scaffolded by
aztec initwas too minimal -- it created a blank contract with no callable functions, making it hard for new developers to understand how Aztec contracts work.How it worked before
aztec initcreated a workspace with a blank contract (emptyimplblock) and a basic testaztec new <name>created the same blank contract, either as a new project or adding to an existing workspaceWhat changes
aztec newstays the same -- it scaffolds a blank contract, either as a new standalone project or as a new crate added to an existing workspaceaztec initnow scaffolds a Counter example with:Owned<BalanceSet>for encrypted stateconstructor,increment,get_counter) with short docs explaining privacy model and execution contextTechnical details
We used to build the blank project directly from the bash script. Now we have templates we can simply copy, instead of containing the entire code inside the .sh file
What doesn't change
The existing Counter tutorial docs remain valid since they use
aztec new, which still scaffolds the blank template.Feedback wanted
Please let me know if you have any suggestions on the template content, comments or anything else.
Fixes F-581