Skip to content

Commit 8a6f2b5

Browse files
committed
applying suggestions, making testnet ci job run nightly
1 parent 1c2158a commit 8a6f2b5

File tree

6 files changed

+17
-23
lines changed

6 files changed

+17
-23
lines changed

.github/workflows/testnet.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
name: Testnet Tests
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- dev
8-
pull_request:
9-
branches:
10-
- main
11-
- dev
4+
schedule:
5+
- cron: '0 2 * * *'
126
workflow_dispatch:
137
inputs:
148
skip_deployment:
@@ -59,7 +53,7 @@ jobs:
5953
- name: Test testnet connectivity
6054
run: |
6155
echo "Testing testnet connectivity..."
62-
curl -s https://aztec-alpha-testnet-fullnode.zkv.xyz/status || echo "Warning: Could not connect to testnet"
56+
curl -s https://aztec-testnet-fullnode.zkv.xyz/status || echo "Warning: Could not connect to testnet"
6357
6458
- name: Deploy account to testnet
6559
if: ${{ !inputs.skip_deployment }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ log/
66
.DS_Store
77
codegenCache.json
88
store/
9+
.tsbuildinfo

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ aztec-up 2.0.2
5050

5151
### Environment Configuration
5252

53-
This project uses environment-specific `.env` files to manage configuration:
53+
This project uses JSON configuration files to manage environment-specific settings:
5454

55-
- `.env.sandbox` - Configuration for local sandbox development
56-
- `.env.testnet` - Configuration for testnet deployment
57-
- `.env.local` - Alternative configuration for local development (optional)
55+
- `config/sandbox.json` - Configuration for local sandbox development
56+
- `config/testnet.json` - Configuration for testnet deployment
5857

59-
The system automatically loads the appropriate `.env` file based on the `ENV` environment variable. If `ENV` is not set, it defaults to `sandbox`.
58+
The system automatically loads the appropriate configuration file based on the `ENV` environment variable. If `ENV` is not set, it defaults to `sandbox`.
59+
60+
The configuration files contain network URLs, timeouts, and environment-specific settings. You can modify these files to customize your development environment.
6061

6162
### Running on Sandbox (Local Development)
6263

@@ -84,7 +85,7 @@ yarn deploy-account::testnet # Deploy account to testnet
8485
yarn interaction-existing-contract::testnet # Interact with testnet contracts
8586
```
8687

87-
The `::testnet` suffix automatically sets `ENV=testnet`, loading configuration from `.env.testnet`.
88+
The `::testnet` suffix automatically sets `ENV=testnet`, loading configuration from `config/testnet.json`.
8889

8990
---
9091

@@ -171,10 +172,10 @@ You can find a handful of scripts in the `./scripts` folder.
171172

172173
The `./src/utils/` folder contains utility functions:
173174

174-
- `./src/utils/create_account_from_env.ts` provides functions to create Schnorr accounts from environment variables (SECRET and SALT), useful for account management across different environments.
175-
- `./src/utils/setup_pxe.ts` provides a function to set up and configure the Private Execution Environment (PXE) service with proper configuration for local development.
175+
- `./src/utils/create_account_from_env.ts` provides functions to create Schnorr accounts from environment variables (SECRET, SIGNING_KEY, and SALT), useful for account management across different environments.
176+
- `./src/utils/setup_pxe.ts` provides a function to set up and configure the Private Execution Environment (PXE) service with proper configuration based on the environment.
176177
- `./src/utils/deploy_account.ts` provides a function to deploy Schnorr accounts to the network with sponsored fee payment, including key generation and deployment verification.
177-
- `./src/utils/environment.ts` provides environment-aware configuration loading, automatically selecting the correct `.env` file based on the `ENV` variable.
178+
- `./config/config.ts` provides environment-aware configuration loading, automatically selecting the correct JSON config file based on the `ENV` variable.
178179

179180
## **Error Resolution**
180181

config/testnet.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "testnet",
33
"environment": "testnet",
44
"network": {
5-
"nodeUrl": "https://aztec-alpha-testnet-fullnode.zkv.xyz",
5+
"nodeUrl": "https://aztec-testnet-fullnode.zkv.xyz",
66
"l1RpcUrl": "https://ethereum-sepolia-rpc.publicnode.com",
77
"l1ChainId": 11155111
88
},

src/test/e2e/accounts.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { PrivateVotingContractArtifact, PrivateVotingContract } from "../../arti
22
import { AccountManager, AccountWallet, ContractDeployer, createLogger, Fr, PXE, TxStatus, getContractInstanceFromInstantiationParams, Logger, Fq } from "@aztec/aztec.js";
33
import { generateSchnorrAccounts } from "@aztec/accounts/testing"
44
import { getSchnorrAccount } from '@aztec/accounts/schnorr';
5-
import { deriveSigningKey } from '@aztec/stdlib/keys';
65
import { spawn, spawnSync } from 'child_process';
76

87
import { SponsoredFeePaymentMethod } from "@aztec/aztec.js/fee/testing";
@@ -59,7 +58,7 @@ describe("Accounts", () => {
5958
let secretKey = Fr.random();
6059
let signingKey = Fq.random();
6160
let salt = Fr.random();
62-
let schnorrAccount = await getSchnorrAccount(pxe, secretKey, deriveSigningKey(secretKey), salt)
61+
let schnorrAccount = await getSchnorrAccount(pxe, secretKey, signingKey, salt)
6362
await schnorrAccount.deploy({ fee: { paymentMethod: sponsoredPaymentMethod } }).wait({ timeout: getTimeouts().deployTimeout });
6463
ownerWallet = await schnorrAccount.getWallet();
6564
}, 600000)

src/test/e2e/index.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
99
import { getSponsoredFPCInstance } from "../../utils/sponsored_fpc.js";
1010
import { setupPXE } from "../../utils/setup_pxe.js";
1111
import { SponsoredFPCContract } from "@aztec/noir-contracts.js/SponsoredFPC";
12-
import { deriveSigningKey } from "@aztec/stdlib/keys";
1312
import { getL1RpcUrl, getTimeouts } from "../../../config/config.js";
1413

1514
describe("Voting", () => {
@@ -48,7 +47,7 @@ describe("Voting", () => {
4847
let secretKey = Fr.random();
4948
let signingKey = Fq.random();
5049
let salt = Fr.random();
51-
let schnorrAccount = await getSchnorrAccount(pxe, secretKey, deriveSigningKey(secretKey), salt)
50+
let schnorrAccount = await getSchnorrAccount(pxe, secretKey, signingKey, salt)
5251
await schnorrAccount.deploy({ fee: { paymentMethod: sponsoredPaymentMethod } }).wait({ timeout: getTimeouts().deployTimeout });
5352
firstWallet = await schnorrAccount.getWallet();
5453
const existingSenders = await pxe.getSenders();

0 commit comments

Comments
 (0)