@aztec/cli 5.0.0-rc.1 → 5.0.0

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.
@@ -7,7 +7,7 @@ export const devnetConfig = {
7
7
  AZTEC_EJECTION_THRESHOLD: 50000000000000000000,
8
8
  AZTEC_LOCAL_EJECTION_THRESHOLD: 98000000000000000000,
9
9
  AZTEC_EXIT_DELAY_SECONDS: 172800,
10
- AZTEC_INBOX_LAG: 1,
10
+ AZTEC_INBOX_LAG: 2,
11
11
  AZTEC_PROOF_SUBMISSION_EPOCHS: 1,
12
12
  AZTEC_MANA_TARGET: 100000000,
13
13
  AZTEC_PROVING_COST_PER_MANA: 100,
@@ -39,6 +39,7 @@ export const devnetConfig = {
39
39
  PUBLIC_DATA_TREE_MAP_SIZE_KB: 1073741824,
40
40
  PUBLIC_OTEL_INCLUDE_METRICS: 'aztec.validator,aztec.tx_collector,aztec.mempool,aztec.p2p.gossip.agg_,aztec.ivc_verifier.agg_',
41
41
  SENTINEL_ENABLED: true,
42
+ OFFENSE_COLLECTION_ENABLED: true,
42
43
  AZTEC_SLOT_DURATION: 36,
43
44
  AZTEC_EPOCH_DURATION: 8,
44
45
  AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET: 1,
@@ -76,7 +77,7 @@ export const devnetConfig = {
76
77
  SLASH_INVALID_BLOCK_PENALTY: 10000000000000000000,
77
78
  SLASH_INVALID_CHECKPOINT_PROPOSAL_PENALTY: 0,
78
79
  SLASH_GRACE_PERIOD_L2_SLOTS: 0,
79
- ENABLE_VERSION_CHECK: true,
80
+ ENABLE_AUTO_SHUTDOWN: false,
80
81
  } as const;
81
82
 
82
83
  export const testnetConfig = {
@@ -86,7 +87,7 @@ export const testnetConfig = {
86
87
  AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET: 2,
87
88
  AZTEC_LAG_IN_EPOCHS_FOR_RANDAO: 2,
88
89
  AZTEC_EXIT_DELAY_SECONDS: 172800,
89
- AZTEC_INBOX_LAG: 1,
90
+ AZTEC_INBOX_LAG: 2,
90
91
  AZTEC_PROOF_SUBMISSION_EPOCHS: 1,
91
92
  AZTEC_INITIAL_ETH_PER_FEE_ASSET: 10000000,
92
93
  AZTEC_SLASHER_ENABLED: true,
@@ -112,6 +113,7 @@ export const testnetConfig = {
112
113
  PUBLIC_DATA_TREE_MAP_SIZE_KB: 1073741824,
113
114
  PUBLIC_OTEL_INCLUDE_METRICS: 'aztec.validator,aztec.tx_collector,aztec.mempool,aztec.p2p.gossip.agg_,aztec.ivc_verifier.agg_',
114
115
  SENTINEL_ENABLED: true,
116
+ OFFENSE_COLLECTION_ENABLED: true,
115
117
  AZTEC_SLOT_DURATION: 72,
116
118
  AZTEC_ACTIVATION_THRESHOLD: 2E+23,
117
119
  AZTEC_EJECTION_THRESHOLD: 1E+23,
@@ -147,7 +149,7 @@ export const testnetConfig = {
147
149
  SLASH_INVALID_BLOCK_PENALTY: 1E+23,
148
150
  SLASH_INVALID_CHECKPOINT_PROPOSAL_PENALTY: 1E+23,
149
151
  SLASH_GRACE_PERIOD_L2_SLOTS: 64,
150
- ENABLE_VERSION_CHECK: true,
152
+ ENABLE_AUTO_SHUTDOWN: false,
151
153
  } as const;
152
154
 
153
155
  export const mainnetConfig = {
@@ -156,7 +158,7 @@ export const mainnetConfig = {
156
158
  AZTEC_TARGET_COMMITTEE_SIZE: 48,
157
159
  AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET: 2,
158
160
  AZTEC_LAG_IN_EPOCHS_FOR_RANDAO: 2,
159
- AZTEC_INBOX_LAG: 1,
161
+ AZTEC_INBOX_LAG: 2,
160
162
  AZTEC_PROOF_SUBMISSION_EPOCHS: 1,
161
163
  AZTEC_INITIAL_ETH_PER_FEE_ASSET: 10000000,
162
164
  AZTEC_SLASHER_ENABLED: true,
@@ -180,6 +182,7 @@ export const mainnetConfig = {
180
182
  PUBLIC_DATA_TREE_MAP_SIZE_KB: 1073741824,
181
183
  PUBLIC_OTEL_INCLUDE_METRICS: 'aztec.validator,aztec.tx_collector,aztec.mempool,aztec.p2p.gossip.agg_,aztec.ivc_verifier.agg_',
182
184
  SENTINEL_ENABLED: true,
185
+ OFFENSE_COLLECTION_ENABLED: true,
183
186
  AZTEC_SLOT_DURATION: 72,
184
187
  AZTEC_ACTIVATION_THRESHOLD: 2E+23,
185
188
  AZTEC_EJECTION_THRESHOLD: 1E+23,
@@ -213,7 +216,7 @@ export const mainnetConfig = {
213
216
  P2P_TX_POOL_DELETE_TXS_AFTER_REORG: true,
214
217
  PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',
215
218
  PUBLIC_OTEL_COLLECT_FROM: '',
216
- ENABLE_VERSION_CHECK: false,
219
+ ENABLE_AUTO_SHUTDOWN: false,
217
220
  SLASH_DATA_WITHHOLDING_PENALTY: 0,
218
221
  SLASH_INACTIVITY_TARGET_PERCENTAGE: 0.8,
219
222
  SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 2,
@@ -1,4 +1,5 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
+ import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin';
2
3
  import { EthAddress } from '@aztec/foundation/eth-address';
3
4
  import type { LogFn } from '@aztec/foundation/log';
4
5
  import type { PXE } from '@aztec/pxe/server';
@@ -50,14 +51,14 @@ export const l1ChainIdOption = new Option('-c, --l1-chain-id <number>', 'Chain I
50
51
  return parsedValue;
51
52
  });
52
53
 
53
- export const createSecretKeyOption = (
54
+ export const createSigningKeyOption = (
54
55
  description: string,
55
56
  mandatory: boolean,
56
- argsParser?: (value: string, previous: Fr) => Fr,
57
+ argsParser?: (value: string, previous: GrumpkinScalar) => GrumpkinScalar,
57
58
  ) =>
58
- new Option('-sk, --secret-key <string>', description)
59
- .env('SECRET_KEY')
60
- .argParser(argsParser ?? parseSecretKey)
59
+ new Option('-sk, --signing-key <string>', description)
60
+ .env('SIGNING_KEY')
61
+ .argParser(argsParser ?? parseSigningKey)
61
62
  .makeOptionMandatory(mandatory);
62
63
 
63
64
  export const logJson = (log: LogFn) => (obj: object) => log(JSON.stringify(obj, null, 2));
@@ -101,7 +102,7 @@ export async function getTxSender(pxe: PXE, _from?: string) {
101
102
  let from: AztecAddress;
102
103
  if (_from) {
103
104
  try {
104
- from = AztecAddress.fromString(_from);
105
+ from = AztecAddress.fromStringUnsafe(_from);
105
106
  } catch {
106
107
  throw new InvalidArgumentError(`Invalid option 'from' passed: ${_from}`);
107
108
  }
@@ -195,7 +196,7 @@ export function parseFieldFromHexString(str: string): Fr {
195
196
  */
196
197
  export function parseAztecAddress(address: string): AztecAddress {
197
198
  try {
198
- return AztecAddress.fromString(address);
199
+ return AztecAddress.fromStringUnsafe(address);
199
200
  } catch {
200
201
  throw new InvalidArgumentError(`Invalid Aztec address: ${address}`);
201
202
  }
@@ -357,16 +358,16 @@ export function parsePartialAddress(address: string): Fr {
357
358
  }
358
359
 
359
360
  /**
360
- * Parses a secret key from a string.
361
- * @param privateKey - A string
362
- * @returns A secret key
361
+ * Parses an account signing key from a string.
362
+ * @param signingKey - A string
363
+ * @returns A signing key
363
364
  * @throws InvalidArgumentError if the input string is not valid.
364
365
  */
365
- export function parseSecretKey(secretKey: string): Fr {
366
+ export function parseSigningKey(signingKey: string): GrumpkinScalar {
366
367
  try {
367
- return Fr.fromHexString(secretKey);
368
+ return GrumpkinScalar.fromHexString(signingKey);
368
369
  } catch {
369
- throw new InvalidArgumentError(`Invalid encryption secret key: ${secretKey}`);
370
+ throw new InvalidArgumentError(`Invalid signing key: ${signingKey}`);
370
371
  }
371
372
  }
372
373