Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Bad merge on boxes and disable vite box #10579

Merged
merged 3 commits into from
Dec 10, 2024
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ This provide an interactive environment for debugging the CI test.

## Debugging

Logging goes through the [DebugLogger](yarn-project/foundation/src/log/debug.ts) module in Typescript. `LOG_LEVEL` controls the default log level, and one can set alternate levels for specific modules, such as `debug; warn: module1, module2; error: module3`.
Logging goes through the [Logger](yarn-project/foundation/src/log/) module in Typescript. `LOG_LEVEL` controls the default log level, and one can set alternate levels for specific modules, such as `debug; warn: module1, module2; error: module3`.

## Releases

Expand Down
4 changes: 2 additions & 2 deletions boxes/boxes/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"clean": "rm -rf ./dist .tsbuildinfo ./artifacts ./src/contracts/target",
"prep": "yarn clean && yarn compile && yarn codegen",
"dev": "vite",
"build": "tsc -b && vite build",
"build": "yarn prep && tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
Expand Down Expand Up @@ -45,4 +45,4 @@
"vite-plugin-node-polyfills": "^0.22.0",
"vite-plugin-top-level-await": "^1.4.4"
}
}
}
21 changes: 9 additions & 12 deletions boxes/boxes/vite/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
AztecNode,
Fr,
createDebugLogger,
createLogger,
deriveMasterIncomingViewingSecretKey,
} from "@aztec/aztec.js";
import { BoxReactContractArtifact } from "../artifacts/BoxReact";
Expand All @@ -24,10 +24,7 @@ export class PrivateEnv {
accountContract;
account: AccountManager;

constructor(
private secretKey: Fr,
private nodeURL: string,
) {}
constructor(private secretKey: Fr, private nodeURL: string) {}

async init() {
const config = getPXEServiceConfig();
Expand All @@ -36,20 +33,20 @@ export class PrivateEnv {
const proofCreator = new TestPrivateKernelProver();
this.pxe = await this.createPXEService(aztecNode, config, proofCreator);
const encryptionPrivateKey = deriveMasterIncomingViewingSecretKey(
this.secretKey,
this.secretKey
);
this.accountContract = new SingleKeyAccountContract(encryptionPrivateKey);
this.account = new AccountManager(
this.pxe,
this.secretKey,
this.accountContract,
this.accountContract
);
}

async createPXEService(
aztecNode: AztecNode,
config: PXEServiceConfig,
proofCreator?: PrivateKernelProver,
proofCreator?: PrivateKernelProver
) {
const l1Contracts = await aztecNode.getL1ContractAddresses();
const configWithContracts = {
Expand All @@ -60,7 +57,7 @@ export class PrivateEnv {
const store = await createStore(
"pxe_data",
configWithContracts,
createDebugLogger("aztec:pxe:data:indexeddb"),
createLogger("pxe:data:indexeddb")
);

const keyStore = new KeyStore(store);
Expand All @@ -74,7 +71,7 @@ export class PrivateEnv {
db,
tips,
proofCreator,
config,
config
);
await server.start();
return server;
Expand All @@ -88,7 +85,7 @@ export class PrivateEnv {

export const deployerEnv = new PrivateEnv(
SECRET_KEY,
process.env.PXE_URL || "http://localhost:8080",
process.env.PXE_URL || "http://localhost:8080"
);

const IGNORE_FUNCTIONS = [
Expand All @@ -97,5 +94,5 @@ const IGNORE_FUNCTIONS = [
"sync_notes",
];
export const filteredInterface = BoxReactContractArtifact.functions.filter(
(f) => !IGNORE_FUNCTIONS.includes(f.name),
(f) => !IGNORE_FUNCTIONS.includes(f.name)
);
6 changes: 3 additions & 3 deletions boxes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "0.5.0",
"type": "module",
"scripts": {
"compile": "yarn workspaces foreach -A -v run compile",
"build": "yarn workspaces foreach -A -v run build",
"compile": "yarn workspaces foreach --exclude vite -A -v run compile",
"build": "yarn workspaces foreach --exclude vite -A -v run build",
"install-browsers": "playwright install --with-deps",
"publish": "yarn npm publish",
"test": "vitest bin.test.js",
Expand Down Expand Up @@ -43,4 +43,4 @@
"devDependencies": {
"@playwright/test": "1.46.1"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Open `cross_chain_messaging.test.ts` and paste the initial description of the te

```typescript
import { beforeAll, describe, beforeEach, expect, jest, it} from '@jest/globals'
import { AccountWallet, AztecAddress, BatchCall, type DebugLogger, EthAddress, Fr, computeAuthWitMessageHash, createLogger, createPXEClient, waitForPXE, L1ToL2Message, L1Actor, L2Actor, type PXE, type Wallet } from '@aztec/aztec.js';
import { AccountWallet, AztecAddress, BatchCall, type Logger, EthAddress, Fr, computeAuthWitMessageHash, createLogger, createPXEClient, waitForPXE, L1ToL2Message, L1Actor, L2Actor, type PXE, type Wallet } from '@aztec/aztec.js';
import { getInitialTestAccountsWallets } from '@aztec/accounts/testing';
import { TokenContract } from '@aztec/noir-contracts.js/Token';
import { sha256ToField } from '@aztec/foundation/crypto';
Expand Down Expand Up @@ -79,7 +79,7 @@ async function publicDeployAccounts(sender: Wallet, accountsToDeploy: Wallet[],
describe('e2e_cross_chain_messaging', () => {
jest.setTimeout(90_000);

let logger: DebugLogger;
let logger: Logger;
let wallets: AccountWallet[];
let user1Wallet: AccountWallet;
let user2Wallet: AccountWallet;
Expand Down
Loading