@aztec/ethereum 0.0.1-commit.b33fc05d0 → 0.0.1-commit.b3d3157a
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/client.d.ts +25 -3
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +60 -8
- package/dest/config.d.ts +6 -6
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +5 -9
- package/dest/contracts/chain_state_override.d.ts +78 -0
- package/dest/contracts/chain_state_override.d.ts.map +1 -0
- package/dest/contracts/chain_state_override.js +137 -0
- package/dest/contracts/empire_base.d.ts +1 -3
- package/dest/contracts/empire_base.d.ts.map +1 -1
- package/dest/contracts/fee_asset_price_oracle.d.ts +6 -2
- package/dest/contracts/fee_asset_price_oracle.d.ts.map +1 -1
- package/dest/contracts/fee_asset_price_oracle.js +11 -6
- package/dest/contracts/governance.d.ts +108 -33
- package/dest/contracts/governance.d.ts.map +1 -1
- package/dest/contracts/governance.js +193 -12
- package/dest/contracts/governance_proposer.d.ts +33 -3
- package/dest/contracts/governance_proposer.d.ts.map +1 -1
- package/dest/contracts/governance_proposer.js +51 -9
- package/dest/contracts/inbox.d.ts +3 -3
- package/dest/contracts/inbox.d.ts.map +1 -1
- package/dest/contracts/inbox.js +12 -7
- package/dest/contracts/index.d.ts +3 -3
- package/dest/contracts/index.d.ts.map +1 -1
- package/dest/contracts/index.js +2 -2
- package/dest/contracts/multicall.d.ts +127 -12
- package/dest/contracts/multicall.d.ts.map +1 -1
- package/dest/contracts/multicall.js +201 -94
- package/dest/contracts/outbox.d.ts +27 -4
- package/dest/contracts/outbox.d.ts.map +1 -1
- package/dest/contracts/outbox.js +34 -7
- package/dest/contracts/rollup.d.ts +5250 -24
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +366 -64
- package/dest/contracts/{tally_slashing_proposer.d.ts → slashing_proposer.d.ts} +3 -4
- package/dest/contracts/slashing_proposer.d.ts.map +1 -0
- package/dest/contracts/{tally_slashing_proposer.js → slashing_proposer.js} +13 -15
- package/dest/deploy_aztec_l1_contracts.d.ts +3 -6
- package/dest/deploy_aztec_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_aztec_l1_contracts.js +2 -4
- package/dest/generated/l1-contracts-defaults.d.ts +1 -1
- package/dest/generated/l1-contracts-defaults.js +1 -1
- package/dest/l1_artifacts.d.ts +13409 -15883
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_artifacts.js +9 -24
- package/dest/l1_contract_addresses.d.ts +61 -65
- package/dest/l1_contract_addresses.d.ts.map +1 -1
- package/dest/l1_contract_addresses.js +101 -82
- package/dest/l1_reader.d.ts +5 -5
- package/dest/l1_reader.d.ts.map +1 -1
- package/dest/l1_reader.js +9 -7
- package/dest/l1_tx_utils/l1_tx_utils.d.ts +9 -1
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.js +54 -35
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/readonly_l1_tx_utils.js +2 -1
- package/dest/l1_tx_utils/tx_delayer.d.ts +5 -3
- package/dest/l1_tx_utils/tx_delayer.d.ts.map +1 -1
- package/dest/l1_tx_utils/tx_delayer.js +7 -5
- package/dest/publisher_manager.d.ts +21 -7
- package/dest/publisher_manager.d.ts.map +1 -1
- package/dest/publisher_manager.js +81 -7
- package/dest/queries.d.ts +13 -2
- package/dest/queries.d.ts.map +1 -1
- package/dest/queries.js +62 -3
- package/dest/test/chain_monitor.d.ts +23 -3
- package/dest/test/chain_monitor.d.ts.map +1 -1
- package/dest/test/chain_monitor.js +38 -2
- package/dest/test/eth_cheat_codes.d.ts +12 -4
- package/dest/test/eth_cheat_codes.d.ts.map +1 -1
- package/dest/test/eth_cheat_codes.js +17 -4
- package/dest/test/rollup_cheat_codes.d.ts +31 -3
- package/dest/test/rollup_cheat_codes.d.ts.map +1 -1
- package/dest/test/rollup_cheat_codes.js +59 -7
- package/dest/test/start_anvil.d.ts +8 -1
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +16 -2
- package/dest/utils.d.ts +9 -2
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +34 -6
- package/package.json +6 -6
- package/src/client.ts +66 -2
- package/src/config.ts +9 -13
- package/src/contracts/chain_state_override.ts +200 -0
- package/src/contracts/empire_base.ts +0 -2
- package/src/contracts/fee_asset_price_oracle.ts +10 -5
- package/src/contracts/governance.ts +266 -9
- package/src/contracts/governance_proposer.ts +52 -5
- package/src/contracts/inbox.ts +13 -5
- package/src/contracts/index.ts +2 -2
- package/src/contracts/multicall.ts +243 -105
- package/src/contracts/outbox.ts +42 -8
- package/src/contracts/rollup.ts +401 -64
- package/src/contracts/{tally_slashing_proposer.ts → slashing_proposer.ts} +14 -16
- package/src/deploy_aztec_l1_contracts.ts +1 -5
- package/src/generated/l1-contracts-defaults.ts +1 -1
- package/src/l1_artifacts.ts +12 -35
- package/src/l1_contract_addresses.ts +120 -94
- package/src/l1_reader.ts +17 -10
- package/src/l1_tx_utils/l1_tx_utils.ts +51 -28
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +2 -1
- package/src/l1_tx_utils/tx_delayer.ts +16 -7
- package/src/publisher_manager.ts +105 -10
- package/src/queries.ts +70 -4
- package/src/test/chain_monitor.ts +65 -3
- package/src/test/eth_cheat_codes.ts +16 -4
- package/src/test/rollup_cheat_codes.ts +64 -6
- package/src/test/start_anvil.ts +25 -2
- package/src/utils.ts +30 -6
- package/dest/contracts/empire_slashing_proposer.d.ts +0 -69
- package/dest/contracts/empire_slashing_proposer.d.ts.map +0 -1
- package/dest/contracts/empire_slashing_proposer.js +0 -216
- package/dest/contracts/tally_slashing_proposer.d.ts.map +0 -1
- package/src/contracts/empire_slashing_proposer.ts +0 -265
package/dest/contracts/rollup.js
CHANGED
|
@@ -376,25 +376,20 @@ import { Buffer32 } from '@aztec/foundation/buffer';
|
|
|
376
376
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
377
377
|
import { memoize } from '@aztec/foundation/decorators';
|
|
378
378
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
379
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
379
380
|
import { makeBackoff, retry } from '@aztec/foundation/retry';
|
|
381
|
+
import { getErrorCause } from '@aztec/foundation/types';
|
|
380
382
|
import { EscapeHatchAbi } from '@aztec/l1-artifacts/EscapeHatchAbi';
|
|
381
383
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
382
384
|
import { RollupStorage } from '@aztec/l1-artifacts/RollupStorage';
|
|
383
385
|
import chunk from 'lodash.chunk';
|
|
384
|
-
import { encodeFunctionData, getContract, hexToBigInt, keccak256 } from 'viem';
|
|
386
|
+
import { ContractFunctionRevertedError, RpcRequestError, decodeErrorResult, encodeAbiParameters, encodeFunctionData, getContract, hexToBigInt, keccak256 } from 'viem';
|
|
385
387
|
import { getPublicClient } from '../client.js';
|
|
386
388
|
import { formatViemError } from '../utils.js';
|
|
387
|
-
import { EmpireSlashingProposerContract } from './empire_slashing_proposer.js';
|
|
388
389
|
import { GSEContract } from './gse.js';
|
|
389
390
|
import { SlasherContract } from './slasher_contract.js';
|
|
390
|
-
import {
|
|
391
|
+
import { SlashingProposerContract } from './slashing_proposer.js';
|
|
391
392
|
import { checkBlockTag } from './utils.js';
|
|
392
|
-
export var SlashingProposerType = /*#__PURE__*/ function(SlashingProposerType) {
|
|
393
|
-
SlashingProposerType[SlashingProposerType["None"] = 0] = "None";
|
|
394
|
-
SlashingProposerType[SlashingProposerType["Tally"] = 1] = "Tally";
|
|
395
|
-
SlashingProposerType[SlashingProposerType["Empire"] = 2] = "Empire";
|
|
396
|
-
return SlashingProposerType;
|
|
397
|
-
}({});
|
|
398
393
|
/**
|
|
399
394
|
* Status of a validator/attester in the staking system.
|
|
400
395
|
* Matches the Status enum in StakingLib.sol
|
|
@@ -405,6 +400,37 @@ export var SlashingProposerType = /*#__PURE__*/ function(SlashingProposerType) {
|
|
|
405
400
|
AttesterStatus[AttesterStatus["EXITING"] = 3] = "EXITING";
|
|
406
401
|
return AttesterStatus;
|
|
407
402
|
}({});
|
|
403
|
+
/** Field offsets within the CompressedTempCheckpointLog struct in Solidity storage. */ export var TempCheckpointLogField = /*#__PURE__*/ function(TempCheckpointLogField) {
|
|
404
|
+
TempCheckpointLogField[TempCheckpointLogField["HeaderHash"] = 0] = "HeaderHash";
|
|
405
|
+
TempCheckpointLogField[TempCheckpointLogField["BlobCommitmentsHash"] = 1] = "BlobCommitmentsHash";
|
|
406
|
+
TempCheckpointLogField[TempCheckpointLogField["OutHash"] = 2] = "OutHash";
|
|
407
|
+
TempCheckpointLogField[TempCheckpointLogField["AttestationsHash"] = 3] = "AttestationsHash";
|
|
408
|
+
TempCheckpointLogField[TempCheckpointLogField["PayloadDigest"] = 4] = "PayloadDigest";
|
|
409
|
+
TempCheckpointLogField[TempCheckpointLogField["SlotNumber"] = 5] = "SlotNumber";
|
|
410
|
+
TempCheckpointLogField[TempCheckpointLogField["FeeHeader"] = 6] = "FeeHeader";
|
|
411
|
+
return TempCheckpointLogField;
|
|
412
|
+
}({});
|
|
413
|
+
const INSUFFICIENT_VALIDATOR_SET_SIZE_ERROR = 'ValidatorSelection__InsufficientValidatorSetSize';
|
|
414
|
+
function isValidatorSelectionError(err, errorName) {
|
|
415
|
+
return getErrorCause(err, ContractFunctionRevertedError)?.data?.errorName === errorName || decodeRpcRequestErrorName(err) === errorName;
|
|
416
|
+
}
|
|
417
|
+
function decodeRpcRequestErrorName(err) {
|
|
418
|
+
const data = getErrorCause(err, RpcRequestError)?.data;
|
|
419
|
+
if (!isHexString(data)) {
|
|
420
|
+
return undefined;
|
|
421
|
+
}
|
|
422
|
+
try {
|
|
423
|
+
return decodeErrorResult({
|
|
424
|
+
abi: RollupAbi,
|
|
425
|
+
data
|
|
426
|
+
}).errorName;
|
|
427
|
+
} catch {
|
|
428
|
+
return undefined;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
function isHexString(value) {
|
|
432
|
+
return typeof value === 'string' && value.startsWith('0x');
|
|
433
|
+
}
|
|
408
434
|
export class RollupContract {
|
|
409
435
|
client;
|
|
410
436
|
static{
|
|
@@ -499,6 +525,16 @@ export class RollupContract {
|
|
|
499
525
|
2,
|
|
500
526
|
"getGenesisArchiveTreeRoot"
|
|
501
527
|
],
|
|
528
|
+
[
|
|
529
|
+
memoize,
|
|
530
|
+
2,
|
|
531
|
+
"getVkTreeRoot"
|
|
532
|
+
],
|
|
533
|
+
[
|
|
534
|
+
memoize,
|
|
535
|
+
2,
|
|
536
|
+
"getProtocolContractsHash"
|
|
537
|
+
],
|
|
502
538
|
[
|
|
503
539
|
memoize,
|
|
504
540
|
2,
|
|
@@ -507,6 +543,7 @@ export class RollupContract {
|
|
|
507
543
|
], []));
|
|
508
544
|
}
|
|
509
545
|
rollup;
|
|
546
|
+
logger;
|
|
510
547
|
static cachedStfStorageSlot;
|
|
511
548
|
cachedEscapeHatch;
|
|
512
549
|
static get checkBlobStorageSlot() {
|
|
@@ -525,12 +562,12 @@ export class RollupContract {
|
|
|
525
562
|
}
|
|
526
563
|
static getFromConfig(config) {
|
|
527
564
|
const client = getPublicClient(config);
|
|
528
|
-
const address = config.
|
|
565
|
+
const address = config.rollupAddress.toString();
|
|
529
566
|
return new RollupContract(client, address);
|
|
530
567
|
}
|
|
531
568
|
constructor(client, address){
|
|
532
569
|
this.client = client;
|
|
533
|
-
_initProto(this);
|
|
570
|
+
this.logger = (_initProto(this), createLogger('ethereum:rollup'));
|
|
534
571
|
if (address instanceof EthAddress) {
|
|
535
572
|
address = address.toString();
|
|
536
573
|
}
|
|
@@ -555,34 +592,10 @@ export class RollupContract {
|
|
|
555
592
|
return undefined;
|
|
556
593
|
}
|
|
557
594
|
const proposerAddress = await slasher.getProposer();
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
type: 'function',
|
|
561
|
-
name: 'SLASHING_PROPOSER_TYPE',
|
|
562
|
-
inputs: [],
|
|
563
|
-
outputs: [
|
|
564
|
-
{
|
|
565
|
-
name: '',
|
|
566
|
-
type: 'uint8',
|
|
567
|
-
internalType: 'enum SlasherFlavor'
|
|
568
|
-
}
|
|
569
|
-
],
|
|
570
|
-
stateMutability: 'view'
|
|
571
|
-
}
|
|
572
|
-
];
|
|
573
|
-
const proposer = getContract({
|
|
574
|
-
address: proposerAddress.toString(),
|
|
575
|
-
abi: proposerAbi,
|
|
576
|
-
client: this.client
|
|
577
|
-
});
|
|
578
|
-
const proposerType = await proposer.read.SLASHING_PROPOSER_TYPE();
|
|
579
|
-
if (proposerType === 1..valueOf()) {
|
|
580
|
-
return new TallySlashingProposerContract(this.client, proposerAddress);
|
|
581
|
-
} else if (proposerType === 2..valueOf()) {
|
|
582
|
-
return new EmpireSlashingProposerContract(this.client, proposerAddress);
|
|
583
|
-
} else {
|
|
584
|
-
throw new Error(`Unknown slashing proposer type: ${proposerType}`);
|
|
595
|
+
if (proposerAddress.isZero()) {
|
|
596
|
+
return undefined;
|
|
585
597
|
}
|
|
598
|
+
return new SlashingProposerContract(this.client, proposerAddress);
|
|
586
599
|
}
|
|
587
600
|
getL1StartBlock() {
|
|
588
601
|
return this.rollup.read.L1_BLOCK_AT_GENESIS();
|
|
@@ -640,6 +653,22 @@ export class RollupContract {
|
|
|
640
653
|
0n
|
|
641
654
|
]));
|
|
642
655
|
}
|
|
656
|
+
async getVkTreeRoot() {
|
|
657
|
+
const slot = BigInt(RollupContract.stfStorageSlot) + 3n;
|
|
658
|
+
const value = await this.client.getStorageAt({
|
|
659
|
+
address: this.address,
|
|
660
|
+
slot: `0x${slot.toString(16)}`
|
|
661
|
+
});
|
|
662
|
+
return Fr.fromString(value ?? '0x0');
|
|
663
|
+
}
|
|
664
|
+
async getProtocolContractsHash() {
|
|
665
|
+
const slot = BigInt(RollupContract.stfStorageSlot) + 4n;
|
|
666
|
+
const value = await this.client.getStorageAt({
|
|
667
|
+
address: this.address,
|
|
668
|
+
slot: `0x${slot.toString(16)}`
|
|
669
|
+
});
|
|
670
|
+
return Fr.fromString(value ?? '0x0');
|
|
671
|
+
}
|
|
643
672
|
/**
|
|
644
673
|
* Returns rollup constants used for epoch queries.
|
|
645
674
|
* Return type is `L1RollupConstants` which is defined in stdlib,
|
|
@@ -707,7 +736,11 @@ export class RollupContract {
|
|
|
707
736
|
BigInt(epoch)
|
|
708
737
|
]);
|
|
709
738
|
return isOpen;
|
|
710
|
-
} catch
|
|
739
|
+
} catch (err) {
|
|
740
|
+
this.logger.warn('isEscapeHatchOpen failed (treating as closed); RPC or contract error may cause liveness risk', {
|
|
741
|
+
epoch: Number(epoch),
|
|
742
|
+
error: err
|
|
743
|
+
});
|
|
711
744
|
return false;
|
|
712
745
|
}
|
|
713
746
|
}
|
|
@@ -736,25 +769,40 @@ export class RollupContract {
|
|
|
736
769
|
getCheckpointReward() {
|
|
737
770
|
return this.rollup.read.getCheckpointReward();
|
|
738
771
|
}
|
|
739
|
-
async getCheckpointNumber() {
|
|
740
|
-
|
|
772
|
+
async getCheckpointNumber(options) {
|
|
773
|
+
await checkBlockTag(options?.blockNumber, this.client);
|
|
774
|
+
return CheckpointNumber.fromBigInt(await this.rollup.read.getPendingCheckpointNumber(options));
|
|
741
775
|
}
|
|
742
776
|
async getProvenCheckpointNumber(options) {
|
|
743
777
|
await checkBlockTag(options?.blockNumber, this.client);
|
|
744
778
|
return CheckpointNumber.fromBigInt(await this.rollup.read.getProvenCheckpointNumber(options));
|
|
745
779
|
}
|
|
746
|
-
async getSlotNumber() {
|
|
747
|
-
|
|
780
|
+
async getSlotNumber(options) {
|
|
781
|
+
await checkBlockTag(options?.blockNumber, this.client);
|
|
782
|
+
return SlotNumber.fromBigInt(await this.rollup.read.getCurrentSlot(options));
|
|
748
783
|
}
|
|
749
|
-
async getL1FeesAt(timestamp) {
|
|
784
|
+
async getL1FeesAt(timestamp, options) {
|
|
785
|
+
await checkBlockTag(options?.blockNumber, this.client);
|
|
750
786
|
const result = await this.rollup.read.getL1FeesAt([
|
|
751
787
|
timestamp
|
|
752
|
-
]);
|
|
788
|
+
], options);
|
|
753
789
|
return {
|
|
754
790
|
baseFee: result.baseFee,
|
|
755
791
|
blobFee: result.blobFee
|
|
756
792
|
};
|
|
757
793
|
}
|
|
794
|
+
async getFeeHeader(checkpointNumber) {
|
|
795
|
+
const result = await this.rollup.read.getFeeHeader([
|
|
796
|
+
checkpointNumber
|
|
797
|
+
]);
|
|
798
|
+
return {
|
|
799
|
+
excessMana: result.excessMana,
|
|
800
|
+
manaUsed: result.manaUsed,
|
|
801
|
+
ethPerFeeAsset: result.ethPerFeeAsset,
|
|
802
|
+
congestionCost: result.congestionCost,
|
|
803
|
+
proverCost: result.proverCost
|
|
804
|
+
};
|
|
805
|
+
}
|
|
758
806
|
getEthPerFeeAsset() {
|
|
759
807
|
return this.rollup.read.getEthPerFeeAsset();
|
|
760
808
|
}
|
|
@@ -767,7 +815,7 @@ export class RollupContract {
|
|
|
767
815
|
timestamp
|
|
768
816
|
]
|
|
769
817
|
}).catch((e)=>{
|
|
770
|
-
if (e
|
|
818
|
+
if (isValidatorSelectionError(e, INSUFFICIENT_VALIDATOR_SET_SIZE_ERROR)) {
|
|
771
819
|
return {
|
|
772
820
|
result: undefined
|
|
773
821
|
};
|
|
@@ -794,7 +842,7 @@ export class RollupContract {
|
|
|
794
842
|
functionName: 'getCurrentEpochCommittee',
|
|
795
843
|
args: []
|
|
796
844
|
}).catch((e)=>{
|
|
797
|
-
if (e
|
|
845
|
+
if (isValidatorSelectionError(e, INSUFFICIENT_VALIDATOR_SET_SIZE_ERROR)) {
|
|
798
846
|
return {
|
|
799
847
|
result: undefined
|
|
800
848
|
};
|
|
@@ -823,10 +871,11 @@ export class RollupContract {
|
|
|
823
871
|
});
|
|
824
872
|
return EthAddress.fromString(result);
|
|
825
873
|
}
|
|
826
|
-
async getCheckpoint(checkpointNumber) {
|
|
874
|
+
async getCheckpoint(checkpointNumber, options) {
|
|
875
|
+
await checkBlockTag(options?.blockNumber, this.client);
|
|
827
876
|
const result = await this.rollup.read.getCheckpoint([
|
|
828
877
|
BigInt(checkpointNumber)
|
|
829
|
-
]);
|
|
878
|
+
], options);
|
|
830
879
|
return {
|
|
831
880
|
archive: Fr.fromString(result.archive),
|
|
832
881
|
headerHash: Buffer32.fromString(result.headerHash),
|
|
@@ -856,6 +905,28 @@ export class RollupContract {
|
|
|
856
905
|
0.5
|
|
857
906
|
]));
|
|
858
907
|
}
|
|
908
|
+
/**
|
|
909
|
+
* Returns the effective pending checkpoint, accounting for potential prunes.
|
|
910
|
+
* When a prune can happen, the L1 contract uses the proven checkpoint instead of the pending one.
|
|
911
|
+
* This mirrors the behavior of getEffectivePendingCheckpointNumber in STFLib.sol.
|
|
912
|
+
* @param atTimestamp - The timestamp to evaluate pruneability at. Defaults to the current L1 block timestamp.
|
|
913
|
+
* @param options - Optional L1 block number to pin the queries to.
|
|
914
|
+
*/ getEffectivePendingCheckpoint(atTimestamp, options) {
|
|
915
|
+
return retry(async ()=>{
|
|
916
|
+
const timestamp = atTimestamp ?? (await this.client.getBlock()).timestamp;
|
|
917
|
+
const canPrune = await this.canPruneAtTime(timestamp, options);
|
|
918
|
+
if (canPrune) {
|
|
919
|
+
const provenCheckpointNumber = await this.getProvenCheckpointNumber(options);
|
|
920
|
+
return await this.getCheckpoint(provenCheckpointNumber, options);
|
|
921
|
+
}
|
|
922
|
+
const pendingCheckpointNumber = await this.getCheckpointNumber(options);
|
|
923
|
+
return await this.getCheckpoint(pendingCheckpointNumber, options);
|
|
924
|
+
}, 'getting effective pending checkpoint', makeBackoff([
|
|
925
|
+
0.5,
|
|
926
|
+
0.5,
|
|
927
|
+
0.5
|
|
928
|
+
]));
|
|
929
|
+
}
|
|
859
930
|
async getTips() {
|
|
860
931
|
const { pending, proven } = await this.rollup.read.getTips();
|
|
861
932
|
return {
|
|
@@ -940,9 +1011,8 @@ export class RollupContract {
|
|
|
940
1011
|
* @return [slot, checkpointNumber, timeOfNextL1Slot] - If you can propose, the L2 slot number, checkpoint number and
|
|
941
1012
|
* timestamp of the next L1 block
|
|
942
1013
|
* @throws otherwise
|
|
943
|
-
*/ async
|
|
944
|
-
const
|
|
945
|
-
const timeOfNextL1Slot = latestBlock.timestamp + BigInt(slotDuration);
|
|
1014
|
+
*/ async canProposeAt(archive, account, timestamp, stateOverride = []) {
|
|
1015
|
+
const timeOfNextL1Slot = timestamp;
|
|
946
1016
|
const who = typeof account === 'string' ? account : account.address;
|
|
947
1017
|
try {
|
|
948
1018
|
const { result: [slot, checkpointNumber] } = await this.client.simulateContract({
|
|
@@ -955,7 +1025,7 @@ export class RollupContract {
|
|
|
955
1025
|
who
|
|
956
1026
|
],
|
|
957
1027
|
account,
|
|
958
|
-
stateOverride
|
|
1028
|
+
stateOverride
|
|
959
1029
|
});
|
|
960
1030
|
return {
|
|
961
1031
|
slot: SlotNumber.fromBigInt(slot),
|
|
@@ -967,11 +1037,15 @@ export class RollupContract {
|
|
|
967
1037
|
}
|
|
968
1038
|
}
|
|
969
1039
|
/**
|
|
970
|
-
* Returns a state override that sets the pending
|
|
971
|
-
*
|
|
972
|
-
*
|
|
973
|
-
|
|
974
|
-
|
|
1040
|
+
* Returns a state override that sets the pending and/or proven checkpoint numbers. Useful for simulations.
|
|
1041
|
+
* Both values share a single storage slot (pending in the upper 128 bits, proven in the lower 128 bits), so
|
|
1042
|
+
* a single combined override is emitted to avoid the second state-diff clobbering the first. The current live
|
|
1043
|
+
* value is read once to preserve any half not being overridden. Returns an empty override if neither is set.
|
|
1044
|
+
*
|
|
1045
|
+
* Throws if the resulting `proven > pending`, which would crash the simulation: `STFLib.canPruneAtTime` calls
|
|
1046
|
+
* `getEpochForCheckpoint(proven + 1)` whenever `pending != proven`, and that asserts `_n <= tips.pending`.
|
|
1047
|
+
*/ async makeChainTipsOverride(override) {
|
|
1048
|
+
if (override.pending === undefined && override.proven === undefined) {
|
|
975
1049
|
return [];
|
|
976
1050
|
}
|
|
977
1051
|
const slot = RollupContract.stfStorageSlot;
|
|
@@ -979,8 +1053,15 @@ export class RollupContract {
|
|
|
979
1053
|
address: this.address,
|
|
980
1054
|
slot
|
|
981
1055
|
});
|
|
982
|
-
const
|
|
983
|
-
const
|
|
1056
|
+
const currentRaw = currentValue ? hexToBigInt(currentValue) : 0n;
|
|
1057
|
+
const currentPending = currentRaw >> 128n;
|
|
1058
|
+
const currentProven = currentRaw & (1n << 128n) - 1n;
|
|
1059
|
+
const newPending = override.pending !== undefined ? BigInt(override.pending) : currentPending;
|
|
1060
|
+
const newProven = override.proven !== undefined ? BigInt(override.proven) : currentProven;
|
|
1061
|
+
if (newProven > newPending) {
|
|
1062
|
+
throw new Error(`Invalid chain tips override: proven (${newProven}) > pending (${newPending})`);
|
|
1063
|
+
}
|
|
1064
|
+
const newValue = newPending << 128n | newProven;
|
|
984
1065
|
return [
|
|
985
1066
|
{
|
|
986
1067
|
address: this.address,
|
|
@@ -993,6 +1074,161 @@ export class RollupContract {
|
|
|
993
1074
|
}
|
|
994
1075
|
];
|
|
995
1076
|
}
|
|
1077
|
+
/**
|
|
1078
|
+
* Returns a state override that patches `tempCheckpointLogs[checkpointNumber]` with every field that
|
|
1079
|
+
* the L1 contract reads during `propose()` for the checkpoint that builds on top of it (proposer
|
|
1080
|
+
* pipelining simulation). Mirrors the writes done by `ProposeLib.addTempCheckpointLog`.
|
|
1081
|
+
*
|
|
1082
|
+
* `blobCommitmentsHash` and `attestationsHash` are intentionally not exposed here — the propose path
|
|
1083
|
+
* never asserts against them, so leaving them at storage zero is harmless.
|
|
1084
|
+
*/ async makeTempCheckpointLogOverride(checkpointNumber, fields) {
|
|
1085
|
+
const constants = await this.getRollupConstants();
|
|
1086
|
+
const slotAt = (field)=>`0x${this.computeTempCheckpointLogStorageSlot(checkpointNumber, field, constants).toString(16).padStart(64, '0')}`;
|
|
1087
|
+
const word = (v)=>`0x${v.toString(16).padStart(64, '0')}`;
|
|
1088
|
+
const stateDiff = [];
|
|
1089
|
+
if (fields.headerHash) {
|
|
1090
|
+
stateDiff.push({
|
|
1091
|
+
slot: slotAt(0),
|
|
1092
|
+
value: fields.headerHash.toString()
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
if (fields.outHash) {
|
|
1096
|
+
stateDiff.push({
|
|
1097
|
+
slot: slotAt(2),
|
|
1098
|
+
value: fields.outHash.toString()
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1101
|
+
if (fields.payloadDigest) {
|
|
1102
|
+
stateDiff.push({
|
|
1103
|
+
slot: slotAt(4),
|
|
1104
|
+
value: fields.payloadDigest.toString()
|
|
1105
|
+
});
|
|
1106
|
+
}
|
|
1107
|
+
if (fields.slotNumber !== undefined) {
|
|
1108
|
+
// CompressedSlot is uint32 on L1 (SafeCast.toUint32 reverts on overflow). Match that behavior here
|
|
1109
|
+
// so a malformed override surfaces immediately rather than silently truncating into a wrong slot.
|
|
1110
|
+
const slotNumber = BigInt(fields.slotNumber);
|
|
1111
|
+
if (slotNumber < 0n || slotNumber > 0xffffffffn) {
|
|
1112
|
+
throw new Error(`slotNumber ${slotNumber} does not fit in uint32`);
|
|
1113
|
+
}
|
|
1114
|
+
stateDiff.push({
|
|
1115
|
+
slot: slotAt(5),
|
|
1116
|
+
value: word(slotNumber)
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
if (fields.feeHeader) {
|
|
1120
|
+
stateDiff.push({
|
|
1121
|
+
slot: slotAt(6),
|
|
1122
|
+
value: word(RollupContract.compressFeeHeader(fields.feeHeader))
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
if (stateDiff.length === 0) {
|
|
1126
|
+
return [];
|
|
1127
|
+
}
|
|
1128
|
+
return [
|
|
1129
|
+
{
|
|
1130
|
+
address: this.address,
|
|
1131
|
+
stateDiff
|
|
1132
|
+
}
|
|
1133
|
+
];
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* Returns a state override that sets archives[checkpointNumber] to the given archive value.
|
|
1137
|
+
* Used when simulating a canProposeAtTime call where the local archive differs from L1
|
|
1138
|
+
* (e.g. pipelining where the parent checkpoint hasn't landed on L1 yet).
|
|
1139
|
+
*/ makeArchiveOverride(checkpointNumber, archive) {
|
|
1140
|
+
const archivesMappingBase = hexToBigInt(RollupContract.stfStorageSlot) + 1n;
|
|
1141
|
+
const archiveSlot = hexToBigInt(keccak256(encodeAbiParameters([
|
|
1142
|
+
{
|
|
1143
|
+
type: 'uint256'
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
type: 'uint256'
|
|
1147
|
+
}
|
|
1148
|
+
], [
|
|
1149
|
+
BigInt(checkpointNumber),
|
|
1150
|
+
archivesMappingBase
|
|
1151
|
+
])));
|
|
1152
|
+
return [
|
|
1153
|
+
{
|
|
1154
|
+
address: this.address,
|
|
1155
|
+
stateDiff: [
|
|
1156
|
+
{
|
|
1157
|
+
slot: `0x${archiveSlot.toString(16).padStart(64, '0')}`,
|
|
1158
|
+
value: archive.toString()
|
|
1159
|
+
}
|
|
1160
|
+
]
|
|
1161
|
+
}
|
|
1162
|
+
];
|
|
1163
|
+
}
|
|
1164
|
+
/** Merges multiple StateOverride arrays, combining stateDiff entries for the same address. */ static mergeStateOverrides(...overrides) {
|
|
1165
|
+
const byAddress = new Map();
|
|
1166
|
+
for (const override of overrides){
|
|
1167
|
+
for (const entry of override){
|
|
1168
|
+
const key = entry.address.toLowerCase();
|
|
1169
|
+
const existing = byAddress.get(key);
|
|
1170
|
+
if (existing) {
|
|
1171
|
+
existing.stateDiff.push(...entry.stateDiff ?? []);
|
|
1172
|
+
if (entry.balance !== undefined) {
|
|
1173
|
+
existing.balance = entry.balance;
|
|
1174
|
+
}
|
|
1175
|
+
} else {
|
|
1176
|
+
byAddress.set(key, {
|
|
1177
|
+
address: entry.address,
|
|
1178
|
+
balance: entry.balance,
|
|
1179
|
+
stateDiff: [
|
|
1180
|
+
...entry.stateDiff ?? []
|
|
1181
|
+
]
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
return [
|
|
1187
|
+
...byAddress.values()
|
|
1188
|
+
];
|
|
1189
|
+
}
|
|
1190
|
+
/** Compresses a FeeHeader into a uint256 matching FeeHeaderLib.compress() in FeeStructs.sol. */ static compressFeeHeader(feeHeader) {
|
|
1191
|
+
const MASK_48_BITS = (1n << 48n) - 1n;
|
|
1192
|
+
const MASK_64_BITS = (1n << 64n) - 1n;
|
|
1193
|
+
const MASK_63_BITS = (1n << 63n) - 1n;
|
|
1194
|
+
let value = BigInt(feeHeader.manaUsed) & (1n << 32n) - 1n; // bits [0:31]
|
|
1195
|
+
value |= (feeHeader.excessMana < MASK_48_BITS ? feeHeader.excessMana : MASK_48_BITS) << 32n; // bits [32:79]
|
|
1196
|
+
value |= (BigInt(feeHeader.ethPerFeeAsset) & MASK_48_BITS) << 80n; // bits [80:127]
|
|
1197
|
+
value |= (feeHeader.congestionCost < MASK_64_BITS ? feeHeader.congestionCost : MASK_64_BITS) << 128n; // bits [128:191]
|
|
1198
|
+
value |= (feeHeader.proverCost < MASK_63_BITS ? feeHeader.proverCost : MASK_63_BITS) << 192n; // bits [192:254]
|
|
1199
|
+
value |= 1n << 255n; // preheat flag
|
|
1200
|
+
return value;
|
|
1201
|
+
}
|
|
1202
|
+
/** Computes the fee header for a child checkpoint given parent fee header and child data.
|
|
1203
|
+
* Must stay in sync with Solidity FeeLib.sol (computeNewEthPerFeeAsset, clampedAdd). */ static computeChildFeeHeader(parentFeeHeader, childManaUsed, feeAssetPriceModifier, manaTarget) {
|
|
1204
|
+
const MIN_ETH_PER_FEE_ASSET = 100n;
|
|
1205
|
+
const MAX_ETH_PER_FEE_ASSET = 100_000_000_000_000n; // 1e14, matches FeeLib.sol
|
|
1206
|
+
// excessMana = clampedAdd(parent.excessMana + parent.manaUsed, -manaTarget)
|
|
1207
|
+
const sum = parentFeeHeader.excessMana + parentFeeHeader.manaUsed;
|
|
1208
|
+
const excessMana = sum > manaTarget ? sum - manaTarget : 0n;
|
|
1209
|
+
// ethPerFeeAsset = computeNewEthPerFeeAsset(max(parent.ethPerFeeAsset, MIN), modifier)
|
|
1210
|
+
const parentPrice = parentFeeHeader.ethPerFeeAsset > MIN_ETH_PER_FEE_ASSET ? parentFeeHeader.ethPerFeeAsset : MIN_ETH_PER_FEE_ASSET;
|
|
1211
|
+
let newPrice;
|
|
1212
|
+
if (feeAssetPriceModifier >= 0n) {
|
|
1213
|
+
newPrice = parentPrice * (10_000n + feeAssetPriceModifier) / 10_000n;
|
|
1214
|
+
} else {
|
|
1215
|
+
const absMod = -feeAssetPriceModifier;
|
|
1216
|
+
newPrice = parentPrice * (10_000n - absMod) / 10_000n;
|
|
1217
|
+
}
|
|
1218
|
+
if (newPrice < MIN_ETH_PER_FEE_ASSET) {
|
|
1219
|
+
newPrice = MIN_ETH_PER_FEE_ASSET;
|
|
1220
|
+
}
|
|
1221
|
+
if (newPrice > MAX_ETH_PER_FEE_ASSET) {
|
|
1222
|
+
newPrice = MAX_ETH_PER_FEE_ASSET;
|
|
1223
|
+
}
|
|
1224
|
+
return {
|
|
1225
|
+
excessMana,
|
|
1226
|
+
manaUsed: childManaUsed,
|
|
1227
|
+
ethPerFeeAsset: newPrice,
|
|
1228
|
+
congestionCost: 0n,
|
|
1229
|
+
proverCost: 0n
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
996
1232
|
/** Creates a request to Rollup#invalidateBadAttestation to be simulated or sent */ buildInvalidateBadAttestationRequest(checkpointNumber, attestationsAndSigners, committee, invalidIndex) {
|
|
997
1233
|
return {
|
|
998
1234
|
to: this.address,
|
|
@@ -1034,11 +1270,25 @@ export class RollupContract {
|
|
|
1034
1270
|
prover
|
|
1035
1271
|
]);
|
|
1036
1272
|
}
|
|
1037
|
-
getManaMinFeeAt(timestamp, inFeeAsset) {
|
|
1273
|
+
getManaMinFeeAt(timestamp, inFeeAsset, stateOverride) {
|
|
1038
1274
|
return this.rollup.read.getManaMinFeeAt([
|
|
1039
1275
|
timestamp,
|
|
1040
1276
|
inFeeAsset
|
|
1277
|
+
], {
|
|
1278
|
+
stateOverride
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1281
|
+
async getManaMinFeeComponentsAt(timestamp, inFeeAsset) {
|
|
1282
|
+
const result = await this.rollup.read.getManaMinFeeComponentsAt([
|
|
1283
|
+
timestamp,
|
|
1284
|
+
inFeeAsset
|
|
1041
1285
|
]);
|
|
1286
|
+
return {
|
|
1287
|
+
sequencerCost: result.sequencerCost,
|
|
1288
|
+
proverCost: result.proverCost,
|
|
1289
|
+
congestionCost: result.congestionCost,
|
|
1290
|
+
congestionMultiplier: result.congestionMultiplier
|
|
1291
|
+
};
|
|
1042
1292
|
}
|
|
1043
1293
|
async getSlotAt(timestamp) {
|
|
1044
1294
|
return SlotNumber.fromBigInt(await this.rollup.read.getSlotAt([
|
|
@@ -1089,10 +1339,10 @@ export class RollupContract {
|
|
|
1089
1339
|
prover
|
|
1090
1340
|
]);
|
|
1091
1341
|
}
|
|
1092
|
-
async getAttesters() {
|
|
1342
|
+
async getAttesters(timestamp) {
|
|
1093
1343
|
const attesterSize = await this.getActiveAttesterCount();
|
|
1094
1344
|
const gse = new GSEContract(this.client, await this.getGSE());
|
|
1095
|
-
const ts = (await this.client.getBlock()).timestamp;
|
|
1345
|
+
const ts = timestamp ?? (await this.client.getBlock()).timestamp;
|
|
1096
1346
|
const indices = Array.from({
|
|
1097
1347
|
length: attesterSize
|
|
1098
1348
|
}, (_, i)=>BigInt(i));
|
|
@@ -1198,7 +1448,8 @@ export class RollupContract {
|
|
|
1198
1448
|
const args = log.args;
|
|
1199
1449
|
if (args.checkpointNumber !== undefined) {
|
|
1200
1450
|
callback({
|
|
1201
|
-
checkpointNumber: CheckpointNumber.fromBigInt(args.checkpointNumber)
|
|
1451
|
+
checkpointNumber: CheckpointNumber.fromBigInt(args.checkpointNumber),
|
|
1452
|
+
event: log
|
|
1202
1453
|
});
|
|
1203
1454
|
}
|
|
1204
1455
|
}
|
|
@@ -1229,6 +1480,18 @@ export class RollupContract {
|
|
|
1229
1480
|
}
|
|
1230
1481
|
});
|
|
1231
1482
|
}
|
|
1483
|
+
/**
|
|
1484
|
+
* Fetches OwnershipTransferred events emitted on the L1 block this rollup was deployed on.
|
|
1485
|
+
* The Rollup inherits from Ownable and emits this event in its constructor, so the event
|
|
1486
|
+
* is guaranteed to exist on `l1StartBlock` for any correctly deployed rollup. Used as a
|
|
1487
|
+
* probe to detect RPC nodes that prune historical logs.
|
|
1488
|
+
*/ async getOwnershipTransferredEventsAtDeploy() {
|
|
1489
|
+
const l1StartBlock = await this.getL1StartBlock();
|
|
1490
|
+
return await this.rollup.getEvents.OwnershipTransferred({}, {
|
|
1491
|
+
fromBlock: l1StartBlock,
|
|
1492
|
+
toBlock: l1StartBlock
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1232
1495
|
/** Fetches CheckpointProposed events within the given block range. */ async getCheckpointProposedEvents(fromBlock, toBlock) {
|
|
1233
1496
|
const logs = await this.rollup.getEvents.CheckpointProposed({}, {
|
|
1234
1497
|
fromBlock,
|
|
@@ -1257,4 +1520,43 @@ export class RollupContract {
|
|
|
1257
1520
|
}
|
|
1258
1521
|
}));
|
|
1259
1522
|
}
|
|
1523
|
+
/** Packs pending and proven checkpoint numbers into the chain tips storage format. */ static packChainTips(pendingCheckpointNumber, provenCheckpointNumber) {
|
|
1524
|
+
return pendingCheckpointNumber << 128n | provenCheckpointNumber & (1n << 128n) - 1n;
|
|
1525
|
+
}
|
|
1526
|
+
/** Storage slot for the chain tips (offset 0 within the STF storage struct). */ static get chainTipsStorageSlot() {
|
|
1527
|
+
return BigInt(RollupContract.stfStorageSlot);
|
|
1528
|
+
}
|
|
1529
|
+
/**
|
|
1530
|
+
* Computes the storage slot for a field within a tempCheckpointLog entry.
|
|
1531
|
+
* @param checkpointNumber - The checkpoint number
|
|
1532
|
+
* @param field - The field within the CompressedTempCheckpointLog struct
|
|
1533
|
+
*/ async getTempCheckpointLogStorageSlot(checkpointNumber, field) {
|
|
1534
|
+
const [epochDuration, proofSubmissionEpochs] = await Promise.all([
|
|
1535
|
+
this.getEpochDuration(),
|
|
1536
|
+
this.getProofSubmissionEpochs()
|
|
1537
|
+
]);
|
|
1538
|
+
return this.computeTempCheckpointLogStorageSlot(checkpointNumber, field, {
|
|
1539
|
+
epochDuration,
|
|
1540
|
+
proofSubmissionEpochs
|
|
1541
|
+
});
|
|
1542
|
+
}
|
|
1543
|
+
computeTempCheckpointLogStorageSlot(checkpointNumber, field, constants) {
|
|
1544
|
+
const fieldOffset = BigInt(field);
|
|
1545
|
+
const { epochDuration, proofSubmissionEpochs } = constants;
|
|
1546
|
+
const roundaboutSize = BigInt(epochDuration) * (BigInt(proofSubmissionEpochs) + 1n) + 1n;
|
|
1547
|
+
const tempCheckpointLogsBase = BigInt(RollupContract.stfStorageSlot) + 2n;
|
|
1548
|
+
const circularIndex = BigInt(checkpointNumber) % roundaboutSize;
|
|
1549
|
+
const entryBase = BigInt(keccak256(encodeAbiParameters([
|
|
1550
|
+
{
|
|
1551
|
+
type: 'uint256'
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
type: 'uint256'
|
|
1555
|
+
}
|
|
1556
|
+
], [
|
|
1557
|
+
circularIndex,
|
|
1558
|
+
tempCheckpointLogsBase
|
|
1559
|
+
])));
|
|
1560
|
+
return entryBase + fieldOffset;
|
|
1561
|
+
}
|
|
1260
1562
|
}
|
|
@@ -5,13 +5,12 @@ import { Buffer32 } from '@aztec/foundation/buffer';
|
|
|
5
5
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
6
6
|
import { type Hex, type Log, type TypedDataDefinition } from 'viem';
|
|
7
7
|
/**
|
|
8
|
-
* Wrapper around the
|
|
8
|
+
* Wrapper around the SlashingProposer contract that provides
|
|
9
9
|
* a TypeScript interface for interacting with the consensus-based slashing system.
|
|
10
10
|
*/
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class SlashingProposerContract {
|
|
12
12
|
readonly client: ViemClient;
|
|
13
13
|
private readonly contract;
|
|
14
|
-
readonly type: "tally";
|
|
15
14
|
constructor(client: ViemClient, address: Hex | EthAddress);
|
|
16
15
|
get address(): EthAddress;
|
|
17
16
|
getQuorumSize(): Promise<bigint>;
|
|
@@ -137,4 +136,4 @@ export declare class TallySlashingProposerContract {
|
|
|
137
136
|
* @returns An array of numbers representing the slash votes
|
|
138
137
|
*/
|
|
139
138
|
export declare function decodeSlashConsensusVotes(buffer: Buffer): number[];
|
|
140
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
139
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xhc2hpbmdfcHJvcG9zZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdHMvc2xhc2hpbmdfcHJvcG9zZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDL0QsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFeEQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQzdELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUNwRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFNM0QsT0FBTyxFQUVMLEtBQUssR0FBRyxFQUNSLEtBQUssR0FBRyxFQUNSLEtBQUssbUJBQW1CLEVBR3pCLE1BQU0sTUFBTSxDQUFDO0FBRWQ7OztHQUdHO0FBQ0gscUJBQWEsd0JBQXdCO2FBSWpCLE1BQU0sRUFBR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