diff --git a/yarn-project/aztec/src/cli/aztec_start_options.ts b/yarn-project/aztec/src/cli/aztec_start_options.ts index 663734e3bbd..32c971638b1 100644 --- a/yarn-project/aztec/src/cli/aztec_start_options.ts +++ b/yarn-project/aztec/src/cli/aztec_start_options.ts @@ -8,6 +8,8 @@ import { proverNodeConfigMappings } from '@aztec/prover-node'; import { allPxeConfigMappings } from '@aztec/pxe'; import { telemetryClientConfigMappings } from '@aztec/telemetry-client/start'; +import { defaultMnemonic } from '../sandbox.js'; + // Define an interface for options export interface AztecStartOption { flag: string; @@ -89,14 +91,14 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = { { flag: '--l1-chain-id ', description: 'The L1 chain ID', - defaultValue: 1337, + defaultValue: 31337, envVar: 'L1_CHAIN_ID', parseVal: val => parseInt(val, 10), }, { flag: '--l1-mnemonic ', description: 'Mnemonic for L1 accounts. Will be used if no publisher private keys are provided', - defaultValue: undefined, + defaultValue: defaultMnemonic, envVar: 'MNEMONIC', }, ], diff --git a/yarn-project/aztec/src/cli/cmds/start_node.ts b/yarn-project/aztec/src/cli/cmds/start_node.ts index a3666539abb..0f7693cb983 100644 --- a/yarn-project/aztec/src/cli/cmds/start_node.ts +++ b/yarn-project/aztec/src/cli/cmds/start_node.ts @@ -1,5 +1,6 @@ import { aztecNodeConfigMappings, createAztecNodeRpcServer } from '@aztec/aztec-node'; import { type PXE } from '@aztec/circuit-types'; +import { NULL_KEY } from '@aztec/ethereum'; import { type ServerList } from '@aztec/foundation/json-rpc/server'; import { type LogFn } from '@aztec/foundation/log'; import { createProvingJobSourceServer } from '@aztec/prover-client/prover-agent'; @@ -40,7 +41,7 @@ export const startNode = async ( } // Deploy contracts if needed - if (options.deployAztecContracts) { + if (nodeSpecificOptions.deployAztecContracts) { let account; if (nodeSpecificOptions.publisherPrivateKey) { account = privateKeyToAccount(nodeSpecificOptions.publisherPrivateKey); @@ -68,7 +69,7 @@ export const startNode = async ( } else { const sequencerConfig = extractNamespacedOptions(options, 'sequencer'); let account; - if (!sequencerConfig.publisherPrivateKey) { + if (!sequencerConfig.publisherPrivateKey || sequencerConfig.publisherPrivateKey === NULL_KEY) { if (!options.l1Mnemonic) { userLog( '--sequencer.publisherPrivateKey or --l1-mnemonic is required to start Aztec Node with --sequencer option',