From 9f5e6ef2c9a11d3a1209d425ddf19c9504c23346 Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Wed, 12 Mar 2025 18:40:39 +0000 Subject: [PATCH 1/4] chore: default datadir --- yarn-project/aztec/src/cli/chain_l2_config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yarn-project/aztec/src/cli/chain_l2_config.ts b/yarn-project/aztec/src/cli/chain_l2_config.ts index a09594cd80d4..0da4e1d16ce5 100644 --- a/yarn-project/aztec/src/cli/chain_l2_config.ts +++ b/yarn-project/aztec/src/cli/chain_l2_config.ts @@ -1,3 +1,5 @@ +import path from 'path'; + export type NetworkNames = 'testnet-ignition'; export type L2ChainConfig = { @@ -71,4 +73,5 @@ export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames enrichVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress); enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString()); enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString()); + enrichVar('DATA_DIR', path.join(process.env.HOME || '~', '.aztec', 'testnet', 'data')); } From 71020943c43bc6c4374d656cd6a13212e0236adf Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Wed, 12 Mar 2025 18:41:16 +0000 Subject: [PATCH 2/4] fix --- yarn-project/aztec/src/cli/chain_l2_config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/aztec/src/cli/chain_l2_config.ts b/yarn-project/aztec/src/cli/chain_l2_config.ts index 0da4e1d16ce5..914830798a63 100644 --- a/yarn-project/aztec/src/cli/chain_l2_config.ts +++ b/yarn-project/aztec/src/cli/chain_l2_config.ts @@ -73,5 +73,5 @@ export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames enrichVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress); enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString()); enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString()); - enrichVar('DATA_DIR', path.join(process.env.HOME || '~', '.aztec', 'testnet', 'data')); + enrichVar('DATA_DIR', path.join(process.env.HOME || '~', '.aztec', networkName, 'data')); } From 77aae6c33de7e09234b711d5a08c224c761780dd Mon Sep 17 00:00:00 2001 From: Maddiaa <47148561+Maddiaa0@users.noreply.github.com> Date: Wed, 12 Mar 2025 19:52:43 +0000 Subject: [PATCH 3/4] Update yarn-project/aztec/src/cli/chain_l2_config.ts --- yarn-project/aztec/src/cli/chain_l2_config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/aztec/src/cli/chain_l2_config.ts b/yarn-project/aztec/src/cli/chain_l2_config.ts index 914830798a63..f134bb7434bf 100644 --- a/yarn-project/aztec/src/cli/chain_l2_config.ts +++ b/yarn-project/aztec/src/cli/chain_l2_config.ts @@ -73,5 +73,5 @@ export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames enrichVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress); enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString()); enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString()); - enrichVar('DATA_DIR', path.join(process.env.HOME || '~', '.aztec', networkName, 'data')); + enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec', networkName, 'data')); } From 40203e9248e57bc4e8c0c8cbd328149dac816d87 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Thu, 13 Mar 2025 09:33:38 +0000 Subject: [PATCH 4/4] Restrict env vars to type --- yarn-project/aztec/src/cli/chain_l2_config.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yarn-project/aztec/src/cli/chain_l2_config.ts b/yarn-project/aztec/src/cli/chain_l2_config.ts index f134bb7434bf..247a6eae1aa6 100644 --- a/yarn-project/aztec/src/cli/chain_l2_config.ts +++ b/yarn-project/aztec/src/cli/chain_l2_config.ts @@ -1,3 +1,5 @@ +import type { EnvVar } from '@aztec/foundation/config'; + import path from 'path'; export type NetworkNames = 'testnet-ignition'; @@ -49,7 +51,7 @@ export async function getL2ChainConfig(networkName: NetworkNames): Promise