@aztec/ethereum 0.0.1-commit.7b97ef96e → 0.0.1-commit.7cbc774
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 +16 -2
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +27 -7
- package/dest/config.d.ts +8 -6
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +11 -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 +21 -4
- package/dest/contracts/outbox.d.ts.map +1 -1
- package/dest/contracts/outbox.js +29 -6
- package/dest/contracts/registry.d.ts +3 -1
- package/dest/contracts/registry.d.ts.map +1 -1
- package/dest/contracts/registry.js +30 -1
- package/dest/contracts/rollup.d.ts +5258 -29
- package/dest/contracts/rollup.d.ts.map +1 -1
- package/dest/contracts/rollup.js +362 -69
- 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 +2 -2
- package/dest/generated/l1-contracts-defaults.js +2 -2
- 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 +12 -3
- package/dest/l1_tx_utils/l1_tx_utils.d.ts.map +1 -1
- package/dest/l1_tx_utils/l1_tx_utils.js +61 -60
- 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 +8 -4
- 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 +23 -3
- package/dest/test/start_anvil.d.ts.map +1 -1
- package/dest/test/start_anvil.js +143 -29
- package/dest/utils.d.ts +8 -1
- package/dest/utils.d.ts.map +1 -1
- package/dest/utils.js +35 -12
- package/package.json +6 -8
- package/src/client.ts +28 -2
- package/src/config.ts +21 -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 +38 -8
- package/src/contracts/registry.ts +31 -1
- package/src/contracts/rollup.ts +411 -79
- 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 +2 -2
- 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 +58 -42
- package/src/l1_tx_utils/readonly_l1_tx_utils.ts +8 -4
- 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 +177 -29
- package/src/utils.ts +35 -14
- 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,19 @@ 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';
|
|
380
381
|
import { EscapeHatchAbi } from '@aztec/l1-artifacts/EscapeHatchAbi';
|
|
381
382
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
382
383
|
import { RollupStorage } from '@aztec/l1-artifacts/RollupStorage';
|
|
383
384
|
import chunk from 'lodash.chunk';
|
|
384
|
-
import { encodeFunctionData, getContract, hexToBigInt, keccak256 } from 'viem';
|
|
385
|
+
import { encodeAbiParameters, encodeFunctionData, getContract, hexToBigInt, keccak256 } from 'viem';
|
|
385
386
|
import { getPublicClient } from '../client.js';
|
|
386
387
|
import { formatViemError } from '../utils.js';
|
|
387
|
-
import { EmpireSlashingProposerContract } from './empire_slashing_proposer.js';
|
|
388
388
|
import { GSEContract } from './gse.js';
|
|
389
389
|
import { SlasherContract } from './slasher_contract.js';
|
|
390
|
-
import {
|
|
390
|
+
import { SlashingProposerContract } from './slashing_proposer.js';
|
|
391
391
|
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
392
|
/**
|
|
399
393
|
* Status of a validator/attester in the staking system.
|
|
400
394
|
* Matches the Status enum in StakingLib.sol
|
|
@@ -405,6 +399,16 @@ export var SlashingProposerType = /*#__PURE__*/ function(SlashingProposerType) {
|
|
|
405
399
|
AttesterStatus[AttesterStatus["EXITING"] = 3] = "EXITING";
|
|
406
400
|
return AttesterStatus;
|
|
407
401
|
}({});
|
|
402
|
+
/** Field offsets within the CompressedTempCheckpointLog struct in Solidity storage. */ export var TempCheckpointLogField = /*#__PURE__*/ function(TempCheckpointLogField) {
|
|
403
|
+
TempCheckpointLogField[TempCheckpointLogField["HeaderHash"] = 0] = "HeaderHash";
|
|
404
|
+
TempCheckpointLogField[TempCheckpointLogField["BlobCommitmentsHash"] = 1] = "BlobCommitmentsHash";
|
|
405
|
+
TempCheckpointLogField[TempCheckpointLogField["OutHash"] = 2] = "OutHash";
|
|
406
|
+
TempCheckpointLogField[TempCheckpointLogField["AttestationsHash"] = 3] = "AttestationsHash";
|
|
407
|
+
TempCheckpointLogField[TempCheckpointLogField["PayloadDigest"] = 4] = "PayloadDigest";
|
|
408
|
+
TempCheckpointLogField[TempCheckpointLogField["SlotNumber"] = 5] = "SlotNumber";
|
|
409
|
+
TempCheckpointLogField[TempCheckpointLogField["FeeHeader"] = 6] = "FeeHeader";
|
|
410
|
+
return TempCheckpointLogField;
|
|
411
|
+
}({});
|
|
408
412
|
export class RollupContract {
|
|
409
413
|
client;
|
|
410
414
|
static{
|
|
@@ -499,6 +503,16 @@ export class RollupContract {
|
|
|
499
503
|
2,
|
|
500
504
|
"getGenesisArchiveTreeRoot"
|
|
501
505
|
],
|
|
506
|
+
[
|
|
507
|
+
memoize,
|
|
508
|
+
2,
|
|
509
|
+
"getVkTreeRoot"
|
|
510
|
+
],
|
|
511
|
+
[
|
|
512
|
+
memoize,
|
|
513
|
+
2,
|
|
514
|
+
"getProtocolContractsHash"
|
|
515
|
+
],
|
|
502
516
|
[
|
|
503
517
|
memoize,
|
|
504
518
|
2,
|
|
@@ -507,6 +521,7 @@ export class RollupContract {
|
|
|
507
521
|
], []));
|
|
508
522
|
}
|
|
509
523
|
rollup;
|
|
524
|
+
logger;
|
|
510
525
|
static cachedStfStorageSlot;
|
|
511
526
|
cachedEscapeHatch;
|
|
512
527
|
static get checkBlobStorageSlot() {
|
|
@@ -525,12 +540,12 @@ export class RollupContract {
|
|
|
525
540
|
}
|
|
526
541
|
static getFromConfig(config) {
|
|
527
542
|
const client = getPublicClient(config);
|
|
528
|
-
const address = config.
|
|
543
|
+
const address = config.rollupAddress.toString();
|
|
529
544
|
return new RollupContract(client, address);
|
|
530
545
|
}
|
|
531
546
|
constructor(client, address){
|
|
532
547
|
this.client = client;
|
|
533
|
-
_initProto(this);
|
|
548
|
+
this.logger = (_initProto(this), createLogger('ethereum:rollup'));
|
|
534
549
|
if (address instanceof EthAddress) {
|
|
535
550
|
address = address.toString();
|
|
536
551
|
}
|
|
@@ -555,34 +570,10 @@ export class RollupContract {
|
|
|
555
570
|
return undefined;
|
|
556
571
|
}
|
|
557
572
|
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}`);
|
|
573
|
+
if (proposerAddress.isZero()) {
|
|
574
|
+
return undefined;
|
|
585
575
|
}
|
|
576
|
+
return new SlashingProposerContract(this.client, proposerAddress);
|
|
586
577
|
}
|
|
587
578
|
getL1StartBlock() {
|
|
588
579
|
return this.rollup.read.L1_BLOCK_AT_GENESIS();
|
|
@@ -640,18 +631,35 @@ export class RollupContract {
|
|
|
640
631
|
0n
|
|
641
632
|
]));
|
|
642
633
|
}
|
|
634
|
+
async getVkTreeRoot() {
|
|
635
|
+
const slot = BigInt(RollupContract.stfStorageSlot) + 3n;
|
|
636
|
+
const value = await this.client.getStorageAt({
|
|
637
|
+
address: this.address,
|
|
638
|
+
slot: `0x${slot.toString(16)}`
|
|
639
|
+
});
|
|
640
|
+
return Fr.fromString(value ?? '0x0');
|
|
641
|
+
}
|
|
642
|
+
async getProtocolContractsHash() {
|
|
643
|
+
const slot = BigInt(RollupContract.stfStorageSlot) + 4n;
|
|
644
|
+
const value = await this.client.getStorageAt({
|
|
645
|
+
address: this.address,
|
|
646
|
+
slot: `0x${slot.toString(16)}`
|
|
647
|
+
});
|
|
648
|
+
return Fr.fromString(value ?? '0x0');
|
|
649
|
+
}
|
|
643
650
|
/**
|
|
644
651
|
* Returns rollup constants used for epoch queries.
|
|
645
652
|
* Return type is `L1RollupConstants` which is defined in stdlib,
|
|
646
653
|
* so we cant reference it until we move this contract to that package.
|
|
647
654
|
*/ async getRollupConstants() {
|
|
648
|
-
const [l1StartBlock, l1GenesisTime, slotDuration, epochDuration, proofSubmissionEpochs, targetCommitteeSize] = await Promise.all([
|
|
655
|
+
const [l1StartBlock, l1GenesisTime, slotDuration, epochDuration, proofSubmissionEpochs, targetCommitteeSize, rollupManaLimit] = await Promise.all([
|
|
649
656
|
this.getL1StartBlock(),
|
|
650
657
|
this.getL1GenesisTime(),
|
|
651
658
|
this.getSlotDuration(),
|
|
652
659
|
this.getEpochDuration(),
|
|
653
660
|
this.getProofSubmissionEpochs(),
|
|
654
|
-
this.getTargetCommitteeSize()
|
|
661
|
+
this.getTargetCommitteeSize(),
|
|
662
|
+
this.getManaLimit()
|
|
655
663
|
]);
|
|
656
664
|
return {
|
|
657
665
|
l1StartBlock,
|
|
@@ -659,7 +667,8 @@ export class RollupContract {
|
|
|
659
667
|
slotDuration,
|
|
660
668
|
epochDuration: Number(epochDuration),
|
|
661
669
|
proofSubmissionEpochs: Number(proofSubmissionEpochs),
|
|
662
|
-
targetCommitteeSize
|
|
670
|
+
targetCommitteeSize,
|
|
671
|
+
rollupManaLimit: Number(rollupManaLimit)
|
|
663
672
|
};
|
|
664
673
|
}
|
|
665
674
|
async getSlasherAddress() {
|
|
@@ -705,7 +714,11 @@ export class RollupContract {
|
|
|
705
714
|
BigInt(epoch)
|
|
706
715
|
]);
|
|
707
716
|
return isOpen;
|
|
708
|
-
} catch
|
|
717
|
+
} catch (err) {
|
|
718
|
+
this.logger.warn('isEscapeHatchOpen failed (treating as closed); RPC or contract error may cause liveness risk', {
|
|
719
|
+
epoch: Number(epoch),
|
|
720
|
+
error: err
|
|
721
|
+
});
|
|
709
722
|
return false;
|
|
710
723
|
}
|
|
711
724
|
}
|
|
@@ -734,24 +747,40 @@ export class RollupContract {
|
|
|
734
747
|
getCheckpointReward() {
|
|
735
748
|
return this.rollup.read.getCheckpointReward();
|
|
736
749
|
}
|
|
737
|
-
async getCheckpointNumber() {
|
|
738
|
-
|
|
750
|
+
async getCheckpointNumber(options) {
|
|
751
|
+
await checkBlockTag(options?.blockNumber, this.client);
|
|
752
|
+
return CheckpointNumber.fromBigInt(await this.rollup.read.getPendingCheckpointNumber(options));
|
|
739
753
|
}
|
|
740
|
-
async getProvenCheckpointNumber() {
|
|
741
|
-
|
|
754
|
+
async getProvenCheckpointNumber(options) {
|
|
755
|
+
await checkBlockTag(options?.blockNumber, this.client);
|
|
756
|
+
return CheckpointNumber.fromBigInt(await this.rollup.read.getProvenCheckpointNumber(options));
|
|
742
757
|
}
|
|
743
|
-
async getSlotNumber() {
|
|
744
|
-
|
|
758
|
+
async getSlotNumber(options) {
|
|
759
|
+
await checkBlockTag(options?.blockNumber, this.client);
|
|
760
|
+
return SlotNumber.fromBigInt(await this.rollup.read.getCurrentSlot(options));
|
|
745
761
|
}
|
|
746
|
-
async getL1FeesAt(timestamp) {
|
|
762
|
+
async getL1FeesAt(timestamp, options) {
|
|
763
|
+
await checkBlockTag(options?.blockNumber, this.client);
|
|
747
764
|
const result = await this.rollup.read.getL1FeesAt([
|
|
748
765
|
timestamp
|
|
749
|
-
]);
|
|
766
|
+
], options);
|
|
750
767
|
return {
|
|
751
768
|
baseFee: result.baseFee,
|
|
752
769
|
blobFee: result.blobFee
|
|
753
770
|
};
|
|
754
771
|
}
|
|
772
|
+
async getFeeHeader(checkpointNumber) {
|
|
773
|
+
const result = await this.rollup.read.getFeeHeader([
|
|
774
|
+
checkpointNumber
|
|
775
|
+
]);
|
|
776
|
+
return {
|
|
777
|
+
excessMana: result.excessMana,
|
|
778
|
+
manaUsed: result.manaUsed,
|
|
779
|
+
ethPerFeeAsset: result.ethPerFeeAsset,
|
|
780
|
+
congestionCost: result.congestionCost,
|
|
781
|
+
proverCost: result.proverCost
|
|
782
|
+
};
|
|
783
|
+
}
|
|
755
784
|
getEthPerFeeAsset() {
|
|
756
785
|
return this.rollup.read.getEthPerFeeAsset();
|
|
757
786
|
}
|
|
@@ -820,10 +849,11 @@ export class RollupContract {
|
|
|
820
849
|
});
|
|
821
850
|
return EthAddress.fromString(result);
|
|
822
851
|
}
|
|
823
|
-
async getCheckpoint(checkpointNumber) {
|
|
852
|
+
async getCheckpoint(checkpointNumber, options) {
|
|
853
|
+
await checkBlockTag(options?.blockNumber, this.client);
|
|
824
854
|
const result = await this.rollup.read.getCheckpoint([
|
|
825
855
|
BigInt(checkpointNumber)
|
|
826
|
-
]);
|
|
856
|
+
], options);
|
|
827
857
|
return {
|
|
828
858
|
archive: Fr.fromString(result.archive),
|
|
829
859
|
headerHash: Buffer32.fromString(result.headerHash),
|
|
@@ -853,6 +883,28 @@ export class RollupContract {
|
|
|
853
883
|
0.5
|
|
854
884
|
]));
|
|
855
885
|
}
|
|
886
|
+
/**
|
|
887
|
+
* Returns the effective pending checkpoint, accounting for potential prunes.
|
|
888
|
+
* When a prune can happen, the L1 contract uses the proven checkpoint instead of the pending one.
|
|
889
|
+
* This mirrors the behavior of getEffectivePendingCheckpointNumber in STFLib.sol.
|
|
890
|
+
* @param atTimestamp - The timestamp to evaluate pruneability at. Defaults to the current L1 block timestamp.
|
|
891
|
+
* @param options - Optional L1 block number to pin the queries to.
|
|
892
|
+
*/ getEffectivePendingCheckpoint(atTimestamp, options) {
|
|
893
|
+
return retry(async ()=>{
|
|
894
|
+
const timestamp = atTimestamp ?? (await this.client.getBlock()).timestamp;
|
|
895
|
+
const canPrune = await this.canPruneAtTime(timestamp, options);
|
|
896
|
+
if (canPrune) {
|
|
897
|
+
const provenCheckpointNumber = await this.getProvenCheckpointNumber(options);
|
|
898
|
+
return await this.getCheckpoint(provenCheckpointNumber, options);
|
|
899
|
+
}
|
|
900
|
+
const pendingCheckpointNumber = await this.getCheckpointNumber(options);
|
|
901
|
+
return await this.getCheckpoint(pendingCheckpointNumber, options);
|
|
902
|
+
}, 'getting effective pending checkpoint', makeBackoff([
|
|
903
|
+
0.5,
|
|
904
|
+
0.5,
|
|
905
|
+
0.5
|
|
906
|
+
]));
|
|
907
|
+
}
|
|
856
908
|
async getTips() {
|
|
857
909
|
const { pending, proven } = await this.rollup.read.getTips();
|
|
858
910
|
return {
|
|
@@ -937,9 +989,8 @@ export class RollupContract {
|
|
|
937
989
|
* @return [slot, checkpointNumber, timeOfNextL1Slot] - If you can propose, the L2 slot number, checkpoint number and
|
|
938
990
|
* timestamp of the next L1 block
|
|
939
991
|
* @throws otherwise
|
|
940
|
-
*/ async
|
|
941
|
-
const
|
|
942
|
-
const timeOfNextL1Slot = latestBlock.timestamp + BigInt(slotDuration);
|
|
992
|
+
*/ async canProposeAt(archive, account, timestamp, stateOverride = []) {
|
|
993
|
+
const timeOfNextL1Slot = timestamp;
|
|
943
994
|
const who = typeof account === 'string' ? account : account.address;
|
|
944
995
|
try {
|
|
945
996
|
const { result: [slot, checkpointNumber] } = await this.client.simulateContract({
|
|
@@ -952,7 +1003,7 @@ export class RollupContract {
|
|
|
952
1003
|
who
|
|
953
1004
|
],
|
|
954
1005
|
account,
|
|
955
|
-
stateOverride
|
|
1006
|
+
stateOverride
|
|
956
1007
|
});
|
|
957
1008
|
return {
|
|
958
1009
|
slot: SlotNumber.fromBigInt(slot),
|
|
@@ -964,11 +1015,15 @@ export class RollupContract {
|
|
|
964
1015
|
}
|
|
965
1016
|
}
|
|
966
1017
|
/**
|
|
967
|
-
* Returns a state override that sets the pending
|
|
968
|
-
*
|
|
969
|
-
*
|
|
970
|
-
|
|
971
|
-
|
|
1018
|
+
* Returns a state override that sets the pending and/or proven checkpoint numbers. Useful for simulations.
|
|
1019
|
+
* Both values share a single storage slot (pending in the upper 128 bits, proven in the lower 128 bits), so
|
|
1020
|
+
* a single combined override is emitted to avoid the second state-diff clobbering the first. The current live
|
|
1021
|
+
* value is read once to preserve any half not being overridden. Returns an empty override if neither is set.
|
|
1022
|
+
*
|
|
1023
|
+
* Throws if the resulting `proven > pending`, which would crash the simulation: `STFLib.canPruneAtTime` calls
|
|
1024
|
+
* `getEpochForCheckpoint(proven + 1)` whenever `pending != proven`, and that asserts `_n <= tips.pending`.
|
|
1025
|
+
*/ async makeChainTipsOverride(override) {
|
|
1026
|
+
if (override.pending === undefined && override.proven === undefined) {
|
|
972
1027
|
return [];
|
|
973
1028
|
}
|
|
974
1029
|
const slot = RollupContract.stfStorageSlot;
|
|
@@ -976,8 +1031,15 @@ export class RollupContract {
|
|
|
976
1031
|
address: this.address,
|
|
977
1032
|
slot
|
|
978
1033
|
});
|
|
979
|
-
const
|
|
980
|
-
const
|
|
1034
|
+
const currentRaw = currentValue ? hexToBigInt(currentValue) : 0n;
|
|
1035
|
+
const currentPending = currentRaw >> 128n;
|
|
1036
|
+
const currentProven = currentRaw & (1n << 128n) - 1n;
|
|
1037
|
+
const newPending = override.pending !== undefined ? BigInt(override.pending) : currentPending;
|
|
1038
|
+
const newProven = override.proven !== undefined ? BigInt(override.proven) : currentProven;
|
|
1039
|
+
if (newProven > newPending) {
|
|
1040
|
+
throw new Error(`Invalid chain tips override: proven (${newProven}) > pending (${newPending})`);
|
|
1041
|
+
}
|
|
1042
|
+
const newValue = newPending << 128n | newProven;
|
|
981
1043
|
return [
|
|
982
1044
|
{
|
|
983
1045
|
address: this.address,
|
|
@@ -990,6 +1052,161 @@ export class RollupContract {
|
|
|
990
1052
|
}
|
|
991
1053
|
];
|
|
992
1054
|
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Returns a state override that patches `tempCheckpointLogs[checkpointNumber]` with every field that
|
|
1057
|
+
* the L1 contract reads during `propose()` for the checkpoint that builds on top of it (proposer
|
|
1058
|
+
* pipelining simulation). Mirrors the writes done by `ProposeLib.addTempCheckpointLog`.
|
|
1059
|
+
*
|
|
1060
|
+
* `blobCommitmentsHash` and `attestationsHash` are intentionally not exposed here — the propose path
|
|
1061
|
+
* never asserts against them, so leaving them at storage zero is harmless.
|
|
1062
|
+
*/ async makeTempCheckpointLogOverride(checkpointNumber, fields) {
|
|
1063
|
+
const constants = await this.getRollupConstants();
|
|
1064
|
+
const slotAt = (field)=>`0x${this.computeTempCheckpointLogStorageSlot(checkpointNumber, field, constants).toString(16).padStart(64, '0')}`;
|
|
1065
|
+
const word = (v)=>`0x${v.toString(16).padStart(64, '0')}`;
|
|
1066
|
+
const stateDiff = [];
|
|
1067
|
+
if (fields.headerHash) {
|
|
1068
|
+
stateDiff.push({
|
|
1069
|
+
slot: slotAt(0),
|
|
1070
|
+
value: fields.headerHash.toString()
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
if (fields.outHash) {
|
|
1074
|
+
stateDiff.push({
|
|
1075
|
+
slot: slotAt(2),
|
|
1076
|
+
value: fields.outHash.toString()
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
1079
|
+
if (fields.payloadDigest) {
|
|
1080
|
+
stateDiff.push({
|
|
1081
|
+
slot: slotAt(4),
|
|
1082
|
+
value: fields.payloadDigest.toString()
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
if (fields.slotNumber !== undefined) {
|
|
1086
|
+
// CompressedSlot is uint32 on L1 (SafeCast.toUint32 reverts on overflow). Match that behavior here
|
|
1087
|
+
// so a malformed override surfaces immediately rather than silently truncating into a wrong slot.
|
|
1088
|
+
const slotNumber = BigInt(fields.slotNumber);
|
|
1089
|
+
if (slotNumber < 0n || slotNumber > 0xffffffffn) {
|
|
1090
|
+
throw new Error(`slotNumber ${slotNumber} does not fit in uint32`);
|
|
1091
|
+
}
|
|
1092
|
+
stateDiff.push({
|
|
1093
|
+
slot: slotAt(5),
|
|
1094
|
+
value: word(slotNumber)
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
if (fields.feeHeader) {
|
|
1098
|
+
stateDiff.push({
|
|
1099
|
+
slot: slotAt(6),
|
|
1100
|
+
value: word(RollupContract.compressFeeHeader(fields.feeHeader))
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1103
|
+
if (stateDiff.length === 0) {
|
|
1104
|
+
return [];
|
|
1105
|
+
}
|
|
1106
|
+
return [
|
|
1107
|
+
{
|
|
1108
|
+
address: this.address,
|
|
1109
|
+
stateDiff
|
|
1110
|
+
}
|
|
1111
|
+
];
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* Returns a state override that sets archives[checkpointNumber] to the given archive value.
|
|
1115
|
+
* Used when simulating a canProposeAtTime call where the local archive differs from L1
|
|
1116
|
+
* (e.g. pipelining where the parent checkpoint hasn't landed on L1 yet).
|
|
1117
|
+
*/ makeArchiveOverride(checkpointNumber, archive) {
|
|
1118
|
+
const archivesMappingBase = hexToBigInt(RollupContract.stfStorageSlot) + 1n;
|
|
1119
|
+
const archiveSlot = hexToBigInt(keccak256(encodeAbiParameters([
|
|
1120
|
+
{
|
|
1121
|
+
type: 'uint256'
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
type: 'uint256'
|
|
1125
|
+
}
|
|
1126
|
+
], [
|
|
1127
|
+
BigInt(checkpointNumber),
|
|
1128
|
+
archivesMappingBase
|
|
1129
|
+
])));
|
|
1130
|
+
return [
|
|
1131
|
+
{
|
|
1132
|
+
address: this.address,
|
|
1133
|
+
stateDiff: [
|
|
1134
|
+
{
|
|
1135
|
+
slot: `0x${archiveSlot.toString(16).padStart(64, '0')}`,
|
|
1136
|
+
value: archive.toString()
|
|
1137
|
+
}
|
|
1138
|
+
]
|
|
1139
|
+
}
|
|
1140
|
+
];
|
|
1141
|
+
}
|
|
1142
|
+
/** Merges multiple StateOverride arrays, combining stateDiff entries for the same address. */ static mergeStateOverrides(...overrides) {
|
|
1143
|
+
const byAddress = new Map();
|
|
1144
|
+
for (const override of overrides){
|
|
1145
|
+
for (const entry of override){
|
|
1146
|
+
const key = entry.address.toLowerCase();
|
|
1147
|
+
const existing = byAddress.get(key);
|
|
1148
|
+
if (existing) {
|
|
1149
|
+
existing.stateDiff.push(...entry.stateDiff ?? []);
|
|
1150
|
+
if (entry.balance !== undefined) {
|
|
1151
|
+
existing.balance = entry.balance;
|
|
1152
|
+
}
|
|
1153
|
+
} else {
|
|
1154
|
+
byAddress.set(key, {
|
|
1155
|
+
address: entry.address,
|
|
1156
|
+
balance: entry.balance,
|
|
1157
|
+
stateDiff: [
|
|
1158
|
+
...entry.stateDiff ?? []
|
|
1159
|
+
]
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
return [
|
|
1165
|
+
...byAddress.values()
|
|
1166
|
+
];
|
|
1167
|
+
}
|
|
1168
|
+
/** Compresses a FeeHeader into a uint256 matching FeeHeaderLib.compress() in FeeStructs.sol. */ static compressFeeHeader(feeHeader) {
|
|
1169
|
+
const MASK_48_BITS = (1n << 48n) - 1n;
|
|
1170
|
+
const MASK_64_BITS = (1n << 64n) - 1n;
|
|
1171
|
+
const MASK_63_BITS = (1n << 63n) - 1n;
|
|
1172
|
+
let value = BigInt(feeHeader.manaUsed) & (1n << 32n) - 1n; // bits [0:31]
|
|
1173
|
+
value |= (feeHeader.excessMana < MASK_48_BITS ? feeHeader.excessMana : MASK_48_BITS) << 32n; // bits [32:79]
|
|
1174
|
+
value |= (BigInt(feeHeader.ethPerFeeAsset) & MASK_48_BITS) << 80n; // bits [80:127]
|
|
1175
|
+
value |= (feeHeader.congestionCost < MASK_64_BITS ? feeHeader.congestionCost : MASK_64_BITS) << 128n; // bits [128:191]
|
|
1176
|
+
value |= (feeHeader.proverCost < MASK_63_BITS ? feeHeader.proverCost : MASK_63_BITS) << 192n; // bits [192:254]
|
|
1177
|
+
value |= 1n << 255n; // preheat flag
|
|
1178
|
+
return value;
|
|
1179
|
+
}
|
|
1180
|
+
/** Computes the fee header for a child checkpoint given parent fee header and child data.
|
|
1181
|
+
* Must stay in sync with Solidity FeeLib.sol (computeNewEthPerFeeAsset, clampedAdd). */ static computeChildFeeHeader(parentFeeHeader, childManaUsed, feeAssetPriceModifier, manaTarget) {
|
|
1182
|
+
const MIN_ETH_PER_FEE_ASSET = 100n;
|
|
1183
|
+
const MAX_ETH_PER_FEE_ASSET = 100_000_000_000_000n; // 1e14, matches FeeLib.sol
|
|
1184
|
+
// excessMana = clampedAdd(parent.excessMana + parent.manaUsed, -manaTarget)
|
|
1185
|
+
const sum = parentFeeHeader.excessMana + parentFeeHeader.manaUsed;
|
|
1186
|
+
const excessMana = sum > manaTarget ? sum - manaTarget : 0n;
|
|
1187
|
+
// ethPerFeeAsset = computeNewEthPerFeeAsset(max(parent.ethPerFeeAsset, MIN), modifier)
|
|
1188
|
+
const parentPrice = parentFeeHeader.ethPerFeeAsset > MIN_ETH_PER_FEE_ASSET ? parentFeeHeader.ethPerFeeAsset : MIN_ETH_PER_FEE_ASSET;
|
|
1189
|
+
let newPrice;
|
|
1190
|
+
if (feeAssetPriceModifier >= 0n) {
|
|
1191
|
+
newPrice = parentPrice * (10_000n + feeAssetPriceModifier) / 10_000n;
|
|
1192
|
+
} else {
|
|
1193
|
+
const absMod = -feeAssetPriceModifier;
|
|
1194
|
+
newPrice = parentPrice * (10_000n - absMod) / 10_000n;
|
|
1195
|
+
}
|
|
1196
|
+
if (newPrice < MIN_ETH_PER_FEE_ASSET) {
|
|
1197
|
+
newPrice = MIN_ETH_PER_FEE_ASSET;
|
|
1198
|
+
}
|
|
1199
|
+
if (newPrice > MAX_ETH_PER_FEE_ASSET) {
|
|
1200
|
+
newPrice = MAX_ETH_PER_FEE_ASSET;
|
|
1201
|
+
}
|
|
1202
|
+
return {
|
|
1203
|
+
excessMana,
|
|
1204
|
+
manaUsed: childManaUsed,
|
|
1205
|
+
ethPerFeeAsset: newPrice,
|
|
1206
|
+
congestionCost: 0n,
|
|
1207
|
+
proverCost: 0n
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
993
1210
|
/** Creates a request to Rollup#invalidateBadAttestation to be simulated or sent */ buildInvalidateBadAttestationRequest(checkpointNumber, attestationsAndSigners, committee, invalidIndex) {
|
|
994
1211
|
return {
|
|
995
1212
|
to: this.address,
|
|
@@ -1031,11 +1248,25 @@ export class RollupContract {
|
|
|
1031
1248
|
prover
|
|
1032
1249
|
]);
|
|
1033
1250
|
}
|
|
1034
|
-
getManaMinFeeAt(timestamp, inFeeAsset) {
|
|
1251
|
+
getManaMinFeeAt(timestamp, inFeeAsset, stateOverride) {
|
|
1035
1252
|
return this.rollup.read.getManaMinFeeAt([
|
|
1036
1253
|
timestamp,
|
|
1037
1254
|
inFeeAsset
|
|
1255
|
+
], {
|
|
1256
|
+
stateOverride
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
async getManaMinFeeComponentsAt(timestamp, inFeeAsset) {
|
|
1260
|
+
const result = await this.rollup.read.getManaMinFeeComponentsAt([
|
|
1261
|
+
timestamp,
|
|
1262
|
+
inFeeAsset
|
|
1038
1263
|
]);
|
|
1264
|
+
return {
|
|
1265
|
+
sequencerCost: result.sequencerCost,
|
|
1266
|
+
proverCost: result.proverCost,
|
|
1267
|
+
congestionCost: result.congestionCost,
|
|
1268
|
+
congestionMultiplier: result.congestionMultiplier
|
|
1269
|
+
};
|
|
1039
1270
|
}
|
|
1040
1271
|
async getSlotAt(timestamp) {
|
|
1041
1272
|
return SlotNumber.fromBigInt(await this.rollup.read.getSlotAt([
|
|
@@ -1086,10 +1317,10 @@ export class RollupContract {
|
|
|
1086
1317
|
prover
|
|
1087
1318
|
]);
|
|
1088
1319
|
}
|
|
1089
|
-
async getAttesters() {
|
|
1320
|
+
async getAttesters(timestamp) {
|
|
1090
1321
|
const attesterSize = await this.getActiveAttesterCount();
|
|
1091
1322
|
const gse = new GSEContract(this.client, await this.getGSE());
|
|
1092
|
-
const ts = (await this.client.getBlock()).timestamp;
|
|
1323
|
+
const ts = timestamp ?? (await this.client.getBlock()).timestamp;
|
|
1093
1324
|
const indices = Array.from({
|
|
1094
1325
|
length: attesterSize
|
|
1095
1326
|
}, (_, i)=>BigInt(i));
|
|
@@ -1195,7 +1426,8 @@ export class RollupContract {
|
|
|
1195
1426
|
const args = log.args;
|
|
1196
1427
|
if (args.checkpointNumber !== undefined) {
|
|
1197
1428
|
callback({
|
|
1198
|
-
checkpointNumber: CheckpointNumber.fromBigInt(args.checkpointNumber)
|
|
1429
|
+
checkpointNumber: CheckpointNumber.fromBigInt(args.checkpointNumber),
|
|
1430
|
+
event: log
|
|
1199
1431
|
});
|
|
1200
1432
|
}
|
|
1201
1433
|
}
|
|
@@ -1226,6 +1458,18 @@ export class RollupContract {
|
|
|
1226
1458
|
}
|
|
1227
1459
|
});
|
|
1228
1460
|
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Fetches OwnershipTransferred events emitted on the L1 block this rollup was deployed on.
|
|
1463
|
+
* The Rollup inherits from Ownable and emits this event in its constructor, so the event
|
|
1464
|
+
* is guaranteed to exist on `l1StartBlock` for any correctly deployed rollup. Used as a
|
|
1465
|
+
* probe to detect RPC nodes that prune historical logs.
|
|
1466
|
+
*/ async getOwnershipTransferredEventsAtDeploy() {
|
|
1467
|
+
const l1StartBlock = await this.getL1StartBlock();
|
|
1468
|
+
return await this.rollup.getEvents.OwnershipTransferred({}, {
|
|
1469
|
+
fromBlock: l1StartBlock,
|
|
1470
|
+
toBlock: l1StartBlock
|
|
1471
|
+
});
|
|
1472
|
+
}
|
|
1229
1473
|
/** Fetches CheckpointProposed events within the given block range. */ async getCheckpointProposedEvents(fromBlock, toBlock) {
|
|
1230
1474
|
const logs = await this.rollup.getEvents.CheckpointProposed({}, {
|
|
1231
1475
|
fromBlock,
|
|
@@ -1239,9 +1483,58 @@ export class RollupContract {
|
|
|
1239
1483
|
checkpointNumber: CheckpointNumber.fromBigInt(log.args.checkpointNumber),
|
|
1240
1484
|
archive: Fr.fromString(log.args.archive),
|
|
1241
1485
|
versionedBlobHashes: log.args.versionedBlobHashes.map((h)=>Buffer.from(h.slice(2), 'hex')),
|
|
1242
|
-
attestationsHash:
|
|
1243
|
-
|
|
1486
|
+
attestationsHash: (()=>{
|
|
1487
|
+
if (!log.args.attestationsHash) {
|
|
1488
|
+
throw new Error(`CheckpointProposed event missing attestationsHash for checkpoint ${log.args.checkpointNumber}`);
|
|
1489
|
+
}
|
|
1490
|
+
return Buffer32.fromString(log.args.attestationsHash);
|
|
1491
|
+
})(),
|
|
1492
|
+
payloadDigest: (()=>{
|
|
1493
|
+
if (!log.args.payloadDigest) {
|
|
1494
|
+
throw new Error(`CheckpointProposed event missing payloadDigest for checkpoint ${log.args.checkpointNumber}`);
|
|
1495
|
+
}
|
|
1496
|
+
return Buffer32.fromString(log.args.payloadDigest);
|
|
1497
|
+
})()
|
|
1244
1498
|
}
|
|
1245
1499
|
}));
|
|
1246
1500
|
}
|
|
1501
|
+
/** Packs pending and proven checkpoint numbers into the chain tips storage format. */ static packChainTips(pendingCheckpointNumber, provenCheckpointNumber) {
|
|
1502
|
+
return pendingCheckpointNumber << 128n | provenCheckpointNumber & (1n << 128n) - 1n;
|
|
1503
|
+
}
|
|
1504
|
+
/** Storage slot for the chain tips (offset 0 within the STF storage struct). */ static get chainTipsStorageSlot() {
|
|
1505
|
+
return BigInt(RollupContract.stfStorageSlot);
|
|
1506
|
+
}
|
|
1507
|
+
/**
|
|
1508
|
+
* Computes the storage slot for a field within a tempCheckpointLog entry.
|
|
1509
|
+
* @param checkpointNumber - The checkpoint number
|
|
1510
|
+
* @param field - The field within the CompressedTempCheckpointLog struct
|
|
1511
|
+
*/ async getTempCheckpointLogStorageSlot(checkpointNumber, field) {
|
|
1512
|
+
const [epochDuration, proofSubmissionEpochs] = await Promise.all([
|
|
1513
|
+
this.getEpochDuration(),
|
|
1514
|
+
this.getProofSubmissionEpochs()
|
|
1515
|
+
]);
|
|
1516
|
+
return this.computeTempCheckpointLogStorageSlot(checkpointNumber, field, {
|
|
1517
|
+
epochDuration,
|
|
1518
|
+
proofSubmissionEpochs
|
|
1519
|
+
});
|
|
1520
|
+
}
|
|
1521
|
+
computeTempCheckpointLogStorageSlot(checkpointNumber, field, constants) {
|
|
1522
|
+
const fieldOffset = BigInt(field);
|
|
1523
|
+
const { epochDuration, proofSubmissionEpochs } = constants;
|
|
1524
|
+
const roundaboutSize = BigInt(epochDuration) * (BigInt(proofSubmissionEpochs) + 1n) + 1n;
|
|
1525
|
+
const tempCheckpointLogsBase = BigInt(RollupContract.stfStorageSlot) + 2n;
|
|
1526
|
+
const circularIndex = BigInt(checkpointNumber) % roundaboutSize;
|
|
1527
|
+
const entryBase = BigInt(keccak256(encodeAbiParameters([
|
|
1528
|
+
{
|
|
1529
|
+
type: 'uint256'
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
type: 'uint256'
|
|
1533
|
+
}
|
|
1534
|
+
], [
|
|
1535
|
+
circularIndex,
|
|
1536
|
+
tempCheckpointLogsBase
|
|
1537
|
+
])));
|
|
1538
|
+
return entryBase + fieldOffset;
|
|
1539
|
+
}
|
|
1247
1540
|
}
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xhc2hpbmdfcHJvcG9zZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdHMvc2xhc2hpbmdfcHJvcG9zZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDL0QsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sdUJBQXVCLEN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