From bdacc704738f53e932eaa748f2d68b05a338feae Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Tue, 10 Dec 2024 11:21:18 -0300 Subject: [PATCH 1/3] fix: Bad merge on boxes --- README.md | 2 +- boxes/boxes/vite/src/config.ts | 21 ++++++++----------- .../token_bridge/4_typescript_glue_code.md | 4 ++-- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 7b2c6d3c5ea..752f9fd3c35 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/boxes/boxes/vite/src/config.ts b/boxes/boxes/vite/src/config.ts index 0052072e235..e17120a3fc5 100644 --- a/boxes/boxes/vite/src/config.ts +++ b/boxes/boxes/vite/src/config.ts @@ -1,7 +1,7 @@ import { AztecNode, Fr, - createDebugLogger, + createLogger, deriveMasterIncomingViewingSecretKey, } from "@aztec/aztec.js"; import { BoxReactContractArtifact } from "../artifacts/BoxReact"; @@ -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(); @@ -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 = { @@ -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); @@ -74,7 +71,7 @@ export class PrivateEnv { db, tips, proofCreator, - config, + config ); await server.start(); return server; @@ -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 = [ @@ -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) ); diff --git a/docs/docs/tutorials/codealong/contract_tutorials/token_bridge/4_typescript_glue_code.md b/docs/docs/tutorials/codealong/contract_tutorials/token_bridge/4_typescript_glue_code.md index 267f12fc939..cf7a02878be 100644 --- a/docs/docs/tutorials/codealong/contract_tutorials/token_bridge/4_typescript_glue_code.md +++ b/docs/docs/tutorials/codealong/contract_tutorials/token_bridge/4_typescript_glue_code.md @@ -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'; @@ -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; From b8f69c1a1f69f6125c31e24e8bbbe34101c45787 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Tue, 10 Dec 2024 12:29:20 -0300 Subject: [PATCH 2/3] Fix vite box build --- boxes/boxes/vite/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boxes/boxes/vite/package.json b/boxes/boxes/vite/package.json index cbc2f139190..2107b6c79ad 100644 --- a/boxes/boxes/vite/package.json +++ b/boxes/boxes/vite/package.json @@ -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" }, @@ -45,4 +45,4 @@ "vite-plugin-node-polyfills": "^0.22.0", "vite-plugin-top-level-await": "^1.4.4" } -} +} \ No newline at end of file From c5aaf22a1a5082cfc6d5d707ec13a28a6cd172b9 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Tue, 10 Dec 2024 14:27:50 -0300 Subject: [PATCH 3/3] Disable vite --- boxes/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boxes/package.json b/boxes/package.json index 7cd31f064ca..a904d9b967b 100644 --- a/boxes/package.json +++ b/boxes/package.json @@ -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", @@ -43,4 +43,4 @@ "devDependencies": { "@playwright/test": "1.46.1" } -} +} \ No newline at end of file