@aztec/cli 3.0.0-nightly.20251120 → 3.0.0-nightly.20251122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/cmds/validator_keys/add.d.ts.map +1 -1
- package/dest/cmds/validator_keys/add.js +2 -4
- package/dest/cmds/validator_keys/index.d.ts.map +1 -1
- package/dest/cmds/validator_keys/index.js +6 -2
- package/dest/cmds/validator_keys/new.d.ts +0 -1
- package/dest/cmds/validator_keys/new.d.ts.map +1 -1
- package/dest/cmds/validator_keys/new.js +2 -3
- package/dest/cmds/validator_keys/shared.d.ts +0 -1
- package/dest/cmds/validator_keys/shared.d.ts.map +1 -1
- package/dest/cmds/validator_keys/shared.js +2 -7
- package/dest/config/network_config.js +1 -1
- package/package.json +28 -28
- package/src/cmds/validator_keys/add.ts +0 -4
- package/src/cmds/validator_keys/index.ts +4 -2
- package/src/cmds/validator_keys/new.ts +0 -3
- package/src/cmds/validator_keys/shared.ts +0 -8
- package/src/config/network_config.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/cmds/validator_keys/add.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQnD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAW5D,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAElE,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,EAAE,GAAG,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../src/cmds/validator_keys/add.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQnD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAW5D,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAElE,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,EAAE,GAAG,EAAE,KAAK,iBAoGpG"}
|
|
@@ -11,7 +11,7 @@ export async function addValidatorKeys(existing, options, log) {
|
|
|
11
11
|
validatePublisherOptions(options);
|
|
12
12
|
// validate remote signer options
|
|
13
13
|
validateRemoteSignerOptions(options);
|
|
14
|
-
const { dataDir, file, count, publisherCount = 0, publishers, mnemonic, accountIndex = 0, addressIndex, ikm, blsPath, json, feeRecipient: feeRecipientOpt, coinbase: coinbaseOpt,
|
|
14
|
+
const { dataDir, file, count, publisherCount = 0, publishers, mnemonic, accountIndex = 0, addressIndex, ikm, blsPath, json, feeRecipient: feeRecipientOpt, coinbase: coinbaseOpt, remoteSigner: remoteSignerOpt, password, encryptedKeystoreDir } = options;
|
|
15
15
|
const validatorCount = typeof count === 'number' && Number.isFinite(count) && count > 0 ? Math.floor(count) : 1;
|
|
16
16
|
const baseAddressIndex = addressIndex ?? 0;
|
|
17
17
|
const keystore = loadKeystoreFile(existing);
|
|
@@ -24,7 +24,6 @@ export async function addValidatorKeys(existing, options, log) {
|
|
|
24
24
|
throw new Error('feeRecipient is required (either present in existing file or via --fee-recipient)');
|
|
25
25
|
}
|
|
26
26
|
const coinbase = coinbaseOpt ?? first.coinbase;
|
|
27
|
-
const fundingAccount = fundingAccountOpt ?? first.fundingAccount;
|
|
28
27
|
const derivedRemoteSigner = first.attester?.remoteSignerUrl || first.attester?.eth?.remoteSignerUrl;
|
|
29
28
|
const remoteSigner = remoteSignerOpt ?? derivedRemoteSigner;
|
|
30
29
|
// Ensure we always have a mnemonic for key derivation if none was provided
|
|
@@ -42,8 +41,7 @@ export async function addValidatorKeys(existing, options, log) {
|
|
|
42
41
|
blsPath,
|
|
43
42
|
feeRecipient,
|
|
44
43
|
coinbase,
|
|
45
|
-
remoteSigner
|
|
46
|
-
fundingAccount
|
|
44
|
+
remoteSigner
|
|
47
45
|
});
|
|
48
46
|
keystore.validators.push(...validators);
|
|
49
47
|
// If password provided, write ETH JSON V3 and BLS BN254 keystores and replace plaintext
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmds/validator_keys/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmds/validator_keys/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,WAsI1D"}
|
|
@@ -5,11 +5,15 @@ export function injectCommands(program, log) {
|
|
|
5
5
|
'valKeys',
|
|
6
6
|
'valkeys'
|
|
7
7
|
]).description('Manage validator keystores for node operators');
|
|
8
|
-
group.command('new').summary('Generate a new validator keystore JSON').description('Generates a new validator keystore with ETH secp256k1 accounts and optional BLS accounts').option('--data-dir <path>', 'Directory to store keystore(s). Defaults to ~/.aztec/keystore').option('--file <name>', 'Keystore file name. Defaults to key1.json (or keyN.json if key1.json exists)').option('--count <N>', 'Number of validators to generate', parseOptionalInteger).option('--publisher-count <N>', 'Number of publisher accounts per validator (default 0)', (value)=>parseOptionalInteger(value, 0)).option('--publishers <privateKeys>', 'Comma-separated list of publisher private keys for all validators.', (value)=>value.split(',').map((key)=>key.trim())).option('--mnemonic <mnemonic>', 'Mnemonic for ETH/BLS derivation').option('--passphrase <str>', 'Optional passphrase for mnemonic').option('--account-index <N>', 'Base account index for ETH/BLS derivation', parseOptionalInteger).option('--address-index <N>', 'Base address index for ETH/BLS derivation', parseOptionalInteger).option('--coinbase <address>', 'Coinbase ETH address to use when proposing. Defaults to attester address.', parseEthereumAddress)
|
|
8
|
+
group.command('new').summary('Generate a new validator keystore JSON').description('Generates a new validator keystore with ETH secp256k1 accounts and optional BLS accounts').option('--data-dir <path>', 'Directory to store keystore(s). Defaults to ~/.aztec/keystore').option('--file <name>', 'Keystore file name. Defaults to key1.json (or keyN.json if key1.json exists)').option('--count <N>', 'Number of validators to generate', parseOptionalInteger).option('--publisher-count <N>', 'Number of publisher accounts per validator (default 0)', (value)=>parseOptionalInteger(value, 0)).option('--publishers <privateKeys>', 'Comma-separated list of publisher private keys for all validators.', (value)=>value.split(',').map((key)=>key.trim())).option('--mnemonic <mnemonic>', 'Mnemonic for ETH/BLS derivation').option('--passphrase <str>', 'Optional passphrase for mnemonic').option('--account-index <N>', 'Base account index for ETH/BLS derivation', parseOptionalInteger).option('--address-index <N>', 'Base address index for ETH/BLS derivation', parseOptionalInteger).option('--coinbase <address>', 'Coinbase ETH address to use when proposing. Defaults to attester address.', parseEthereumAddress)// TODO: add funding account back in when implemented
|
|
9
|
+
// .option('--funding-account <privateKey|address>', 'ETH private key (or address for remote signer setup) to fund publishers')
|
|
10
|
+
.option('--remote-signer <url>', 'Default remote signer URL for accounts in this file').option('--ikm <hex>', 'Initial keying material for BLS (alternative to mnemonic)', (value)=>parseHex(value, 32)).option('--bls-path <path>', `EIP-2334 path (default ${defaultBlsPath})`).option('--password <str>', 'Password for writing keystore files (ETH JSON V3 and BLS EIP-2335). Empty string allowed').option('--encrypted-keystore-dir <dir>', 'Output directory for encrypted keystore file(s)').option('--json', 'Echo resulting JSON to stdout').option('--staker-output', 'Generate a single staker output JSON file with an array of validator entries').option('--gse-address <address>', 'GSE contract address (required with --staker-output)', parseEthereumAddress).option('--l1-rpc-urls <urls>', 'L1 RPC URLs (comma-separated, required with --staker-output)', (value)=>value.split(',')).option('-c, --l1-chain-id <number>', 'L1 chain ID (required with --staker-output)', (value)=>parseInt(value), 31337).requiredOption('--fee-recipient <address>', 'Aztec address that will receive fees', parseAztecAddress).action(async (options)=>{
|
|
9
11
|
const { newValidatorKeystore } = await import('./new.js');
|
|
10
12
|
await newValidatorKeystore(options, log);
|
|
11
13
|
});
|
|
12
|
-
group.command('add').summary('Augment an existing validator keystore JSON').description('Adds attester/publisher/BLS entries to an existing keystore using the same flags as new').argument('<existing>', 'Path to existing keystore JSON').option('--data-dir <path>', 'Directory where keystore(s) live. (default: ~/.aztec/keystore)').option('--file <name>', 'Override output file name. (default: key<N>.json)').option('--count <N>', 'Number of validators to add. (default: 1)', parseOptionalInteger).option('--publisher-count <N>', 'Number of publisher accounts per validator (default 0)', (value)=>parseOptionalInteger(value, 0)).option('--publishers <privateKeys>', 'Comma-separated list of publisher private keys for all validators.', (value)=>value.split(',').map((key)=>key.trim())).option('--mnemonic <mnemonic>', 'Mnemonic for ETH/BLS derivation').option('--passphrase <str>', 'Optional passphrase for mnemonic').option('--account-index <N>', 'Base account index for ETH/BLS derivation', parseOptionalInteger).option('--address-index <N>', 'Base address index for ETH/BLS derivation', parseOptionalInteger).option('--coinbase <address>', 'Coinbase ETH address to use when proposing. Defaults to attester address.', parseEthereumAddress)
|
|
14
|
+
group.command('add').summary('Augment an existing validator keystore JSON').description('Adds attester/publisher/BLS entries to an existing keystore using the same flags as new').argument('<existing>', 'Path to existing keystore JSON').option('--data-dir <path>', 'Directory where keystore(s) live. (default: ~/.aztec/keystore)').option('--file <name>', 'Override output file name. (default: key<N>.json)').option('--count <N>', 'Number of validators to add. (default: 1)', parseOptionalInteger).option('--publisher-count <N>', 'Number of publisher accounts per validator (default 0)', (value)=>parseOptionalInteger(value, 0)).option('--publishers <privateKeys>', 'Comma-separated list of publisher private keys for all validators.', (value)=>value.split(',').map((key)=>key.trim())).option('--mnemonic <mnemonic>', 'Mnemonic for ETH/BLS derivation').option('--passphrase <str>', 'Optional passphrase for mnemonic').option('--account-index <N>', 'Base account index for ETH/BLS derivation', parseOptionalInteger).option('--address-index <N>', 'Base address index for ETH/BLS derivation', parseOptionalInteger).option('--coinbase <address>', 'Coinbase ETH address to use when proposing. Defaults to attester address.', parseEthereumAddress)// TODO: add funding account back in when implemented
|
|
15
|
+
// .option('--funding-account <privateKey|address>', 'ETH private key (or address for remote signer setup) to fund publishers')
|
|
16
|
+
.option('--remote-signer <url>', 'Default remote signer URL for accounts in this file').option('--ikm <hex>', 'Initial keying material for BLS (alternative to mnemonic)', (value)=>parseHex(value, 32)).option('--bls-path <path>', `EIP-2334 path (default ${defaultBlsPath})`).option('--empty', 'Generate an empty skeleton without keys').option('--password <str>', 'Password for writing keystore files (ETH JSON V3 and BLS EIP-2335). Empty string allowed').option('--encrypted-keystore-dir <dir>', 'Output directory for encrypted keystore file(s)').option('--json', 'Echo resulting JSON to stdout').requiredOption('--fee-recipient <address>', 'Aztec address that will receive fees', parseAztecAddress).action(async (existing, options)=>{
|
|
13
17
|
const { addValidatorKeys } = await import('./add.js');
|
|
14
18
|
await addValidatorKeys(existing, options, log);
|
|
15
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new.d.ts","sourceRoot":"","sources":["../../../src/cmds/validator_keys/new.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAyBhE,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAA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M,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,EAAE,GAAG,EAAE,KAAK,iBAuJ1F"}
|
|
@@ -17,7 +17,7 @@ export async function newValidatorKeystore(options, log) {
|
|
|
17
17
|
validatePublisherOptions(options);
|
|
18
18
|
// validate remote signer options
|
|
19
19
|
validateRemoteSignerOptions(options);
|
|
20
|
-
const { dataDir, file, count, publisherCount = 0, publishers, json, coinbase, accountIndex = 0, addressIndex = 0, feeRecipient, remoteSigner,
|
|
20
|
+
const { dataDir, file, count, publisherCount = 0, publishers, json, coinbase, accountIndex = 0, addressIndex = 0, feeRecipient, remoteSigner, blsPath, ikm, mnemonic: _mnemonic, password, encryptedKeystoreDir, stakerOutput, gseAddress, l1RpcUrls, l1ChainId } = options;
|
|
21
21
|
const mnemonic = _mnemonic ?? generateMnemonic(wordlist);
|
|
22
22
|
if (!_mnemonic && !json) {
|
|
23
23
|
log('No mnemonic provided, generating new one...');
|
|
@@ -40,8 +40,7 @@ export async function newValidatorKeystore(options, log) {
|
|
|
40
40
|
blsPath,
|
|
41
41
|
feeRecipient,
|
|
42
42
|
coinbase,
|
|
43
|
-
remoteSigner
|
|
44
|
-
fundingAccount
|
|
43
|
+
remoteSigner
|
|
45
44
|
});
|
|
46
45
|
// If password provided, write ETH JSON V3 and BLS BN254 keystores and replace plaintext
|
|
47
46
|
if (password !== undefined) {
|
|
@@ -19,7 +19,6 @@ export type BuildValidatorsInput = {
|
|
|
19
19
|
feeRecipient: AztecAddress;
|
|
20
20
|
coinbase?: EthAddress;
|
|
21
21
|
remoteSigner?: string;
|
|
22
|
-
fundingAccount?: EthAddress;
|
|
23
22
|
};
|
|
24
23
|
export declare function withValidatorIndex(path: string, accountIndex?: number, addressIndex?: number): string;
|
|
25
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/cmds/validator_keys/shared.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAWhE,MAAM,MAAM,gBAAgB,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEvG,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/cmds/validator_keys/shared.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UA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emonic, baseAccountIndex, addressIndex, remo
|
|
|
50
50
|
} : '0x' + Buffer.from(acct.getHdKey().privateKey).toString('hex');
|
|
51
51
|
}
|
|
52
52
|
export async function buildValidatorEntries(input) {
|
|
53
|
-
const { validatorCount, publisherCount = 0, publishers, accountIndex, baseAddressIndex, mnemonic, ikm, blsPath, feeRecipient, coinbase, remoteSigner
|
|
53
|
+
const { validatorCount, publisherCount = 0, publishers, accountIndex, baseAddressIndex, mnemonic, ikm, blsPath, feeRecipient, coinbase, remoteSigner } = input;
|
|
54
54
|
const summaries = [];
|
|
55
55
|
const validators = await Promise.all(Array.from({
|
|
56
56
|
length: validatorCount
|
|
@@ -104,8 +104,7 @@ export async function buildValidatorEntries(input) {
|
|
|
104
104
|
publisher: publisherField
|
|
105
105
|
} : {},
|
|
106
106
|
feeRecipient,
|
|
107
|
-
coinbase: coinbase ?? attesterEthAddress
|
|
108
|
-
fundingAccount
|
|
107
|
+
coinbase: coinbase ?? attesterEthAddress
|
|
109
108
|
};
|
|
110
109
|
}));
|
|
111
110
|
return {
|
|
@@ -270,9 +269,5 @@ export function maybePrintJson(log, jsonFlag, obj) {
|
|
|
270
269
|
v.publisher = await maybeEncryptEth(pub, `publisher_${i + 1}`);
|
|
271
270
|
}
|
|
272
271
|
}
|
|
273
|
-
// Optional fundingAccount within validator
|
|
274
|
-
if ('fundingAccount' in v) {
|
|
275
|
-
v.fundingAccount = await maybeEncryptEth(v.fundingAccount, `funding_${i + 1}`);
|
|
276
|
-
}
|
|
277
272
|
}
|
|
278
273
|
}
|
|
@@ -81,7 +81,7 @@ const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
|
|
|
81
81
|
const cacheDir = process.env.DATA_DIRECTORY ? join(process.env.DATA_DIRECTORY, 'cache') : undefined;
|
|
82
82
|
const networkConfig = await getNetworkConfig(networkName, cacheDir);
|
|
83
83
|
if (!networkConfig) {
|
|
84
|
-
|
|
84
|
+
throw new Error(`Failed to fetch network config for network: ${networkName}`);
|
|
85
85
|
}
|
|
86
86
|
enrichVar('BOOTSTRAP_NODES', networkConfig.bootnodes.join(','));
|
|
87
87
|
enrichVar('L1_CHAIN_ID', String(networkConfig.l1ChainId));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251122",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
@@ -71,21 +71,21 @@
|
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@aztec/accounts": "3.0.0-nightly.
|
|
75
|
-
"@aztec/archiver": "3.0.0-nightly.
|
|
76
|
-
"@aztec/aztec.js": "3.0.0-nightly.
|
|
77
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
78
|
-
"@aztec/entrypoints": "3.0.0-nightly.
|
|
79
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
80
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
81
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
82
|
-
"@aztec/node-keystore": "3.0.0-nightly.
|
|
83
|
-
"@aztec/node-lib": "3.0.0-nightly.
|
|
84
|
-
"@aztec/p2p": "3.0.0-nightly.
|
|
85
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
86
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
87
|
-
"@aztec/test-wallet": "3.0.0-nightly.
|
|
88
|
-
"@aztec/world-state": "3.0.0-nightly.
|
|
74
|
+
"@aztec/accounts": "3.0.0-nightly.20251122",
|
|
75
|
+
"@aztec/archiver": "3.0.0-nightly.20251122",
|
|
76
|
+
"@aztec/aztec.js": "3.0.0-nightly.20251122",
|
|
77
|
+
"@aztec/constants": "3.0.0-nightly.20251122",
|
|
78
|
+
"@aztec/entrypoints": "3.0.0-nightly.20251122",
|
|
79
|
+
"@aztec/ethereum": "3.0.0-nightly.20251122",
|
|
80
|
+
"@aztec/foundation": "3.0.0-nightly.20251122",
|
|
81
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251122",
|
|
82
|
+
"@aztec/node-keystore": "3.0.0-nightly.20251122",
|
|
83
|
+
"@aztec/node-lib": "3.0.0-nightly.20251122",
|
|
84
|
+
"@aztec/p2p": "3.0.0-nightly.20251122",
|
|
85
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251122",
|
|
86
|
+
"@aztec/stdlib": "3.0.0-nightly.20251122",
|
|
87
|
+
"@aztec/test-wallet": "3.0.0-nightly.20251122",
|
|
88
|
+
"@aztec/world-state": "3.0.0-nightly.20251122",
|
|
89
89
|
"@ethersproject/wallet": "^5.8.0",
|
|
90
90
|
"@iarna/toml": "^2.2.5",
|
|
91
91
|
"@libp2p/peer-id-factory": "^3.0.4",
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
"viem": "npm:@spalladino/viem@2.38.2-eip7594.0"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@aztec/aztec-node": "3.0.0-nightly.
|
|
103
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
104
|
-
"@aztec/telemetry-client": "3.0.0-nightly.
|
|
102
|
+
"@aztec/aztec-node": "3.0.0-nightly.20251122",
|
|
103
|
+
"@aztec/kv-store": "3.0.0-nightly.20251122",
|
|
104
|
+
"@aztec/telemetry-client": "3.0.0-nightly.20251122",
|
|
105
105
|
"@jest/globals": "^30.0.0",
|
|
106
106
|
"@types/jest": "^30.0.0",
|
|
107
107
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -117,15 +117,15 @@
|
|
|
117
117
|
"typescript": "^5.3.3"
|
|
118
118
|
},
|
|
119
119
|
"peerDependencies": {
|
|
120
|
-
"@aztec/accounts": "3.0.0-nightly.
|
|
121
|
-
"@aztec/bb-prover": "3.0.0-nightly.
|
|
122
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
123
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
124
|
-
"@aztec/noir-contracts.js": "3.0.0-nightly.
|
|
125
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.
|
|
126
|
-
"@aztec/noir-test-contracts.js": "3.0.0-nightly.
|
|
127
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
128
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
120
|
+
"@aztec/accounts": "3.0.0-nightly.20251122",
|
|
121
|
+
"@aztec/bb-prover": "3.0.0-nightly.20251122",
|
|
122
|
+
"@aztec/ethereum": "3.0.0-nightly.20251122",
|
|
123
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251122",
|
|
124
|
+
"@aztec/noir-contracts.js": "3.0.0-nightly.20251122",
|
|
125
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251122",
|
|
126
|
+
"@aztec/noir-test-contracts.js": "3.0.0-nightly.20251122",
|
|
127
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251122",
|
|
128
|
+
"@aztec/stdlib": "3.0.0-nightly.20251122"
|
|
129
129
|
},
|
|
130
130
|
"files": [
|
|
131
131
|
"dest",
|
|
@@ -42,7 +42,6 @@ export async function addValidatorKeys(existing: string, options: AddValidatorKe
|
|
|
42
42
|
json,
|
|
43
43
|
feeRecipient: feeRecipientOpt,
|
|
44
44
|
coinbase: coinbaseOpt,
|
|
45
|
-
fundingAccount: fundingAccountOpt,
|
|
46
45
|
remoteSigner: remoteSignerOpt,
|
|
47
46
|
password,
|
|
48
47
|
encryptedKeystoreDir,
|
|
@@ -63,8 +62,6 @@ export async function addValidatorKeys(existing: string, options: AddValidatorKe
|
|
|
63
62
|
throw new Error('feeRecipient is required (either present in existing file or via --fee-recipient)');
|
|
64
63
|
}
|
|
65
64
|
const coinbase = (coinbaseOpt as EthAddress | undefined) ?? (first.coinbase as EthAddress | undefined);
|
|
66
|
-
const fundingAccount =
|
|
67
|
-
(fundingAccountOpt as EthAddress | undefined) ?? (first.fundingAccount as EthAddress | undefined);
|
|
68
65
|
const derivedRemoteSigner = (first.attester as any)?.remoteSignerUrl || (first.attester as any)?.eth?.remoteSignerUrl;
|
|
69
66
|
const remoteSigner = remoteSignerOpt ?? derivedRemoteSigner;
|
|
70
67
|
|
|
@@ -87,7 +84,6 @@ export async function addValidatorKeys(existing: string, options: AddValidatorKe
|
|
|
87
84
|
feeRecipient,
|
|
88
85
|
coinbase,
|
|
89
86
|
remoteSigner,
|
|
90
|
-
fundingAccount,
|
|
91
87
|
});
|
|
92
88
|
|
|
93
89
|
keystore.validators.push(...validators);
|
|
@@ -33,7 +33,8 @@ export function injectCommands(program: Command, log: LogFn) {
|
|
|
33
33
|
'Coinbase ETH address to use when proposing. Defaults to attester address.',
|
|
34
34
|
parseEthereumAddress,
|
|
35
35
|
)
|
|
36
|
-
|
|
36
|
+
// TODO: add funding account back in when implemented
|
|
37
|
+
// .option('--funding-account <privateKey|address>', 'ETH private key (or address for remote signer setup) to fund publishers')
|
|
37
38
|
.option('--remote-signer <url>', 'Default remote signer URL for accounts in this file')
|
|
38
39
|
.option('--ikm <hex>', 'Initial keying material for BLS (alternative to mnemonic)', value => parseHex(value, 32))
|
|
39
40
|
.option('--bls-path <path>', `EIP-2334 path (default ${defaultBlsPath})`)
|
|
@@ -84,7 +85,8 @@ export function injectCommands(program: Command, log: LogFn) {
|
|
|
84
85
|
'Coinbase ETH address to use when proposing. Defaults to attester address.',
|
|
85
86
|
parseEthereumAddress,
|
|
86
87
|
)
|
|
87
|
-
|
|
88
|
+
// TODO: add funding account back in when implemented
|
|
89
|
+
// .option('--funding-account <privateKey|address>', 'ETH private key (or address for remote signer setup) to fund publishers')
|
|
88
90
|
.option('--remote-signer <url>', 'Default remote signer URL for accounts in this file')
|
|
89
91
|
.option('--ikm <hex>', 'Initial keying material for BLS (alternative to mnemonic)', value => parseHex(value, 32))
|
|
90
92
|
.option('--bls-path <path>', `EIP-2334 path (default ${defaultBlsPath})`)
|
|
@@ -46,7 +46,6 @@ export type NewValidatorKeystoreOptions = {
|
|
|
46
46
|
feeRecipient: AztecAddress;
|
|
47
47
|
coinbase?: EthAddress;
|
|
48
48
|
remoteSigner?: string;
|
|
49
|
-
fundingAccount?: EthAddress;
|
|
50
49
|
stakerOutput?: boolean;
|
|
51
50
|
gseAddress?: EthAddress;
|
|
52
51
|
l1RpcUrls?: string[];
|
|
@@ -75,7 +74,6 @@ export async function newValidatorKeystore(options: NewValidatorKeystoreOptions,
|
|
|
75
74
|
addressIndex = 0,
|
|
76
75
|
feeRecipient,
|
|
77
76
|
remoteSigner,
|
|
78
|
-
fundingAccount,
|
|
79
77
|
blsPath,
|
|
80
78
|
ikm,
|
|
81
79
|
mnemonic: _mnemonic,
|
|
@@ -113,7 +111,6 @@ export async function newValidatorKeystore(options: NewValidatorKeystoreOptions,
|
|
|
113
111
|
feeRecipient,
|
|
114
112
|
coinbase,
|
|
115
113
|
remoteSigner,
|
|
116
|
-
fundingAccount,
|
|
117
114
|
});
|
|
118
115
|
|
|
119
116
|
// If password provided, write ETH JSON V3 and BLS BN254 keystores and replace plaintext
|
|
@@ -29,7 +29,6 @@ export type BuildValidatorsInput = {
|
|
|
29
29
|
feeRecipient: AztecAddress;
|
|
30
30
|
coinbase?: EthAddress;
|
|
31
31
|
remoteSigner?: string;
|
|
32
|
-
fundingAccount?: EthAddress;
|
|
33
32
|
};
|
|
34
33
|
|
|
35
34
|
export function withValidatorIndex(path: string, accountIndex: number = 0, addressIndex: number = 0) {
|
|
@@ -89,7 +88,6 @@ export async function buildValidatorEntries(input: BuildValidatorsInput) {
|
|
|
89
88
|
feeRecipient,
|
|
90
89
|
coinbase,
|
|
91
90
|
remoteSigner,
|
|
92
|
-
fundingAccount,
|
|
93
91
|
} = input;
|
|
94
92
|
|
|
95
93
|
const summaries: ValidatorSummary[] = [];
|
|
@@ -143,7 +141,6 @@ export async function buildValidatorEntries(input: BuildValidatorsInput) {
|
|
|
143
141
|
...(publisherField !== undefined ? { publisher: publisherField } : {}),
|
|
144
142
|
feeRecipient,
|
|
145
143
|
coinbase: coinbase ?? attesterEthAddress,
|
|
146
|
-
fundingAccount,
|
|
147
144
|
} as ValidatorKeyStore;
|
|
148
145
|
}),
|
|
149
146
|
);
|
|
@@ -324,10 +321,5 @@ export async function writeEthJsonV3ToFile(
|
|
|
324
321
|
(v as any).publisher = await maybeEncryptEth(pub, `publisher_${i + 1}`);
|
|
325
322
|
}
|
|
326
323
|
}
|
|
327
|
-
|
|
328
|
-
// Optional fundingAccount within validator
|
|
329
|
-
if ('fundingAccount' in v) {
|
|
330
|
-
(v as any).fundingAccount = await maybeEncryptEth((v as any).fundingAccount, `funding_${i + 1}`);
|
|
331
|
-
}
|
|
332
324
|
}
|
|
333
325
|
}
|
|
@@ -109,7 +109,7 @@ export async function enrichEnvironmentWithNetworkConfig(networkName: NetworkNam
|
|
|
109
109
|
const networkConfig = await getNetworkConfig(networkName, cacheDir);
|
|
110
110
|
|
|
111
111
|
if (!networkConfig) {
|
|
112
|
-
|
|
112
|
+
throw new Error(`Failed to fetch network config for network: ${networkName}`);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
enrichVar('BOOTSTRAP_NODES', networkConfig.bootnodes.join(','));
|