Skip to content

Commit

Permalink
fix: default config (#7848)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr authored Aug 8, 2024
1 parent 0152c9a commit 78ae6b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions yarn-project/aztec/src/cli/aztec_start_options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -89,14 +91,14 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
{
flag: '--l1-chain-id <value>',
description: 'The L1 chain ID',
defaultValue: 1337,
defaultValue: 31337,
envVar: 'L1_CHAIN_ID',
parseVal: val => parseInt(val, 10),
},
{
flag: '--l1-mnemonic <value>',
description: 'Mnemonic for L1 accounts. Will be used if no publisher private keys are provided',
defaultValue: undefined,
defaultValue: defaultMnemonic,
envVar: 'MNEMONIC',
},
],
Expand Down
5 changes: 3 additions & 2 deletions yarn-project/aztec/src/cli/cmds/start_node.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 78ae6b4

Please sign in to comment.