@aztec/ethereum 3.0.0-canary.a9708bd → 3.0.0-devnet.20251212
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/account.d.ts +1 -1
- package/dest/chain.d.ts +1 -1
- package/dest/client.d.ts +2 -2
- package/dest/client.d.ts.map +1 -1
- package/dest/config.d.ts +16 -8
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +160 -62
- package/dest/constants.d.ts +1 -1
- package/dest/contracts/empire_base.d.ts +7 -6
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/empire_base.js +1 -1
- package/dest/contracts/empire_slashing_proposer.d.ts +7 -6
- package/dest/contracts/empire_slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/empire_slashing_proposer.js +9 -3
- package/dest/contracts/errors.d.ts +1 -1
- package/dest/contracts/errors.d.ts.map +1 -1
- package/dest/contracts/fee_asset_handler.d.ts +4 -4
- package/dest/contracts/fee_asset_handler.d.ts.map +1 -1
- package/dest/contracts/fee_juice.d.ts +1 -1
- package/dest/contracts/fee_juice.d.ts.map +1 -1
- package/dest/contracts/governance.d.ts +16 -16
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +7 -3
- package/dest/contracts/governance_proposer.d.ts +6 -6
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +9 -4
- package/dest/contracts/gse.d.ts +1 -1
- package/dest/contracts/gse.d.ts.map +1 -1
- package/dest/contracts/inbox.d.ts +1 -1
- package/dest/contracts/inbox.d.ts.map +1 -1
- package/dest/contracts/index.d.ts +1 -1
- package/dest/contracts/multicall.d.ts +5 -7
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +6 -4
- package/dest/contracts/registry.d.ts +1 -1
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/rollup.d.ts +83 -72
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +144 -139
- package/dest/contracts/slasher_contract.d.ts +11 -1
- package/dest/contracts/slasher_contract.d.ts.map +1 -1
- package/dest/contracts/slasher_contract.js +18 -0
- package/dest/contracts/tally_slashing_proposer.d.ts +30 -9
- package/dest/contracts/tally_slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/tally_slashing_proposer.js +58 -8
- package/dest/contracts/utils.d.ts +1 -1
- package/dest/deploy_l1_contracts.d.ts +477 -15
- package/dest/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_l1_contracts.js +610 -386
- package/dest/eth-signer/eth-signer.d.ts +1 -1
- package/dest/eth-signer/index.d.ts +1 -1
- package/dest/forwarder_proxy.d.ts +32 -0
- package/dest/forwarder_proxy.d.ts.map +1 -0
- package/dest/forwarder_proxy.js +93 -0
- package/dest/l1_artifacts.d.ts +14258 -6015
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_artifacts.js +10 -5
- package/dest/l1_contract_addresses.d.ts +8 -4
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +16 -26
- package/dest/l1_reader.d.ts +4 -2
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +14 -8
- package/dest/l1_tx_utils/config.d.ts +59 -0
- package/dest/l1_tx_utils/config.d.ts.map +1 -0
- package/dest/l1_tx_utils/config.js +96 -0
- package/dest/l1_tx_utils/constants.d.ts +6 -0
- package/dest/l1_tx_utils/constants.d.ts.map +1 -0
- package/dest/l1_tx_utils/constants.js +14 -0
- package/dest/l1_tx_utils/factory.d.ts +24 -0
- package/dest/l1_tx_utils/factory.d.ts.map +1 -0
- package/dest/l1_tx_utils/factory.js +12 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts +41 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/forwarder_l1_tx_utils.js +48 -0
- package/dest/l1_tx_utils/index-blobs.d.ts +3 -0
- package/dest/l1_tx_utils/index-blobs.d.ts.map +1 -0
- package/dest/l1_tx_utils/index-blobs.js +2 -0
- package/dest/l1_tx_utils/index.d.ts +10 -0
- package/dest/l1_tx_utils/index.d.ts.map +1 -0
- package/dest/l1_tx_utils/index.js +10 -0
- package/dest/l1_tx_utils/interfaces.d.ts +76 -0
- package/dest/l1_tx_utils/interfaces.d.ts.map +1 -0
- package/dest/l1_tx_utils/interfaces.js +4 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +94 -0
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils.js +623 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +26 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +1 -0
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.js +26 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +94 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +431 -0
- package/dest/l1_tx_utils/signer.d.ts +4 -0
- package/dest/l1_tx_utils/signer.d.ts.map +1 -0
- package/dest/l1_tx_utils/signer.js +16 -0
- package/dest/l1_tx_utils/types.d.ts +67 -0
- package/dest/l1_tx_utils/types.d.ts.map +1 -0
- package/dest/l1_tx_utils/types.js +26 -0
- package/dest/l1_tx_utils/utils.d.ts +4 -0
- package/dest/l1_tx_utils/utils.d.ts.map +1 -0
- package/dest/l1_tx_utils/utils.js +14 -0
- package/dest/l1_types.d.ts +1 -1
- package/dest/publisher_manager.d.ts +8 -3
- package/dest/publisher_manager.d.ts.map +1 -1
- package/dest/publisher_manager.js +36 -8
- package/dest/queries.d.ts +1 -1
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +13 -12
- package/dest/test/chain_monitor.d.ts +33 -19
- package/dest/test/chain_monitor.d.ts.map +1 -1
- package/dest/test/chain_monitor.js +100 -33
- package/dest/test/delayed_tx_utils.d.ts +3 -3
- package/dest/test/delayed_tx_utils.d.ts.map +1 -1
- package/dest/test/delayed_tx_utils.js +2 -2
- package/dest/test/eth_cheat_codes.d.ts +36 -14
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +124 -31
- package/dest/test/eth_cheat_codes_with_state.d.ts +1 -1
- package/dest/test/eth_cheat_codes_with_state.d.ts.map +1 -1
- package/dest/test/index.d.ts +1 -1
- package/dest/test/rollup_cheat_codes.d.ts +23 -20
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +79 -42
- package/dest/test/start_anvil.d.ts +2 -1
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +2 -1
- package/dest/test/tx_delayer.d.ts +1 -1
- package/dest/test/tx_delayer.d.ts.map +1 -1
- package/dest/test/tx_delayer.js +3 -2
- package/dest/test/upgrade_utils.d.ts +1 -1
- package/dest/test/upgrade_utils.d.ts.map +1 -1
- package/dest/test/upgrade_utils.js +3 -2
- package/dest/types.d.ts +57 -2
- package/dest/types.d.ts.map +1 -1
- package/dest/utils.d.ts +2 -2
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +10 -161
- package/dest/zkPassportVerifierAddress.d.ts +1 -1
- package/dest/zkPassportVerifierAddress.js +1 -1
- package/package.json +27 -13
- package/src/client.ts +1 -1
- package/src/config.ts +177 -65
- package/src/contracts/empire_base.ts +7 -6
- package/src/contracts/empire_slashing_proposer.ts +18 -8
- package/src/contracts/fee_asset_handler.ts +1 -1
- package/src/contracts/governance.ts +3 -3
- package/src/contracts/governance_proposer.ts +14 -9
- package/src/contracts/multicall.ts +12 -10
- package/src/contracts/rollup.ts +170 -171
- package/src/contracts/slasher_contract.ts +22 -0
- package/src/contracts/tally_slashing_proposer.ts +63 -12
- package/src/deploy_l1_contracts.ts +610 -337
- package/src/forwarder_proxy.ts +108 -0
- package/src/l1_artifacts.ts +14 -6
- package/src/l1_contract_addresses.ts +17 -26
- package/src/l1_reader.ts +17 -9
- package/src/l1_tx_utils/README.md +177 -0
- package/src/l1_tx_utils/config.ts +161 -0
- package/src/l1_tx_utils/constants.ts +18 -0
- package/src/l1_tx_utils/factory.ts +64 -0
- package/src/l1_tx_utils/forwarder_l1_tx_utils.ts +119 -0
- package/src/l1_tx_utils/index-blobs.ts +2 -0
- package/src/l1_tx_utils/index.ts +12 -0
- package/src/l1_tx_utils/interfaces.ts +86 -0
- package/src/l1_tx_utils/l1_tx_utils.ts +738 -0
- package/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +77 -0
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +557 -0
- package/src/l1_tx_utils/signer.ts +28 -0
- package/src/l1_tx_utils/types.ts +85 -0
- package/src/l1_tx_utils/utils.ts +16 -0
- package/src/publisher_manager.ts +51 -9
- package/src/queries.ts +16 -8
- package/src/test/chain_monitor.ts +118 -36
- package/src/test/delayed_tx_utils.ts +2 -2
- package/src/test/eth_cheat_codes.ts +149 -30
- package/src/test/rollup_cheat_codes.ts +94 -52
- package/src/test/start_anvil.ts +2 -0
- package/src/test/tx_delayer.ts +4 -2
- package/src/test/upgrade_utils.ts +3 -2
- package/src/types.ts +62 -0
- package/src/utils.ts +12 -184
- package/src/zkPassportVerifierAddress.ts +1 -1
- package/dest/index.d.ts +0 -18
- package/dest/index.d.ts.map +0 -1
- package/dest/index.js +0 -17
- package/dest/l1_tx_utils.d.ts +0 -250
- package/dest/l1_tx_utils.d.ts.map +0 -1
- package/dest/l1_tx_utils.js +0 -826
- package/dest/l1_tx_utils_with_blobs.d.ts +0 -19
- package/dest/l1_tx_utils_with_blobs.d.ts.map +0 -1
- package/dest/l1_tx_utils_with_blobs.js +0 -85
- package/src/index.ts +0 -17
- package/src/l1_tx_utils.ts +0 -1105
- package/src/l1_tx_utils_with_blobs.ts +0 -144
package/dest/utils.js
CHANGED
|
@@ -118,34 +118,16 @@ function getNestedErrorData(error) {
|
|
|
118
118
|
if (error instanceof Error) {
|
|
119
119
|
return new FormattedViemError(error.message, error?.metaMessages);
|
|
120
120
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
//
|
|
125
|
-
if (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// If we found a specific error detail, format it clearly
|
|
134
|
-
if (errorDetail) {
|
|
135
|
-
// Look for key sections of the formatted result to replace with highlighted error
|
|
136
|
-
let replaced = false;
|
|
137
|
-
// Try to find the Details: section
|
|
138
|
-
const detailsMatch = formattedRes.match(/Details: ([^\n]+)/);
|
|
139
|
-
if (detailsMatch) {
|
|
140
|
-
formattedRes = formattedRes.replace(detailsMatch[0], `Details: *${errorDetail}*`);
|
|
141
|
-
replaced = true;
|
|
142
|
-
}
|
|
143
|
-
// If we didn't find a Details section, add the error at the beginning
|
|
144
|
-
if (!replaced) {
|
|
145
|
-
formattedRes = `Error: *${errorDetail}*\n\n${formattedRes}`;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return new FormattedViemError(formattedRes.replace(/\\n/g, '\n'), error?.metaMessages);
|
|
121
|
+
const body = String(error);
|
|
122
|
+
const length = body.length;
|
|
123
|
+
// LogExplorer can only render up to 2500 characters in it's summary view. Try to keep the whole message below this number
|
|
124
|
+
// Limit the error to 2000 chacaters in order to allow code higher up to decorate this error with extra details (up to 500 characters)
|
|
125
|
+
if (length > 2000) {
|
|
126
|
+
const chunk = 950;
|
|
127
|
+
const truncated = length - 2 * chunk;
|
|
128
|
+
return new FormattedViemError(body.slice(0, chunk) + `...${truncated} characters truncated...` + body.slice(-1 * chunk));
|
|
129
|
+
}
|
|
130
|
+
return new FormattedViemError(body);
|
|
149
131
|
}
|
|
150
132
|
function stripAbis(obj) {
|
|
151
133
|
if (!obj || typeof obj !== 'object') {
|
|
@@ -166,139 +148,6 @@ function stripAbis(obj) {
|
|
|
166
148
|
}
|
|
167
149
|
});
|
|
168
150
|
}
|
|
169
|
-
function extractAndFormatRequestBody(message) {
|
|
170
|
-
// First check if message is extremely large and contains very large hex strings
|
|
171
|
-
if (message.length > 50000) {
|
|
172
|
-
message = replaceHexStrings(message, {
|
|
173
|
-
minLength: 10000,
|
|
174
|
-
truncateLength: 200
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
// Add a specific check for RPC calls with large params
|
|
178
|
-
if (message.includes('"method":"eth_sendRawTransaction"')) {
|
|
179
|
-
message = replaceHexStrings(message, {
|
|
180
|
-
pattern: /"params":\s*\[\s*"(0x[a-fA-F0-9]{1000,})"\s*\]/g,
|
|
181
|
-
transform: (hex)=>`"params":["${truncateHex(hex, 200)}"]`
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
// First handle Request body JSON
|
|
185
|
-
const requestBodyRegex = /Request body: ({[\s\S]*?})\n/g;
|
|
186
|
-
let result = message.replace(requestBodyRegex, (match, body)=>{
|
|
187
|
-
return `Request body: ${formatRequestBody(body)}\n`;
|
|
188
|
-
});
|
|
189
|
-
// Then handle Arguments section
|
|
190
|
-
const argsRegex = /((?:Request |Estimate Gas )?Arguments:[\s\S]*?(?=\n\n|$))/g;
|
|
191
|
-
result = result.replace(argsRegex, (section)=>{
|
|
192
|
-
const lines = section.split('\n');
|
|
193
|
-
const processedLines = lines.map((line)=>{
|
|
194
|
-
// Check if line contains a colon followed by content
|
|
195
|
-
const colonIndex = line.indexOf(':');
|
|
196
|
-
if (colonIndex !== -1) {
|
|
197
|
-
const [prefix, content] = [
|
|
198
|
-
line.slice(0, colonIndex + 1),
|
|
199
|
-
line.slice(colonIndex + 1).trim()
|
|
200
|
-
];
|
|
201
|
-
// If content contains a hex string, truncate it
|
|
202
|
-
if (content.includes('0x')) {
|
|
203
|
-
const processedContent = replaceHexStrings(content);
|
|
204
|
-
return `${prefix} ${processedContent}`;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
return line;
|
|
208
|
-
});
|
|
209
|
-
return processedLines.join('\n');
|
|
210
|
-
});
|
|
211
|
-
// Finally, catch any remaining hex strings in the message
|
|
212
|
-
result = replaceHexStrings(result);
|
|
213
|
-
return result;
|
|
214
|
-
}
|
|
215
|
-
function truncateHex(hex, length = 100) {
|
|
216
|
-
if (!hex || typeof hex !== 'string') {
|
|
217
|
-
return hex;
|
|
218
|
-
}
|
|
219
|
-
if (!hex.startsWith('0x')) {
|
|
220
|
-
return hex;
|
|
221
|
-
}
|
|
222
|
-
if (hex.length <= length * 2) {
|
|
223
|
-
return hex;
|
|
224
|
-
}
|
|
225
|
-
// For extremely large hex strings, use more aggressive truncation
|
|
226
|
-
if (hex.length > 10000) {
|
|
227
|
-
return `${hex.slice(0, length)}...<${hex.length - length * 2} chars omitted>...${hex.slice(-length)}`;
|
|
228
|
-
}
|
|
229
|
-
return `${hex.slice(0, length)}...${hex.slice(-length)}`;
|
|
230
|
-
}
|
|
231
|
-
function replaceHexStrings(text, options = {}) {
|
|
232
|
-
const { minLength = 10, maxLength = Infinity, truncateLength = 100, pattern, transform = (hex)=>truncateHex(hex, truncateLength) } = options;
|
|
233
|
-
const hexRegex = pattern ?? new RegExp(`(0x[a-fA-F0-9]{${minLength},${maxLength}})`, 'g');
|
|
234
|
-
return text.replace(hexRegex, (match)=>transform(match));
|
|
235
|
-
}
|
|
236
|
-
function formatRequestBody(body) {
|
|
237
|
-
try {
|
|
238
|
-
// Special handling for eth_sendRawTransaction
|
|
239
|
-
if (body.includes('"method":"eth_sendRawTransaction"')) {
|
|
240
|
-
try {
|
|
241
|
-
const parsed = JSON.parse(body);
|
|
242
|
-
if (parsed.params && Array.isArray(parsed.params) && parsed.params.length > 0) {
|
|
243
|
-
// These are likely large transaction hex strings
|
|
244
|
-
parsed.params = parsed.params.map((param)=>{
|
|
245
|
-
if (typeof param === 'string' && param.startsWith('0x') && param.length > 1000) {
|
|
246
|
-
return truncateHex(param, 200);
|
|
247
|
-
}
|
|
248
|
-
return param;
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
return JSON.stringify(parsed, null, 2);
|
|
252
|
-
} catch {
|
|
253
|
-
// If specific parsing fails, fall back to regex-based truncation
|
|
254
|
-
return replaceHexStrings(body, {
|
|
255
|
-
pattern: /"params":\s*\[\s*"(0x[a-fA-F0-9]{1000,})"\s*\]/g,
|
|
256
|
-
transform: (hex)=>`"params":["${truncateHex(hex, 200)}"]`
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
// For extremely large request bodies, use simple truncation instead of parsing
|
|
261
|
-
if (body.length > 50000) {
|
|
262
|
-
const jsonStart = body.indexOf('{');
|
|
263
|
-
const jsonEnd = body.lastIndexOf('}');
|
|
264
|
-
if (jsonStart >= 0 && jsonEnd > jsonStart) {
|
|
265
|
-
return replaceHexStrings(body, {
|
|
266
|
-
minLength: 10000,
|
|
267
|
-
truncateLength: 200
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
const parsed = JSON.parse(body);
|
|
272
|
-
// Process the entire request body
|
|
273
|
-
const processed = processParams(parsed);
|
|
274
|
-
return JSON.stringify(processed, null, 2);
|
|
275
|
-
} catch {
|
|
276
|
-
// If JSON parsing fails, do a simple truncation of any large hex strings
|
|
277
|
-
return replaceHexStrings(body, {
|
|
278
|
-
minLength: 1000,
|
|
279
|
-
truncateLength: 150
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
// Recursively process all parameters that might contain hex strings
|
|
284
|
-
function processParams(obj) {
|
|
285
|
-
if (Array.isArray(obj)) {
|
|
286
|
-
return obj.map((item)=>processParams(item));
|
|
287
|
-
}
|
|
288
|
-
if (typeof obj === 'object' && obj !== null) {
|
|
289
|
-
const result = {};
|
|
290
|
-
for (const [key, value] of Object.entries(obj)){
|
|
291
|
-
result[key] = processParams(value);
|
|
292
|
-
}
|
|
293
|
-
return result;
|
|
294
|
-
}
|
|
295
|
-
if (typeof obj === 'string') {
|
|
296
|
-
if (obj.startsWith('0x')) {
|
|
297
|
-
return truncateHex(obj);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
return obj;
|
|
301
|
-
}
|
|
302
151
|
export function tryGetCustomErrorName(err) {
|
|
303
152
|
try {
|
|
304
153
|
// See https://viem.sh/docs/contract/simulateContract#handling-custom-errors
|
|
@@ -12,4 +12,4 @@ export declare const ZK_PASSPORT_DOMAIN = "testnet.aztec.network";
|
|
|
12
12
|
* The default scope of the zk passport proofs
|
|
13
13
|
*/
|
|
14
14
|
export declare const ZK_PASSPORT_SCOPE = "personhood";
|
|
15
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiemtQYXNzcG9ydFZlcmlmaWVyQWRkcmVzcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3prUGFzc3BvcnRWZXJpZmllckFkZHJlc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBRTNEOzs7R0FHRztBQUNILGVBQU8sTUFBTSw0QkFBNEIsWUFBc0UsQ0FBQztBQUNoSDs7R0FFRztBQUNILGVBQU8sTUFBTSxrQkFBa0IsMEJBQTBCLENBQUM7QUFDMUQ7O0dBRUc7QUFDSCxlQUFPLE1BQU0saUJBQWlCLGVBQWUsQ0FBQyJ9
|
|
@@ -2,7 +2,7 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
2
2
|
/**
|
|
3
3
|
* The address of the zk passport verifier on sepolia
|
|
4
4
|
* get address from: ROOT/l1-contracts/lib/circuits/src/solidity/deployments/deployment-11155111.json
|
|
5
|
-
*/ export const ZK_PASSPORT_VERIFIER_ADDRESS = EthAddress.fromString('
|
|
5
|
+
*/ export const ZK_PASSPORT_VERIFIER_ADDRESS = EthAddress.fromString('0x3101Bad9eA5fACadA5554844a1a88F7Fe48D4DE0');
|
|
6
6
|
/**
|
|
7
7
|
* The default domain of the zk passport site
|
|
8
8
|
*/ export const ZK_PASSPORT_DOMAIN = 'testnet.aztec.network';
|
package/package.json
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/ethereum",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-devnet.20251212",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
|
-
"
|
|
7
|
-
"./
|
|
6
|
+
"./account": "./dest/account.js",
|
|
7
|
+
"./chain": "./dest/chain.js",
|
|
8
|
+
"./client": "./dest/client.js",
|
|
9
|
+
"./config": "./dest/config.js",
|
|
10
|
+
"./constants": "./dest/constants.js",
|
|
8
11
|
"./contracts": "./dest/contracts/index.js",
|
|
9
12
|
"./deploy-l1-contracts": "./dest/deploy_l1_contracts.js",
|
|
13
|
+
"./eth-signer": "./dest/eth-signer/index.js",
|
|
14
|
+
"./forwarder-proxy": "./dest/forwarder_proxy.js",
|
|
15
|
+
"./l1-artifacts": "./dest/l1_artifacts.js",
|
|
10
16
|
"./l1-contract-addresses": "./dest/l1_contract_addresses.js",
|
|
11
|
-
"./l1-
|
|
17
|
+
"./l1-reader": "./dest/l1_reader.js",
|
|
18
|
+
"./l1-tx-utils": "./dest/l1_tx_utils/index.js",
|
|
19
|
+
"./l1-tx-utils-with-blobs": "./dest/l1_tx_utils/index-blobs.js",
|
|
20
|
+
"./l1-types": "./dest/l1_types.js",
|
|
21
|
+
"./publisher-manager": "./dest/publisher_manager.js",
|
|
22
|
+
"./queries": "./dest/queries.js",
|
|
23
|
+
"./test": "./dest/test/index.js",
|
|
24
|
+
"./types": "./dest/types.js",
|
|
12
25
|
"./utils": "./dest/utils.js"
|
|
13
26
|
},
|
|
14
27
|
"typedocOptions": {
|
|
@@ -19,10 +32,10 @@
|
|
|
19
32
|
"tsconfig": "./tsconfig.json"
|
|
20
33
|
},
|
|
21
34
|
"scripts": {
|
|
22
|
-
"build": "yarn clean && tsc
|
|
23
|
-
"build:dev": "tsc
|
|
35
|
+
"build": "yarn clean && ../scripts/tsc.sh",
|
|
36
|
+
"build:dev": "../scripts/tsc.sh --watch",
|
|
24
37
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
25
|
-
"start:dev": "
|
|
38
|
+
"start:dev": "concurrently -k \"tsgo -b -w\" \"nodemon --watch dest --exec yarn start\"",
|
|
26
39
|
"start": "node ./dest/index.js",
|
|
27
40
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}",
|
|
28
41
|
"proposer-address": "node ./dest/cli/forwarder_address.js"
|
|
@@ -31,16 +44,16 @@
|
|
|
31
44
|
"../package.common.json"
|
|
32
45
|
],
|
|
33
46
|
"dependencies": {
|
|
34
|
-
"@aztec/blob-lib": "3.0.0-
|
|
35
|
-
"@aztec/constants": "3.0.0-
|
|
36
|
-
"@aztec/foundation": "3.0.0-
|
|
37
|
-
"@aztec/l1-artifacts": "3.0.0-
|
|
47
|
+
"@aztec/blob-lib": "3.0.0-devnet.20251212",
|
|
48
|
+
"@aztec/constants": "3.0.0-devnet.20251212",
|
|
49
|
+
"@aztec/foundation": "3.0.0-devnet.20251212",
|
|
50
|
+
"@aztec/l1-artifacts": "3.0.0-devnet.20251212",
|
|
38
51
|
"@viem/anvil": "^0.0.10",
|
|
39
52
|
"dotenv": "^16.0.3",
|
|
40
53
|
"lodash.chunk": "^4.2.0",
|
|
41
54
|
"lodash.pickby": "^4.5.0",
|
|
42
55
|
"tslib": "^2.4.0",
|
|
43
|
-
"viem": "2.
|
|
56
|
+
"viem": "npm:@aztec/viem@2.38.2",
|
|
44
57
|
"zod": "^3.23.8"
|
|
45
58
|
},
|
|
46
59
|
"devDependencies": {
|
|
@@ -49,6 +62,7 @@
|
|
|
49
62
|
"@types/jest": "^30.0.0",
|
|
50
63
|
"@types/lodash.pickby": "^4",
|
|
51
64
|
"@types/node": "^22.15.17",
|
|
65
|
+
"@typescript/native-preview": "7.0.0-dev.20251126.1",
|
|
52
66
|
"@viem/anvil": "^0.0.10",
|
|
53
67
|
"get-port": "^7.1.0",
|
|
54
68
|
"jest": "^30.0.0",
|
|
@@ -62,7 +76,7 @@
|
|
|
62
76
|
"src",
|
|
63
77
|
"!*.test.*"
|
|
64
78
|
],
|
|
65
|
-
"types": "./dest/
|
|
79
|
+
"types": "./dest/types.d.ts",
|
|
66
80
|
"jest": {
|
|
67
81
|
"moduleNameMapper": {
|
|
68
82
|
"^(\\.{1,2}/.*)\\.[cm]?js$": "$1"
|
package/src/client.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { createEthereumChain } from './chain.js';
|
|
|
19
19
|
import type { ExtendedViemWalletClient, ViemPublicClient } from './types.js';
|
|
20
20
|
|
|
21
21
|
type Config = {
|
|
22
|
-
/**
|
|
22
|
+
/** List of URLs of Ethereum RPC nodes that services will connect to (comma separated). */
|
|
23
23
|
l1RpcUrls: string[];
|
|
24
24
|
/** The chain ID of the ethereum host. */
|
|
25
25
|
l1ChainId: number;
|
package/src/config.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from '@aztec/foundation/config';
|
|
11
11
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
12
12
|
|
|
13
|
-
import { type L1TxUtilsConfig, l1TxUtilsConfigMappings } from './l1_tx_utils.js';
|
|
13
|
+
import { type L1TxUtilsConfig, l1TxUtilsConfigMappings } from './l1_tx_utils/index.js';
|
|
14
14
|
|
|
15
15
|
export type GenesisStateConfig = {
|
|
16
16
|
/** Whether to populate the genesis state with initial fee juice for the test accounts */
|
|
@@ -28,12 +28,18 @@ export type L1ContractsConfig = {
|
|
|
28
28
|
aztecEpochDuration: number;
|
|
29
29
|
/** The target validator committee size. */
|
|
30
30
|
aztecTargetCommitteeSize: number;
|
|
31
|
+
/** The number of epochs to lag behind the current epoch for validator selection. */
|
|
32
|
+
lagInEpochsForValidatorSet: number;
|
|
33
|
+
/** The number of epochs to lag behind the current epoch for randao selection. */
|
|
34
|
+
lagInEpochsForRandao: number;
|
|
31
35
|
/** The number of epochs after an epoch ends that proofs are still accepted. */
|
|
32
36
|
aztecProofSubmissionEpochs: number;
|
|
33
37
|
/** The deposit amount for a validator */
|
|
34
38
|
activationThreshold: bigint;
|
|
35
39
|
/** The minimum stake for a validator. */
|
|
36
40
|
ejectionThreshold: bigint;
|
|
41
|
+
/** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
|
|
42
|
+
localEjectionThreshold: bigint;
|
|
37
43
|
/** The slashing quorum, i.e. how many slots must signal for the same payload in a round for it to be submittable to the Slasher (defaults to slashRoundSize / 2 + 1) */
|
|
38
44
|
slashingQuorum?: number;
|
|
39
45
|
/** The slashing round size, i.e. how many epochs are in a slashing round */
|
|
@@ -46,6 +52,8 @@ export type L1ContractsConfig = {
|
|
|
46
52
|
slashingVetoer: EthAddress;
|
|
47
53
|
/** How many slashing rounds back we slash (ie when slashing in round N, we slash for offenses committed during epochs of round N-offset) */
|
|
48
54
|
slashingOffsetInRounds: number;
|
|
55
|
+
/** How long slashing can be disabled for in seconds when vetoer disables it */
|
|
56
|
+
slashingDisableDuration: number;
|
|
49
57
|
/** Type of slasher proposer */
|
|
50
58
|
slasherFlavor: 'empire' | 'tally' | 'none';
|
|
51
59
|
/** Minimum amount that can be slashed in tally slashing */
|
|
@@ -71,22 +79,26 @@ export const DefaultL1ContractsConfig = {
|
|
|
71
79
|
aztecSlotDuration: 36,
|
|
72
80
|
aztecEpochDuration: 32,
|
|
73
81
|
aztecTargetCommitteeSize: 48,
|
|
82
|
+
lagInEpochsForValidatorSet: 2,
|
|
83
|
+
lagInEpochsForRandao: 2, // For PROD, this value should be > lagInEpochsForValidatorSet
|
|
74
84
|
aztecProofSubmissionEpochs: 1, // you have a full epoch to submit a proof after the epoch to prove ends
|
|
75
|
-
activationThreshold:
|
|
76
|
-
ejectionThreshold:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
85
|
+
activationThreshold: 100n * 10n ** 18n,
|
|
86
|
+
ejectionThreshold: 50n * 10n ** 18n,
|
|
87
|
+
localEjectionThreshold: 98n * 10n ** 18n,
|
|
88
|
+
slashAmountSmall: 10n * 10n ** 18n,
|
|
89
|
+
slashAmountMedium: 20n * 10n ** 18n,
|
|
90
|
+
slashAmountLarge: 50n * 10n ** 18n,
|
|
80
91
|
slashingRoundSizeInEpochs: 4,
|
|
81
92
|
slashingLifetimeInRounds: 5,
|
|
82
93
|
slashingExecutionDelayInRounds: 0, // round N may be submitted in round N + 1
|
|
83
94
|
slashingVetoer: EthAddress.ZERO,
|
|
84
95
|
governanceProposerRoundSize: 300,
|
|
85
|
-
manaTarget: BigInt(
|
|
96
|
+
manaTarget: BigInt(100e6),
|
|
86
97
|
provingCostPerMana: BigInt(100),
|
|
87
98
|
exitDelaySeconds: 2 * 24 * 60 * 60,
|
|
88
99
|
slasherFlavor: 'tally' as const,
|
|
89
100
|
slashingOffsetInRounds: 2,
|
|
101
|
+
slashingDisableDuration: 5 * 24 * 60 * 60, // 5 days in seconds
|
|
90
102
|
} satisfies L1ContractsConfig;
|
|
91
103
|
|
|
92
104
|
const LocalGovernanceConfiguration = {
|
|
@@ -103,113 +115,192 @@ const LocalGovernanceConfiguration = {
|
|
|
103
115
|
minimumVotes: 400n * 10n ** 18n,
|
|
104
116
|
};
|
|
105
117
|
|
|
106
|
-
const
|
|
118
|
+
const StagingPublicGovernanceConfiguration = {
|
|
107
119
|
proposeConfig: {
|
|
108
|
-
lockDelay: 60n * 60n * 24n,
|
|
120
|
+
lockDelay: 60n * 60n * 24n * 30n,
|
|
109
121
|
lockAmount: DefaultL1ContractsConfig.activationThreshold * 100n,
|
|
110
122
|
},
|
|
111
123
|
votingDelay: 60n,
|
|
112
124
|
votingDuration: 60n * 60n,
|
|
113
|
-
executionDelay: 60n
|
|
125
|
+
executionDelay: 60n,
|
|
114
126
|
gracePeriod: 60n * 60n * 24n * 7n,
|
|
115
127
|
quorum: 3n * 10n ** 17n, // 30%
|
|
116
128
|
requiredYeaMargin: 4n * 10n ** 16n, // 4%
|
|
117
|
-
minimumVotes: DefaultL1ContractsConfig.ejectionThreshold * 200n,
|
|
129
|
+
minimumVotes: DefaultL1ContractsConfig.ejectionThreshold * 200n, // >= 200 validators must vote
|
|
118
130
|
};
|
|
119
131
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
132
|
+
const TestnetGovernanceConfiguration = {
|
|
133
|
+
proposeConfig: {
|
|
134
|
+
lockDelay: 10n * 365n * 24n * 60n * 60n,
|
|
135
|
+
lockAmount: 1250n * 200_000n * 10n ** 18n,
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
votingDelay: 12n * 60n * 60n, // 12 hours
|
|
139
|
+
votingDuration: 1n * 24n * 60n * 60n, // 1 day
|
|
140
|
+
executionDelay: 12n * 60n * 60n, // 12 hours
|
|
141
|
+
gracePeriod: 1n * 24n * 60n * 60n, // 1 day
|
|
142
|
+
quorum: 2n * 10n ** 17n, // 20%
|
|
143
|
+
requiredYeaMargin: 1n * 10n ** 17n, // 10%
|
|
144
|
+
minimumVotes: 100n * 200_000n * 10n ** 18n,
|
|
125
145
|
};
|
|
126
146
|
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
147
|
+
const StagingIgnitionGovernanceConfiguration = {
|
|
148
|
+
proposeConfig: {
|
|
149
|
+
lockDelay: 10n * 365n * 24n * 60n * 60n,
|
|
150
|
+
lockAmount: 1250n * 200_000n * 10n ** 18n,
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
votingDelay: 7n * 24n * 60n * 60n,
|
|
154
|
+
votingDuration: 7n * 24n * 60n * 60n,
|
|
155
|
+
executionDelay: 30n * 24n * 60n * 60n,
|
|
156
|
+
gracePeriod: 7n * 24n * 60n * 60n,
|
|
157
|
+
quorum: 2n * 10n ** 17n, // 20%
|
|
158
|
+
requiredYeaMargin: 1n * 10n ** 17n, // 10%
|
|
159
|
+
minimumVotes: 1250n * 200_000n * 10n ** 18n,
|
|
130
160
|
};
|
|
131
161
|
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
162
|
+
const MainnetGovernanceConfiguration = {
|
|
163
|
+
proposeConfig: {
|
|
164
|
+
lockDelay: 90n * 24n * 60n * 60n,
|
|
165
|
+
lockAmount: 258_750_000n * 10n ** 18n,
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
votingDelay: 3n * 24n * 60n * 60n,
|
|
169
|
+
votingDuration: 7n * 24n * 60n * 60n,
|
|
170
|
+
executionDelay: 7n * 24n * 60n * 60n,
|
|
171
|
+
gracePeriod: 7n * 24n * 60n * 60n,
|
|
172
|
+
quorum: 2n * 10n ** 17n, // 20%
|
|
173
|
+
requiredYeaMargin: 33n * 10n ** 16n, // 33%
|
|
174
|
+
minimumVotes: 1000n * 200_000n * 10n ** 18n,
|
|
135
175
|
};
|
|
136
176
|
|
|
137
|
-
export const
|
|
138
|
-
|
|
139
|
-
|
|
177
|
+
export const getGovernanceConfiguration = (networkName: NetworkNames) => {
|
|
178
|
+
switch (networkName) {
|
|
179
|
+
case 'local':
|
|
180
|
+
return LocalGovernanceConfiguration;
|
|
181
|
+
case 'next-net':
|
|
182
|
+
return LocalGovernanceConfiguration;
|
|
183
|
+
case 'devnet':
|
|
184
|
+
return LocalGovernanceConfiguration;
|
|
185
|
+
case 'staging-public':
|
|
186
|
+
return StagingPublicGovernanceConfiguration;
|
|
187
|
+
case 'testnet':
|
|
188
|
+
return TestnetGovernanceConfiguration;
|
|
189
|
+
case 'staging-ignition':
|
|
190
|
+
return StagingIgnitionGovernanceConfiguration;
|
|
191
|
+
case 'mainnet':
|
|
192
|
+
return MainnetGovernanceConfiguration;
|
|
193
|
+
default:
|
|
194
|
+
throw new Error(`Unrecognized network name: ${networkName}`);
|
|
140
195
|
}
|
|
141
|
-
return LocalGSEConfiguration;
|
|
142
196
|
};
|
|
143
197
|
|
|
144
198
|
// Making a default config here as we are only using it thought the deployment
|
|
145
199
|
// and do not expect to be using different setups, so having environment variables
|
|
146
200
|
// for it seems overkill
|
|
147
|
-
|
|
148
|
-
|
|
201
|
+
|
|
202
|
+
const DefaultRewardConfig = {
|
|
203
|
+
sequencerBps: 8000,
|
|
149
204
|
rewardDistributor: EthAddress.ZERO.toString(),
|
|
150
205
|
booster: EthAddress.ZERO.toString(),
|
|
151
|
-
|
|
206
|
+
checkpointReward: 500n * 10n ** 18n,
|
|
152
207
|
};
|
|
153
208
|
|
|
154
|
-
const
|
|
155
|
-
sequencerBps:
|
|
209
|
+
const MainnetRewardConfig = {
|
|
210
|
+
sequencerBps: 7_000,
|
|
156
211
|
rewardDistributor: EthAddress.ZERO.toString(),
|
|
157
212
|
booster: EthAddress.ZERO.toString(),
|
|
158
|
-
|
|
213
|
+
checkpointReward: 400n * 10n ** 18n,
|
|
159
214
|
};
|
|
160
215
|
|
|
161
216
|
export const getRewardConfig = (networkName: NetworkNames) => {
|
|
162
|
-
|
|
163
|
-
|
|
217
|
+
switch (networkName) {
|
|
218
|
+
case 'local':
|
|
219
|
+
case 'devnet':
|
|
220
|
+
case 'next-net':
|
|
221
|
+
case 'staging-public':
|
|
222
|
+
case 'testnet':
|
|
223
|
+
case 'staging-ignition':
|
|
224
|
+
return DefaultRewardConfig;
|
|
225
|
+
case 'mainnet':
|
|
226
|
+
return MainnetRewardConfig;
|
|
227
|
+
default:
|
|
228
|
+
throw new Error(`Unrecognized network name: ${networkName}`);
|
|
164
229
|
}
|
|
165
|
-
return LocalRewardConfig;
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
const LocalRewardBoostConfig = {
|
|
169
|
-
increment: 200000,
|
|
170
|
-
maxScore: 5000000,
|
|
171
|
-
a: 5000,
|
|
172
|
-
k: 1000000,
|
|
173
|
-
minimum: 100000,
|
|
174
230
|
};
|
|
175
231
|
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
return TestnetRewardBoostConfig;
|
|
187
|
-
}
|
|
188
|
-
return LocalRewardBoostConfig;
|
|
232
|
+
export const getRewardBoostConfig = () => {
|
|
233
|
+
// The reward configuration is specified with a precision of 1e5, and we use the same across
|
|
234
|
+
// all networks.
|
|
235
|
+
return {
|
|
236
|
+
increment: 125_000, // 1.25
|
|
237
|
+
maxScore: 15_000_000, // 150
|
|
238
|
+
a: 1_000, // 0.01
|
|
239
|
+
k: 1_000_000, // 10
|
|
240
|
+
minimum: 100_000, // 1
|
|
241
|
+
};
|
|
189
242
|
};
|
|
190
243
|
|
|
191
244
|
// Similar to the above, no need for environment variables for this.
|
|
192
245
|
const LocalEntryQueueConfig = {
|
|
193
246
|
bootstrapValidatorSetSize: 0n,
|
|
194
247
|
bootstrapFlushSize: 0n,
|
|
195
|
-
normalFlushSizeMin: 48n,
|
|
248
|
+
normalFlushSizeMin: 48n,
|
|
196
249
|
normalFlushSizeQuotient: 2n,
|
|
197
250
|
maxQueueFlushSize: 48n,
|
|
198
251
|
};
|
|
199
252
|
|
|
200
|
-
const
|
|
201
|
-
bootstrapValidatorSetSize:
|
|
202
|
-
bootstrapFlushSize:
|
|
253
|
+
const StagingPublicEntryQueueConfig = {
|
|
254
|
+
bootstrapValidatorSetSize: 48n,
|
|
255
|
+
bootstrapFlushSize: 48n,
|
|
203
256
|
normalFlushSizeMin: 1n,
|
|
204
257
|
normalFlushSizeQuotient: 2475n,
|
|
205
258
|
maxQueueFlushSize: 32n, // Limited to 32 so flush cost are kept below 15M gas.
|
|
206
259
|
};
|
|
207
260
|
|
|
261
|
+
const TestnetEntryQueueConfig = {
|
|
262
|
+
bootstrapValidatorSetSize: 256n,
|
|
263
|
+
bootstrapFlushSize: 256n,
|
|
264
|
+
normalFlushSizeMin: 4n,
|
|
265
|
+
normalFlushSizeQuotient: 2048n,
|
|
266
|
+
maxQueueFlushSize: 8n,
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
const StagingIgnitionEntryQueueConfig = {
|
|
270
|
+
bootstrapValidatorSetSize: 48n,
|
|
271
|
+
bootstrapFlushSize: 48n,
|
|
272
|
+
normalFlushSizeMin: 1n,
|
|
273
|
+
normalFlushSizeQuotient: 2048n,
|
|
274
|
+
maxQueueFlushSize: 24n,
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
const MainnetEntryQueueConfig = {
|
|
278
|
+
bootstrapValidatorSetSize: 1_000n,
|
|
279
|
+
bootstrapFlushSize: 1_000n,
|
|
280
|
+
normalFlushSizeMin: 1n,
|
|
281
|
+
normalFlushSizeQuotient: 2_048n,
|
|
282
|
+
maxQueueFlushSize: 8n,
|
|
283
|
+
};
|
|
284
|
+
|
|
208
285
|
export const getEntryQueueConfig = (networkName: NetworkNames) => {
|
|
209
|
-
|
|
210
|
-
|
|
286
|
+
switch (networkName) {
|
|
287
|
+
case 'local':
|
|
288
|
+
return LocalEntryQueueConfig;
|
|
289
|
+
case 'next-net':
|
|
290
|
+
return LocalEntryQueueConfig;
|
|
291
|
+
case 'devnet':
|
|
292
|
+
return LocalEntryQueueConfig;
|
|
293
|
+
case 'staging-public':
|
|
294
|
+
return StagingPublicEntryQueueConfig;
|
|
295
|
+
case 'testnet':
|
|
296
|
+
return TestnetEntryQueueConfig;
|
|
297
|
+
case 'staging-ignition':
|
|
298
|
+
return StagingIgnitionEntryQueueConfig;
|
|
299
|
+
case 'mainnet':
|
|
300
|
+
return MainnetEntryQueueConfig;
|
|
301
|
+
default:
|
|
302
|
+
throw new Error(`Unrecognized network name: ${networkName}`);
|
|
211
303
|
}
|
|
212
|
-
return LocalEntryQueueConfig;
|
|
213
304
|
};
|
|
214
305
|
|
|
215
306
|
export const l1ContractsConfigMappings: ConfigMappingsType<L1ContractsConfig> = {
|
|
@@ -233,6 +324,16 @@ export const l1ContractsConfigMappings: ConfigMappingsType<L1ContractsConfig> =
|
|
|
233
324
|
description: 'The target validator committee size.',
|
|
234
325
|
...numberConfigHelper(DefaultL1ContractsConfig.aztecTargetCommitteeSize),
|
|
235
326
|
},
|
|
327
|
+
lagInEpochsForValidatorSet: {
|
|
328
|
+
env: 'AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET',
|
|
329
|
+
description: 'The number of epochs to lag behind the current epoch for validator selection.',
|
|
330
|
+
...numberConfigHelper(DefaultL1ContractsConfig.lagInEpochsForValidatorSet),
|
|
331
|
+
},
|
|
332
|
+
lagInEpochsForRandao: {
|
|
333
|
+
env: 'AZTEC_LAG_IN_EPOCHS_FOR_RANDAO',
|
|
334
|
+
description: 'The number of epochs to lag behind the current epoch for randao selection.',
|
|
335
|
+
...numberConfigHelper(DefaultL1ContractsConfig.lagInEpochsForRandao),
|
|
336
|
+
},
|
|
236
337
|
aztecProofSubmissionEpochs: {
|
|
237
338
|
env: 'AZTEC_PROOF_SUBMISSION_EPOCHS',
|
|
238
339
|
description: 'The number of epochs after an epoch ends that proofs are still accepted.',
|
|
@@ -248,6 +349,12 @@ export const l1ContractsConfigMappings: ConfigMappingsType<L1ContractsConfig> =
|
|
|
248
349
|
description: 'The minimum stake for a validator.',
|
|
249
350
|
...bigintConfigHelper(DefaultL1ContractsConfig.ejectionThreshold),
|
|
250
351
|
},
|
|
352
|
+
localEjectionThreshold: {
|
|
353
|
+
env: 'AZTEC_LOCAL_EJECTION_THRESHOLD',
|
|
354
|
+
description:
|
|
355
|
+
'The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup',
|
|
356
|
+
...bigintConfigHelper(DefaultL1ContractsConfig.localEjectionThreshold),
|
|
357
|
+
},
|
|
251
358
|
slashingOffsetInRounds: {
|
|
252
359
|
env: 'AZTEC_SLASHING_OFFSET_IN_ROUNDS',
|
|
253
360
|
description:
|
|
@@ -300,6 +407,11 @@ export const l1ContractsConfigMappings: ConfigMappingsType<L1ContractsConfig> =
|
|
|
300
407
|
parseEnv: (val: string) => EthAddress.fromString(val),
|
|
301
408
|
defaultValue: DefaultL1ContractsConfig.slashingVetoer,
|
|
302
409
|
},
|
|
410
|
+
slashingDisableDuration: {
|
|
411
|
+
env: 'AZTEC_SLASHING_DISABLE_DURATION',
|
|
412
|
+
description: 'How long slashing can be disabled for in seconds when vetoer disables it',
|
|
413
|
+
...numberConfigHelper(DefaultL1ContractsConfig.slashingDisableDuration),
|
|
414
|
+
},
|
|
303
415
|
governanceProposerQuorum: {
|
|
304
416
|
env: 'AZTEC_GOVERNANCE_PROPOSER_QUORUM',
|
|
305
417
|
description: 'The governance proposing quorum',
|
|
@@ -373,7 +485,7 @@ export function validateConfig(config: Omit<L1ContractsConfig, keyof L1TxUtilsCo
|
|
|
373
485
|
}
|
|
374
486
|
|
|
375
487
|
// EmpireBase constructor validations for governance/slashing proposers
|
|
376
|
-
// From: require(QUORUM_SIZE > ROUND_SIZE / 2, Errors.
|
|
488
|
+
// From: require(QUORUM_SIZE > ROUND_SIZE / 2, Errors.EmpireBase__InvalidQuorumAndRoundSize(QUORUM_SIZE, ROUND_SIZE));
|
|
377
489
|
const { governanceProposerQuorum, governanceProposerRoundSize } = config;
|
|
378
490
|
if (
|
|
379
491
|
governanceProposerQuorum !== undefined &&
|
|
@@ -384,7 +496,7 @@ export function validateConfig(config: Omit<L1ContractsConfig, keyof L1TxUtilsCo
|
|
|
384
496
|
);
|
|
385
497
|
}
|
|
386
498
|
|
|
387
|
-
// From: require(QUORUM_SIZE <= ROUND_SIZE, Errors.
|
|
499
|
+
// From: require(QUORUM_SIZE <= ROUND_SIZE, Errors.EmpireBase__QuorumCannotBeLargerThanRoundSize(QUORUM_SIZE, ROUND_SIZE));
|
|
388
500
|
if (governanceProposerQuorum !== undefined && governanceProposerQuorum > governanceProposerRoundSize) {
|
|
389
501
|
errors.push(
|
|
390
502
|
`governanceProposerQuorum (${governanceProposerQuorum}) cannot be larger than governanceProposerRoundSize (${governanceProposerRoundSize})`,
|