Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/note-send-proof-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
env:
AZTEC_ENV: local-network
AZTEC_VERSION: 4.2.0
AZTEC_VERSION: 4.3.0

steps:
- name: Checkout repository
Expand All @@ -44,6 +44,7 @@ jobs:
- name: Update path
run: |
echo "$HOME/.aztec/current/bin" >> $GITHUB_PATH
echo "$HOME/.aztec/current/internal-bin" >> $GITHUB_PATH
echo "$HOME/.aztec/current/node_modules/.bin" >> $GITHUB_PATH
echo "$HOME/.aztec/bin" >> $GITHUB_PATH

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/prediction-market-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
env:
AZTEC_ENV: local-network
AZTEC_VERSION: 4.2.0
AZTEC_VERSION: 4.3.0

steps:
- name: Checkout repository
Expand Down Expand Up @@ -46,6 +46,7 @@ jobs:
- name: Update path
run: |
echo "$HOME/.aztec/current/bin" >> $GITHUB_PATH
echo "$HOME/.aztec/current/internal-bin" >> $GITHUB_PATH
echo "$HOME/.aztec/current/node_modules/.bin" >> $GITHUB_PATH
echo "$HOME/.aztec/bin" >> $GITHUB_PATH

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/recursive-verification-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
env:
AZTEC_ENV: local-network
AZTEC_VERSION: 4.2.0
AZTEC_VERSION: 4.3.0

steps:
- name: Checkout repository
Expand All @@ -43,6 +43,7 @@ jobs:
- name: Update path
run: |
echo "$HOME/.aztec/current/bin" >> $GITHUB_PATH
echo "$HOME/.aztec/current/internal-bin" >> $GITHUB_PATH
echo "$HOME/.aztec/current/node_modules/.bin" >> $GITHUB_PATH
echo "$HOME/.aztec/bin" >> $GITHUB_PATH

Expand All @@ -52,7 +53,7 @@ jobs:

- name: Compile Noir circuit
working-directory: recursive_verification/circuit
run: nargo compile
run: aztec-nargo compile

- name: Change ownership for nargo files
run: sudo chown -R $(whoami) ~/nargo || true
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-wallet-webapp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Test Wallet Webapp Tests
runs-on: ubuntu-latest
env:
AZTEC_VERSION: 4.2.0
AZTEC_VERSION: 4.3.0

steps:
- name: Checkout repository
Expand All @@ -43,6 +43,7 @@ jobs:
- name: Update path
run: |
echo "$HOME/.aztec/current/bin" >> $GITHUB_PATH
echo "$HOME/.aztec/current/internal-bin" >> $GITHUB_PATH
echo "$HOME/.aztec/current/node_modules/.bin" >> $GITHUB_PATH
echo "$HOME/.aztec/bin" >> $GITHUB_PATH

Expand Down
18 changes: 9 additions & 9 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ aztec-examples/
bash -i <(curl -s https://install.aztec.network)

# Set specific version (examples may require different versions)
aztec-up 4.2.0 # For recursive_verification
aztec-up 4.3.0 # For recursive_verification
```

### Building Contracts
Expand All @@ -69,14 +69,14 @@ yarn ccc # Compiles contract and generates TypeScript bindings

### Building Vanilla Noir Circuits

The compatible `nargo` (version 1.0.0-beta.18) is bundled with the Aztec CLI at `~/.aztec/current/bin/nargo`. Ensure `~/.aztec/current/bin` is on your `PATH` (the Aztec installer adds this automatically).
The compatible `nargo` (version 1.0.0-beta.21) is bundled with the Aztec CLI at `~/.aztec/current/bin/aztec-nargo`. As of Aztec v4.3.0, bundled binaries are exposed only under their `aztec-` prefixed names — invoke `aztec-nargo` (a drop-in for `nargo`) rather than the bare name, which is no longer on `PATH`. Ensure `~/.aztec/current/bin` is on your `PATH` (the Aztec installer adds this automatically).

```bash
# Verify nargo is available
~/.aztec/current/bin/nargo --version
aztec-nargo --version

# Compile a vanilla Noir circuit
nargo compile
aztec-nargo compile
```

### Running Local Development Environment
Expand All @@ -103,7 +103,7 @@ aztec test
aztec start --txe --port=8081

# Terminal 2: Run tests with output
nargo test --oracle-resolver http://127.0.0.1:8081 --show-output
aztec-nargo test --oracle-resolver http://127.0.0.1:8081 --show-output

# Run integration tests (recursive_verification)
cd recursive_verification
Expand Down Expand Up @@ -151,10 +151,10 @@ cd recursive_verification
yarn install

# 2. Verify nargo is available (bundled with Aztec CLI)
~/.aztec/current/bin/nargo --version
aztec-nargo --version

# 3. Compile the Noir circuit
cd circuit && nargo compile && cd ..
cd circuit && aztec-nargo compile && cd ..

# 4. Compile the Aztec contract
yarn ccc # Runs: aztec compile && aztec codegen
Expand All @@ -172,7 +172,7 @@ yarn recursion # Deploys ValueNotEqual contract and verifies proof
yarn test

# Optional: Run circuit tests
cd circuit && nargo test
cd circuit && aztec-nargo test
```

### Starter Token Example
Expand Down Expand Up @@ -260,7 +260,7 @@ easy_private_state = { git = "https://github.com/AztecProtocol/aztec-packages/",

**Version Compatibility**: All examples use the same Aztec version:

- All examples: v4.2.0
- All examples: v4.3.0

### JavaScript/TypeScript Dependencies

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You can find additional examples in the Aztec monorepo [docs examples folder](ht

### 1. [Recursive Verification](./recursive_verification)

**Aztec Version**: 4.2.0
**Aztec Version**: 4.3.0

Demonstrates how to verify Noir circuit proofs within Aztec smart contracts using the UltraHonk proving system. This example showcases:

Expand All @@ -43,7 +43,7 @@ Demonstrates how to verify Noir circuit proofs within Aztec smart contracts usin
bash -i <(curl -s https://install.aztec.network)

# Set specific Aztec version (if needed)
aztec-up 4.2.0
aztec-up 4.3.0
```

## Development Workflow
Expand Down
2 changes: 1 addition & 1 deletion account-contract/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ compiler_version = ">=1.0.0"
type = "contract"

[dependencies]
aztec = { git = "https://github.com/AztecProtocol/aztec-nr/", tag = "v4.2.0", directory = "aztec" }
aztec = { git = "https://github.com/AztecProtocol/aztec-nr/", tag = "v4.3.0", directory = "aztec" }
12 changes: 6 additions & 6 deletions account-contract/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,25 +172,25 @@ When implementing custom account contracts in Aztec, be aware of these critical

## Aztec Version Compatibility

This example is compatible with **Aztec v4.2.0**.
This example is compatible with **Aztec v4.3.0**.

To set this version:

```bash
aztec-up 4.2.0
aztec-up 4.3.0
```

## Dependencies

### Noir Dependencies

- **aztec**: v4.2.0
- **aztec**: v4.3.0

### TypeScript Dependencies

- **@aztec/aztec.js**: 4.2.0
- **@aztec/accounts**: 4.2.0
- **@aztec/stdlib**: 4.2.0
- **@aztec/aztec.js**: 4.3.0
- **@aztec/accounts**: 4.3.0
- **@aztec/stdlib**: 4.3.0
- **@aztec/entrypoints**: Included in aztec.js

## Project Structure
Expand Down
12 changes: 6 additions & 6 deletions account-contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"typescript": "^5.0.0"
},
"dependencies": {
"@aztec/accounts": "4.2.0",
"@aztec/aztec.js": "4.2.0",
"@aztec/foundation": "4.2.0",
"@aztec/noir-contracts.js": "4.2.0",
"@aztec/stdlib": "4.2.0",
"@aztec/wallets": "4.2.0",
"@aztec/accounts": "4.3.0",
"@aztec/aztec.js": "4.3.0",
"@aztec/foundation": "4.3.0",
"@aztec/noir-contracts.js": "4.3.0",
"@aztec/stdlib": "4.3.0",
"@aztec/wallets": "4.3.0",
"tsx": "^4.20.6"
}
}
31 changes: 3 additions & 28 deletions account-contract/src/main.nr
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ pub contract PasswordAccount {
context::PrivateContext,
hash::compute_siloed_nullifier,
macros::{functions::{external, initializer, only_self, noinitcheck, view}, storage::storage},
oracle::{
get_nullifier_membership_witness::get_low_nullifier_membership_witness,
notes::{get_sender_for_tags, set_sender_for_tags},
},
oracle::get_nullifier_membership_witness::get_low_nullifier_membership_witness,
protocol::{address::AztecAddress, hash::poseidon2_hash},
state_vars::PublicImmutable,
};
Expand All @@ -33,23 +30,6 @@ pub contract PasswordAccount {
fn constructor(password: Field) {
let hashed_password = poseidon2_hash([password]);
self.enqueue_self.set_hashed_password(hashed_password);

// Safety: The sender for tags is only used to compute unconstrained shared secrets for emitting logs.
// Since this value is only used for unconstrained tagging and not for any constrained logic,
// it is safe to load from an unconstrained context.
// TODO(#15752): Improve the sender_for_tags handling here when the original sender is undefined.
let original_sender = unsafe { get_sender_for_tags().unwrap_or(self.address) };

// We set the sender for tags to this contract because we don't want to force the user corresponding to this
// account to add the account deployer as a sender to their PXE. By setting it to this contract, user's PXE
// will manage to find the note even if the account deployer is not registered as a sender (i.e
// `pxe.registerSender(accountDeployer)` was not called)

// Safety: Comment from above applies here as well.
unsafe { set_sender_for_tags(self.address) };

// Safety: Comment from above applies here as well.
unsafe { set_sender_for_tags(original_sender) };
}

#[external("public")]
Expand All @@ -63,11 +43,6 @@ pub contract PasswordAccount {
#[external("private")]
#[noinitcheck]
fn entrypoint(app_payload: AppPayload, fee_payment_method: u8, cancellable: bool, password: Field) {
// Safety: The sender for tags is only used to compute unconstrained shared secrets for emitting logs.
// Since this value is only used for unconstrained tagging and not for any constrained logic,
// it is safe to set from a constrained context.
unsafe { set_sender_for_tags(self.address) };

let actions = AccountActions::init(self.context, is_valid_impl);
actions.entrypoint(app_payload, fee_payment_method, cancellable, password);
}
Expand Down Expand Up @@ -110,9 +85,9 @@ pub contract PasswordAccount {
// it is not as part of execution of the contract, so we are good.
let nullifier = compute_authwit_nullifier(self.address, inner_hash);
let siloed_nullifier = compute_siloed_nullifier(consumer, nullifier);
let lower_wit =
let (leaf_preimage, _witness) =
get_low_nullifier_membership_witness(self.context.block_header(), siloed_nullifier);
let is_spent = lower_wit.leaf_preimage.nullifier == siloed_nullifier;
let is_spent = leaf_preimage.nullifier == siloed_nullifier;

!is_spent & valid_in_private
}
Expand Down
18 changes: 9 additions & 9 deletions account-contract/ts/deploy-account-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ const deployAccountOpts: DeployOptions = {
(await getSponsoredPFCContract()).address
),
},
contractAddressSalt: Fr.ONE,
universalDeploy: true,
};

const passwordAccountContract = new PasswordAccountContract(new Fr(123123123123));
Expand Down Expand Up @@ -62,14 +60,16 @@ const wallet = await EmbeddedWallet.create(createAztecNodeClient('http://localho

await wallet.registerContract(await getSponsoredPFCContract(), SponsoredFPCContractArtifact);

const accountContractDeployMethod = new DeployMethod(
publicKeys,
const accountContractDeployMethod = DeployMethod.create(
wallet,
artifact,
(instance, wallet) => Contract.at(instance.address, artifact, wallet),
constructorArgs,
constructorName,
)
{
artifact,
postDeployCtor: (instance, wallet) => Contract.at(instance.address, artifact, wallet),
args: constructorArgs,
constructorNameOrArtifact: constructorName,
},
{ salt: Fr.ONE, universalDeploy: true, publicKeys },
);

const { estimatedGas, stats } = await accountContractDeployMethod.simulate(deployAccountOpts);

Expand Down
Loading
Loading