@aztec/ethereum 3.0.0-devnet.2 → 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 +1 -1
- package/dest/config.d.ts +7 -4
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +55 -17
- package/dest/constants.d.ts +1 -1
- package/dest/contracts/empire_base.d.ts +6 -5
- 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 +5 -4
- package/dest/contracts/empire_slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/empire_slashing_proposer.js +8 -2
- 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 +1 -1
- 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_proposer.d.ts +5 -4
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +8 -2
- 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 +2 -2
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/registry.d.ts +1 -1
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/rollup.d.ts +55 -64
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +76 -67
- package/dest/contracts/slasher_contract.d.ts +1 -1
- package/dest/contracts/slasher_contract.d.ts.map +1 -1
- package/dest/contracts/tally_slashing_proposer.d.ts +9 -7
- package/dest/contracts/tally_slashing_proposer.d.ts.map +1 -1
- package/dest/contracts/tally_slashing_proposer.js +4 -4
- package/dest/contracts/utils.d.ts +1 -1
- package/dest/deploy_l1_contracts.d.ts +456 -9
- package/dest/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_l1_contracts.js +68 -37
- 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 +6400 -872
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_contract_addresses.d.ts +3 -3
- package/dest/l1_reader.d.ts +3 -1
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +6 -0
- package/dest/l1_tx_utils/config.d.ts +5 -5
- package/dest/l1_tx_utils/config.d.ts.map +1 -1
- package/dest/l1_tx_utils/config.js +32 -9
- package/dest/l1_tx_utils/constants.d.ts +1 -1
- package/dest/l1_tx_utils/factory.d.ts +1 -1
- 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 +1 -1
- package/dest/l1_tx_utils/interfaces.d.ts +2 -2
- package/dest/l1_tx_utils/interfaces.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +1 -2
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.js +17 -4
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts +1 -1
- package/dest/l1_tx_utils/l1_tx_utils_with_blobs.d.ts.map +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +29 -16
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +171 -34
- package/dest/l1_tx_utils/signer.d.ts +1 -1
- package/dest/l1_tx_utils/types.d.ts +1 -1
- package/dest/l1_tx_utils/types.d.ts.map +1 -1
- package/dest/l1_tx_utils/utils.d.ts +1 -1
- package/dest/l1_types.d.ts +1 -1
- package/dest/publisher_manager.d.ts +1 -1
- package/dest/publisher_manager.d.ts.map +1 -1
- package/dest/queries.d.ts +1 -1
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +5 -3
- package/dest/test/chain_monitor.d.ts +27 -24
- package/dest/test/chain_monitor.d.ts.map +1 -1
- package/dest/test/chain_monitor.js +32 -34
- package/dest/test/delayed_tx_utils.d.ts +1 -1
- package/dest/test/delayed_tx_utils.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.d.ts +8 -12
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +9 -3
- 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 +14 -13
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +43 -38
- 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/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/zkPassportVerifierAddress.d.ts +1 -1
- package/package.json +27 -13
- package/src/config.ts +62 -18
- package/src/contracts/empire_base.ts +6 -5
- package/src/contracts/empire_slashing_proposer.ts +11 -5
- package/src/contracts/governance_proposer.ts +11 -5
- package/src/contracts/rollup.ts +81 -80
- package/src/contracts/tally_slashing_proposer.ts +11 -8
- package/src/deploy_l1_contracts.ts +63 -32
- package/src/forwarder_proxy.ts +108 -0
- package/src/l1_reader.ts +8 -0
- package/src/l1_tx_utils/config.ts +34 -13
- 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/interfaces.ts +1 -1
- package/src/l1_tx_utils/l1_tx_utils.ts +24 -4
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +223 -38
- package/src/queries.ts +6 -3
- package/src/test/chain_monitor.ts +50 -48
- package/src/test/eth_cheat_codes.ts +8 -2
- package/src/test/rollup_cheat_codes.ts +44 -42
- package/src/test/start_anvil.ts +2 -0
- package/src/test/tx_delayer.ts +4 -2
- package/src/types.ts +62 -0
- package/src/utils.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/src/index.ts +0 -17
package/dest/contracts/rollup.js
CHANGED
|
@@ -4,6 +4,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
4
4
|
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
}
|
|
7
|
+
import { CheckpointNumber, EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
7
8
|
import { memoize } from '@aztec/foundation/decorators';
|
|
8
9
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
9
10
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
@@ -113,8 +114,8 @@ export class RollupContract {
|
|
|
113
114
|
getEpochDuration() {
|
|
114
115
|
return this.rollup.read.getEpochDuration();
|
|
115
116
|
}
|
|
116
|
-
getSlotDuration() {
|
|
117
|
-
return this.rollup.read.getSlotDuration();
|
|
117
|
+
async getSlotDuration() {
|
|
118
|
+
return Number(await this.rollup.read.getSlotDuration());
|
|
118
119
|
}
|
|
119
120
|
getTargetCommitteeSize() {
|
|
120
121
|
return this.rollup.read.getTargetCommitteeSize();
|
|
@@ -125,8 +126,11 @@ export class RollupContract {
|
|
|
125
126
|
getLocalEjectionThreshold() {
|
|
126
127
|
return this.rollup.read.getLocalEjectionThreshold();
|
|
127
128
|
}
|
|
128
|
-
|
|
129
|
-
return this.rollup.read.
|
|
129
|
+
getLagInEpochsForValidatorSet() {
|
|
130
|
+
return this.rollup.read.getLagInEpochsForValidatorSet();
|
|
131
|
+
}
|
|
132
|
+
getLagInEpochsForRandao() {
|
|
133
|
+
return this.rollup.read.getLagInEpochsForRandao();
|
|
130
134
|
}
|
|
131
135
|
getActivationThreshold() {
|
|
132
136
|
return this.rollup.read.getActivationThreshold();
|
|
@@ -169,7 +173,7 @@ export class RollupContract {
|
|
|
169
173
|
return {
|
|
170
174
|
l1StartBlock,
|
|
171
175
|
l1GenesisTime,
|
|
172
|
-
slotDuration
|
|
176
|
+
slotDuration,
|
|
173
177
|
epochDuration: Number(epochDuration),
|
|
174
178
|
proofSubmissionEpochs: Number(proofSubmissionEpochs)
|
|
175
179
|
};
|
|
@@ -199,17 +203,17 @@ export class RollupContract {
|
|
|
199
203
|
}
|
|
200
204
|
return await slasher.getProposer();
|
|
201
205
|
}
|
|
202
|
-
|
|
203
|
-
return this.rollup.read.
|
|
206
|
+
getCheckpointReward() {
|
|
207
|
+
return this.rollup.read.getCheckpointReward();
|
|
204
208
|
}
|
|
205
|
-
|
|
206
|
-
return this.rollup.read.
|
|
209
|
+
async getCheckpointNumber() {
|
|
210
|
+
return CheckpointNumber.fromBigInt(await this.rollup.read.getPendingCheckpointNumber());
|
|
207
211
|
}
|
|
208
|
-
|
|
209
|
-
return this.rollup.read.
|
|
212
|
+
async getProvenCheckpointNumber() {
|
|
213
|
+
return CheckpointNumber.fromBigInt(await this.rollup.read.getProvenCheckpointNumber());
|
|
210
214
|
}
|
|
211
|
-
getSlotNumber() {
|
|
212
|
-
return this.rollup.read.getCurrentSlot();
|
|
215
|
+
async getSlotNumber() {
|
|
216
|
+
return SlotNumber.fromBigInt(await this.rollup.read.getCurrentSlot());
|
|
213
217
|
}
|
|
214
218
|
getL1FeesAt(timestamp) {
|
|
215
219
|
return this.rollup.read.getL1FeesAt([
|
|
@@ -245,8 +249,8 @@ export class RollupContract {
|
|
|
245
249
|
getCurrentSampleSeed() {
|
|
246
250
|
return this.rollup.read.getCurrentSampleSeed();
|
|
247
251
|
}
|
|
248
|
-
getCurrentEpoch() {
|
|
249
|
-
return this.rollup.read.getCurrentEpoch();
|
|
252
|
+
async getCurrentEpoch() {
|
|
253
|
+
return EpochNumber.fromBigInt(await this.rollup.read.getCurrentEpoch());
|
|
250
254
|
}
|
|
251
255
|
async getCurrentEpochCommittee() {
|
|
252
256
|
const { result } = await this.client.simulateContract({
|
|
@@ -284,17 +288,21 @@ export class RollupContract {
|
|
|
284
288
|
});
|
|
285
289
|
return result;
|
|
286
290
|
}
|
|
287
|
-
|
|
288
|
-
return this.rollup.read.
|
|
289
|
-
BigInt(
|
|
291
|
+
getCheckpoint(checkpointNumber) {
|
|
292
|
+
return this.rollup.read.getCheckpoint([
|
|
293
|
+
BigInt(checkpointNumber)
|
|
290
294
|
]);
|
|
291
295
|
}
|
|
292
|
-
getTips() {
|
|
293
|
-
|
|
296
|
+
async getTips() {
|
|
297
|
+
const { pending, proven } = await this.rollup.read.getTips();
|
|
298
|
+
return {
|
|
299
|
+
pending: CheckpointNumber.fromBigInt(pending),
|
|
300
|
+
proven: CheckpointNumber.fromBigInt(proven)
|
|
301
|
+
};
|
|
294
302
|
}
|
|
295
303
|
getTimestampForSlot(slot) {
|
|
296
304
|
return this.rollup.read.getTimestampForSlot([
|
|
297
|
-
slot
|
|
305
|
+
BigInt(slot)
|
|
298
306
|
]);
|
|
299
307
|
}
|
|
300
308
|
getEntryQueueLength() {
|
|
@@ -303,16 +311,16 @@ export class RollupContract {
|
|
|
303
311
|
getAvailableValidatorFlushes() {
|
|
304
312
|
return this.rollup.read.getAvailableValidatorFlushes();
|
|
305
313
|
}
|
|
306
|
-
getNextFlushableEpoch() {
|
|
307
|
-
return this.rollup.read.getNextFlushableEpoch();
|
|
314
|
+
async getNextFlushableEpoch() {
|
|
315
|
+
return EpochNumber.fromBigInt(await this.rollup.read.getNextFlushableEpoch());
|
|
308
316
|
}
|
|
309
|
-
getCurrentEpochNumber() {
|
|
310
|
-
return this.rollup.read.getCurrentEpoch();
|
|
317
|
+
async getCurrentEpochNumber() {
|
|
318
|
+
return EpochNumber.fromBigInt(await this.rollup.read.getCurrentEpoch());
|
|
311
319
|
}
|
|
312
|
-
|
|
313
|
-
return this.rollup.read.
|
|
314
|
-
BigInt(
|
|
315
|
-
]);
|
|
320
|
+
async getEpochNumberForCheckpoint(checkpointNumber) {
|
|
321
|
+
return EpochNumber.fromBigInt(await this.rollup.read.getEpochForCheckpoint([
|
|
322
|
+
BigInt(checkpointNumber)
|
|
323
|
+
]));
|
|
316
324
|
}
|
|
317
325
|
async getRollupAddresses() {
|
|
318
326
|
const [inboxAddress, outboxAddress, feeJuicePortalAddress, rewardDistributorAddress, feeJuiceAddress, stakingAssetAddress, gseAddress] = (await Promise.all([
|
|
@@ -339,9 +347,9 @@ export class RollupContract {
|
|
|
339
347
|
return EthAddress.fromString(await this.rollup.read.getFeeAssetPortal());
|
|
340
348
|
}
|
|
341
349
|
async getEpochNumberForSlotNumber(slotNumber) {
|
|
342
|
-
return await this.rollup.read.getEpochAtSlot([
|
|
343
|
-
slotNumber
|
|
344
|
-
]);
|
|
350
|
+
return EpochNumber.fromBigInt(await this.rollup.read.getEpochAtSlot([
|
|
351
|
+
BigInt(slotNumber)
|
|
352
|
+
]));
|
|
345
353
|
}
|
|
346
354
|
getEpochProofPublicInputs(args) {
|
|
347
355
|
return this.rollup.read.getEpochProofPublicInputs(args);
|
|
@@ -365,17 +373,15 @@ export class RollupContract {
|
|
|
365
373
|
* @dev Throws if unable to propose
|
|
366
374
|
*
|
|
367
375
|
* @param archive - The archive that we expect to be current state
|
|
368
|
-
* @return [slot,
|
|
376
|
+
* @return [slot, checkpointNumber, timeOfNextL1Slot] - If you can propose, the L2 slot number, checkpoint number and
|
|
377
|
+
* timestamp of the next L1 block
|
|
369
378
|
* @throws otherwise
|
|
370
379
|
*/ async canProposeAtNextEthBlock(archive, account, slotDuration, opts = {}) {
|
|
371
|
-
if (typeof slotDuration === 'number') {
|
|
372
|
-
slotDuration = BigInt(slotDuration);
|
|
373
|
-
}
|
|
374
380
|
const latestBlock = await this.client.getBlock();
|
|
375
|
-
const timeOfNextL1Slot = latestBlock.timestamp + slotDuration;
|
|
381
|
+
const timeOfNextL1Slot = latestBlock.timestamp + BigInt(slotDuration);
|
|
376
382
|
const who = typeof account === 'string' ? account : account.address;
|
|
377
383
|
try {
|
|
378
|
-
const { result: [slot,
|
|
384
|
+
const { result: [slot, checkpointNumber] } = await this.client.simulateContract({
|
|
379
385
|
address: this.address,
|
|
380
386
|
abi: RollupAbi,
|
|
381
387
|
functionName: 'canProposeAtTime',
|
|
@@ -385,11 +391,11 @@ export class RollupContract {
|
|
|
385
391
|
who
|
|
386
392
|
],
|
|
387
393
|
account,
|
|
388
|
-
stateOverride: await this.
|
|
394
|
+
stateOverride: await this.makePendingCheckpointNumberOverride(opts.forcePendingCheckpointNumber)
|
|
389
395
|
});
|
|
390
396
|
return {
|
|
391
|
-
slot,
|
|
392
|
-
|
|
397
|
+
slot: SlotNumber.fromBigInt(slot),
|
|
398
|
+
checkpointNumber: CheckpointNumber.fromBigInt(checkpointNumber),
|
|
393
399
|
timeOfNextL1Slot
|
|
394
400
|
};
|
|
395
401
|
} catch (err) {
|
|
@@ -397,11 +403,11 @@ export class RollupContract {
|
|
|
397
403
|
}
|
|
398
404
|
}
|
|
399
405
|
/**
|
|
400
|
-
* Returns a state override that sets the pending
|
|
401
|
-
* Requires querying the current state of the contract to get the current proven
|
|
406
|
+
* Returns a state override that sets the pending checkpoint number to the specified value. Useful for simulations.
|
|
407
|
+
* Requires querying the current state of the contract to get the current proven checkpoint number, as they are both
|
|
402
408
|
* stored in the same slot. If the argument is undefined, it returns an empty override.
|
|
403
|
-
*/ async
|
|
404
|
-
if (
|
|
409
|
+
*/ async makePendingCheckpointNumberOverride(forcePendingCheckpointNumber) {
|
|
410
|
+
if (forcePendingCheckpointNumber === undefined) {
|
|
405
411
|
return [];
|
|
406
412
|
}
|
|
407
413
|
const slot = RollupContract.stfStorageSlot;
|
|
@@ -409,8 +415,8 @@ export class RollupContract {
|
|
|
409
415
|
address: this.address,
|
|
410
416
|
slot
|
|
411
417
|
});
|
|
412
|
-
const
|
|
413
|
-
const newValue = BigInt(
|
|
418
|
+
const currentProvenCheckpointNumber = currentValue ? hexToBigInt(currentValue) & (1n << 128n) - 1n : 0n;
|
|
419
|
+
const newValue = BigInt(forcePendingCheckpointNumber) << 128n | currentProvenCheckpointNumber;
|
|
414
420
|
return [
|
|
415
421
|
{
|
|
416
422
|
address: this.address,
|
|
@@ -423,14 +429,14 @@ export class RollupContract {
|
|
|
423
429
|
}
|
|
424
430
|
];
|
|
425
431
|
}
|
|
426
|
-
/** Creates a request to Rollup#invalidateBadAttestation to be simulated or sent */ buildInvalidateBadAttestationRequest(
|
|
432
|
+
/** Creates a request to Rollup#invalidateBadAttestation to be simulated or sent */ buildInvalidateBadAttestationRequest(checkpointNumber, attestationsAndSigners, committee, invalidIndex) {
|
|
427
433
|
return {
|
|
428
434
|
to: this.address,
|
|
429
435
|
data: encodeFunctionData({
|
|
430
436
|
abi: RollupAbi,
|
|
431
437
|
functionName: 'invalidateBadAttestation',
|
|
432
438
|
args: [
|
|
433
|
-
BigInt(
|
|
439
|
+
BigInt(checkpointNumber),
|
|
434
440
|
attestationsAndSigners,
|
|
435
441
|
committee.map((addr)=>addr.toString()),
|
|
436
442
|
BigInt(invalidIndex)
|
|
@@ -438,27 +444,27 @@ export class RollupContract {
|
|
|
438
444
|
})
|
|
439
445
|
};
|
|
440
446
|
}
|
|
441
|
-
/** Creates a request to Rollup#invalidateInsufficientAttestations to be simulated or sent */ buildInvalidateInsufficientAttestationsRequest(
|
|
447
|
+
/** Creates a request to Rollup#invalidateInsufficientAttestations to be simulated or sent */ buildInvalidateInsufficientAttestationsRequest(checkpointNumber, attestationsAndSigners, committee) {
|
|
442
448
|
return {
|
|
443
449
|
to: this.address,
|
|
444
450
|
data: encodeFunctionData({
|
|
445
451
|
abi: RollupAbi,
|
|
446
452
|
functionName: 'invalidateInsufficientAttestations',
|
|
447
453
|
args: [
|
|
448
|
-
BigInt(
|
|
454
|
+
BigInt(checkpointNumber),
|
|
449
455
|
attestationsAndSigners,
|
|
450
456
|
committee.map((addr)=>addr.toString())
|
|
451
457
|
]
|
|
452
458
|
})
|
|
453
459
|
};
|
|
454
460
|
}
|
|
455
|
-
/** Calls getHasSubmitted directly. Returns whether the given prover has submitted a proof with the given length for the given epoch. */ getHasSubmittedProof(epochNumber,
|
|
461
|
+
/** Calls getHasSubmitted directly. Returns whether the given prover has submitted a proof with the given length for the given epoch. */ getHasSubmittedProof(epochNumber, numberOfCheckpointsInEpoch, prover) {
|
|
456
462
|
if (prover instanceof EthAddress) {
|
|
457
463
|
prover = prover.toString();
|
|
458
464
|
}
|
|
459
465
|
return this.rollup.read.getHasSubmitted([
|
|
460
466
|
BigInt(epochNumber),
|
|
461
|
-
BigInt(
|
|
467
|
+
BigInt(numberOfCheckpointsInEpoch),
|
|
462
468
|
prover
|
|
463
469
|
]);
|
|
464
470
|
}
|
|
@@ -468,15 +474,15 @@ export class RollupContract {
|
|
|
468
474
|
inFeeAsset
|
|
469
475
|
]);
|
|
470
476
|
}
|
|
471
|
-
getSlotAt(timestamp) {
|
|
472
|
-
return this.rollup.read.getSlotAt([
|
|
477
|
+
async getSlotAt(timestamp) {
|
|
478
|
+
return SlotNumber.fromBigInt(await this.rollup.read.getSlotAt([
|
|
473
479
|
timestamp
|
|
474
|
-
]);
|
|
480
|
+
]));
|
|
475
481
|
}
|
|
476
|
-
async status(
|
|
482
|
+
async status(checkpointNumber, options) {
|
|
477
483
|
await checkBlockTag(options?.blockNumber, this.client);
|
|
478
484
|
return this.rollup.read.status([
|
|
479
|
-
|
|
485
|
+
BigInt(checkpointNumber)
|
|
480
486
|
], options);
|
|
481
487
|
}
|
|
482
488
|
async canPruneAtTime(timestamp, options) {
|
|
@@ -488,9 +494,9 @@ export class RollupContract {
|
|
|
488
494
|
archive() {
|
|
489
495
|
return this.rollup.read.archive();
|
|
490
496
|
}
|
|
491
|
-
archiveAt(
|
|
497
|
+
archiveAt(checkpointNumber) {
|
|
492
498
|
return this.rollup.read.archiveAt([
|
|
493
|
-
|
|
499
|
+
BigInt(checkpointNumber)
|
|
494
500
|
]);
|
|
495
501
|
}
|
|
496
502
|
getSequencerRewards(address) {
|
|
@@ -536,9 +542,9 @@ export class RollupContract {
|
|
|
536
542
|
address
|
|
537
543
|
]);
|
|
538
544
|
}
|
|
539
|
-
getBlobCommitmentsHash(
|
|
545
|
+
getBlobCommitmentsHash(checkpointNumber) {
|
|
540
546
|
return this.rollup.read.getBlobCommitmentsHash([
|
|
541
|
-
|
|
547
|
+
BigInt(checkpointNumber)
|
|
542
548
|
]);
|
|
543
549
|
}
|
|
544
550
|
getCurrentBlobCommitmentsHash() {
|
|
@@ -584,14 +590,14 @@ export class RollupContract {
|
|
|
584
590
|
}
|
|
585
591
|
});
|
|
586
592
|
}
|
|
587
|
-
|
|
588
|
-
return this.rollup.watchEvent.
|
|
593
|
+
listenToCheckpointInvalidated(callback) {
|
|
594
|
+
return this.rollup.watchEvent.CheckpointInvalidated({}, {
|
|
589
595
|
onLogs: (logs)=>{
|
|
590
596
|
for (const log of logs){
|
|
591
597
|
const args = log.args;
|
|
592
|
-
if (args.
|
|
598
|
+
if (args.checkpointNumber !== undefined) {
|
|
593
599
|
callback({
|
|
594
|
-
|
|
600
|
+
checkpointNumber: CheckpointNumber.fromBigInt(args.checkpointNumber)
|
|
595
601
|
});
|
|
596
602
|
}
|
|
597
603
|
}
|
|
@@ -649,7 +655,10 @@ _ts_decorate([
|
|
|
649
655
|
], RollupContract.prototype, "getLocalEjectionThreshold", null);
|
|
650
656
|
_ts_decorate([
|
|
651
657
|
memoize
|
|
652
|
-
], RollupContract.prototype, "
|
|
658
|
+
], RollupContract.prototype, "getLagInEpochsForValidatorSet", null);
|
|
659
|
+
_ts_decorate([
|
|
660
|
+
memoize
|
|
661
|
+
], RollupContract.prototype, "getLagInEpochsForRandao", null);
|
|
653
662
|
_ts_decorate([
|
|
654
663
|
memoize
|
|
655
664
|
], RollupContract.prototype, "getActivationThreshold", null);
|
|
@@ -41,4 +41,4 @@ export declare class SlasherContract {
|
|
|
41
41
|
*/
|
|
42
42
|
getProposer(): Promise<EthAddress>;
|
|
43
43
|
}
|
|
44
|
-
//# sourceMappingURL=
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xhc2hlcl9jb250cmFjdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0cy9zbGFzaGVyX2NvbnRyYWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQU0zRCxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFFOUM7O0dBRUc7QUFDSCxxQkFBYSxlQUFlO0lBSXhCLE9BQU8sQ0FBQyxRQUFRLENBQUMsTUFBTTtJQUN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slasher_contract.d.ts","sourceRoot":"","sources":["../../src/contracts/slasher_contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAM3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,qBAAa,eAAe;IAIxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG;IALtB,OAAO,CAAC,QAAQ,CAAuD;IAEvE,YACmB,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,UAAU,EACnB,GAAG,yCAAmC,EAOxD;IAED;;;;OAIG;IACU,eAAe,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAOzE;IAED;;;OAGG;IACU,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAOjD;IAED;;;OAGG;IACU,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,CAG5C;IAED;;;OAGG;IACU,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAGzD;IAED;;;OAGG;IACU,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,CAGhD;IAED;;;OAGG;IACU,WAAW,IAAI,OAAO,CAAC,UAAU,CAAC,CAG9C;CACF"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { L1TxRequest } from '@aztec/ethereum/l1-tx-utils';
|
|
2
|
+
import type { ViemClient } from '@aztec/ethereum/types';
|
|
3
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
4
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
3
5
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
6
|
import { type Hex, type Log, type TypedDataDefinition } from 'viem';
|
|
@@ -36,7 +38,7 @@ export declare class TallySlashingProposerContract {
|
|
|
36
38
|
* @param slot - The slot number to check at
|
|
37
39
|
* @returns Whether the round is ready to execute
|
|
38
40
|
*/
|
|
39
|
-
isRoundReadyToExecute(round: bigint, slot:
|
|
41
|
+
isRoundReadyToExecute(round: bigint, slot: SlotNumber): Promise<boolean>;
|
|
40
42
|
/** Returns the slash actions and payload address for a given round (zero if no slash actions) */
|
|
41
43
|
getPayload(round: bigint): Promise<{
|
|
42
44
|
actions: {
|
|
@@ -58,9 +60,9 @@ export declare class TallySlashingProposerContract {
|
|
|
58
60
|
tryExtractVoteCastEvent(logs: Log[]): {
|
|
59
61
|
eventName: "VoteCast";
|
|
60
62
|
args: {
|
|
63
|
+
proposer: `0x${string}`;
|
|
61
64
|
round: bigint;
|
|
62
65
|
slot: bigint;
|
|
63
|
-
proposer: `0x${string}`;
|
|
64
66
|
};
|
|
65
67
|
} | undefined;
|
|
66
68
|
/** Tries to extract a RoundExecuted event from the given logs. */
|
|
@@ -78,11 +80,11 @@ export declare class TallySlashingProposerContract {
|
|
|
78
80
|
* @param signer - The signer to produce the signature
|
|
79
81
|
* @returns L1 transaction request
|
|
80
82
|
*/
|
|
81
|
-
buildVoteRequestFromSigner(votes: Hex, slot:
|
|
83
|
+
buildVoteRequestFromSigner(votes: Hex, slot: SlotNumber, signer: (msg: TypedDataDefinition) => Promise<Hex>): Promise<L1TxRequest>;
|
|
82
84
|
/** Returns the typed data definition to EIP712-sign for voting */
|
|
83
|
-
buildVoteTypedData(votes: Hex, slot:
|
|
85
|
+
buildVoteTypedData(votes: Hex, slot: SlotNumber): TypedDataDefinition;
|
|
84
86
|
/** Gets the digest to sign for voting directly from the contract */
|
|
85
|
-
getVoteDataDigest(votes: Hex, slot:
|
|
87
|
+
getVoteDataDigest(votes: Hex, slot: SlotNumber): Promise<Buffer32>;
|
|
86
88
|
/**
|
|
87
89
|
* Create a transaction to vote for slashing offenses
|
|
88
90
|
* @param votes - The encoded votes for slashing
|
|
@@ -135,4 +137,4 @@ export declare class TallySlashingProposerContract {
|
|
|
135
137
|
* @returns An array of numbers representing the slash votes
|
|
136
138
|
*/
|
|
137
139
|
export declare function decodeSlashConsensusVotes(buffer: Buffer): number[];
|
|
138
|
-
//# sourceMappingURL=
|
|
140
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFsbHlfc2xhc2hpbmdfcHJvcG9zZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdHMvdGFsbHlfc2xhc2hpbmdfcHJvcG9zZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDL0QsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFeEQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQzdELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUNwRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFLM0QsT0FBTyxFQUVMLEtBQUssR0FBRyxFQUNSLEtBQUssR0FBRyxFQUNSLEtBQUssbUJBQW1CLEVBR3pCLE1BQU0sTUFBTSxDQUFDO0FBRWQ7OztHQUdHO0FBQ0gscUJBQWEsNkJBQTZCO2FBTXRCLE1BQU0sRUFBRSxVQUFVO0lBTHBDLE9BQU8sQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFxRTtJQUU5RixTQUFnQixJQUFJLFVBQW9CO0lBRXhDLFlBQ2tCLE1BQU0sRUFBRSxVQUFVLEVBQ2xDLE9BQU8sRUFBRSxHQUFHLEdBQUcsVUFBVSxFQU8xQjtJQUVELElBQVcsT0FBTyxlQUVqQjtJQUVNLGFBQWEsSUFBSSxPQUFPLENBQUMsTUFBTSxDQUFDLENBRXRDO0lBRU0sWUFBWSxJ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FBQyxFQUFFLEdBQUcsQ0FBQTtLQUFFLEdBQUcsV0FBVyxDQVN0RztJQUVEOzs7OztPQUtHO0lBQ0ksd0JBQXdCLENBQUMsS0FBSyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLEVBQUUsR0FBRyxXQUFXLENBU3RGO0lBRUQsdURBQXVEO0lBQzFDLFdBQVcsQ0FBQyxLQUFLLEVBQUUsTUFBTTs7O1NBWXJDO0lBRUQ7Ozs7T0FJRztJQUNJLGdCQUFnQixDQUFDLFFBQVEsRUFBRSxDQUFDLElBQUksRUFBRTtRQUFFLEtBQUssRUFBRSxNQUFNLENBQUM7UUFBQyxRQUFRLEVBQUUsTUFBTSxDQUFBO0tBQUUsS0FBSyxJQUFJLEdBQUcsTUFBTSxJQUFJLENBY2pHO0lBRUQ7Ozs7T0FJRztJQUNJLHFCQUFxQixDQUMxQixRQUFRLEVBQUUsQ0FBQyxJQUFJLEVBQUU7UUFBRSxLQUFLLEVBQUUsTUFBTSxDQUFDO1FBQUMsVUFBVSxFQUFFLE1BQU0sQ0FBQztRQUFDLFdBQVcsRUFBRSxHQUFHLENBQUE7S0FBRSxLQUFLLElBQUksR0FDaEYsTUFBTSxJQUFJLENBY1o7Q0FDRjtBQUVEOzs7Ozs7O0dBT0c7QUFDSCx3QkFBZ0IseUJBQXlCLENBQUMsTUFBTSxFQUFFLE1BQU0sR0FBRyxNQUFNLEVBQUUsQ0FlbEUifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tally_slashing_proposer.d.ts","sourceRoot":"","sources":["../../src/contracts/tally_slashing_proposer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"tally_slashing_proposer.d.ts","sourceRoot":"","sources":["../../src/contracts/tally_slashing_proposer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE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AED;;;;;OAKG;IACI,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,GAAG,WAAW,CAStF;IAED,uDAAuD;IAC1C,WAAW,CAAC,KAAK,EAAE,MAAM;;;SAYrC;IAED;;;;OAIG;IACI,gBAAgB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,GAAG,MAAM,IAAI,CAcjG;IAED;;;;OAIG;IACI,qBAAqB,CAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,GAAG,CAAA;KAAE,KAAK,IAAI,GAChF,MAAM,IAAI,CAcZ;CACF;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAelE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { tryExtractEvent } from '@aztec/ethereum';
|
|
1
|
+
import { tryExtractEvent } from '@aztec/ethereum/utils';
|
|
2
2
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import { Signature } from '@aztec/foundation/eth-signature';
|
|
@@ -76,7 +76,7 @@ import { encodeFunctionData, getContract } from 'viem';
|
|
|
76
76
|
*/ async isRoundReadyToExecute(round, slot) {
|
|
77
77
|
return await this.contract.read.isRoundReadyToExecute([
|
|
78
78
|
round,
|
|
79
|
-
slot
|
|
79
|
+
BigInt(slot)
|
|
80
80
|
]);
|
|
81
81
|
}
|
|
82
82
|
/** Returns the slash actions and payload address for a given round (zero if no slash actions) */ async getPayload(round) {
|
|
@@ -186,14 +186,14 @@ import { encodeFunctionData, getContract } from 'viem';
|
|
|
186
186
|
primaryType: 'Vote',
|
|
187
187
|
message: {
|
|
188
188
|
votes,
|
|
189
|
-
slot
|
|
189
|
+
slot: BigInt(slot)
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
/** Gets the digest to sign for voting directly from the contract */ async getVoteDataDigest(votes, slot) {
|
|
194
194
|
return Buffer32.fromString(await this.contract.read.getVoteSignatureDigest([
|
|
195
195
|
votes,
|
|
196
|
-
slot
|
|
196
|
+
BigInt(slot)
|
|
197
197
|
]));
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ViemClient } from '../types.js';
|
|
2
2
|
export declare function checkBlockTag(block: bigint | undefined, publicClient: ViemClient): Promise<void>;
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdHMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sYUFBYSxDQUFDO0FBSzlDLHdCQUFzQixhQUFhLENBQUMsS0FBSyxFQUFFLE1BQU0sR0FBRyxTQUFTLEVBQUUsWUFBWSxFQUFFLFVBQVUsaUJBUXRGIn0=
|