@aztec/cli 0.0.1-commit.ee80a48 → 0.0.1-commit.ef17749e1

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.
@@ -2,7 +2,7 @@
2
2
  // Do not edit manually - run yarn generate to regenerate
3
3
  export const devnetConfig = {
4
4
  ETHEREUM_SLOT_DURATION: 12,
5
- AZTEC_SLOT_DURATION: 36,
5
+ AZTEC_SLOT_DURATION: 72,
6
6
  AZTEC_TARGET_COMMITTEE_SIZE: 48,
7
7
  AZTEC_ACTIVATION_THRESHOLD: 100000000000000000000,
8
8
  AZTEC_EJECTION_THRESHOLD: 50000000000000000000,
@@ -26,12 +26,14 @@ export const devnetConfig = {
26
26
  SLASH_MIN_PENALTY_PERCENTAGE: 0.5,
27
27
  SLASH_MAX_PENALTY_PERCENTAGE: 2,
28
28
  SLASH_OFFENSE_EXPIRATION_ROUNDS: 4,
29
- SLASH_MAX_PAYLOAD_SIZE: 50,
29
+ SLASH_MAX_PAYLOAD_SIZE: 80,
30
30
  SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4,
31
31
  P2P_ENABLED: true,
32
32
  BOOTSTRAP_NODES: '',
33
33
  SEQ_MIN_TX_PER_BLOCK: 0,
34
34
  SEQ_BUILD_CHECKPOINT_IF_EMPTY: true,
35
+ SEQ_BLOCK_DURATION_MS: 6000,
36
+ SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36,
35
37
  DATA_STORE_MAP_SIZE_KB: 134217728,
36
38
  ARCHIVER_STORE_MAP_SIZE_KB: 1073741824,
37
39
  NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824,
@@ -47,7 +49,7 @@ export const devnetConfig = {
47
49
  TEST_ACCOUNTS: true,
48
50
  SPONSORED_FPC: true,
49
51
  TRANSACTIONS_DISABLED: false,
50
- SEQ_MAX_TX_PER_BLOCK: 32,
52
+ SEQ_MAX_TX_PER_BLOCK: 18,
51
53
  PROVER_REAL_PROOFS: false,
52
54
  PXE_PROVER_ENABLED: false,
53
55
  SYNC_SNAPSHOTS_URLS: '',
@@ -55,8 +57,6 @@ export const devnetConfig = {
55
57
  BLOB_ALLOW_EMPTY_SOURCES: false,
56
58
  P2P_MAX_PENDING_TX_COUNT: 1000,
57
59
  P2P_TX_POOL_DELETE_TXS_AFTER_REORG: false,
58
- AUTO_UPDATE: 'none',
59
- AUTO_UPDATE_URL: '',
60
60
  PUBLIC_OTEL_OPT_OUT: true,
61
61
  PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',
62
62
  PUBLIC_OTEL_COLLECT_FROM: '',
@@ -66,10 +66,13 @@ export const devnetConfig = {
66
66
  SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 1,
67
67
  SLASH_INACTIVITY_PENALTY: 10000000000000000000,
68
68
  SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY: 10000000000000000000,
69
+ SLASH_DUPLICATE_PROPOSAL_PENALTY: 10000000000000000000,
70
+ SLASH_DUPLICATE_ATTESTATION_PENALTY: 10000000000000000000,
69
71
  SLASH_ATTEST_DESCENDANT_OF_INVALID_PENALTY: 10000000000000000000,
70
72
  SLASH_UNKNOWN_PENALTY: 10000000000000000000,
71
73
  SLASH_INVALID_BLOCK_PENALTY: 10000000000000000000,
72
- SLASH_GRACE_PERIOD_L2_SLOTS: 0
74
+ SLASH_GRACE_PERIOD_L2_SLOTS: 0,
75
+ ENABLE_VERSION_CHECK: true
73
76
  };
74
77
  export const testnetConfig = {
75
78
  ETHEREUM_SLOT_DURATION: 12,
@@ -80,25 +83,23 @@ export const testnetConfig = {
80
83
  AZTEC_EXIT_DELAY_SECONDS: 172800,
81
84
  AZTEC_INBOX_LAG: 1,
82
85
  AZTEC_PROOF_SUBMISSION_EPOCHS: 1,
83
- AZTEC_PROVING_COST_PER_MANA: 100,
84
86
  AZTEC_INITIAL_ETH_PER_FEE_ASSET: 10000000,
85
87
  AZTEC_SLASHER_FLAVOR: 'tally',
86
88
  AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS: 4,
87
89
  AZTEC_SLASHING_LIFETIME_IN_ROUNDS: 5,
88
90
  AZTEC_SLASHING_OFFSET_IN_ROUNDS: 2,
89
91
  AZTEC_SLASHING_DISABLE_DURATION: 432000,
90
- AZTEC_SLASH_AMOUNT_SMALL: 10000000000000000000,
91
- AZTEC_SLASH_AMOUNT_MEDIUM: 20000000000000000000,
92
- AZTEC_SLASH_AMOUNT_LARGE: 50000000000000000000,
93
92
  SLASH_MIN_PENALTY_PERCENTAGE: 0.5,
94
93
  SLASH_MAX_PENALTY_PERCENTAGE: 2,
95
94
  SLASH_OFFENSE_EXPIRATION_ROUNDS: 4,
96
- SLASH_MAX_PAYLOAD_SIZE: 50,
95
+ SLASH_MAX_PAYLOAD_SIZE: 80,
97
96
  SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4,
98
97
  P2P_ENABLED: true,
99
98
  BOOTSTRAP_NODES: '',
100
99
  SEQ_MIN_TX_PER_BLOCK: 0,
101
100
  SEQ_BUILD_CHECKPOINT_IF_EMPTY: true,
101
+ SEQ_BLOCK_DURATION_MS: 6000,
102
+ SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36,
102
103
  DATA_STORE_MAP_SIZE_KB: 134217728,
103
104
  ARCHIVER_STORE_MAP_SIZE_KB: 1073741824,
104
105
  NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824,
@@ -115,13 +116,18 @@ export const testnetConfig = {
115
116
  AZTEC_SLASHING_QUORUM: 33,
116
117
  AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE: 100,
117
118
  AZTEC_GOVERNANCE_PROPOSER_QUORUM: 60,
118
- AZTEC_MANA_TARGET: 150000000,
119
+ AZTEC_MANA_TARGET: 75000000,
120
+ AZTEC_PROVING_COST_PER_MANA: 25000000,
121
+ AZTEC_SLASH_AMOUNT_SMALL: 1E+23,
122
+ AZTEC_SLASH_AMOUNT_MEDIUM: 1E+23,
123
+ AZTEC_SLASH_AMOUNT_LARGE: 1E+23,
119
124
  L1_CHAIN_ID: 11155111,
120
125
  TEST_ACCOUNTS: false,
121
126
  SPONSORED_FPC: true,
122
127
  TRANSACTIONS_DISABLED: false,
123
- SEQ_MAX_TX_PER_BLOCK: 8,
128
+ SEQ_MAX_TX_PER_CHECKPOINT: 72,
124
129
  PROVER_REAL_PROOFS: true,
130
+ P2P_MAX_PENDING_TX_COUNT: 1000,
125
131
  P2P_TX_POOL_DELETE_TXS_AFTER_REORG: true,
126
132
  SLASH_PRUNE_PENALTY: 10000000000000000000,
127
133
  SLASH_DATA_WITHHOLDING_PENALTY: 10000000000000000000,
@@ -129,14 +135,18 @@ export const testnetConfig = {
129
135
  SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 1,
130
136
  SLASH_INACTIVITY_PENALTY: 10000000000000000000,
131
137
  SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY: 10000000000000000000,
138
+ SLASH_DUPLICATE_PROPOSAL_PENALTY: 10000000000000000000,
139
+ SLASH_DUPLICATE_ATTESTATION_PENALTY: 10000000000000000000,
132
140
  SLASH_ATTEST_DESCENDANT_OF_INVALID_PENALTY: 10000000000000000000,
133
141
  SLASH_UNKNOWN_PENALTY: 10000000000000000000,
134
142
  SLASH_INVALID_BLOCK_PENALTY: 10000000000000000000,
135
- SLASH_GRACE_PERIOD_L2_SLOTS: 64
143
+ SLASH_GRACE_PERIOD_L2_SLOTS: 64,
144
+ ENABLE_VERSION_CHECK: true
136
145
  };
137
146
  export const mainnetConfig = {
138
147
  ETHEREUM_SLOT_DURATION: 12,
139
148
  AZTEC_EPOCH_DURATION: 32,
149
+ AZTEC_TARGET_COMMITTEE_SIZE: 48,
140
150
  AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET: 2,
141
151
  AZTEC_LAG_IN_EPOCHS_FOR_RANDAO: 2,
142
152
  AZTEC_INBOX_LAG: 1,
@@ -148,12 +158,14 @@ export const mainnetConfig = {
148
158
  SLASH_MIN_PENALTY_PERCENTAGE: 0.5,
149
159
  SLASH_MAX_PENALTY_PERCENTAGE: 2,
150
160
  SLASH_OFFENSE_EXPIRATION_ROUNDS: 4,
151
- SLASH_MAX_PAYLOAD_SIZE: 50,
161
+ SLASH_MAX_PAYLOAD_SIZE: 80,
152
162
  SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4,
153
163
  P2P_ENABLED: true,
154
164
  BOOTSTRAP_NODES: '',
155
165
  SEQ_MIN_TX_PER_BLOCK: 0,
156
166
  SEQ_BUILD_CHECKPOINT_IF_EMPTY: true,
167
+ SEQ_BLOCK_DURATION_MS: 6000,
168
+ SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36,
157
169
  DATA_STORE_MAP_SIZE_KB: 134217728,
158
170
  ARCHIVER_STORE_MAP_SIZE_KB: 1073741824,
159
171
  NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824,
@@ -162,10 +174,9 @@ export const mainnetConfig = {
162
174
  PUBLIC_OTEL_INCLUDE_METRICS: 'aztec.validator,aztec.tx_collector,aztec.mempool,aztec.p2p.gossip.agg_,aztec.ivc_verifier.agg_',
163
175
  SENTINEL_ENABLED: true,
164
176
  AZTEC_SLOT_DURATION: 72,
165
- AZTEC_TARGET_COMMITTEE_SIZE: 24,
166
177
  AZTEC_ACTIVATION_THRESHOLD: 2E+23,
167
178
  AZTEC_EJECTION_THRESHOLD: 1E+23,
168
- AZTEC_LOCAL_EJECTION_THRESHOLD: 1.96E+23,
179
+ AZTEC_LOCAL_EJECTION_THRESHOLD: 1.9E+23,
169
180
  AZTEC_SLASH_AMOUNT_SMALL: 2E+21,
170
181
  AZTEC_SLASH_AMOUNT_MEDIUM: 2E+21,
171
182
  AZTEC_SLASH_AMOUNT_LARGE: 2E+21,
@@ -175,30 +186,36 @@ export const mainnetConfig = {
175
186
  AZTEC_SLASHING_QUORUM: 65,
176
187
  AZTEC_GOVERNANCE_PROPOSER_QUORUM: 600,
177
188
  AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE: 1000,
178
- AZTEC_MANA_TARGET: 0,
179
- AZTEC_PROVING_COST_PER_MANA: 0,
189
+ AZTEC_MANA_TARGET: 75000000,
190
+ AZTEC_PROVING_COST_PER_MANA: 25000000,
180
191
  AZTEC_EXIT_DELAY_SECONDS: 345600,
181
192
  AZTEC_SLASHING_DISABLE_DURATION: 259200,
193
+ AZTEC_ENTRY_QUEUE_BOOTSTRAP_VALIDATOR_SET_SIZE: 500,
194
+ AZTEC_ENTRY_QUEUE_BOOTSTRAP_FLUSH_SIZE: 500,
195
+ AZTEC_ENTRY_QUEUE_FLUSH_SIZE_MIN: 1,
196
+ AZTEC_ENTRY_QUEUE_FLUSH_SIZE_QUOTIENT: 400,
197
+ AZTEC_ENTRY_QUEUE_MAX_FLUSH_SIZE: 4,
182
198
  L1_CHAIN_ID: 1,
183
199
  TEST_ACCOUNTS: false,
184
200
  SPONSORED_FPC: false,
185
- TRANSACTIONS_DISABLED: true,
186
- SEQ_MAX_TX_PER_BLOCK: 0,
201
+ TRANSACTIONS_DISABLED: false,
202
+ SEQ_MAX_TX_PER_CHECKPOINT: 72,
187
203
  PROVER_REAL_PROOFS: true,
188
204
  SYNC_SNAPSHOTS_URLS: 'https://aztec-labs-snapshots.com/mainnet/',
189
205
  BLOB_ALLOW_EMPTY_SOURCES: true,
190
- P2P_MAX_PENDING_TX_COUNT: 0,
206
+ P2P_MAX_PENDING_TX_COUNT: 1000,
191
207
  P2P_TX_POOL_DELETE_TXS_AFTER_REORG: true,
192
- AUTO_UPDATE: 'notify',
193
- AUTO_UPDATE_URL: 'https://storage.googleapis.com/aztec-mainnet/auto-update/mainnet.json',
194
- PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
195
- PUBLIC_OTEL_COLLECT_FROM: 'sequencer',
208
+ PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',
209
+ PUBLIC_OTEL_COLLECT_FROM: '',
210
+ ENABLE_VERSION_CHECK: false,
196
211
  SLASH_PRUNE_PENALTY: 0,
197
212
  SLASH_DATA_WITHHOLDING_PENALTY: 0,
198
213
  SLASH_INACTIVITY_TARGET_PERCENTAGE: 0.8,
199
214
  SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 2,
200
215
  SLASH_INACTIVITY_PENALTY: 2E+21,
201
216
  SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY: 2E+21,
217
+ SLASH_DUPLICATE_PROPOSAL_PENALTY: 2E+21,
218
+ SLASH_DUPLICATE_ATTESTATION_PENALTY: 2E+21,
202
219
  SLASH_ATTEST_DESCENDANT_OF_INVALID_PENALTY: 2E+21,
203
220
  SLASH_UNKNOWN_PENALTY: 2E+21,
204
221
  SLASH_INVALID_BLOCK_PENALTY: 2E+21,
@@ -19,4 +19,4 @@ export declare function getNetworkConfig(networkName: NetworkNames, cacheDir?: s
19
19
  * Does not throw if the network simply doesn't exist in the config - just returns without enriching
20
20
  */
21
21
  export declare function enrichEnvironmentWithNetworkConfig(networkName: NetworkNames): Promise<void>;
22
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29ya19jb25maWcuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb25maWcvbmV0d29ya19jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEtBQUssYUFBYSxFQUEwQixLQUFLLFlBQVksRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBYXpHOzs7Ozs7OztHQVFHO0FBQ0gsd0JBQXNCLGdCQUFnQixDQUNwQyxXQUFXLEVBQUUsWUFBWSxFQUN6QixRQUFRLENBQUMsRUFBRSxNQUFNLEdBQ2hCLE9BQU8sQ0FBQyxhQUFhLEdBQUcsU0FBUyxDQUFDLENBOEJwQztBQXVERDs7Ozs7Ozs7R0FRRztBQUNILHdCQUFzQixrQ0FBa0MsQ0FBQyxXQUFXLEVBQUUsWUFBWSxpQkEyQmpGIn0=
22
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29ya19jb25maWcuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb25maWcvbmV0d29ya19jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEtBQUssYUFBYSxFQUEwQixLQUFLLFlBQVksRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBWXpHOzs7Ozs7OztHQVFHO0FBQ0gsd0JBQXNCLGdCQUFnQixDQUNwQyxXQUFXLEVBQUUsWUFBWSxFQUN6QixRQUFRLENBQUMsRUFBRSxNQUFNLEdBQ2hCLE9BQU8sQ0FBQyxhQUFhLEdBQUcsU0FBUyxDQUFDLENBOEJwQztBQXNERDs7Ozs7Ozs7R0FRRztBQUNILHdCQUFzQixrQ0FBa0MsQ0FBQyxXQUFXLEVBQUUsWUFBWSxpQkE4QmpGIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"network_config.d.ts","sourceRoot":"","sources":["../../src/config/network_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAA0B,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAazG;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,YAAY,EACzB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CA8BpC;AAuDD;;;;;;;;GAQG;AACH,wBAAsB,kCAAkC,CAAC,WAAW,EAAE,YAAY,iBA2BjF"}
1
+ {"version":3,"file":"network_config.d.ts","sourceRoot":"","sources":["../../src/config/network_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAA0B,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAYzG;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,YAAY,EACzB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CA8BpC;AAsDD;;;;;;;;GAQG;AACH,wBAAsB,kCAAkC,CAAC,WAAW,EAAE,YAAY,iBA8BjF"}
@@ -5,7 +5,6 @@ import { cachedFetch } from './cached_fetch.js';
5
5
  import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
6
6
  const DEFAULT_CONFIG_URL = 'https://raw.githubusercontent.com/AztecProtocol/networks/refs/heads/main/network_config.json';
7
7
  const FALLBACK_CONFIG_URL = 'https://metadata.aztec.network/network_config.json';
8
- const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
9
8
  /**
10
9
  * Fetches remote network configuration from GitHub with caching support.
11
10
  * Uses the reusable cachedFetch utility. Falls back to metadata.aztec.network if the default URL fails.
@@ -64,7 +63,6 @@ const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
64
63
  let rawConfig;
65
64
  if (url.protocol === 'http:' || url.protocol === 'https:') {
66
65
  rawConfig = await cachedFetch(url.href, {
67
- cacheDurationMs: NETWORK_CONFIG_CACHE_DURATION_MS,
68
66
  cacheFile: cacheDir ? join(cacheDir, networkName, 'network_config.json') : undefined
69
67
  });
70
68
  } else if (url.protocol === 'file:') {
@@ -112,4 +110,7 @@ const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
112
110
  if (networkConfig.blockDurationMs !== undefined) {
113
111
  enrichVar('SEQ_BLOCK_DURATION_MS', String(networkConfig.blockDurationMs));
114
112
  }
113
+ if (networkConfig.txPublicSetupAllowListExtend) {
114
+ enrichVar('TX_PUBLIC_SETUP_ALLOWLIST', networkConfig.txPublicSetupAllowListExtend);
115
+ }
115
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/cli",
3
- "version": "0.0.1-commit.ee80a48",
3
+ "version": "0.0.1-commit.ef17749e1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./contracts": "./dest/cmds/contracts/index.js",
@@ -77,23 +77,23 @@
77
77
  ]
78
78
  },
79
79
  "dependencies": {
80
- "@aztec/accounts": "0.0.1-commit.ee80a48",
81
- "@aztec/archiver": "0.0.1-commit.ee80a48",
82
- "@aztec/aztec.js": "0.0.1-commit.ee80a48",
83
- "@aztec/constants": "0.0.1-commit.ee80a48",
84
- "@aztec/entrypoints": "0.0.1-commit.ee80a48",
85
- "@aztec/ethereum": "0.0.1-commit.ee80a48",
86
- "@aztec/foundation": "0.0.1-commit.ee80a48",
87
- "@aztec/l1-artifacts": "0.0.1-commit.ee80a48",
88
- "@aztec/node-keystore": "0.0.1-commit.ee80a48",
89
- "@aztec/node-lib": "0.0.1-commit.ee80a48",
90
- "@aztec/p2p": "0.0.1-commit.ee80a48",
91
- "@aztec/protocol-contracts": "0.0.1-commit.ee80a48",
92
- "@aztec/sequencer-client": "0.0.1-commit.ee80a48",
93
- "@aztec/slasher": "0.0.1-commit.ee80a48",
94
- "@aztec/stdlib": "0.0.1-commit.ee80a48",
95
- "@aztec/test-wallet": "0.0.1-commit.ee80a48",
96
- "@aztec/world-state": "0.0.1-commit.ee80a48",
80
+ "@aztec/accounts": "0.0.1-commit.ef17749e1",
81
+ "@aztec/archiver": "0.0.1-commit.ef17749e1",
82
+ "@aztec/aztec.js": "0.0.1-commit.ef17749e1",
83
+ "@aztec/constants": "0.0.1-commit.ef17749e1",
84
+ "@aztec/entrypoints": "0.0.1-commit.ef17749e1",
85
+ "@aztec/ethereum": "0.0.1-commit.ef17749e1",
86
+ "@aztec/foundation": "0.0.1-commit.ef17749e1",
87
+ "@aztec/l1-artifacts": "0.0.1-commit.ef17749e1",
88
+ "@aztec/node-keystore": "0.0.1-commit.ef17749e1",
89
+ "@aztec/node-lib": "0.0.1-commit.ef17749e1",
90
+ "@aztec/p2p": "0.0.1-commit.ef17749e1",
91
+ "@aztec/protocol-contracts": "0.0.1-commit.ef17749e1",
92
+ "@aztec/sequencer-client": "0.0.1-commit.ef17749e1",
93
+ "@aztec/slasher": "0.0.1-commit.ef17749e1",
94
+ "@aztec/stdlib": "0.0.1-commit.ef17749e1",
95
+ "@aztec/wallets": "0.0.1-commit.ef17749e1",
96
+ "@aztec/world-state": "0.0.1-commit.ef17749e1",
97
97
  "@ethersproject/wallet": "^5.8.0",
98
98
  "@iarna/toml": "^2.2.5",
99
99
  "@libp2p/peer-id-factory": "^3.0.4",
@@ -107,9 +107,9 @@
107
107
  "viem": "npm:@aztec/viem@2.38.2"
108
108
  },
109
109
  "devDependencies": {
110
- "@aztec/aztec-node": "0.0.1-commit.ee80a48",
111
- "@aztec/kv-store": "0.0.1-commit.ee80a48",
112
- "@aztec/telemetry-client": "0.0.1-commit.ee80a48",
110
+ "@aztec/aztec-node": "0.0.1-commit.ef17749e1",
111
+ "@aztec/kv-store": "0.0.1-commit.ef17749e1",
112
+ "@aztec/telemetry-client": "0.0.1-commit.ef17749e1",
113
113
  "@jest/globals": "^30.0.0",
114
114
  "@types/jest": "^30.0.0",
115
115
  "@types/lodash.chunk": "^4.2.9",
@@ -126,15 +126,15 @@
126
126
  "typescript": "^5.3.3"
127
127
  },
128
128
  "peerDependencies": {
129
- "@aztec/accounts": "0.0.1-commit.ee80a48",
130
- "@aztec/bb-prover": "0.0.1-commit.ee80a48",
131
- "@aztec/ethereum": "0.0.1-commit.ee80a48",
132
- "@aztec/l1-artifacts": "0.0.1-commit.ee80a48",
133
- "@aztec/noir-contracts.js": "0.0.1-commit.ee80a48",
134
- "@aztec/noir-protocol-circuits-types": "0.0.1-commit.ee80a48",
135
- "@aztec/noir-test-contracts.js": "0.0.1-commit.ee80a48",
136
- "@aztec/protocol-contracts": "0.0.1-commit.ee80a48",
137
- "@aztec/stdlib": "0.0.1-commit.ee80a48"
129
+ "@aztec/accounts": "0.0.1-commit.ef17749e1",
130
+ "@aztec/bb-prover": "0.0.1-commit.ef17749e1",
131
+ "@aztec/ethereum": "0.0.1-commit.ef17749e1",
132
+ "@aztec/l1-artifacts": "0.0.1-commit.ef17749e1",
133
+ "@aztec/noir-contracts.js": "0.0.1-commit.ef17749e1",
134
+ "@aztec/noir-protocol-circuits-types": "0.0.1-commit.ef17749e1",
135
+ "@aztec/noir-test-contracts.js": "0.0.1-commit.ef17749e1",
136
+ "@aztec/protocol-contracts": "0.0.1-commit.ef17749e1",
137
+ "@aztec/stdlib": "0.0.1-commit.ef17749e1"
138
138
  },
139
139
  "files": [
140
140
  "dest",
@@ -1,12 +1,13 @@
1
1
  import { getInitialTestAccountsData } from '@aztec/accounts/testing';
2
- import type { AztecAddress } from '@aztec/aztec.js/addresses';
2
+ import { AztecAddress } from '@aztec/aztec.js/addresses';
3
3
  import type { WaitOpts } from '@aztec/aztec.js/contracts';
4
4
  import { createAztecNodeClient } from '@aztec/aztec.js/node';
5
5
  import { AccountManager } from '@aztec/aztec.js/wallet';
6
6
  import { jsonStringify } from '@aztec/foundation/json-rpc';
7
7
  import type { LogFn } from '@aztec/foundation/log';
8
8
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
9
- import { TestWallet, deployFundedSchnorrAccounts } from '@aztec/test-wallet/server';
9
+ import { EmbeddedWallet } from '@aztec/wallets/embedded';
10
+ import { deployFundedSchnorrAccounts } from '@aztec/wallets/testing';
10
11
 
11
12
  export async function setupL2Contracts(nodeUrl: string, testAccounts: boolean, json: boolean, log: LogFn) {
12
13
  const waitOpts: WaitOpts = {
@@ -16,7 +17,7 @@ export async function setupL2Contracts(nodeUrl: string, testAccounts: boolean, j
16
17
  log('setupL2Contracts: Wait options' + jsonStringify(waitOpts));
17
18
  log('setupL2Contracts: Creating PXE client...');
18
19
  const node = createAztecNodeClient(nodeUrl);
19
- const wallet = await TestWallet.create(node);
20
+ const wallet = await EmbeddedWallet.create(node);
20
21
 
21
22
  let deployedAccountManagers: AccountManager[] = [];
22
23
  if (testAccounts) {
@@ -109,8 +109,16 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
109
109
  program
110
110
  .command('compute-genesis-values')
111
111
  .description('Computes genesis values (VK tree root, protocol contracts hash, genesis archive root).')
112
- .addOption(new Option('--test-accounts', 'Include initial test accounts in genesis state').env('TEST_ACCOUNTS'))
113
- .addOption(new Option('--sponsored-fpc', 'Include sponsored FPC contract in genesis state').env('SPONSORED_FPC'))
112
+ .addOption(
113
+ new Option('--test-accounts <boolean>', 'Include initial test accounts in genesis state')
114
+ .env('TEST_ACCOUNTS')
115
+ .argParser(arg => arg === 'true'),
116
+ )
117
+ .addOption(
118
+ new Option('--sponsored-fpc <boolean>', 'Include sponsored FPC contract in genesis state')
119
+ .env('SPONSORED_FPC')
120
+ .argParser(arg => arg === 'true'),
121
+ )
114
122
  .action(async options => {
115
123
  const { computeGenesisValuesCmd } = await import('./compute_genesis_values.js');
116
124
  await computeGenesisValuesCmd(options.testAccounts, options.sponsoredFpc, log);
@@ -2,7 +2,7 @@ import { createEthereumChain, isAnvilTestChain } from '@aztec/ethereum/chain';
2
2
  import { createExtendedL1Client, getPublicClient } from '@aztec/ethereum/client';
3
3
  import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
4
4
  import { GSEContract, RollupContract } from '@aztec/ethereum/contracts';
5
- import { createL1TxUtilsFromViemWallet } from '@aztec/ethereum/l1-tx-utils';
5
+ import { createL1TxUtils } from '@aztec/ethereum/l1-tx-utils';
6
6
  import { EthCheatCodes } from '@aztec/ethereum/test';
7
7
  import type { EthAddress } from '@aztec/foundation/eth-address';
8
8
  import type { LogFn, Logger } from '@aztec/foundation/log';
@@ -88,7 +88,7 @@ export async function addL1Validator({
88
88
  const gse = new GSEContract(l1Client, gseAddress);
89
89
  const registrationTuple = await gse.makeRegistrationTuple(blsSecretKey);
90
90
 
91
- const l1TxUtils = createL1TxUtilsFromViemWallet(l1Client, { logger: debugLogger });
91
+ const l1TxUtils = createL1TxUtils(l1Client, { logger: debugLogger });
92
92
  const proofParamsObj = ZkPassportProofParams.fromBuffer(proofParams);
93
93
 
94
94
  // Step 1: Claim STK tokens from the faucet
@@ -194,7 +194,7 @@ export async function addL1ValidatorViaRollup({
194
194
 
195
195
  const registrationTuple = await gse.makeRegistrationTuple(blsSecretKey);
196
196
 
197
- const l1TxUtils = createL1TxUtilsFromViemWallet(l1Client, { logger: debugLogger });
197
+ const l1TxUtils = createL1TxUtils(l1Client, { logger: debugLogger });
198
198
 
199
199
  const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
200
200
  to: rollupAddress.toString(),
@@ -241,7 +241,7 @@ export async function removeL1Validator({
241
241
  const account = getAccount(privateKey, mnemonic);
242
242
  const chain = createEthereumChain(rpcUrls, chainId);
243
243
  const l1Client = createExtendedL1Client(rpcUrls, account, chain.chainInfo);
244
- const l1TxUtils = createL1TxUtilsFromViemWallet(l1Client, { logger: debugLogger });
244
+ const l1TxUtils = createL1TxUtils(l1Client, { logger: debugLogger });
245
245
 
246
246
  dualLog(`Removing validator ${validatorAddress.toString()} from rollup ${rollupAddress.toString()}`);
247
247
  const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
@@ -268,7 +268,7 @@ export async function pruneRollup({
268
268
  const account = getAccount(privateKey, mnemonic);
269
269
  const chain = createEthereumChain(rpcUrls, chainId);
270
270
  const l1Client = createExtendedL1Client(rpcUrls, account, chain.chainInfo);
271
- const l1TxUtils = createL1TxUtilsFromViemWallet(l1Client, { logger: debugLogger });
271
+ const l1TxUtils = createL1TxUtils(l1Client, { logger: debugLogger });
272
272
 
273
273
  dualLog(`Trying prune`);
274
274
  const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
@@ -1,24 +1,48 @@
1
1
  import { createLogger } from '@aztec/aztec.js/log';
2
2
 
3
- import { mkdir, readFile, stat, writeFile } from 'fs/promises';
3
+ import { mkdir, readFile, writeFile } from 'fs/promises';
4
4
  import { dirname } from 'path';
5
5
 
6
6
  export interface CachedFetchOptions {
7
- /** Cache duration in milliseconds */
8
- cacheDurationMs: number;
9
- /** The cache file */
7
+ /** The cache file path for storing data. If not provided, no caching is performed. */
10
8
  cacheFile?: string;
9
+ /** Fallback max-age in milliseconds when server sends no Cache-Control header. Defaults to 5 minutes. */
10
+ defaultMaxAgeMs?: number;
11
+ }
12
+
13
+ /** Cache metadata stored in a sidecar .meta file alongside the data file. */
14
+ interface CacheMeta {
15
+ etag?: string;
16
+ expiresAt: number;
17
+ }
18
+
19
+ const DEFAULT_MAX_AGE_MS = 5 * 60 * 1000; // 5 minutes
20
+
21
+ /** Extracts max-age value in milliseconds from a Response's Cache-Control header. Returns undefined if not present. */
22
+ export function parseMaxAge(response: { headers: { get(name: string): string | null } }): number | undefined {
23
+ const cacheControl = response.headers.get('cache-control');
24
+ if (!cacheControl) {
25
+ return undefined;
26
+ }
27
+ const match = cacheControl.match(/max-age=(\d+)/);
28
+ if (!match) {
29
+ return undefined;
30
+ }
31
+ return parseInt(match[1], 10) * 1000;
11
32
  }
12
33
 
13
34
  /**
14
- * Fetches data from a URL with file-based caching support.
15
- * This utility can be used by both remote config and bootnodes fetching.
35
+ * Fetches data from a URL with file-based HTTP conditional caching.
36
+ *
37
+ * Data is stored as raw JSON in the cache file (same format as the server returns).
38
+ * Caching metadata (ETag, expiry) is stored in a separate sidecar `.meta` file.
39
+ * This keeps the data file human-readable and backward-compatible with older code.
16
40
  *
17
41
  * @param url - The URL to fetch from
18
- * @param networkName - Network name for cache directory structure
19
- * @param options - Caching and error handling options
20
- * @param cacheDir - Optional cache directory (defaults to no caching)
21
- * @returns The fetched and parsed JSON data, or undefined if fetch fails and throwOnError is false
42
+ * @param options - Caching options
43
+ * @param fetch - Fetch implementation (defaults to globalThis.fetch)
44
+ * @param log - Logger instance
45
+ * @returns The fetched and parsed JSON data, or undefined if fetch fails
22
46
  */
23
47
  export async function cachedFetch<T = any>(
24
48
  url: string,
@@ -26,42 +50,106 @@ export async function cachedFetch<T = any>(
26
50
  fetch = globalThis.fetch,
27
51
  log = createLogger('cached_fetch'),
28
52
  ): Promise<T | undefined> {
29
- const { cacheDurationMs, cacheFile } = options;
53
+ const { cacheFile, defaultMaxAgeMs = DEFAULT_MAX_AGE_MS } = options;
54
+
55
+ // If no cacheFile, just fetch normally without caching
56
+ if (!cacheFile) {
57
+ return fetchAndParse<T>(url, fetch, log);
58
+ }
59
+
60
+ const metaFile = cacheFile + '.meta';
30
61
 
31
- // Try to read from cache first
62
+ // Try to read metadata
63
+ let meta: CacheMeta | undefined;
32
64
  try {
33
- if (cacheFile) {
34
- const info = await stat(cacheFile);
35
- if (info.mtimeMs + cacheDurationMs > Date.now()) {
36
- const cachedData = JSON.parse(await readFile(cacheFile, 'utf-8'));
37
- return cachedData;
38
- }
39
- }
65
+ meta = JSON.parse(await readFile(metaFile, 'utf-8'));
40
66
  } catch {
41
- log.trace('Failed to read data from cache');
67
+ log.trace('No usable cache metadata found');
42
68
  }
43
69
 
70
+ // Try to read cached data
71
+ let cachedData: T | undefined;
44
72
  try {
45
- const response = await fetch(url);
73
+ cachedData = JSON.parse(await readFile(cacheFile, 'utf-8'));
74
+ } catch {
75
+ log.trace('No usable cached data found');
76
+ }
77
+
78
+ // If metadata and data exist and cache is fresh, return directly
79
+ if (meta && cachedData !== undefined && meta.expiresAt > Date.now()) {
80
+ return cachedData;
81
+ }
82
+
83
+ // Cache is stale or missing — make a (possibly conditional) request
84
+ try {
85
+ const headers: Record<string, string> = {};
86
+ if (meta?.etag && cachedData !== undefined) {
87
+ headers['If-None-Match'] = meta.etag;
88
+ }
89
+
90
+ const response = await fetch(url, { headers });
91
+
92
+ if (response.status === 304 && cachedData !== undefined) {
93
+ // Not modified — recompute expiry from new response headers and return cached data
94
+ const maxAgeMs = parseMaxAge(response) ?? defaultMaxAgeMs;
95
+ await writeMetaFile(metaFile, { etag: meta?.etag, expiresAt: Date.now() + maxAgeMs }, log);
96
+ return cachedData;
97
+ }
98
+
46
99
  if (!response.ok) {
47
100
  log.warn(`Failed to fetch from ${url}: ${response.status} ${response.statusText}`);
48
- return undefined;
101
+ return cachedData;
49
102
  }
50
103
 
51
- const data = await response.json();
104
+ // 200 — parse new data and cache it
105
+ const data = (await response.json()) as T;
106
+ const maxAgeMs = parseMaxAge(response) ?? defaultMaxAgeMs;
107
+ const etag = response.headers.get('etag') ?? undefined;
52
108
 
53
- try {
54
- if (cacheFile) {
55
- await mkdir(dirname(cacheFile), { recursive: true });
56
- await writeFile(cacheFile, JSON.stringify(data), 'utf-8');
57
- }
58
- } catch (err) {
59
- log.warn('Failed to cache data on disk: ' + cacheFile, { cacheFile, err });
60
- }
109
+ await ensureDir(cacheFile, log);
110
+ await Promise.all([
111
+ writeFile(cacheFile, JSON.stringify(data), 'utf-8'),
112
+ writeFile(metaFile, JSON.stringify({ etag, expiresAt: Date.now() + maxAgeMs }), 'utf-8'),
113
+ ]);
61
114
 
62
115
  return data;
116
+ } catch (err) {
117
+ log.warn(`Failed to fetch from ${url}`, { err });
118
+ return cachedData;
119
+ }
120
+ }
121
+
122
+ async function fetchAndParse<T>(
123
+ url: string,
124
+ fetch: typeof globalThis.fetch,
125
+ log: ReturnType<typeof createLogger>,
126
+ ): Promise<T | undefined> {
127
+ try {
128
+ const response = await fetch(url);
129
+ if (!response.ok) {
130
+ log.warn(`Failed to fetch from ${url}: ${response.status} ${response.statusText}`);
131
+ return undefined;
132
+ }
133
+ return (await response.json()) as T;
63
134
  } catch (err) {
64
135
  log.warn(`Failed to fetch from ${url}`, { err });
65
136
  return undefined;
66
137
  }
67
138
  }
139
+
140
+ async function ensureDir(filePath: string, log: ReturnType<typeof createLogger>) {
141
+ try {
142
+ await mkdir(dirname(filePath), { recursive: true });
143
+ } catch (err) {
144
+ log.warn('Failed to create cache directory for: ' + filePath, { err });
145
+ }
146
+ }
147
+
148
+ async function writeMetaFile(metaFile: string, meta: CacheMeta, log: ReturnType<typeof createLogger>) {
149
+ try {
150
+ await mkdir(dirname(metaFile), { recursive: true });
151
+ await writeFile(metaFile, JSON.stringify(meta), 'utf-8');
152
+ } catch (err) {
153
+ log.warn('Failed to write cache metadata: ' + metaFile, { err });
154
+ }
155
+ }
@@ -45,7 +45,9 @@ export function enrichEnvironmentWithChainName(networkName: NetworkNames) {
45
45
  }
46
46
 
47
47
  // Apply generated network config from defaults.yml
48
- const generatedConfig = NetworkConfigs[networkName];
48
+ // For devnet iterations (v4-devnet-1, etc.), use the base devnet config
49
+ const configKey = /^v\d+-devnet-\d+$/.test(networkName) ? 'devnet' : networkName;
50
+ const generatedConfig = NetworkConfigs[configKey];
49
51
  if (generatedConfig) {
50
52
  enrichEnvironmentWithNetworkConfig(generatedConfig);
51
53
  }