Skip to content

chore: upgrade v4.0.0 devnet.2 patch.1#24

Merged
zkfrov merged 2 commits into
test/jsfrom
chore/upgrade-v4.0.0-devnet.2-patch.1
Feb 26, 2026
Merged

chore: upgrade v4.0.0 devnet.2 patch.1#24
zkfrov merged 2 commits into
test/jsfrom
chore/upgrade-v4.0.0-devnet.2-patch.1

Conversation

@zkfrov
Copy link
Copy Markdown
Collaborator

@zkfrov zkfrov commented Feb 25, 2026

Description

Upgrades all Aztec dependencies from 4.0.0-devnet.1-patch.0 to 4.0.0-devnet.2-patch.1.

Changes

API migrations

  • TestWalletEmbeddedWallet (new embedded wallet API)
  • SponsoredFeePaymentMethod now required for on-chain contract class publication (bytecode DA cost exceeds default fee juice balance)
  • Publication payloads merged into a single transaction via mergeExecutionPayloads, matching how DeployMethod bundles publish + constructor in the SDK

CustomEmbeddedWallet

  • Replaced registerCustomAccount monkey-patch with a proper EmbeddedWallet subclass
  • Overrides getAccountFromAddress to support custom account types (e.g. SchnorrInitializerlessAccount)
  • Shared across tests and benchmarks via utils.ts

Fee sponsorship

  • setupTestSuite now registers the canonical SponsoredFPC and returns a SponsoredFeePaymentMethod
  • deployWithImmutables accepts an optional fee for published deployments
  • deploySchnorrAccount accepts an optional fee forwarded to the deploy method

Housekeeping

  • Deduplicated SponsoredFPC registration (was in e2e test, benchmark, and utils separately)
  • Moved registerCustomAccount from e2e test + benchmark into shared utils.ts

Summary by cubic

Upgrades to Aztec v4.0.0-devnet.2-patch.1, migrates to the new EmbeddedWallet APIs, and renames the package to @defi-wonderland/aztec-immutables-macro. Adds fee sponsorship support and merges publication steps into a single transaction across utils, tests, and benchmarks.

  • Migration

    • TestWallet → EmbeddedWallet; add CustomEmbeddedWallet with registerCustomAccount for custom accounts.
    • Setup registers SponsoredFPC and returns SponsoredFeePaymentMethod; pass fee to deployWithImmutables, deployMixedUsageContract, and deploySchnorrAccount.
    • Publication now merges class + instance + init into one tx; fee payload is prepended when provided.
    • Replace wallet.createAccount(...) with wallet.createSchnorrAccount(secret, salt).
    • Simulations query balances from the account’s own address as needed.
    • Package renamed to @defi-wonderland/aztec-immutables-macro; README import paths updated.
    • Shared helpers consolidated in utils; duplicate SponsoredFPC registration removed.
  • Dependencies

    • Bump all Aztec packages to 4.0.0-devnet.2-patch.1; add @aztec/wallets and remove @aztec/test-wallet.
    • Update Noir Nargo.toml aztec tags and aztec-benchmark GitHub workflow refs to devnet.2-patch.1.
    • Update aztec-standards prerelease tarball and package metadata (name/version/repo).
    • Add wallet_data_* to .gitignore.

Written for commit 3c7ac35. Summary will update on new commits.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for sponsored fee payments in account deployments and transactions.
  • Chores

    • Package renamed to @defi-wonderland/aztec-immutables-macro.
    • Updated dependencies to Aztec 4.0.0-devnet.2-patch.1.
    • Enhanced wallet infrastructure for improved account management.
  • Documentation

    • Updated README with new import paths for the renamed package.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 18 files

@github-actions
Copy link
Copy Markdown

Benchmark Comparison

CPU Cores RAM Arch
AMD EPYC 7763 64-Core Processor 16 63 GiB x64

Contract: account

Function Gates DA Gas L2 Gas Proving Time (ms)
Status Base PR Diff Base PR Diff Base PR Diff Base PR Diff
🟢 Immutables Account: transfer_private_to_private 550,774 537,939 -12,835 (-2.3%) 22,016 1,312 -20,704 (-94.0%) 512 512 7,226 7,090 -136 (-1.9%)
🟢 Immutables Account: transfer_private_to_public 588,359 573,546 -14,813 (-2.5%) 12,800 800 -12,000 (-93.8%) 149,749 149,749 7,536 7,521 -15 (-0.2%)
🟢 Standard Account: deploy + initialize 516,258 511,144 -5,114 (-1.0%) 12,288 768 -11,520 (-93.8%) 512 512 7,066 6,956 -110 (-1.6%)
🟢 Standard Account: transfer_private_to_private 549,676 536,841 -12,835 (-2.3%) 22,016 1,312 -20,704 (-94.0%) 512 512 7,154 7,051 -103 (-1.4%)
🟢 Standard Account: transfer_private_to_public 587,261 572,448 -14,813 (-2.5%) 12,800 800 -12,000 (-93.8%) 149,749 149,749 7,574 7,327 -247 (-3.3%)

@zkfrov
Copy link
Copy Markdown
Collaborator Author

zkfrov commented Feb 25, 2026

@coderabbitai full review !!!

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 25, 2026

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 25, 2026

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

This pull request updates the project from Aztec version 4.0.0-devnet.1-patch.0 to 4.0.0-devnet.2-patch.1 across dependencies, workflow references, and Nargo manifests. The package is renamed from immutables-macro to aztec-immutables-macro. The wallet implementation is refactored from TestWallet to a new CustomEmbeddedWallet class that extends EmbeddedWallet and manages custom accounts. Fee payment handling is introduced through SponsoredFeePaymentMethod, with deployment flows updated to accept optional fee parameters. Documentation and import paths are updated to reflect the new package name.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the primary change—upgrading Aztec dependencies to v4.0.0-devnet.2-patch.1—which is the main objective reflected throughout the changeset.
Description check ✅ Passed The description thoroughly documents the upgrade, API migrations, new CustomEmbeddedWallet class, fee sponsorship changes, and housekeeping improvements with clear sections and examples, exceeding the minimal template requirements.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/upgrade-v4.0.0-devnet.2-patch.1

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 25, 2026

@zkfrov, I'll perform a full review of all the changes in this PR right away! 🐰

✅ Actions performed

Full review triggered.

Comment thread src/ts/e2e.test.ts
Comment on lines -461 to -466
const deployerBalanceAfter = await token.methods
.balance_of_private(deployerAddress)
.simulate({ from: deployerAddress });
expect(deployerBalanceAfter).toEqual(
deployerBalanceBefore + TRANSFER_AMOUNT,
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropped expectation?

Comment on lines -62 to -74
// Register the canonical SponsoredFPC for fee sponsorship.
const sponsoredFPCInstance =
await getContractInstanceFromInstantiationParams(
SponsoredFPCContract.artifact,
{ salt: new Fr(0n) },
);
await wallet.registerContract(
sponsoredFPCInstance,
SponsoredFPCContract.artifact,
);
const sponsoredPaymentMethod = new SponsoredFeePaymentMethod(
sponsoredFPCInstance.address,
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did we don't need this?

Copy link
Copy Markdown
Member

@wei3erHase wei3erHase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@zkfrov zkfrov merged commit 0b3b77f into test/js Feb 26, 2026
6 checks passed
@zkfrov zkfrov deleted the chore/upgrade-v4.0.0-devnet.2-patch.1 branch February 26, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants