@aztec/sequencer-client 0.0.1-commit.d6f2b3f94 → 0.0.1-commit.dbf9cec
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/sequencer-client.d.ts +12 -7
- package/dest/client/sequencer-client.d.ts.map +1 -1
- package/dest/client/sequencer-client.js +15 -4
- package/dest/config.d.ts +3 -3
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +13 -4
- package/dest/global_variable_builder/global_builder.d.ts +2 -4
- package/dest/global_variable_builder/global_builder.d.ts.map +1 -1
- package/dest/publisher/config.d.ts +35 -17
- package/dest/publisher/config.d.ts.map +1 -1
- package/dest/publisher/config.js +106 -42
- package/dest/publisher/index.d.ts +2 -1
- package/dest/publisher/index.d.ts.map +1 -1
- package/dest/publisher/l1_tx_failed_store/factory.d.ts +11 -0
- package/dest/publisher/l1_tx_failed_store/factory.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/factory.js +22 -0
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.d.ts +59 -0
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.js +1 -0
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.d.ts +15 -0
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.js +34 -0
- package/dest/publisher/l1_tx_failed_store/index.d.ts +4 -0
- package/dest/publisher/l1_tx_failed_store/index.d.ts.map +1 -0
- package/dest/publisher/l1_tx_failed_store/index.js +2 -0
- package/dest/publisher/sequencer-publisher-factory.d.ts +11 -3
- package/dest/publisher/sequencer-publisher-factory.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher-factory.js +13 -2
- package/dest/publisher/sequencer-publisher.d.ts +22 -7
- package/dest/publisher/sequencer-publisher.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher.js +258 -29
- package/dest/sequencer/checkpoint_proposal_job.d.ts +1 -1
- package/dest/sequencer/checkpoint_proposal_job.d.ts.map +1 -1
- package/dest/sequencer/checkpoint_proposal_job.js +39 -11
- package/dest/sequencer/metrics.d.ts +17 -5
- package/dest/sequencer/metrics.d.ts.map +1 -1
- package/dest/sequencer/metrics.js +86 -15
- package/dest/sequencer/sequencer.d.ts +15 -7
- package/dest/sequencer/sequencer.d.ts.map +1 -1
- package/dest/sequencer/sequencer.js +23 -25
- package/dest/sequencer/timetable.js +1 -1
- package/dest/test/index.d.ts +3 -5
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/mock_checkpoint_builder.d.ts +5 -3
- package/dest/test/mock_checkpoint_builder.d.ts.map +1 -1
- package/dest/test/mock_checkpoint_builder.js +6 -4
- package/dest/test/utils.d.ts +3 -3
- package/dest/test/utils.d.ts.map +1 -1
- package/dest/test/utils.js +5 -4
- package/package.json +28 -28
- package/src/client/sequencer-client.ts +25 -7
- package/src/config.ts +17 -8
- package/src/global_variable_builder/global_builder.ts +1 -1
- package/src/publisher/config.ts +121 -43
- package/src/publisher/index.ts +3 -0
- package/src/publisher/l1_tx_failed_store/factory.ts +32 -0
- package/src/publisher/l1_tx_failed_store/failed_tx_store.ts +55 -0
- package/src/publisher/l1_tx_failed_store/file_store_failed_tx_store.ts +46 -0
- package/src/publisher/l1_tx_failed_store/index.ts +3 -0
- package/src/publisher/sequencer-publisher-factory.ts +23 -6
- package/src/publisher/sequencer-publisher.ts +241 -36
- package/src/sequencer/checkpoint_proposal_job.ts +59 -10
- package/src/sequencer/metrics.ts +92 -18
- package/src/sequencer/sequencer.ts +31 -30
- package/src/sequencer/timetable.ts +1 -1
- package/src/test/index.ts +2 -4
- package/src/test/mock_checkpoint_builder.ts +12 -1
- package/src/test/utils.ts +5 -2
|
@@ -372,7 +372,7 @@ function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
|
|
|
372
372
|
}
|
|
373
373
|
var _dec, _dec1, _dec2, _initProto;
|
|
374
374
|
import { Blob, getBlobsPerL1Block, getPrefixedEthBlobCommitments } from '@aztec/blob-lib';
|
|
375
|
-
import { MULTI_CALL_3_ADDRESS, Multicall3, RollupContract } from '@aztec/ethereum/contracts';
|
|
375
|
+
import { FeeAssetPriceOracle, MULTI_CALL_3_ADDRESS, Multicall3, RollupContract } from '@aztec/ethereum/contracts';
|
|
376
376
|
import { L1FeeAnalyzer } from '@aztec/ethereum/l1-fee-analysis';
|
|
377
377
|
import { MAX_L1_TX_LIMIT, WEI_CONST } from '@aztec/ethereum/l1-tx-utils';
|
|
378
378
|
import { FormattedViemError, formatViemError, mergeAbis, tryExtractEvent } from '@aztec/ethereum/utils';
|
|
@@ -383,13 +383,15 @@ import { pick } from '@aztec/foundation/collection';
|
|
|
383
383
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
384
384
|
import { Signature } from '@aztec/foundation/eth-signature';
|
|
385
385
|
import { createLogger } from '@aztec/foundation/log';
|
|
386
|
+
import { makeBackoff, retry } from '@aztec/foundation/retry';
|
|
386
387
|
import { bufferToHex } from '@aztec/foundation/string';
|
|
387
388
|
import { Timer } from '@aztec/foundation/timer';
|
|
388
389
|
import { EmpireBaseAbi, ErrorsAbi, RollupAbi } from '@aztec/l1-artifacts';
|
|
389
390
|
import { encodeSlashConsensusVotes } from '@aztec/slasher';
|
|
390
391
|
import { CommitteeAttestationsAndSigners } from '@aztec/stdlib/block';
|
|
391
392
|
import { getTelemetryClient, trackSpan } from '@aztec/telemetry-client';
|
|
392
|
-
import { encodeFunctionData, toHex } from 'viem';
|
|
393
|
+
import { encodeFunctionData, keccak256, multicall3Abi, toHex } from 'viem';
|
|
394
|
+
import { createL1TxFailedStore } from './l1_tx_failed_store/index.js';
|
|
393
395
|
import { SequencerPublisherMetrics } from './sequencer-publisher-metrics.js';
|
|
394
396
|
export const Actions = [
|
|
395
397
|
'invalidate-by-invalid-attestation',
|
|
@@ -429,15 +431,18 @@ export class SequencerPublisher {
|
|
|
429
431
|
interrupted;
|
|
430
432
|
metrics;
|
|
431
433
|
epochCache;
|
|
434
|
+
failedTxStore;
|
|
432
435
|
governanceLog;
|
|
433
436
|
slashingLog;
|
|
434
437
|
lastActions;
|
|
435
438
|
isPayloadEmptyCache;
|
|
439
|
+
payloadProposedCache;
|
|
436
440
|
log;
|
|
437
441
|
ethereumSlotDuration;
|
|
438
442
|
blobClient;
|
|
439
443
|
/** Address to use for simulations in fisherman mode (actual proposer's address) */ proposerAddressForSimulation;
|
|
440
444
|
/** L1 fee analyzer for fisherman mode */ l1FeeAnalyzer;
|
|
445
|
+
/** Fee asset price oracle for computing price modifiers from Uniswap V4 */ feeAssetPriceOracle;
|
|
441
446
|
// A CALL to a cold address is 2700 gas
|
|
442
447
|
static MULTICALL_OVERHEAD_GAS_GUESS = 5000n;
|
|
443
448
|
// Gas report for VotingWithSigTest shows a max gas of 100k, but we've seen it cost 700k+ in testnet
|
|
@@ -456,6 +461,7 @@ export class SequencerPublisher {
|
|
|
456
461
|
this.slashingLog = createLogger('sequencer:publisher:slashing');
|
|
457
462
|
this.lastActions = {};
|
|
458
463
|
this.isPayloadEmptyCache = new Map();
|
|
464
|
+
this.payloadProposedCache = new Set();
|
|
459
465
|
this.requests = [];
|
|
460
466
|
this.log = deps.log ?? createLogger('sequencer:publisher');
|
|
461
467
|
this.ethereumSlotDuration = BigInt(config.ethereumSlotDuration);
|
|
@@ -479,10 +485,36 @@ export class SequencerPublisher {
|
|
|
479
485
|
if (config.fishermanMode) {
|
|
480
486
|
this.l1FeeAnalyzer = new L1FeeAnalyzer(this.l1TxUtils.client, deps.dateProvider, createLogger('sequencer:publisher:fee-analyzer'));
|
|
481
487
|
}
|
|
488
|
+
// Initialize fee asset price oracle
|
|
489
|
+
this.feeAssetPriceOracle = new FeeAssetPriceOracle(this.l1TxUtils.client, this.rollupContract, createLogger('sequencer:publisher:price-oracle'));
|
|
490
|
+
// Initialize failed L1 tx store (optional, for test networks)
|
|
491
|
+
this.failedTxStore = createL1TxFailedStore(config.l1TxFailedStore, this.log);
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Backs up a failed L1 transaction to the configured store for debugging.
|
|
495
|
+
* Does nothing if no store is configured.
|
|
496
|
+
*/ backupFailedTx(failedTx) {
|
|
497
|
+
if (!this.failedTxStore) {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
const tx = {
|
|
501
|
+
...failedTx,
|
|
502
|
+
timestamp: Date.now()
|
|
503
|
+
};
|
|
504
|
+
// Fire and forget - don't block on backup
|
|
505
|
+
void this.failedTxStore.then((store)=>store?.saveFailedTx(tx)).catch((err)=>{
|
|
506
|
+
this.log.warn(`Failed to backup failed L1 tx to store`, err);
|
|
507
|
+
});
|
|
482
508
|
}
|
|
483
509
|
getRollupContract() {
|
|
484
510
|
return this.rollupContract;
|
|
485
511
|
}
|
|
512
|
+
/**
|
|
513
|
+
* Gets the fee asset price modifier from the oracle.
|
|
514
|
+
* Returns 0n if the oracle query fails.
|
|
515
|
+
*/ getFeeAssetPriceModifier() {
|
|
516
|
+
return this.feeAssetPriceOracle.computePriceModifier();
|
|
517
|
+
}
|
|
486
518
|
getSenderAddress() {
|
|
487
519
|
return this.l1TxUtils.getSenderAddress();
|
|
488
520
|
}
|
|
@@ -618,12 +650,31 @@ export class SequencerPublisher {
|
|
|
618
650
|
// This ensures the committee gets precomputed correctly
|
|
619
651
|
validRequests.sort((a, b)=>compareActions(a.action, b.action));
|
|
620
652
|
try {
|
|
653
|
+
// Capture context for failed tx backup before sending
|
|
654
|
+
const l1BlockNumber = await this.l1TxUtils.getBlockNumber();
|
|
655
|
+
const multicallData = encodeFunctionData({
|
|
656
|
+
abi: multicall3Abi,
|
|
657
|
+
functionName: 'aggregate3',
|
|
658
|
+
args: [
|
|
659
|
+
validRequests.map((r)=>({
|
|
660
|
+
target: r.request.to,
|
|
661
|
+
callData: r.request.data,
|
|
662
|
+
allowFailure: true
|
|
663
|
+
}))
|
|
664
|
+
]
|
|
665
|
+
});
|
|
666
|
+
const blobDataHex = blobConfig?.blobs?.map((b)=>toHex(b));
|
|
621
667
|
this.log.debug('Forwarding transactions', {
|
|
622
668
|
validRequests: validRequests.map((request)=>request.action),
|
|
623
669
|
txConfig
|
|
624
670
|
});
|
|
625
671
|
const result = await Multicall3.forward(validRequests.map((request)=>request.request), this.l1TxUtils, txConfig, blobConfig, this.rollupContract.address, this.log);
|
|
626
|
-
const
|
|
672
|
+
const txContext = {
|
|
673
|
+
multicallData,
|
|
674
|
+
blobData: blobDataHex,
|
|
675
|
+
l1BlockNumber
|
|
676
|
+
};
|
|
677
|
+
const { successfulActions = [], failedActions = [] } = this.callbackBundledTransactions(validRequests, result, txContext);
|
|
627
678
|
return {
|
|
628
679
|
result,
|
|
629
680
|
expiredActions,
|
|
@@ -643,10 +694,33 @@ export class SequencerPublisher {
|
|
|
643
694
|
}
|
|
644
695
|
}
|
|
645
696
|
}
|
|
646
|
-
callbackBundledTransactions(requests, result) {
|
|
697
|
+
callbackBundledTransactions(requests, result, txContext) {
|
|
647
698
|
const actionsListStr = requests.map((r)=>r.action).join(', ');
|
|
648
699
|
if (result instanceof FormattedViemError) {
|
|
649
700
|
this.log.error(`Failed to publish bundled transactions (${actionsListStr})`, result);
|
|
701
|
+
this.backupFailedTx({
|
|
702
|
+
id: keccak256(txContext.multicallData),
|
|
703
|
+
failureType: 'send-error',
|
|
704
|
+
request: {
|
|
705
|
+
to: MULTI_CALL_3_ADDRESS,
|
|
706
|
+
data: txContext.multicallData
|
|
707
|
+
},
|
|
708
|
+
blobData: txContext.blobData,
|
|
709
|
+
l1BlockNumber: txContext.l1BlockNumber.toString(),
|
|
710
|
+
error: {
|
|
711
|
+
message: result.message,
|
|
712
|
+
name: result.name
|
|
713
|
+
},
|
|
714
|
+
context: {
|
|
715
|
+
actions: requests.map((r)=>r.action),
|
|
716
|
+
requests: requests.map((r)=>({
|
|
717
|
+
action: r.action,
|
|
718
|
+
to: r.request.to,
|
|
719
|
+
data: r.request.data
|
|
720
|
+
})),
|
|
721
|
+
sender: this.getSenderAddress().toString()
|
|
722
|
+
}
|
|
723
|
+
});
|
|
650
724
|
return {
|
|
651
725
|
failedActions: requests.map((r)=>r.action)
|
|
652
726
|
};
|
|
@@ -664,6 +738,37 @@ export class SequencerPublisher {
|
|
|
664
738
|
failedActions.push(request.action);
|
|
665
739
|
}
|
|
666
740
|
}
|
|
741
|
+
// Single backup for the whole reverted tx
|
|
742
|
+
if (failedActions.length > 0 && result?.receipt?.status === 'reverted') {
|
|
743
|
+
this.backupFailedTx({
|
|
744
|
+
id: result.receipt.transactionHash,
|
|
745
|
+
failureType: 'revert',
|
|
746
|
+
request: {
|
|
747
|
+
to: MULTI_CALL_3_ADDRESS,
|
|
748
|
+
data: txContext.multicallData
|
|
749
|
+
},
|
|
750
|
+
blobData: txContext.blobData,
|
|
751
|
+
l1BlockNumber: result.receipt.blockNumber.toString(),
|
|
752
|
+
receipt: {
|
|
753
|
+
transactionHash: result.receipt.transactionHash,
|
|
754
|
+
blockNumber: result.receipt.blockNumber.toString(),
|
|
755
|
+
gasUsed: (result.receipt.gasUsed ?? 0n).toString(),
|
|
756
|
+
status: 'reverted'
|
|
757
|
+
},
|
|
758
|
+
error: {
|
|
759
|
+
message: result.errorMsg ?? 'Transaction reverted'
|
|
760
|
+
},
|
|
761
|
+
context: {
|
|
762
|
+
actions: failedActions,
|
|
763
|
+
requests: requests.filter((r)=>failedActions.includes(r.action)).map((r)=>({
|
|
764
|
+
action: r.action,
|
|
765
|
+
to: r.request.to,
|
|
766
|
+
data: r.request.data
|
|
767
|
+
})),
|
|
768
|
+
sender: this.getSenderAddress().toString()
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
}
|
|
667
772
|
return {
|
|
668
773
|
successfulActions,
|
|
669
774
|
failedActions
|
|
@@ -766,6 +871,7 @@ export class SequencerPublisher {
|
|
|
766
871
|
...logData,
|
|
767
872
|
request
|
|
768
873
|
});
|
|
874
|
+
const l1BlockNumber = await this.l1TxUtils.getBlockNumber();
|
|
769
875
|
try {
|
|
770
876
|
const { gasUsed } = await this.l1TxUtils.simulate(request, undefined, undefined, mergeAbis([
|
|
771
877
|
request.abi ?? [],
|
|
@@ -808,6 +914,27 @@ export class SequencerPublisher {
|
|
|
808
914
|
}
|
|
809
915
|
// Otherwise, throw. We cannot build the next checkpoint if we cannot invalidate the previous one.
|
|
810
916
|
this.log.error(`Simulation for invalidate checkpoint ${checkpointNumber} failed`, viemError, logData);
|
|
917
|
+
this.backupFailedTx({
|
|
918
|
+
id: keccak256(request.data),
|
|
919
|
+
failureType: 'simulation',
|
|
920
|
+
request: {
|
|
921
|
+
to: request.to,
|
|
922
|
+
data: request.data,
|
|
923
|
+
value: request.value?.toString()
|
|
924
|
+
},
|
|
925
|
+
l1BlockNumber: l1BlockNumber.toString(),
|
|
926
|
+
error: {
|
|
927
|
+
message: viemError.message,
|
|
928
|
+
name: viemError.name
|
|
929
|
+
},
|
|
930
|
+
context: {
|
|
931
|
+
actions: [
|
|
932
|
+
`invalidate-${reason}`
|
|
933
|
+
],
|
|
934
|
+
checkpointNumber,
|
|
935
|
+
sender: this.getSenderAddress().toString()
|
|
936
|
+
}
|
|
937
|
+
});
|
|
811
938
|
throw new Error(`Failed to simulate invalidate checkpoint ${checkpointNumber}`, {
|
|
812
939
|
cause: viemError
|
|
813
940
|
});
|
|
@@ -835,29 +962,15 @@ export class SequencerPublisher {
|
|
|
835
962
|
}
|
|
836
963
|
/** Simulates `propose` to make sure that the checkpoint is valid for submission */ async validateCheckpointForSubmission(checkpoint, attestationsAndSigners, attestationsAndSignersSignature, options) {
|
|
837
964
|
const ts = BigInt((await this.l1TxUtils.getBlock()).timestamp + this.ethereumSlotDuration);
|
|
838
|
-
// TODO(palla/mbps): This should not be needed, there's no flow where we propose with zero attestations. Or is there?
|
|
839
|
-
// If we have no attestations, we still need to provide the empty attestations
|
|
840
|
-
// so that the committee is recalculated correctly
|
|
841
|
-
// const ignoreSignatures = attestationsAndSigners.attestations.length === 0;
|
|
842
|
-
// if (ignoreSignatures) {
|
|
843
|
-
// const { committee } = await this.epochCache.getCommittee(block.header.globalVariables.slotNumber);
|
|
844
|
-
// if (!committee) {
|
|
845
|
-
// this.log.warn(`No committee found for slot ${block.header.globalVariables.slotNumber}`);
|
|
846
|
-
// throw new Error(`No committee found for slot ${block.header.globalVariables.slotNumber}`);
|
|
847
|
-
// }
|
|
848
|
-
// attestationsAndSigners.attestations = committee.map(committeeMember =>
|
|
849
|
-
// CommitteeAttestation.fromAddress(committeeMember),
|
|
850
|
-
// );
|
|
851
|
-
// }
|
|
852
965
|
const blobFields = checkpoint.toBlobFields();
|
|
853
|
-
const blobs = getBlobsPerL1Block(blobFields);
|
|
966
|
+
const blobs = await getBlobsPerL1Block(blobFields);
|
|
854
967
|
const blobInput = getPrefixedEthBlobCommitments(blobs);
|
|
855
968
|
const args = [
|
|
856
969
|
{
|
|
857
970
|
header: checkpoint.header.toViem(),
|
|
858
971
|
archive: toHex(checkpoint.archive.root.toBuffer()),
|
|
859
972
|
oracleInput: {
|
|
860
|
-
feeAssetPriceModifier:
|
|
973
|
+
feeAssetPriceModifier: checkpoint.feeAssetPriceModifier
|
|
861
974
|
}
|
|
862
975
|
},
|
|
863
976
|
attestationsAndSigners.getPackedAttestations(),
|
|
@@ -892,6 +1005,28 @@ export class SequencerPublisher {
|
|
|
892
1005
|
this.log.warn(`Skipping vote cast for payload with empty code`);
|
|
893
1006
|
return false;
|
|
894
1007
|
}
|
|
1008
|
+
// Check if payload was already submitted to governance
|
|
1009
|
+
const cacheKey = payload.toString();
|
|
1010
|
+
if (!this.payloadProposedCache.has(cacheKey)) {
|
|
1011
|
+
try {
|
|
1012
|
+
const l1StartBlock = await this.rollupContract.getL1StartBlock();
|
|
1013
|
+
const proposed = await retry(()=>base.hasPayloadBeenProposed(payload.toString(), l1StartBlock), 'Check if payload was proposed', makeBackoff([
|
|
1014
|
+
0,
|
|
1015
|
+
1,
|
|
1016
|
+
2
|
|
1017
|
+
]), this.log, true);
|
|
1018
|
+
if (proposed) {
|
|
1019
|
+
this.payloadProposedCache.add(cacheKey);
|
|
1020
|
+
}
|
|
1021
|
+
} catch (err) {
|
|
1022
|
+
this.log.warn(`Failed to check if payload ${payload} was proposed after retries, skipping signal`, err);
|
|
1023
|
+
return false;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
if (this.payloadProposedCache.has(cacheKey)) {
|
|
1027
|
+
this.log.info(`Payload ${payload} was already proposed to governance, stopping signals`);
|
|
1028
|
+
return false;
|
|
1029
|
+
}
|
|
895
1030
|
const cachedLastVote = this.lastActions[signalType];
|
|
896
1031
|
this.lastActions[signalType] = slotNumber;
|
|
897
1032
|
const action = signalType;
|
|
@@ -902,6 +1037,7 @@ export class SequencerPublisher {
|
|
|
902
1037
|
signer: this.l1TxUtils.client.account?.address,
|
|
903
1038
|
lastValidL2Slot: slotNumber
|
|
904
1039
|
});
|
|
1040
|
+
const l1BlockNumber = await this.l1TxUtils.getBlockNumber();
|
|
905
1041
|
try {
|
|
906
1042
|
await this.l1TxUtils.simulate(request, {
|
|
907
1043
|
time: timestamp
|
|
@@ -913,7 +1049,29 @@ export class SequencerPublisher {
|
|
|
913
1049
|
request
|
|
914
1050
|
});
|
|
915
1051
|
} catch (err) {
|
|
916
|
-
|
|
1052
|
+
const viemError = formatViemError(err);
|
|
1053
|
+
this.log.error(`Failed simulation for ${action} at slot ${slotNumber} (enqueuing the action anyway)`, viemError);
|
|
1054
|
+
this.backupFailedTx({
|
|
1055
|
+
id: keccak256(request.data),
|
|
1056
|
+
failureType: 'simulation',
|
|
1057
|
+
request: {
|
|
1058
|
+
to: request.to,
|
|
1059
|
+
data: request.data,
|
|
1060
|
+
value: request.value?.toString()
|
|
1061
|
+
},
|
|
1062
|
+
l1BlockNumber: l1BlockNumber.toString(),
|
|
1063
|
+
error: {
|
|
1064
|
+
message: viemError.message,
|
|
1065
|
+
name: viemError.name
|
|
1066
|
+
},
|
|
1067
|
+
context: {
|
|
1068
|
+
actions: [
|
|
1069
|
+
action
|
|
1070
|
+
],
|
|
1071
|
+
slot: slotNumber,
|
|
1072
|
+
sender: this.getSenderAddress().toString()
|
|
1073
|
+
}
|
|
1074
|
+
});
|
|
917
1075
|
// Yes, we enqueue the request anyway, in case there was a bug with the simulation itself
|
|
918
1076
|
}
|
|
919
1077
|
// TODO(palla/slash): All votes (governance and slashing) should txTimeoutAt at the end of the slot.
|
|
@@ -1052,13 +1210,14 @@ export class SequencerPublisher {
|
|
|
1052
1210
|
/** Simulates and enqueues a proposal for a checkpoint on L1 */ async enqueueProposeCheckpoint(checkpoint, attestationsAndSigners, attestationsAndSignersSignature, opts = {}) {
|
|
1053
1211
|
const checkpointHeader = checkpoint.header;
|
|
1054
1212
|
const blobFields = checkpoint.toBlobFields();
|
|
1055
|
-
const blobs = getBlobsPerL1Block(blobFields);
|
|
1213
|
+
const blobs = await getBlobsPerL1Block(blobFields);
|
|
1056
1214
|
const proposeTxArgs = {
|
|
1057
1215
|
header: checkpointHeader,
|
|
1058
1216
|
archive: checkpoint.archive.root.toBuffer(),
|
|
1059
1217
|
blobs,
|
|
1060
1218
|
attestationsAndSigners,
|
|
1061
|
-
attestationsAndSignersSignature
|
|
1219
|
+
attestationsAndSignersSignature,
|
|
1220
|
+
feeAssetPriceModifier: checkpoint.feeAssetPriceModifier
|
|
1062
1221
|
};
|
|
1063
1222
|
let ts;
|
|
1064
1223
|
try {
|
|
@@ -1134,6 +1293,7 @@ export class SequencerPublisher {
|
|
|
1134
1293
|
const cachedLastActionSlot = this.lastActions[action];
|
|
1135
1294
|
this.lastActions[action] = slotNumber;
|
|
1136
1295
|
this.log.debug(`Simulating ${action} for slot ${slotNumber}`, logData);
|
|
1296
|
+
const l1BlockNumber = await this.l1TxUtils.getBlockNumber();
|
|
1137
1297
|
let gasUsed;
|
|
1138
1298
|
const simulateAbi = mergeAbis([
|
|
1139
1299
|
request.abi ?? [],
|
|
@@ -1151,6 +1311,27 @@ export class SequencerPublisher {
|
|
|
1151
1311
|
} catch (err) {
|
|
1152
1312
|
const viemError = formatViemError(err, simulateAbi);
|
|
1153
1313
|
this.log.error(`Simulation for ${action} at ${slotNumber} failed`, viemError, logData);
|
|
1314
|
+
this.backupFailedTx({
|
|
1315
|
+
id: keccak256(request.data),
|
|
1316
|
+
failureType: 'simulation',
|
|
1317
|
+
request: {
|
|
1318
|
+
to: request.to,
|
|
1319
|
+
data: request.data,
|
|
1320
|
+
value: request.value?.toString()
|
|
1321
|
+
},
|
|
1322
|
+
l1BlockNumber: l1BlockNumber.toString(),
|
|
1323
|
+
error: {
|
|
1324
|
+
message: viemError.message,
|
|
1325
|
+
name: viemError.name
|
|
1326
|
+
},
|
|
1327
|
+
context: {
|
|
1328
|
+
actions: [
|
|
1329
|
+
action
|
|
1330
|
+
],
|
|
1331
|
+
slot: slotNumber,
|
|
1332
|
+
sender: this.getSenderAddress().toString()
|
|
1333
|
+
}
|
|
1334
|
+
});
|
|
1154
1335
|
return false;
|
|
1155
1336
|
}
|
|
1156
1337
|
// We issued the simulation against the rollup contract, so we need to account for the overhead of the multicall3
|
|
@@ -1229,10 +1410,38 @@ export class SequencerPublisher {
|
|
|
1229
1410
|
}, {}, {
|
|
1230
1411
|
blobs: encodedData.blobs.map((b)=>b.data),
|
|
1231
1412
|
kzg
|
|
1232
|
-
}).catch((err)=>{
|
|
1233
|
-
const
|
|
1234
|
-
this.log.error(`Failed to validate blobs`, message, {
|
|
1235
|
-
metaMessages
|
|
1413
|
+
}).catch(async (err)=>{
|
|
1414
|
+
const viemError = formatViemError(err);
|
|
1415
|
+
this.log.error(`Failed to validate blobs`, viemError.message, {
|
|
1416
|
+
metaMessages: viemError.metaMessages
|
|
1417
|
+
});
|
|
1418
|
+
const validateBlobsData = encodeFunctionData({
|
|
1419
|
+
abi: RollupAbi,
|
|
1420
|
+
functionName: 'validateBlobs',
|
|
1421
|
+
args: [
|
|
1422
|
+
blobInput
|
|
1423
|
+
]
|
|
1424
|
+
});
|
|
1425
|
+
const l1BlockNumber = await this.l1TxUtils.getBlockNumber();
|
|
1426
|
+
this.backupFailedTx({
|
|
1427
|
+
id: keccak256(validateBlobsData),
|
|
1428
|
+
failureType: 'simulation',
|
|
1429
|
+
request: {
|
|
1430
|
+
to: this.rollupContract.address,
|
|
1431
|
+
data: validateBlobsData
|
|
1432
|
+
},
|
|
1433
|
+
blobData: encodedData.blobs.map((b)=>toHex(b.data)),
|
|
1434
|
+
l1BlockNumber: l1BlockNumber.toString(),
|
|
1435
|
+
error: {
|
|
1436
|
+
message: viemError.message,
|
|
1437
|
+
name: viemError.name
|
|
1438
|
+
},
|
|
1439
|
+
context: {
|
|
1440
|
+
actions: [
|
|
1441
|
+
'validate-blobs'
|
|
1442
|
+
],
|
|
1443
|
+
sender: this.getSenderAddress().toString()
|
|
1444
|
+
}
|
|
1236
1445
|
});
|
|
1237
1446
|
throw new Error('Failed to validate blobs');
|
|
1238
1447
|
});
|
|
@@ -1243,8 +1452,7 @@ export class SequencerPublisher {
|
|
|
1243
1452
|
header: encodedData.header.toViem(),
|
|
1244
1453
|
archive: toHex(encodedData.archive),
|
|
1245
1454
|
oracleInput: {
|
|
1246
|
-
|
|
1247
|
-
feeAssetPriceModifier: 0n
|
|
1455
|
+
feeAssetPriceModifier: encodedData.feeAssetPriceModifier
|
|
1248
1456
|
}
|
|
1249
1457
|
},
|
|
1250
1458
|
encodedData.attestationsAndSigners.getPackedAttestations(),
|
|
@@ -1293,6 +1501,7 @@ export class SequencerPublisher {
|
|
|
1293
1501
|
balance: 10n * WEI_CONST * WEI_CONST
|
|
1294
1502
|
});
|
|
1295
1503
|
}
|
|
1504
|
+
const l1BlockNumber = await this.l1TxUtils.getBlockNumber();
|
|
1296
1505
|
const simulationResult = await this.l1TxUtils.simulate({
|
|
1297
1506
|
to: this.rollupContract.address,
|
|
1298
1507
|
data: rollupData,
|
|
@@ -1320,6 +1529,26 @@ export class SequencerPublisher {
|
|
|
1320
1529
|
};
|
|
1321
1530
|
}
|
|
1322
1531
|
this.log.error(`Failed to simulate propose tx`, viemError);
|
|
1532
|
+
this.backupFailedTx({
|
|
1533
|
+
id: keccak256(rollupData),
|
|
1534
|
+
failureType: 'simulation',
|
|
1535
|
+
request: {
|
|
1536
|
+
to: this.rollupContract.address,
|
|
1537
|
+
data: rollupData
|
|
1538
|
+
},
|
|
1539
|
+
l1BlockNumber: l1BlockNumber.toString(),
|
|
1540
|
+
error: {
|
|
1541
|
+
message: viemError.message,
|
|
1542
|
+
name: viemError.name
|
|
1543
|
+
},
|
|
1544
|
+
context: {
|
|
1545
|
+
actions: [
|
|
1546
|
+
'propose'
|
|
1547
|
+
],
|
|
1548
|
+
slot: Number(args[0].header.slotNumber),
|
|
1549
|
+
sender: this.getSenderAddress().toString()
|
|
1550
|
+
}
|
|
1551
|
+
});
|
|
1323
1552
|
throw err;
|
|
1324
1553
|
});
|
|
1325
1554
|
return {
|
|
@@ -99,4 +99,4 @@ export declare class CheckpointProposalJob implements Traceable {
|
|
|
99
99
|
private getSecondsIntoSlot;
|
|
100
100
|
getPublisher(): SequencerPublisher;
|
|
101
101
|
}
|
|
102
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
102
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2twb2ludF9wcm9wb3NhbF9qb2IuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZXF1ZW5jZXIvY2hlY2twb2ludF9wcm9wb3NhbF9qb2IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDckQsT0FBTyxFQUNMLFdBQVcsRUFDWCxnQkFBZ0IsRUFDaEIsV0FBVyxFQUNYLHFCQUFxQixFQUNyQixVQUFVLEVBQ1gsTUFBTSxpQ0FBaUMsQ0FBQ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B;YAgB3B,8BAA8B;IAwB5C;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B,0DAA0D;IAC1D,UACgB,mBAAmB,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhF;IAED,kFAAkF;IAClF,UAAgB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEzD;IAED,OAAO,CAAC,0BAA0B;IAIlC,OAAO,CAAC,kBAAkB;IAKnB,YAAY,uBAElB;CACF"}
|
|
@@ -451,7 +451,7 @@ import { getSlotStartBuildTimestamp } from '@aztec/stdlib/epoch-helpers';
|
|
|
451
451
|
import { Gas } from '@aztec/stdlib/gas';
|
|
452
452
|
import { NoValidTxsError } from '@aztec/stdlib/interfaces/server';
|
|
453
453
|
import { computeInHashFromL1ToL2Messages } from '@aztec/stdlib/messaging';
|
|
454
|
-
import { orderAttestations } from '@aztec/stdlib/p2p';
|
|
454
|
+
import { orderAttestations, trimAttestations } from '@aztec/stdlib/p2p';
|
|
455
455
|
import { AttestationTimeoutError } from '@aztec/stdlib/validators';
|
|
456
456
|
import { Attributes, trackSpan } from '@aztec/telemetry-client';
|
|
457
457
|
import { DutyAlreadySignedError, SlashingProtectionError } from '@aztec/validator-ha-signer/errors';
|
|
@@ -590,7 +590,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
590
590
|
// Wait until the voting promises have resolved, so all requests are enqueued (not sent)
|
|
591
591
|
await Promise.all(votesPromises);
|
|
592
592
|
if (checkpoint) {
|
|
593
|
-
this.metrics.
|
|
593
|
+
this.metrics.recordCheckpointProposalSuccess();
|
|
594
594
|
}
|
|
595
595
|
// Do not post anything to L1 if we are fishermen, but do perform L1 fee analysis
|
|
596
596
|
if (this.config.fishermanMode) {
|
|
@@ -640,13 +640,14 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
640
640
|
const l1ToL2Messages = await this.l1ToL2MessageSource.getL1ToL2Messages(this.checkpointNumber);
|
|
641
641
|
const inHash = computeInHashFromL1ToL2Messages(l1ToL2Messages);
|
|
642
642
|
// Collect the out hashes of all the checkpoints before this one in the same epoch
|
|
643
|
-
const
|
|
644
|
-
|
|
643
|
+
const previousCheckpointOutHashes = (await this.l2BlockSource.getCheckpointsDataForEpoch(this.epoch)).filter((c)=>c.checkpointNumber < this.checkpointNumber).map((c)=>c.checkpointOutHash);
|
|
644
|
+
// Get the fee asset price modifier from the oracle
|
|
645
|
+
const feeAssetPriceModifier = await this.publisher.getFeeAssetPriceModifier();
|
|
645
646
|
const fork = _ts_add_disposable_resource(env, await this.worldState.fork(this.syncedToBlockNumber, {
|
|
646
647
|
closeDelayMs: 12_000
|
|
647
|
-
}),
|
|
648
|
+
}), true);
|
|
648
649
|
// Create checkpoint builder for the entire slot
|
|
649
|
-
const checkpointBuilder = await this.checkpointsBuilder.startCheckpoint(this.checkpointNumber, checkpointGlobalVariables, l1ToL2Messages, previousCheckpointOutHashes, fork, this.log.getBindings());
|
|
650
|
+
const checkpointBuilder = await this.checkpointsBuilder.startCheckpoint(this.checkpointNumber, checkpointGlobalVariables, feeAssetPriceModifier, l1ToL2Messages, previousCheckpointOutHashes, fork, this.log.getBindings());
|
|
650
651
|
// Options for the validator client when creating block and checkpoint proposals
|
|
651
652
|
const blockProposalOptions = {
|
|
652
653
|
publishFullTxs: !!this.config.publishTxsWithProposals,
|
|
@@ -658,6 +659,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
658
659
|
};
|
|
659
660
|
let blocksInCheckpoint = [];
|
|
660
661
|
let blockPendingBroadcast = undefined;
|
|
662
|
+
const checkpointBuildTimer = new Timer();
|
|
661
663
|
try {
|
|
662
664
|
// Main loop: build blocks for the checkpoint
|
|
663
665
|
const result = await this.buildBlocksForCheckpoint(checkpointBuilder, checkpointGlobalVariables.timestamp, inHash, blockProposalOptions);
|
|
@@ -681,10 +683,21 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
681
683
|
});
|
|
682
684
|
return undefined;
|
|
683
685
|
}
|
|
686
|
+
const minBlocksForCheckpoint = this.config.minBlocksForCheckpoint;
|
|
687
|
+
if (minBlocksForCheckpoint !== undefined && blocksInCheckpoint.length < minBlocksForCheckpoint) {
|
|
688
|
+
this.log.warn(`Checkpoint has fewer blocks than minimum (${blocksInCheckpoint.length} < ${minBlocksForCheckpoint}), skipping proposal`, {
|
|
689
|
+
slot: this.slot,
|
|
690
|
+
blocksBuilt: blocksInCheckpoint.length,
|
|
691
|
+
minBlocksForCheckpoint
|
|
692
|
+
});
|
|
693
|
+
return undefined;
|
|
694
|
+
}
|
|
684
695
|
// Assemble and broadcast the checkpoint proposal, including the last block that was not
|
|
685
696
|
// broadcasted yet, and wait to collect the committee attestations.
|
|
686
697
|
this.setStateFn(SequencerState.ASSEMBLING_CHECKPOINT, this.slot);
|
|
687
698
|
const checkpoint = await checkpointBuilder.completeCheckpoint();
|
|
699
|
+
// Record checkpoint-level build metrics
|
|
700
|
+
this.metrics.recordCheckpointBuild(checkpointBuildTimer.ms(), blocksInCheckpoint.length, checkpoint.getStats().txCount, Number(checkpoint.header.totalManaUsed.toBigInt()));
|
|
688
701
|
// Do not collect attestations nor publish to L1 in fisherman mode
|
|
689
702
|
if (this.config.fishermanMode) {
|
|
690
703
|
this.log.info(`Built checkpoint for slot ${this.slot} with ${blocksInCheckpoint.length} blocks. ` + `Skipping proposal in fisherman mode.`, {
|
|
@@ -702,7 +715,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
702
715
|
txs: blockPendingBroadcast.txs
|
|
703
716
|
};
|
|
704
717
|
// Create the checkpoint proposal and broadcast it
|
|
705
|
-
const proposal = await this.validatorClient.createCheckpointProposal(checkpoint.header, checkpoint.archive.root, lastBlock, this.proposer, checkpointProposalOptions);
|
|
718
|
+
const proposal = await this.validatorClient.createCheckpointProposal(checkpoint.header, checkpoint.archive.root, feeAssetPriceModifier, lastBlock, this.proposer, checkpointProposalOptions);
|
|
706
719
|
const blockProposedAt = this.dateProvider.now();
|
|
707
720
|
await this.p2pClient.broadcastCheckpointProposal(proposal);
|
|
708
721
|
this.setStateFn(SequencerState.COLLECTING_ATTESTATIONS, this.slot);
|
|
@@ -727,6 +740,14 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
727
740
|
const aztecSlotDuration = this.l1Constants.slotDuration;
|
|
728
741
|
const slotStartBuildTimestamp = this.getSlotStartBuildTimestamp();
|
|
729
742
|
const txTimeoutAt = new Date((slotStartBuildTimestamp + aztecSlotDuration) * 1000);
|
|
743
|
+
// If we have been configured to potentially skip publishing checkpoint then roll the dice here
|
|
744
|
+
if (this.config.skipPublishingCheckpointsPercent !== undefined && this.config.skipPublishingCheckpointsPercent > 0) {
|
|
745
|
+
const result = Math.max(0, randomInt(100));
|
|
746
|
+
if (result < this.config.skipPublishingCheckpointsPercent) {
|
|
747
|
+
this.log.warn(`Skipping publishing proposal for checkpoint ${checkpoint.number}. Configured percentage: ${this.config.skipPublishingCheckpointsPercent}, generated value: ${result}`);
|
|
748
|
+
return checkpoint;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
730
751
|
await this.publisher.enqueueProposeCheckpoint(checkpoint, attestations, attestationsSignature, {
|
|
731
752
|
txTimeoutAt,
|
|
732
753
|
forcePendingCheckpointNumber: this.invalidateCheckpoint?.forcePendingCheckpointNumber
|
|
@@ -736,7 +757,8 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
736
757
|
env.error = e;
|
|
737
758
|
env.hasError = true;
|
|
738
759
|
} finally{
|
|
739
|
-
_ts_dispose_resources(env);
|
|
760
|
+
const result = _ts_dispose_resources(env);
|
|
761
|
+
if (result) await result;
|
|
740
762
|
}
|
|
741
763
|
} catch (err) {
|
|
742
764
|
if (err && (err instanceof DutyAlreadySignedError || err instanceof SlashingProtectionError)) {
|
|
@@ -882,7 +904,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
882
904
|
}
|
|
883
905
|
// Create iterator to pending txs. We filter out txs already included in previous blocks in the checkpoint
|
|
884
906
|
// just in case p2p failed to sync the provisional block and didn't get to remove those txs from the mempool yet.
|
|
885
|
-
const pendingTxs = filter(this.p2pClient.
|
|
907
|
+
const pendingTxs = filter(this.p2pClient.iterateEligiblePendingTxs(), (tx)=>!txHashesAlreadyIncluded.has(tx.txHash.toString()));
|
|
886
908
|
this.log.debug(`Building block ${blockNumber} at index ${indexWithinCheckpoint} for slot ${this.slot} with ${availableTxs} available txs`, {
|
|
887
909
|
slot: this.slot,
|
|
888
910
|
blockNumber,
|
|
@@ -1051,8 +1073,14 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
1051
1073
|
try {
|
|
1052
1074
|
const attestations = await this.validatorClient.collectAttestations(proposal, numberOfRequiredAttestations, attestationDeadline);
|
|
1053
1075
|
collectedAttestationsCount = attestations.length;
|
|
1076
|
+
// Trim attestations to minimum required to save L1 calldata gas
|
|
1077
|
+
const localAddresses = this.validatorClient.getValidatorAddresses();
|
|
1078
|
+
const trimmed = trimAttestations(attestations, numberOfRequiredAttestations, this.attestorAddress, localAddresses);
|
|
1079
|
+
if (trimmed.length < attestations.length) {
|
|
1080
|
+
this.log.debug(`Trimmed attestations from ${attestations.length} to ${trimmed.length} for L1 submission`);
|
|
1081
|
+
}
|
|
1054
1082
|
// Rollup contract requires that the signatures are provided in the order of the committee
|
|
1055
|
-
const sorted = orderAttestations(
|
|
1083
|
+
const sorted = orderAttestations(trimmed, committee);
|
|
1056
1084
|
// Manipulate the attestations if we've been configured to do so
|
|
1057
1085
|
if (this.config.injectFakeAttestation || this.config.shuffleAttestationOrdering) {
|
|
1058
1086
|
return this.manipulateAttestations(proposal.slotNumber, epoch, seed, committee, sorted);
|
|
@@ -1146,7 +1174,7 @@ _dec = trackSpan('CheckpointProposalJob.execute'), _dec1 = trackSpan('Checkpoint
|
|
|
1146
1174
|
slot: this.slot,
|
|
1147
1175
|
feeAnalysisId: feeAnalysis?.id
|
|
1148
1176
|
});
|
|
1149
|
-
this.metrics.
|
|
1177
|
+
this.metrics.recordCheckpointProposalFailed('block_build_failed');
|
|
1150
1178
|
}
|
|
1151
1179
|
this.publisher.clearPendingRequests();
|
|
1152
1180
|
}
|