@aztec-labs/cli 6.0.0-nightly.20261020 → 6.0.0-nightly.20261022
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/infrastructure/index.d.ts +1 -1
- package/dest/cmds/infrastructure/index.d.ts.map +1 -1
- package/dest/cmds/infrastructure/index.js +3 -2
- package/dest/cmds/infrastructure/sequencers.d.ts +4 -1
- package/dest/cmds/infrastructure/sequencers.d.ts.map +1 -1
- package/dest/cmds/infrastructure/sequencers.js +10 -3
- package/dest/cmds/l1/index.d.ts +1 -1
- package/dest/cmds/l1/index.d.ts.map +1 -1
- package/dest/cmds/l1/index.js +2 -1
- package/dest/cmds/l1/l1_rpc_test_utils.d.ts +10 -2
- package/dest/cmds/l1/l1_rpc_test_utils.d.ts.map +1 -1
- package/dest/cmds/l1/l1_rpc_test_utils.js +35 -1
- package/dest/cmds/l1/update_l1_validators.d.ts +3 -2
- package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
- package/dest/cmds/l1/update_l1_validators.js +3 -3
- package/package.json +23 -23
- package/src/cmds/infrastructure/index.ts +13 -1
- package/src/cmds/infrastructure/sequencers.ts +14 -4
- package/src/cmds/l1/index.ts +6 -0
- package/src/cmds/l1/l1_rpc_test_utils.ts +25 -2
- package/src/cmds/l1/update_l1_validators.ts +7 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec-labs/foundation/log';
|
|
2
2
|
import type { Command } from 'commander';
|
|
3
3
|
export declare function injectCommands(program: Command, log: LogFn): Command;
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jbWRzL2luZnJhc3RydWN0dXJlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLEtBQUssRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQ3hELE9BQU8sS0FBSyxFQUFFLE9BQU8sRUFBRSxNQUFNLFdBQVcsQ0FBQztBQVV6Qyx3QkFBZ0IsY0FBYyxDQUFDLE9BQU8sRUFBRSxPQUFPLEVBQUUsR0FBRyxFQUFFLEtBQUssV0FtRDFEIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmds/infrastructure/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmds/infrastructure/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,WAmD1D"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { ETHEREUM_HOSTS, l1ChainIdOption, nodeOption, parseOptionalInteger } from '../../utils/commands.js';
|
|
1
|
+
import { ETHEREUM_HOSTS, l1ChainIdOption, nodeOption, parseEthereumAddress, parseOptionalInteger } from '../../utils/commands.js';
|
|
2
2
|
export function injectCommands(program, log) {
|
|
3
3
|
program.command('setup-protocol-contracts').description('Bootstrap the blockchain by initializing all the protocol contracts').addOption(nodeOption).option('--testAccounts', 'Deploy funded test accounts.').option('--json', 'Output the contract addresses in JSON format').action(async (options)=>{
|
|
4
4
|
const { setupL2Contracts } = await import('./setup_l2_contract.js');
|
|
5
5
|
await setupL2Contracts(options.nodeUrl, options.testAccounts, options.json, log);
|
|
6
6
|
});
|
|
7
|
-
program.command('sequencers').argument('<command>', 'Command to run: list, add, remove, who-next').argument('[who]', 'Who to add/remove').description('Manages or queries registered sequencers on the L1 rollup contract.').requiredOption('--l1-rpc-urls <string>', 'List of Ethereum host URLs. Chain identifiers localhost and testnet can be used (comma separated)', (arg)=>arg.split(','), [
|
|
7
|
+
program.command('sequencers').argument('<command>', 'Command to run: list, add, remove, who-next').argument('[who]', 'Who to add/remove').option('--recipient <address>', 'For remove (required): address that receives the withdrawn stake; it cannot be changed once set', parseEthereumAddress).description('Manages or queries registered sequencers on the L1 rollup contract.').requiredOption('--l1-rpc-urls <string>', 'List of Ethereum host URLs. Chain identifiers localhost and testnet can be used (comma separated)', (arg)=>arg.split(','), [
|
|
8
8
|
ETHEREUM_HOSTS
|
|
9
9
|
]).option('-m, --mnemonic <string>', 'The mnemonic for the sender of the tx', 'test test test test test test test test test test test junk').option('--block-number <number>', 'Block number to query next sequencer for', parseOptionalInteger).addOption(nodeOption).addOption(l1ChainIdOption).action(async (command, who, options)=>{
|
|
10
10
|
const { sequencers } = await import('./sequencers.js');
|
|
11
11
|
await sequencers({
|
|
12
12
|
command: command,
|
|
13
13
|
who,
|
|
14
|
+
recipient: options.recipient,
|
|
14
15
|
mnemonic: options.mnemonic,
|
|
15
16
|
nodeUrl: options.nodeUrl,
|
|
16
17
|
l1RpcUrls: options.l1RpcUrls,
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import type { EthAddress } from '@aztec-labs/foundation/eth-address';
|
|
1
2
|
import type { LogFn } from '@aztec-labs/foundation/log';
|
|
2
3
|
export declare function sequencers(opts: {
|
|
3
4
|
command: 'list' | 'add' | 'remove' | 'who-next' | 'flush';
|
|
4
5
|
who?: string;
|
|
6
|
+
/** Address that receives the withdrawn stake. Required for `remove`. */
|
|
7
|
+
recipient?: EthAddress;
|
|
5
8
|
mnemonic?: string;
|
|
6
9
|
bn254SecretKey?: bigint;
|
|
7
10
|
nodeUrl: string;
|
|
@@ -9,4 +12,4 @@ export declare function sequencers(opts: {
|
|
|
9
12
|
chainId: number;
|
|
10
13
|
log: LogFn;
|
|
11
14
|
}): Promise<void>;
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VxdWVuY2Vycy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NtZHMvaW5mcmFzdHJ1Y3R1cmUvc2VxdWVuY2Vycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPQSxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSxvQ0FBb0MsQ0FBQztBQUNyRSxPQUFPLEtBQUssRUFBRSxLQUFLLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUl4RCx3QkFBc0IsVUFBVSxDQUFDLElBQUksRUFBRTtJQUNyQyxPQUFPLEVBQUUsTUFBTSxHQUFHLEtBQUssR0FBRyxRQUFRLEdBQUcsVUFBVSxHQUFHLE9BQU8sQ0FBQztJQUMxRCxHQUFHLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDYix3RUFBd0U7SUFDeEUsU0FBUyxDQUFDLEVBQUUsVUFBVSxDQUFDO0lBQ3ZCLFFBQVEsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNsQixjQUFjLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDeEIsT0FBTyxFQUFFLE1BQU0sQ0FBQztJQUNoQixTQUFTLEVBQUUsTUFBTSxFQUFFLENBQUM7SUFDcEIsT0FBTyxFQUFFLE1BQU0sQ0FBQztJQUNoQixHQUFHLEVBQUUsS0FBSyxDQUFDO0NBQ1osaUJBNEdBIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencers.d.ts","sourceRoot":"","sources":["../../../src/cmds/infrastructure/sequencers.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAIxD,wBAAsB,UAAU,CAAC,IAAI,EAAE;IACrC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;IAC1D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,KAAK,CAAC;CACZ,
|
|
1
|
+
{"version":3,"file":"sequencers.d.ts","sourceRoot":"","sources":["../../../src/cmds/infrastructure/sequencers.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAIxD,wBAAsB,UAAU,CAAC,IAAI,EAAE;IACrC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;IAC1D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,KAAK,CAAC;CACZ,iBA4GA"}
|
|
@@ -7,7 +7,11 @@ import { GSEContract, RollupContract } from '@aztec-labs/ethereum/contracts';
|
|
|
7
7
|
import { createPublicClient, createWalletClient, fallback, getContract, http } from 'viem';
|
|
8
8
|
import { mnemonicToAccount } from 'viem/accounts';
|
|
9
9
|
export async function sequencers(opts) {
|
|
10
|
-
const { command, who: maybeWho, mnemonic, bn254SecretKey, nodeUrl, l1RpcUrls, chainId, log } = opts;
|
|
10
|
+
const { command, who: maybeWho, recipient, mnemonic, bn254SecretKey, nodeUrl, l1RpcUrls, chainId, log } = opts;
|
|
11
|
+
const missingRecipient = 'Missing --recipient: the address that receives the withdrawn stake';
|
|
12
|
+
if (command === 'remove' && !recipient) {
|
|
13
|
+
throw new Error(missingRecipient);
|
|
14
|
+
}
|
|
11
15
|
const client = createAztecNodeClient(nodeUrl);
|
|
12
16
|
const { l1ContractAddresses } = await client.getNodeInfo();
|
|
13
17
|
const chain = createEthereumChain(l1RpcUrls, chainId);
|
|
@@ -95,10 +99,13 @@ export async function sequencers(opts) {
|
|
|
95
99
|
if (!who || !writeableRollup) {
|
|
96
100
|
throw new Error(`Missing sequencer address`);
|
|
97
101
|
}
|
|
98
|
-
|
|
102
|
+
if (!recipient) {
|
|
103
|
+
throw new Error(missingRecipient);
|
|
104
|
+
}
|
|
105
|
+
log(`Removing ${who} as sequencer, withdrawing its stake to ${recipient}`);
|
|
99
106
|
const hash = await writeableRollup.write.initiateWithdraw([
|
|
100
107
|
who,
|
|
101
|
-
|
|
108
|
+
recipient.toString()
|
|
102
109
|
]);
|
|
103
110
|
await publicClient.waitForTransactionReceipt({
|
|
104
111
|
hash
|
package/dest/cmds/l1/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { LogFn, Logger } from '@aztec-labs/foundation/log';
|
|
2
2
|
import { type Command } from 'commander';
|
|
3
3
|
export declare function injectCommands(program: Command, log: LogFn, debugLogger: Logger): Command;
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jbWRzL2wxL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUNoRSxPQUFPLEVBQUUsS0FBSyxPQUFPLEVBQVUsTUFBTSxXQUFXLENBQUM7QUF3QmpELHdCQUFnQixjQUFjLENBQUMsT0FBTyxFQUFFLE9BQU8sRUFBRSxHQUFHLEVBQUUsS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLFdBeW1CL0UifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAwBjD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAwBjD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,WAymB/E"}
|
package/dest/cmds/l1/index.js
CHANGED
|
@@ -186,7 +186,7 @@ Note: DEADLINE is a future Unix timestamp in seconds. Run append commands sequen
|
|
|
186
186
|
debugLogger
|
|
187
187
|
});
|
|
188
188
|
});
|
|
189
|
-
program.command('remove-l1-validator').description('Removes a validator to the L1 rollup contract.').addOption(l1RpcUrlsOption).option('-pk, --private-key <string>', 'The private key to use for deployment', PRIVATE_KEY).option('-m, --mnemonic <string>', 'The mnemonic to use in deployment', 'test test test test test test test test test test test junk').addOption(l1ChainIdOption).option('--validator <address>', 'ethereum address of the validator', parseEthereumAddress).option('--rollup <address>', 'ethereum address of the rollup contract', parseEthereumAddress).action(async (options)=>{
|
|
189
|
+
program.command('remove-l1-validator').description('Removes a validator to the L1 rollup contract.').addOption(l1RpcUrlsOption).option('-pk, --private-key <string>', 'The private key to use for deployment', PRIVATE_KEY).option('-m, --mnemonic <string>', 'The mnemonic to use in deployment', 'test test test test test test test test test test test junk').addOption(l1ChainIdOption).option('--validator <address>', 'ethereum address of the validator', parseEthereumAddress).requiredOption('--recipient <address>', 'Address that receives the withdrawn stake; it cannot be changed once set', parseEthereumAddress).option('--rollup <address>', 'ethereum address of the rollup contract', parseEthereumAddress).action(async (options)=>{
|
|
190
190
|
const { removeL1Validator } = await import('./update_l1_validators.js');
|
|
191
191
|
await removeL1Validator({
|
|
192
192
|
rpcUrls: options.l1RpcUrls,
|
|
@@ -194,6 +194,7 @@ Note: DEADLINE is a future Unix timestamp in seconds. Run append commands sequen
|
|
|
194
194
|
privateKey: options.privateKey,
|
|
195
195
|
mnemonic: options.mnemonic,
|
|
196
196
|
validatorAddress: options.validator,
|
|
197
|
+
recipientAddress: options.recipient,
|
|
197
198
|
rollupAddress: options.rollup,
|
|
198
199
|
log,
|
|
199
200
|
debugLogger
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EthAddress } from '@aztec-labs/foundation/eth-address';
|
|
2
2
|
/**
|
|
3
3
|
* Starts a JSON-RPC server that reports `chainId` and, when `canonicalRollup` is given, answers every `eth_call` with
|
|
4
4
|
* that address and records the call. Any other method gets an error.
|
|
@@ -11,4 +11,12 @@ export declare function serveL1Rpc(chainId: number, canonicalRollup?: EthAddress
|
|
|
11
11
|
}[];
|
|
12
12
|
close: () => Promise<unknown>;
|
|
13
13
|
}>;
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Returns the `(attester, recipient)` arguments of the `initiateWithdraw` call that the latest block on an anvil chain
|
|
16
|
+
* sent to `rollup`, failing if that block holds no such call.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getLatestInitiateWithdrawArgs(rpcUrl: string, rollup: EthAddress): Promise<{
|
|
19
|
+
attester: EthAddress;
|
|
20
|
+
recipient: EthAddress;
|
|
21
|
+
}>;
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibDFfcnBjX3Rlc3RfdXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jbWRzL2wxL2wxX3JwY190ZXN0X3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxvQ0FBb0MsQ0FBQztBQUtoRTs7O0dBR0c7QUFDSCx3QkFBc0IsVUFBVSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsZUFBZSxDQUFDLEVBQUUsVUFBVTs7Ozs7OztHQWtDN0U7QUFFRDs7O0dBR0c7QUFDSCx3QkFBc0IsNkJBQTZCLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsVUFBVTs7O0dBYXJGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"l1_rpc_test_utils.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/l1_rpc_test_utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"l1_rpc_test_utils.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/l1_rpc_test_utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAKhE;;;GAGG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,UAAU;;;;;;;GAkC7E;AAED;;;GAGG;AACH,wBAAsB,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;;;GAarF"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { RollupAbi } from '@aztec-foundation/l1-artifacts';
|
|
2
|
+
import { getPublicClient } from '@aztec-labs/ethereum/client';
|
|
3
|
+
import { EthAddress } from '@aztec-labs/foundation/eth-address';
|
|
1
4
|
import { createServer } from 'node:http';
|
|
2
|
-
import { encodeAbiParameters } from 'viem';
|
|
5
|
+
import { decodeFunctionData, encodeAbiParameters } from 'viem';
|
|
6
|
+
import { foundry } from 'viem/chains';
|
|
3
7
|
/**
|
|
4
8
|
* Starts a JSON-RPC server that reports `chainId` and, when `canonicalRollup` is given, answers every `eth_call` with
|
|
5
9
|
* that address and records the call. Any other method gets an error.
|
|
@@ -56,3 +60,33 @@ import { encodeAbiParameters } from 'viem';
|
|
|
56
60
|
close: ()=>new Promise((resolve)=>server.close(resolve))
|
|
57
61
|
};
|
|
58
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Returns the `(attester, recipient)` arguments of the `initiateWithdraw` call that the latest block on an anvil chain
|
|
65
|
+
* sent to `rollup`, failing if that block holds no such call.
|
|
66
|
+
*/ export async function getLatestInitiateWithdrawArgs(rpcUrl, rollup) {
|
|
67
|
+
const client = getPublicClient({
|
|
68
|
+
l1RpcUrls: [
|
|
69
|
+
rpcUrl
|
|
70
|
+
],
|
|
71
|
+
l1ChainId: foundry.id
|
|
72
|
+
});
|
|
73
|
+
const block = await client.getBlock({
|
|
74
|
+
includeTransactions: true
|
|
75
|
+
});
|
|
76
|
+
const tx = block.transactions.find(({ to })=>to !== null && rollup.equals(EthAddress.fromString(to)));
|
|
77
|
+
if (!tx) {
|
|
78
|
+
throw new Error(`No transaction to ${rollup} in the latest block`);
|
|
79
|
+
}
|
|
80
|
+
const decoded = decodeFunctionData({
|
|
81
|
+
abi: RollupAbi,
|
|
82
|
+
data: tx.input
|
|
83
|
+
});
|
|
84
|
+
if (decoded.functionName !== 'initiateWithdraw') {
|
|
85
|
+
throw new Error(`Expected initiateWithdraw, got ${decoded.functionName}`);
|
|
86
|
+
}
|
|
87
|
+
const [attester, recipient] = decoded.args;
|
|
88
|
+
return {
|
|
89
|
+
attester: EthAddress.fromString(attester),
|
|
90
|
+
recipient: EthAddress.fromString(recipient)
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -42,8 +42,9 @@ export declare function addL1ValidatorViaRollup({ rpcUrls, chainId, privateKey,
|
|
|
42
42
|
attesterAddress: EthAddress;
|
|
43
43
|
moveWithLatestRollup: boolean;
|
|
44
44
|
}): Promise<void>;
|
|
45
|
-
export declare function removeL1Validator({ rpcUrls, chainId, privateKey, mnemonic, validatorAddress, rollupAddress, log, debugLogger }: RollupCommandArgs & LoggerArgs & {
|
|
45
|
+
export declare function removeL1Validator({ rpcUrls, chainId, privateKey, mnemonic, validatorAddress, recipientAddress, rollupAddress, log, debugLogger }: RollupCommandArgs & LoggerArgs & {
|
|
46
46
|
validatorAddress: EthAddress;
|
|
47
|
+
recipientAddress: EthAddress;
|
|
47
48
|
}): Promise<void>;
|
|
48
49
|
/** Chain ID and registry published for a network; both are undefined when it publishes none, as for `local`. */
|
|
49
50
|
export type AttesterExitNetwork = {
|
|
@@ -97,4 +98,4 @@ export declare function fastForwardEpochs({ rpcUrls, chainId, rollupAddress, num
|
|
|
97
98
|
numEpochs: bigint;
|
|
98
99
|
}): Promise<void>;
|
|
99
100
|
export declare function debugRollup({ rpcUrls, chainId, rollupAddress, log }: RollupCommandArgs & LoggerArgs): Promise<void>;
|
|
100
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
101
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBkYXRlX2wxX3ZhbGlkYXRvcnMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jbWRzL2wxL3VwZGF0ZV9sMV92YWxpZGF0b3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,CAAC,EAC5C,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,GAAG,EACH,WAAW,EACZ,EAAE,iBAAiB,GAClB,UAAU,GAAG;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,UAAU,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;CAC/B,iBAuDF;AAED,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,GAAG,EACH,WAAW,EACZ,EAAE,iBAAiB,GAAG,UAAU,GAAG;IAAE,gBAAgB,EAAE,UAAU,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"update_l1_validators.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/update_l1_validators.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,yBAAyB,EAI/B,MAAM,gCAAgC,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAYhE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,UAAU,CAAC;IAC1B,iBAAiB,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,sEAAsE;AACtE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,8BAA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
|
|
@@ -175,7 +175,7 @@ export async function addL1ValidatorViaRollup({ rpcUrls, chainId, privateKey, mn
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
export async function removeL1Validator({ rpcUrls, chainId, privateKey, mnemonic, validatorAddress, rollupAddress, log, debugLogger }) {
|
|
178
|
+
export async function removeL1Validator({ rpcUrls, chainId, privateKey, mnemonic, validatorAddress, recipientAddress, rollupAddress, log, debugLogger }) {
|
|
179
179
|
const dualLog = makeDualLog(log, debugLogger);
|
|
180
180
|
const account = getAccount(privateKey, mnemonic);
|
|
181
181
|
const chain = createEthereumChain(rpcUrls, chainId);
|
|
@@ -183,7 +183,7 @@ export async function removeL1Validator({ rpcUrls, chainId, privateKey, mnemonic
|
|
|
183
183
|
const l1TxUtils = createL1TxUtils(l1Client, {
|
|
184
184
|
logger: debugLogger
|
|
185
185
|
});
|
|
186
|
-
dualLog(`Removing validator ${validatorAddress.toString()} from rollup ${rollupAddress.toString()}`);
|
|
186
|
+
dualLog(`Removing validator ${validatorAddress.toString()} from rollup ${rollupAddress.toString()}, ` + `withdrawing its stake to ${recipientAddress.toString()}`);
|
|
187
187
|
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
|
188
188
|
to: rollupAddress.toString(),
|
|
189
189
|
data: encodeFunctionData({
|
|
@@ -191,7 +191,7 @@ export async function removeL1Validator({ rpcUrls, chainId, privateKey, mnemonic
|
|
|
191
191
|
functionName: 'initiateWithdraw',
|
|
192
192
|
args: [
|
|
193
193
|
validatorAddress.toString(),
|
|
194
|
-
|
|
194
|
+
recipientAddress.toString()
|
|
195
195
|
]
|
|
196
196
|
})
|
|
197
197
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec-labs/cli",
|
|
3
|
-
"version": "6.0.0-nightly.
|
|
3
|
+
"version": "6.0.0-nightly.20261022",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./devnet": "./dest/cmds/devnet/index.js",
|
|
@@ -76,19 +76,19 @@
|
|
|
76
76
|
]
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@aztec-foundation/l1-artifacts": "6.0.0-rc.
|
|
80
|
-
"@aztec-labs/accounts": "6.0.0-nightly.
|
|
81
|
-
"@aztec-labs/archiver": "6.0.0-nightly.
|
|
82
|
-
"@aztec-labs/aztec.js": "6.0.0-nightly.
|
|
83
|
-
"@aztec-labs/constants": "6.0.0-nightly.
|
|
84
|
-
"@aztec-labs/ethereum": "6.0.0-nightly.
|
|
85
|
-
"@aztec-labs/foundation": "6.0.0-nightly.
|
|
86
|
-
"@aztec-labs/node-keystore": "6.0.0-nightly.
|
|
87
|
-
"@aztec-labs/p2p": "6.0.0-nightly.
|
|
88
|
-
"@aztec-labs/protocol-contracts": "6.0.0-nightly.
|
|
89
|
-
"@aztec-labs/stdlib": "6.0.0-nightly.
|
|
90
|
-
"@aztec-labs/wallets": "6.0.0-nightly.
|
|
91
|
-
"@aztec-labs/world-state": "6.0.0-nightly.
|
|
79
|
+
"@aztec-foundation/l1-artifacts": "6.0.0-rc.7",
|
|
80
|
+
"@aztec-labs/accounts": "6.0.0-nightly.20261022",
|
|
81
|
+
"@aztec-labs/archiver": "6.0.0-nightly.20261022",
|
|
82
|
+
"@aztec-labs/aztec.js": "6.0.0-nightly.20261022",
|
|
83
|
+
"@aztec-labs/constants": "6.0.0-nightly.20261022",
|
|
84
|
+
"@aztec-labs/ethereum": "6.0.0-nightly.20261022",
|
|
85
|
+
"@aztec-labs/foundation": "6.0.0-nightly.20261022",
|
|
86
|
+
"@aztec-labs/node-keystore": "6.0.0-nightly.20261022",
|
|
87
|
+
"@aztec-labs/p2p": "6.0.0-nightly.20261022",
|
|
88
|
+
"@aztec-labs/protocol-contracts": "6.0.0-nightly.20261022",
|
|
89
|
+
"@aztec-labs/stdlib": "6.0.0-nightly.20261022",
|
|
90
|
+
"@aztec-labs/wallets": "6.0.0-nightly.20261022",
|
|
91
|
+
"@aztec-labs/world-state": "6.0.0-nightly.20261022",
|
|
92
92
|
"@ethersproject/wallet": "^5.8.0",
|
|
93
93
|
"@iarna/toml": "^2.2.5",
|
|
94
94
|
"@libp2p/peer-id-factory": "^3.0.4",
|
|
@@ -118,15 +118,15 @@
|
|
|
118
118
|
"typescript": "^5.3.3"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
|
-
"@aztec-foundation/l1-artifacts": "6.0.0-rc.
|
|
122
|
-
"@aztec-labs/accounts": "6.0.0-nightly.
|
|
123
|
-
"@aztec-labs/bb-prover": "6.0.0-nightly.
|
|
124
|
-
"@aztec-labs/ethereum": "6.0.0-nightly.
|
|
125
|
-
"@aztec-labs/noir-contracts.js": "6.0.0-nightly.
|
|
126
|
-
"@aztec-labs/noir-protocol-circuits-types": "6.0.0-nightly.
|
|
127
|
-
"@aztec-labs/noir-test-contracts.js": "6.0.0-nightly.
|
|
128
|
-
"@aztec-labs/protocol-contracts": "6.0.0-nightly.
|
|
129
|
-
"@aztec-labs/stdlib": "6.0.0-nightly.
|
|
121
|
+
"@aztec-foundation/l1-artifacts": "6.0.0-rc.7",
|
|
122
|
+
"@aztec-labs/accounts": "6.0.0-nightly.20261022",
|
|
123
|
+
"@aztec-labs/bb-prover": "6.0.0-nightly.20261022",
|
|
124
|
+
"@aztec-labs/ethereum": "6.0.0-nightly.20261022",
|
|
125
|
+
"@aztec-labs/noir-contracts.js": "6.0.0-nightly.20261022",
|
|
126
|
+
"@aztec-labs/noir-protocol-circuits-types": "6.0.0-nightly.20261022",
|
|
127
|
+
"@aztec-labs/noir-test-contracts.js": "6.0.0-nightly.20261022",
|
|
128
|
+
"@aztec-labs/protocol-contracts": "6.0.0-nightly.20261022",
|
|
129
|
+
"@aztec-labs/stdlib": "6.0.0-nightly.20261022"
|
|
130
130
|
},
|
|
131
131
|
"files": [
|
|
132
132
|
"dest",
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec-labs/foundation/log';
|
|
2
2
|
import type { Command } from 'commander';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ETHEREUM_HOSTS,
|
|
6
|
+
l1ChainIdOption,
|
|
7
|
+
nodeOption,
|
|
8
|
+
parseEthereumAddress,
|
|
9
|
+
parseOptionalInteger,
|
|
10
|
+
} from '../../utils/commands.js';
|
|
5
11
|
|
|
6
12
|
export function injectCommands(program: Command, log: LogFn) {
|
|
7
13
|
program
|
|
@@ -19,6 +25,11 @@ export function injectCommands(program: Command, log: LogFn) {
|
|
|
19
25
|
.command('sequencers')
|
|
20
26
|
.argument('<command>', 'Command to run: list, add, remove, who-next')
|
|
21
27
|
.argument('[who]', 'Who to add/remove')
|
|
28
|
+
.option(
|
|
29
|
+
'--recipient <address>',
|
|
30
|
+
'For remove (required): address that receives the withdrawn stake; it cannot be changed once set',
|
|
31
|
+
parseEthereumAddress,
|
|
32
|
+
)
|
|
22
33
|
.description('Manages or queries registered sequencers on the L1 rollup contract.')
|
|
23
34
|
.requiredOption<string[]>(
|
|
24
35
|
'--l1-rpc-urls <string>',
|
|
@@ -39,6 +50,7 @@ export function injectCommands(program: Command, log: LogFn) {
|
|
|
39
50
|
await sequencers({
|
|
40
51
|
command: command,
|
|
41
52
|
who,
|
|
53
|
+
recipient: options.recipient,
|
|
42
54
|
mnemonic: options.mnemonic,
|
|
43
55
|
nodeUrl: options.nodeUrl,
|
|
44
56
|
l1RpcUrls: options.l1RpcUrls,
|
|
@@ -5,6 +5,7 @@ import { createAztecNodeClient } from '@aztec-labs/aztec.js/node';
|
|
|
5
5
|
import { createEthereumChain } from '@aztec-labs/ethereum/chain';
|
|
6
6
|
import { getL1ContractsConfigEnvVars } from '@aztec-labs/ethereum/config';
|
|
7
7
|
import { GSEContract, RollupContract } from '@aztec-labs/ethereum/contracts';
|
|
8
|
+
import type { EthAddress } from '@aztec-labs/foundation/eth-address';
|
|
8
9
|
import type { LogFn } from '@aztec-labs/foundation/log';
|
|
9
10
|
import { createPublicClient, createWalletClient, fallback, getContract, http } from 'viem';
|
|
10
11
|
import { mnemonicToAccount } from 'viem/accounts';
|
|
@@ -12,6 +13,8 @@ import { mnemonicToAccount } from 'viem/accounts';
|
|
|
12
13
|
export async function sequencers(opts: {
|
|
13
14
|
command: 'list' | 'add' | 'remove' | 'who-next' | 'flush';
|
|
14
15
|
who?: string;
|
|
16
|
+
/** Address that receives the withdrawn stake. Required for `remove`. */
|
|
17
|
+
recipient?: EthAddress;
|
|
15
18
|
mnemonic?: string;
|
|
16
19
|
bn254SecretKey?: bigint;
|
|
17
20
|
nodeUrl: string;
|
|
@@ -19,7 +22,11 @@ export async function sequencers(opts: {
|
|
|
19
22
|
chainId: number;
|
|
20
23
|
log: LogFn;
|
|
21
24
|
}) {
|
|
22
|
-
const { command, who: maybeWho, mnemonic, bn254SecretKey, nodeUrl, l1RpcUrls, chainId, log } = opts;
|
|
25
|
+
const { command, who: maybeWho, recipient, mnemonic, bn254SecretKey, nodeUrl, l1RpcUrls, chainId, log } = opts;
|
|
26
|
+
const missingRecipient = 'Missing --recipient: the address that receives the withdrawn stake';
|
|
27
|
+
if (command === 'remove' && !recipient) {
|
|
28
|
+
throw new Error(missingRecipient);
|
|
29
|
+
}
|
|
23
30
|
const client = createAztecNodeClient(nodeUrl);
|
|
24
31
|
const { l1ContractAddresses } = await client.getNodeInfo();
|
|
25
32
|
|
|
@@ -47,7 +54,7 @@ export async function sequencers(opts: {
|
|
|
47
54
|
})
|
|
48
55
|
: undefined;
|
|
49
56
|
|
|
50
|
-
const who = (maybeWho as `0x{string}`) ?? walletClient?.account.address.toString();
|
|
57
|
+
const who = (maybeWho as `0x${string}`) ?? walletClient?.account.address.toString();
|
|
51
58
|
|
|
52
59
|
if (command === 'list') {
|
|
53
60
|
const sequencers = await rollup.getAttesters();
|
|
@@ -109,8 +116,11 @@ export async function sequencers(opts: {
|
|
|
109
116
|
if (!who || !writeableRollup) {
|
|
110
117
|
throw new Error(`Missing sequencer address`);
|
|
111
118
|
}
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
if (!recipient) {
|
|
120
|
+
throw new Error(missingRecipient);
|
|
121
|
+
}
|
|
122
|
+
log(`Removing ${who} as sequencer, withdrawing its stake to ${recipient}`);
|
|
123
|
+
const hash = await writeableRollup.write.initiateWithdraw([who, recipient.toString()]);
|
|
114
124
|
await publicClient.waitForTransactionReceipt({ hash });
|
|
115
125
|
log(`Removed in tx ${hash}`);
|
|
116
126
|
} else if (command === 'who-next') {
|
package/src/cmds/l1/index.ts
CHANGED
|
@@ -489,6 +489,11 @@ Note: DEADLINE is a future Unix timestamp in seconds. Run append commands sequen
|
|
|
489
489
|
)
|
|
490
490
|
.addOption(l1ChainIdOption)
|
|
491
491
|
.option('--validator <address>', 'ethereum address of the validator', parseEthereumAddress)
|
|
492
|
+
.requiredOption(
|
|
493
|
+
'--recipient <address>',
|
|
494
|
+
'Address that receives the withdrawn stake; it cannot be changed once set',
|
|
495
|
+
parseEthereumAddress,
|
|
496
|
+
)
|
|
492
497
|
.option('--rollup <address>', 'ethereum address of the rollup contract', parseEthereumAddress)
|
|
493
498
|
.action(async options => {
|
|
494
499
|
const { removeL1Validator } = await import('./update_l1_validators.js');
|
|
@@ -498,6 +503,7 @@ Note: DEADLINE is a future Unix timestamp in seconds. Run append commands sequen
|
|
|
498
503
|
privateKey: options.privateKey,
|
|
499
504
|
mnemonic: options.mnemonic,
|
|
500
505
|
validatorAddress: options.validator,
|
|
506
|
+
recipientAddress: options.recipient,
|
|
501
507
|
rollupAddress: options.rollup,
|
|
502
508
|
log,
|
|
503
509
|
debugLogger,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { RollupAbi } from '@aztec-foundation/l1-artifacts';
|
|
2
|
+
|
|
3
|
+
import { getPublicClient } from '@aztec-labs/ethereum/client';
|
|
4
|
+
import { EthAddress } from '@aztec-labs/foundation/eth-address';
|
|
2
5
|
import { createServer } from 'node:http';
|
|
3
|
-
import { encodeAbiParameters } from 'viem';
|
|
6
|
+
import { decodeFunctionData, encodeAbiParameters } from 'viem';
|
|
7
|
+
import { foundry } from 'viem/chains';
|
|
4
8
|
|
|
5
9
|
/**
|
|
6
10
|
* Starts a JSON-RPC server that reports `chainId` and, when `canonicalRollup` is given, answers every `eth_call` with
|
|
@@ -41,3 +45,22 @@ export async function serveL1Rpc(chainId: number, canonicalRollup?: EthAddress)
|
|
|
41
45
|
close: () => new Promise(resolve => server.close(resolve)),
|
|
42
46
|
};
|
|
43
47
|
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Returns the `(attester, recipient)` arguments of the `initiateWithdraw` call that the latest block on an anvil chain
|
|
51
|
+
* sent to `rollup`, failing if that block holds no such call.
|
|
52
|
+
*/
|
|
53
|
+
export async function getLatestInitiateWithdrawArgs(rpcUrl: string, rollup: EthAddress) {
|
|
54
|
+
const client = getPublicClient({ l1RpcUrls: [rpcUrl], l1ChainId: foundry.id });
|
|
55
|
+
const block = await client.getBlock({ includeTransactions: true });
|
|
56
|
+
const tx = block.transactions.find(({ to }) => to !== null && rollup.equals(EthAddress.fromString(to)));
|
|
57
|
+
if (!tx) {
|
|
58
|
+
throw new Error(`No transaction to ${rollup} in the latest block`);
|
|
59
|
+
}
|
|
60
|
+
const decoded = decodeFunctionData({ abi: RollupAbi, data: tx.input });
|
|
61
|
+
if (decoded.functionName !== 'initiateWithdraw') {
|
|
62
|
+
throw new Error(`Expected initiateWithdraw, got ${decoded.functionName}`);
|
|
63
|
+
}
|
|
64
|
+
const [attester, recipient] = decoded.args;
|
|
65
|
+
return { attester: EthAddress.fromString(attester), recipient: EthAddress.fromString(recipient) };
|
|
66
|
+
}
|
|
@@ -254,23 +254,27 @@ export async function removeL1Validator({
|
|
|
254
254
|
privateKey,
|
|
255
255
|
mnemonic,
|
|
256
256
|
validatorAddress,
|
|
257
|
+
recipientAddress,
|
|
257
258
|
rollupAddress,
|
|
258
259
|
log,
|
|
259
260
|
debugLogger,
|
|
260
|
-
}: RollupCommandArgs & LoggerArgs & { validatorAddress: EthAddress }) {
|
|
261
|
+
}: RollupCommandArgs & LoggerArgs & { validatorAddress: EthAddress; recipientAddress: EthAddress }) {
|
|
261
262
|
const dualLog = makeDualLog(log, debugLogger);
|
|
262
263
|
const account = getAccount(privateKey, mnemonic);
|
|
263
264
|
const chain = createEthereumChain(rpcUrls, chainId);
|
|
264
265
|
const l1Client = createExtendedL1Client(rpcUrls, account, chain.chainInfo);
|
|
265
266
|
const l1TxUtils = createL1TxUtils(l1Client, { logger: debugLogger });
|
|
266
267
|
|
|
267
|
-
dualLog(
|
|
268
|
+
dualLog(
|
|
269
|
+
`Removing validator ${validatorAddress.toString()} from rollup ${rollupAddress.toString()}, ` +
|
|
270
|
+
`withdrawing its stake to ${recipientAddress.toString()}`,
|
|
271
|
+
);
|
|
268
272
|
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
|
269
273
|
to: rollupAddress.toString(),
|
|
270
274
|
data: encodeFunctionData({
|
|
271
275
|
abi: RollupAbi,
|
|
272
276
|
functionName: 'initiateWithdraw',
|
|
273
|
-
args: [validatorAddress.toString(),
|
|
277
|
+
args: [validatorAddress.toString(), recipientAddress.toString()],
|
|
274
278
|
}),
|
|
275
279
|
});
|
|
276
280
|
dualLog(`Transaction hash: ${receipt.transactionHash}`);
|