@aztec/sequencer-client 0.0.1-commit.343b43af6 → 0.0.1-commit.350e0a4d
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/README.md +281 -21
- package/dest/client/sequencer-client.d.ts +23 -16
- package/dest/client/sequencer-client.d.ts.map +1 -1
- package/dest/client/sequencer-client.js +49 -94
- package/dest/config.d.ts +10 -2
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +61 -25
- package/dest/global_variable_builder/fee_predictor.d.ts +37 -0
- package/dest/global_variable_builder/fee_predictor.d.ts.map +1 -0
- package/dest/global_variable_builder/fee_predictor.js +138 -0
- package/dest/global_variable_builder/fee_provider.d.ts +21 -0
- package/dest/global_variable_builder/fee_provider.d.ts.map +1 -0
- package/dest/global_variable_builder/fee_provider.js +80 -0
- package/dest/global_variable_builder/global_builder.d.ts +13 -26
- package/dest/global_variable_builder/global_builder.d.ts.map +1 -1
- package/dest/global_variable_builder/global_builder.js +9 -66
- package/dest/global_variable_builder/index.d.ts +4 -2
- package/dest/global_variable_builder/index.d.ts.map +1 -1
- package/dest/global_variable_builder/index.js +2 -0
- package/dest/publisher/config.d.ts +19 -3
- package/dest/publisher/config.d.ts.map +1 -1
- package/dest/publisher/config.js +30 -5
- package/dest/publisher/l1_to_l2_messaging.d.ts +21 -0
- package/dest/publisher/l1_to_l2_messaging.d.ts.map +1 -0
- package/dest/publisher/l1_to_l2_messaging.js +70 -0
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.d.ts +50 -11
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.d.ts.map +1 -1
- package/dest/publisher/l1_tx_failed_store/failed_tx_store.js +68 -1
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.d.ts +2 -2
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.d.ts.map +1 -1
- package/dest/publisher/l1_tx_failed_store/file_store_failed_tx_store.js +4 -2
- package/dest/publisher/l1_tx_failed_store/index.d.ts +2 -2
- package/dest/publisher/l1_tx_failed_store/index.d.ts.map +1 -1
- package/dest/publisher/l1_tx_failed_store/index.js +1 -0
- package/dest/publisher/sequencer-bundle-simulator.d.ts +96 -0
- package/dest/publisher/sequencer-bundle-simulator.d.ts.map +1 -0
- package/dest/publisher/sequencer-bundle-simulator.js +198 -0
- package/dest/publisher/sequencer-publisher-factory.d.ts +3 -5
- package/dest/publisher/sequencer-publisher-factory.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher-factory.js +2 -3
- package/dest/publisher/sequencer-publisher.d.ts +103 -67
- package/dest/publisher/sequencer-publisher.d.ts.map +1 -1
- package/dest/publisher/sequencer-publisher.js +621 -525
- package/dest/publisher/write_json.d.ts +11 -0
- package/dest/publisher/write_json.d.ts.map +1 -0
- package/dest/publisher/write_json.js +57 -0
- package/dest/sequencer/automine/automine_factory.d.ts +56 -0
- package/dest/sequencer/automine/automine_factory.d.ts.map +1 -0
- package/dest/sequencer/automine/automine_factory.js +85 -0
- package/dest/sequencer/automine/automine_sequencer.d.ts +189 -0
- package/dest/sequencer/automine/automine_sequencer.d.ts.map +1 -0
- package/dest/sequencer/automine/automine_sequencer.js +690 -0
- package/dest/sequencer/automine/index.d.ts +3 -0
- package/dest/sequencer/automine/index.d.ts.map +1 -0
- package/dest/sequencer/automine/index.js +2 -0
- package/dest/sequencer/checkpoint_proposal_job.d.ts +75 -17
- package/dest/sequencer/checkpoint_proposal_job.d.ts.map +1 -1
- package/dest/sequencer/checkpoint_proposal_job.js +795 -239
- package/dest/sequencer/checkpoint_proposal_job_metrics.d.ts +34 -0
- package/dest/sequencer/checkpoint_proposal_job_metrics.d.ts.map +1 -0
- package/dest/sequencer/checkpoint_proposal_job_metrics.js +72 -0
- package/dest/sequencer/checkpoint_voter.d.ts +1 -2
- package/dest/sequencer/checkpoint_voter.d.ts.map +1 -1
- package/dest/sequencer/checkpoint_voter.js +2 -5
- package/dest/sequencer/events.d.ts +62 -5
- package/dest/sequencer/events.d.ts.map +1 -1
- package/dest/sequencer/metrics.d.ts +13 -10
- package/dest/sequencer/metrics.d.ts.map +1 -1
- package/dest/sequencer/metrics.js +45 -20
- package/dest/sequencer/requests_tracker.d.ts +22 -0
- package/dest/sequencer/requests_tracker.d.ts.map +1 -0
- package/dest/sequencer/requests_tracker.js +33 -0
- package/dest/sequencer/sequencer.d.ts +159 -35
- package/dest/sequencer/sequencer.d.ts.map +1 -1
- package/dest/sequencer/sequencer.js +585 -188
- package/dest/sequencer/types.d.ts +2 -2
- package/dest/sequencer/types.d.ts.map +1 -1
- package/dest/test/index.d.ts +3 -3
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/mock_checkpoint_builder.d.ts +4 -4
- package/dest/test/mock_checkpoint_builder.d.ts.map +1 -1
- package/dest/test/utils.d.ts +15 -1
- package/dest/test/utils.d.ts.map +1 -1
- package/dest/test/utils.js +25 -7
- package/package.json +30 -29
- package/src/client/sequencer-client.ts +70 -124
- package/src/config.ts +71 -22
- package/src/global_variable_builder/README.md +44 -0
- package/src/global_variable_builder/fee_predictor.ts +182 -0
- package/src/global_variable_builder/fee_provider.ts +97 -0
- package/src/global_variable_builder/global_builder.ts +19 -88
- package/src/global_variable_builder/index.ts +3 -1
- package/src/publisher/config.ts +62 -7
- package/src/publisher/l1_to_l2_messaging.ts +85 -0
- package/src/publisher/l1_tx_failed_store/failed_tx_store.ts +117 -8
- package/src/publisher/l1_tx_failed_store/file_store_failed_tx_store.ts +4 -3
- package/src/publisher/l1_tx_failed_store/index.ts +1 -1
- package/src/publisher/sequencer-bundle-simulator.ts +254 -0
- package/src/publisher/sequencer-publisher-factory.ts +3 -6
- package/src/publisher/sequencer-publisher.ts +720 -600
- package/src/publisher/write_json.ts +78 -0
- package/src/sequencer/README.md +162 -450
- package/src/sequencer/automine/README.md +60 -0
- package/src/sequencer/automine/automine_factory.ts +152 -0
- package/src/sequencer/automine/automine_sequencer.ts +796 -0
- package/src/sequencer/automine/index.ts +6 -0
- package/src/sequencer/checkpoint_proposal_job.ts +958 -265
- package/src/sequencer/checkpoint_proposal_job_metrics.ts +128 -0
- package/src/sequencer/checkpoint_voter.ts +1 -12
- package/src/sequencer/events.ts +66 -5
- package/src/sequencer/metrics.ts +57 -24
- package/src/sequencer/requests_tracker.ts +43 -0
- package/src/sequencer/sequencer.ts +690 -209
- package/src/sequencer/types.ts +1 -1
- package/src/test/index.ts +2 -2
- package/src/test/mock_checkpoint_builder.ts +3 -3
- package/src/test/utils.ts +61 -10
- package/dest/sequencer/timetable.d.ts +0 -88
- package/dest/sequencer/timetable.d.ts.map +0 -1
- package/dest/sequencer/timetable.js +0 -222
- package/src/sequencer/timetable.ts +0 -283
|
@@ -1,31 +1,36 @@
|
|
|
1
|
+
import type { WindowBlockFees } from '@aztec/ethereum/l1-fee-analysis';
|
|
2
|
+
import type { GasPrice } from '@aztec/ethereum/l1-tx-utils';
|
|
3
|
+
import type { Branded } from '@aztec/foundation/branded-types';
|
|
4
|
+
import { type ZodFor } from '@aztec/foundation/schemas';
|
|
1
5
|
import type { Hex } from 'viem';
|
|
2
6
|
/** URI pointing to a stored failed L1 transaction. */
|
|
3
|
-
export type FailedL1TxUri = string
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
export type FailedL1TxUri = Branded<string, 'FailedL1TxUri'>;
|
|
8
|
+
/**
|
|
9
|
+
* A failed L1 transaction captured for debugging and replay. Serialized with jsonStringify (bigints
|
|
10
|
+
* become decimal strings on disk) and parsed back via FailedL1TxSchema.
|
|
11
|
+
*/
|
|
7
12
|
export type FailedL1Tx = {
|
|
8
13
|
/** Tx hash (for reverts) or keccak256(request.data) (for simulation/send failures). */
|
|
9
14
|
id: Hex;
|
|
10
15
|
/** Unix timestamp (ms) when failure occurred. */
|
|
11
16
|
timestamp: number;
|
|
12
|
-
/**
|
|
13
|
-
failureType: 'simulation' | 'revert' | 'send-error';
|
|
17
|
+
/** How the failure occurred. */
|
|
18
|
+
failureType: 'simulation' | 'revert' | 'send-error' | 'timeout';
|
|
14
19
|
/** The actual L1 transaction for replay (multicall-encoded for bundled txs). */
|
|
15
20
|
request: {
|
|
16
21
|
to: Hex;
|
|
17
22
|
data: Hex;
|
|
18
|
-
value?:
|
|
23
|
+
value?: bigint;
|
|
19
24
|
};
|
|
20
25
|
/** Raw blob data as hex for replay. */
|
|
21
26
|
blobData?: Hex[];
|
|
22
27
|
/** L1 block number at time of failure (simulation target or receipt block). */
|
|
23
|
-
l1BlockNumber:
|
|
28
|
+
l1BlockNumber: bigint;
|
|
24
29
|
/** Receipt info (present only for on-chain reverts). */
|
|
25
30
|
receipt?: {
|
|
26
31
|
transactionHash: Hex;
|
|
27
|
-
blockNumber:
|
|
28
|
-
gasUsed:
|
|
32
|
+
blockNumber: bigint;
|
|
33
|
+
gasUsed: bigint;
|
|
29
34
|
status: 'reverted';
|
|
30
35
|
};
|
|
31
36
|
/** Error information. */
|
|
@@ -48,7 +53,41 @@ export type FailedL1Tx = {
|
|
|
48
53
|
slot?: number;
|
|
49
54
|
sender: Hex;
|
|
50
55
|
};
|
|
56
|
+
/** Gas pricing info at time of failure for underpricing diagnosis. */
|
|
57
|
+
gasInfo?: {
|
|
58
|
+
/** Gas prices the tx was sent with (present for revert/send-error/timeout, not simulation). */
|
|
59
|
+
sentGasPrice?: GasPrice;
|
|
60
|
+
/** Gas limit used or estimated. */
|
|
61
|
+
gasLimit?: bigint;
|
|
62
|
+
/** Nonce used for the sent tx. */
|
|
63
|
+
nonce?: number;
|
|
64
|
+
/**
|
|
65
|
+
* For timeouts: the escalating gas prices used across the initial send and each speed-up retry,
|
|
66
|
+
* in order. Compare against windowBlocks[].minIncludedPriorityFee to see if any attempt cleared the bar.
|
|
67
|
+
*/
|
|
68
|
+
sentGasPriceLadder?: GasPrice[];
|
|
69
|
+
/** Number of send attempts (initial send + speed-ups). */
|
|
70
|
+
attempts?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Per-block fee data for the L1 blocks the tx could have been included in (the target L2 slot's
|
|
73
|
+
* inclusion window), in chronological order. Compare sentGasPrice against these to see whether
|
|
74
|
+
* the tx was underpriced for each block it competed for. May be a partial or empty list if the
|
|
75
|
+
* window was not yet mined when the failure was recorded (e.g. an early send failure).
|
|
76
|
+
*/
|
|
77
|
+
windowBlocks?: WindowBlockFees[];
|
|
78
|
+
};
|
|
79
|
+
/** Timing info relative to the L2 slot. */
|
|
80
|
+
timing?: {
|
|
81
|
+
/** The target L2 slot this tx was for. */
|
|
82
|
+
targetL2Slot?: number;
|
|
83
|
+
/** Unix timestamp (seconds) when the target slot ends. */
|
|
84
|
+
slotDeadlineTimestampS?: bigint;
|
|
85
|
+
/** Milliseconds remaining until the slot deadline. Negative = past deadline. */
|
|
86
|
+
msUntilSlotDeadline?: number;
|
|
87
|
+
};
|
|
51
88
|
};
|
|
89
|
+
/** Parses a stored failed-tx record, coercing the on-disk decimal strings back to bigints. */
|
|
90
|
+
export declare const FailedL1TxSchema: ZodFor<FailedL1Tx>;
|
|
52
91
|
/** Store for failed L1 transactions for debugging purposes. */
|
|
53
92
|
export interface L1TxFailedStore {
|
|
54
93
|
/** Saves a failed transaction and returns its URI. */
|
|
@@ -56,4 +95,4 @@ export interface L1TxFailedStore {
|
|
|
56
95
|
/** Retrieves a failed transaction by its URI. */
|
|
57
96
|
getFailedTx(uri: FailedL1TxUri): Promise<FailedL1Tx>;
|
|
58
97
|
}
|
|
59
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
98
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFpbGVkX3R4X3N0b3JlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcHVibGlzaGVyL2wxX3R4X2ZhaWxlZF9zdG9yZS9mYWlsZWRfdHhfc3RvcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsZUFBZSxFQUFFLE1BQU0saUNBQWlDLEN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QztJQUMzQyxNQUFNLENBQUMsRUFBRTtRQUNQLDBDQUEwQztRQUMxQyxZQUFZLENBQUMsRUFBRSxNQUFNLENBQUM7UUFDdEIsMERBQTBEO1FBQzFELHNCQUFzQixDQUFDLEVBQUUsTUFBTSxDQUFDO1FBQ2hDLGdGQUFnRjtRQUNoRixtQkFBbUIsQ0FBQyxFQUFFLE1BQU0sQ0FBQztLQUM5QixDQUFDO0NBQ0gsQ0FBQztBQW9CRiw4RkFBOEY7QUFDOUYsZUFBTyxNQUFNLGdCQUFnQixFQUFFLE1BQU0sQ0FBQyxVQUFVLENBK0M5QyxDQUFDO0FBRUgsK0RBQStEO0FBQy9ELE1BQU0sV0FBVyxlQUFlO0lBQzlCLHNEQUFzRDtJQUN0RCxZQUFZLENBQUMsRUFBRSxFQUFFLFVBQVUsR0FBRyxPQUFPLENBQUMsYUFBYSxDQUFDLENBQUM7SUFDckQsaURBQWlEO0lBQ2pELFdBQVcsQ0FBQyxHQUFHLEVBQUUsYUFBYSxHQUFHLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQztDQUN0RCJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failed_tx_store.d.ts","sourceRoot":"","sources":["../../../src/publisher/l1_tx_failed_store/failed_tx_store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"failed_tx_store.d.ts","sourceRoot":"","sources":["../../../src/publisher/l1_tx_failed_store/failed_tx_store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,2BAA2B,CAAC;AAEjE,OAAO,KAAK,EAAE,G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;IACtE,OAAO,CAAC,EAAE;QACR,+FAA+F;QAC/F,YAAY,CAAC,EAAE,QAAQ,CAAC;QACxB,mCAAmC;QACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,kCAAkC;QAClC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;;WAGG;QACH,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC;QAChC,0DAA0D;QAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB;;;;;WAKG;QACH,YAAY,CAAC,EAAE,eAAe,EAAE,CAAC;KAClC,CAAC;IACF,2CAA2C;IAC3C,MAAM,CAAC,EAAE;QACP,0CAA0C;QAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,0DAA0D;QAC1D,sBAAsB,CAAC,EAAE,MAAM,CAAC;QAChC,gFAAgF;QAChF,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;CACH,CAAC;AAoBF,8FAA8F;AAC9F,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,UAAU,CA+C9C,CAAC;AAEH,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,sDAAsD;IACtD,YAAY,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACrD,iDAAiD;IACjD,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACtD"}
|
|
@@ -1 +1,68 @@
|
|
|
1
|
-
|
|
1
|
+
import { schemas } from '@aztec/foundation/schemas';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const hexSchema = schemas.HexStringWith0x;
|
|
4
|
+
const gasPriceSchema = z.object({
|
|
5
|
+
maxFeePerGas: schemas.BigInt,
|
|
6
|
+
maxPriorityFeePerGas: schemas.BigInt,
|
|
7
|
+
maxFeePerBlobGas: schemas.BigInt.optional()
|
|
8
|
+
});
|
|
9
|
+
const windowBlockFeesSchema = z.object({
|
|
10
|
+
blockNumber: schemas.BigInt,
|
|
11
|
+
timestamp: schemas.BigInt,
|
|
12
|
+
baseFeePerGas: schemas.BigInt,
|
|
13
|
+
p75PriorityFee: schemas.BigInt,
|
|
14
|
+
minIncludedPriorityFee: schemas.BigInt,
|
|
15
|
+
blockBlobsFull: z.boolean(),
|
|
16
|
+
includedBlobCount: z.number()
|
|
17
|
+
});
|
|
18
|
+
/** Parses a stored failed-tx record, coercing the on-disk decimal strings back to bigints. */ export const FailedL1TxSchema = z.object({
|
|
19
|
+
id: hexSchema,
|
|
20
|
+
timestamp: z.number(),
|
|
21
|
+
failureType: z.enum([
|
|
22
|
+
'simulation',
|
|
23
|
+
'revert',
|
|
24
|
+
'send-error',
|
|
25
|
+
'timeout'
|
|
26
|
+
]),
|
|
27
|
+
request: z.object({
|
|
28
|
+
to: hexSchema,
|
|
29
|
+
data: hexSchema,
|
|
30
|
+
value: schemas.BigInt.optional()
|
|
31
|
+
}),
|
|
32
|
+
blobData: z.array(hexSchema).optional(),
|
|
33
|
+
l1BlockNumber: schemas.BigInt,
|
|
34
|
+
receipt: z.object({
|
|
35
|
+
transactionHash: hexSchema,
|
|
36
|
+
blockNumber: schemas.BigInt,
|
|
37
|
+
gasUsed: schemas.BigInt,
|
|
38
|
+
status: z.literal('reverted')
|
|
39
|
+
}).optional(),
|
|
40
|
+
error: z.object({
|
|
41
|
+
message: z.string(),
|
|
42
|
+
name: z.string().optional()
|
|
43
|
+
}),
|
|
44
|
+
context: z.object({
|
|
45
|
+
actions: z.array(z.string()),
|
|
46
|
+
requests: z.array(z.object({
|
|
47
|
+
action: z.string(),
|
|
48
|
+
to: hexSchema,
|
|
49
|
+
data: hexSchema
|
|
50
|
+
})).optional(),
|
|
51
|
+
checkpointNumber: z.number().optional(),
|
|
52
|
+
slot: z.number().optional(),
|
|
53
|
+
sender: hexSchema
|
|
54
|
+
}),
|
|
55
|
+
gasInfo: z.object({
|
|
56
|
+
sentGasPrice: gasPriceSchema.optional(),
|
|
57
|
+
gasLimit: schemas.BigInt.optional(),
|
|
58
|
+
nonce: z.number().optional(),
|
|
59
|
+
sentGasPriceLadder: z.array(gasPriceSchema).optional(),
|
|
60
|
+
attempts: z.number().optional(),
|
|
61
|
+
windowBlocks: z.array(windowBlockFeesSchema).optional()
|
|
62
|
+
}).optional(),
|
|
63
|
+
timing: z.object({
|
|
64
|
+
targetL2Slot: z.number().optional(),
|
|
65
|
+
slotDeadlineTimestampS: schemas.BigInt.optional(),
|
|
66
|
+
msUntilSlotDeadline: z.number().optional()
|
|
67
|
+
}).optional()
|
|
68
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Logger } from '@aztec/foundation/log';
|
|
2
2
|
import type { FileStore } from '@aztec/stdlib/file-store';
|
|
3
|
-
import type
|
|
3
|
+
import { type FailedL1Tx, type FailedL1TxUri, type L1TxFailedStore } from './failed_tx_store.js';
|
|
4
4
|
/**
|
|
5
5
|
* L1TxFailedStore implementation using the FileStore abstraction.
|
|
6
6
|
* Supports any backend that FileStore supports (GCS, S3, R2, local filesystem).
|
|
@@ -12,4 +12,4 @@ export declare class FileStoreL1TxFailedStore implements L1TxFailedStore {
|
|
|
12
12
|
saveFailedTx(tx: FailedL1Tx): Promise<FailedL1TxUri>;
|
|
13
13
|
getFailedTx(uri: FailedL1TxUri): Promise<FailedL1Tx>;
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZV9zdG9yZV9mYWlsZWRfdHhfc3RvcmUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wdWJsaXNoZXIvbDFfdHhfZmFpbGVkX3N0b3JlL2ZpbGVfc3RvcmVfZmFpbGVkX3R4X3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBZ0IsTUFBTSx1QkFBdUIsQ0FBQztBQUNsRSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUUxRCxPQUFPLEVBQUUsS0FBSyxVQUFVLEVBQW9CLEtBQUssYUFBYSxFQUFFLEtBQUssZUFBZSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFbkg7OztHQUdHO0FBQ0gscUJBQWEsd0JBQXlCLFlBQVcsZUFBZTtJQUk1RCxPQUFPLENBQUMsUUFBUSxDQUFDLFNBQVM7SUFINUIsT0FBTyxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQVM7SUFFN0IsWUFDbUIsU0FBUyxFQUFFLFNBQVMsRUFDckMsTUFBTSxDQUFDLEVBQUUsTUFBTSxFQUdoQjtJQUVZLFlBQVksQ0FBQyxFQUFFLEVBQUUsVUFBVSxHQUFHLE9BQU8sQ0FBQyxhQUFhLENBQUMsQ0FvQmhFO0lBRVksV0FBVyxDQUFDLEdBQUcsRUFBRSxhQUFhLEdBQUcsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUdoRTtDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file_store_failed_tx_store.d.ts","sourceRoot":"","sources":["../../../src/publisher/l1_tx_failed_store/file_store_failed_tx_store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file_store_failed_tx_store.d.ts","sourceRoot":"","sources":["../../../src/publisher/l1_tx_failed_store/file_store_failed_tx_store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,KAAK,UAAU,EAAoB,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEnH;;;GAGG;AACH,qBAAa,wBAAyB,YAAW,eAAe;IAI5D,OAAO,CAAC,QAAQ,CAAC,SAAS;IAH5B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAE7B,YACmB,SAAS,EAAE,SAAS,EACrC,MAAM,CAAC,EAAE,MAAM,EAGhB;IAEY,YAAY,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,CAoBhE;IAEY,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CAGhE;CACF"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { jsonParseWithSchema, jsonStringify } from '@aztec/foundation/json-rpc';
|
|
1
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
+
import { FailedL1TxSchema } from './failed_tx_store.js';
|
|
2
4
|
/**
|
|
3
5
|
* L1TxFailedStore implementation using the FileStore abstraction.
|
|
4
6
|
* Supports any backend that FileStore supports (GCS, S3, R2, local filesystem).
|
|
@@ -12,7 +14,7 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
12
14
|
async saveFailedTx(tx) {
|
|
13
15
|
const prefix = tx.receipt ? 'tx' : 'data';
|
|
14
16
|
const path = `${tx.failureType}/${prefix}-${tx.id}.json`;
|
|
15
|
-
const json =
|
|
17
|
+
const json = jsonStringify(tx, true);
|
|
16
18
|
const uri = await this.fileStore.save(path, Buffer.from(json), {
|
|
17
19
|
metadata: {
|
|
18
20
|
'content-type': 'application/json',
|
|
@@ -29,6 +31,6 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
29
31
|
}
|
|
30
32
|
async getFailedTx(uri) {
|
|
31
33
|
const data = await this.fileStore.read(uri);
|
|
32
|
-
return
|
|
34
|
+
return jsonParseWithSchema(data.toString(), FailedL1TxSchema);
|
|
33
35
|
}
|
|
34
36
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type FailedL1Tx, type FailedL1TxUri, type L1TxFailedStore } from './failed_tx_store.js';
|
|
1
|
+
export { type FailedL1Tx, FailedL1TxSchema, type FailedL1TxUri, type L1TxFailedStore } from './failed_tx_store.js';
|
|
2
2
|
export { createL1TxFailedStore } from './factory.js';
|
|
3
3
|
export { FileStoreL1TxFailedStore } from './file_store_failed_tx_store.js';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wdWJsaXNoZXIvbDFfdHhfZmFpbGVkX3N0b3JlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxLQUFLLFVBQVUsRUFBRSxnQkFBZ0IsRUFBRSxLQUFLLGFBQWEsRUFBRSxLQUFLLGVBQWUsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ25ILE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUNyRCxPQUFPLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/publisher/l1_tx_failed_store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/publisher/l1_tx_failed_store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACnH,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { EpochCache } from '@aztec/epoch-cache';
|
|
2
|
+
import { type RollupContract } from '@aztec/ethereum/contracts';
|
|
3
|
+
import { type L1TxUtils } from '@aztec/ethereum/l1-tx-utils';
|
|
4
|
+
import type { SlotNumber } from '@aztec/foundation/branded-types';
|
|
5
|
+
import { type Logger } from '@aztec/foundation/log';
|
|
6
|
+
import type { Hex } from 'viem';
|
|
7
|
+
import type { RequestWithExpiry } from './sequencer-publisher.js';
|
|
8
|
+
/** A request that was dropped by bundle simulation, with the decoded revert reason. */
|
|
9
|
+
export type DroppedRequest = {
|
|
10
|
+
request: RequestWithExpiry;
|
|
11
|
+
revertReason: string | undefined;
|
|
12
|
+
returnData: Hex | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Result of {@link SequencerBundleSimulator.simulate}.
|
|
16
|
+
*
|
|
17
|
+
* - `success`: simulation succeeded. `requests` is the filtered survivor list, `gasLimit` is
|
|
18
|
+
* the bumped gas limit derived from `gasUsed` (plus blob evaluation gas). `droppedRequests`
|
|
19
|
+
* lists the entries that were observed to revert in simulation.
|
|
20
|
+
* - `fallback`: the node does not support eth_simulateV1 (or the simulate call threw). The
|
|
21
|
+
* caller should send `requests` as-is with a safe gas limit (e.g. {@link MAX_L1_TX_LIMIT}).
|
|
22
|
+
* `droppedRequests` carries any entries that the first pass already proved reverted, so the
|
|
23
|
+
* caller does not re-include them when the second pass falls back.
|
|
24
|
+
* - `aborted`: the bundle cannot be sent. `droppedRequests` contains only entries that were
|
|
25
|
+
* actually observed to revert (so they can be reported as simulation failures); it is empty
|
|
26
|
+
* when the abort was caused by an empty input bundle.
|
|
27
|
+
*/
|
|
28
|
+
export type BundleSimulateResult = {
|
|
29
|
+
kind: 'success';
|
|
30
|
+
requests: RequestWithExpiry[];
|
|
31
|
+
gasLimit: bigint;
|
|
32
|
+
droppedRequests: DroppedRequest[];
|
|
33
|
+
} | {
|
|
34
|
+
kind: 'fallback';
|
|
35
|
+
requests: RequestWithExpiry[];
|
|
36
|
+
droppedRequests: DroppedRequest[];
|
|
37
|
+
} | {
|
|
38
|
+
kind: 'aborted';
|
|
39
|
+
reason: AbortReason;
|
|
40
|
+
droppedRequests: DroppedRequest[];
|
|
41
|
+
};
|
|
42
|
+
export type AbortReason = 'empty-bundle' | 'all-reverted' | 'second-pass-reverts';
|
|
43
|
+
/**
|
|
44
|
+
* Bundle-level simulator for the aggregate3 payload that `SequencerPublisher` is about to send.
|
|
45
|
+
*
|
|
46
|
+
* Runs `eth_simulateV1` against `Multicall3.aggregate3`, drops entries that revert, and returns
|
|
47
|
+
* a gasLimit for the survivors. When `eth_simulateV1` is unavailable, signals fallback to the
|
|
48
|
+
* caller so it can send the bundle as-is with a conservative gas limit.
|
|
49
|
+
*/
|
|
50
|
+
export declare class SequencerBundleSimulator {
|
|
51
|
+
private readonly deps;
|
|
52
|
+
private readonly log;
|
|
53
|
+
constructor(deps: {
|
|
54
|
+
getL1TxUtils: () => L1TxUtils;
|
|
55
|
+
rollupContract: RollupContract;
|
|
56
|
+
epochCache: EpochCache;
|
|
57
|
+
log?: Logger;
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* Simulates the given bundle near the end of the target slot and filters out entries
|
|
61
|
+
* that revert.
|
|
62
|
+
*
|
|
63
|
+
* - If all entries pass on the first pass, returns `success` with the gasLimit.
|
|
64
|
+
* - If some entries revert, re-simulates the survivors. If the second pass is clean, returns
|
|
65
|
+
* `success` with the survivors and dropped entries. If the second pass surfaces any revert,
|
|
66
|
+
* returns `aborted` — we refuse to send a bundle whose composition still has internal
|
|
67
|
+
* reverts after one round of filtering.
|
|
68
|
+
* - If eth_simulateV1 is unavailable, returns `fallback`. The caller is expected to send the
|
|
69
|
+
* bundle as-is with a safe gas limit.
|
|
70
|
+
*
|
|
71
|
+
* The simulation `block.timestamp` is the last L1 slot timestamp inside the target L2 slot.
|
|
72
|
+
* This still maps to the target L2 slot for propose's `validateHeader` and EIP-712 signature
|
|
73
|
+
* checks, while avoiding eth_simulateV1 rejecting a child block whose timestamp is not strictly
|
|
74
|
+
* greater than the current L1 head.
|
|
75
|
+
*
|
|
76
|
+
* Known limitation: on networks where L1 is mining behind cadence (missed L1 slots, anvil with
|
|
77
|
+
* overridden timestamps), the actual `block.timestamp` at send time can land in the prior L2
|
|
78
|
+
* slot. In that case `propose` would revert silently inside the multicall. The simulator does
|
|
79
|
+
* not detect this case because it simulates inside the target slot — the prior implementation
|
|
80
|
+
* used `min(predictedNextL1Ts, targetTimestamp)` to surface this failure mode at simulate time.
|
|
81
|
+
*/
|
|
82
|
+
simulate(validRequests: RequestWithExpiry[], targetSlot: SlotNumber): Promise<BundleSimulateResult>;
|
|
83
|
+
private buildSuccessResult;
|
|
84
|
+
/**
|
|
85
|
+
* `gasLimit = bumpGasLimit(ceil(gasUsed * 64 / 63))`, plus blob evaluation gas if a propose
|
|
86
|
+
* survived, capped at the L1 block gas limit.
|
|
87
|
+
*/
|
|
88
|
+
private computeGasLimit;
|
|
89
|
+
/**
|
|
90
|
+
* eth_simulateV1 cannot carry blob sidecar data, so disable the rollup's on-chain blob check
|
|
91
|
+
* when a propose is in the bundle.
|
|
92
|
+
*/
|
|
93
|
+
private buildStateOverrides;
|
|
94
|
+
private simulateAndDecode;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VxdWVuY2VyLWJ1bmRsZS1zaW11bGF0b3IuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wdWJsaXNoZXIvc2VxdWVuY2VyLWJ1bmRsZS1zaW11bGF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDckQsT0FBTyxFQUFjLEtBQUssY0FBYyxFQUF5Qyx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G,OAAO,CAAC,oBAAoB,CAAC,CA6E/G;IAED,OAAO,CAAC,kBAAkB;IAmB1B;;;OAGG;IACH,OAAO,CAAC,eAAe;IAMvB;;;OAGG;IACH,OAAO,CAAC,mBAAmB;YAOb,iBAAiB;CA8ChC"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { Multicall3, buildSimulationOverridesStateOverride } from '@aztec/ethereum/contracts';
|
|
2
|
+
import { MAX_L1_TX_LIMIT } from '@aztec/ethereum/l1-tx-utils';
|
|
3
|
+
import { formatViemError } from '@aztec/ethereum/utils';
|
|
4
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
+
import { getLastL1SlotTimestampForL2Slot } from '@aztec/stdlib/epoch-helpers';
|
|
6
|
+
/**
|
|
7
|
+
* Bundle-level simulator for the aggregate3 payload that `SequencerPublisher` is about to send.
|
|
8
|
+
*
|
|
9
|
+
* Runs `eth_simulateV1` against `Multicall3.aggregate3`, drops entries that revert, and returns
|
|
10
|
+
* a gasLimit for the survivors. When `eth_simulateV1` is unavailable, signals fallback to the
|
|
11
|
+
* caller so it can send the bundle as-is with a conservative gas limit.
|
|
12
|
+
*/ export class SequencerBundleSimulator {
|
|
13
|
+
deps;
|
|
14
|
+
log;
|
|
15
|
+
constructor(deps){
|
|
16
|
+
this.deps = deps;
|
|
17
|
+
this.log = deps.log ?? createLogger('sequencer:publisher:bundle-simulator');
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Simulates the given bundle near the end of the target slot and filters out entries
|
|
21
|
+
* that revert.
|
|
22
|
+
*
|
|
23
|
+
* - If all entries pass on the first pass, returns `success` with the gasLimit.
|
|
24
|
+
* - If some entries revert, re-simulates the survivors. If the second pass is clean, returns
|
|
25
|
+
* `success` with the survivors and dropped entries. If the second pass surfaces any revert,
|
|
26
|
+
* returns `aborted` — we refuse to send a bundle whose composition still has internal
|
|
27
|
+
* reverts after one round of filtering.
|
|
28
|
+
* - If eth_simulateV1 is unavailable, returns `fallback`. The caller is expected to send the
|
|
29
|
+
* bundle as-is with a safe gas limit.
|
|
30
|
+
*
|
|
31
|
+
* The simulation `block.timestamp` is the last L1 slot timestamp inside the target L2 slot.
|
|
32
|
+
* This still maps to the target L2 slot for propose's `validateHeader` and EIP-712 signature
|
|
33
|
+
* checks, while avoiding eth_simulateV1 rejecting a child block whose timestamp is not strictly
|
|
34
|
+
* greater than the current L1 head.
|
|
35
|
+
*
|
|
36
|
+
* Known limitation: on networks where L1 is mining behind cadence (missed L1 slots, anvil with
|
|
37
|
+
* overridden timestamps), the actual `block.timestamp` at send time can land in the prior L2
|
|
38
|
+
* slot. In that case `propose` would revert silently inside the multicall. The simulator does
|
|
39
|
+
* not detect this case because it simulates inside the target slot — the prior implementation
|
|
40
|
+
* used `min(predictedNextL1Ts, targetTimestamp)` to surface this failure mode at simulate time.
|
|
41
|
+
*/ async simulate(validRequests, targetSlot) {
|
|
42
|
+
if (validRequests.length === 0) {
|
|
43
|
+
return {
|
|
44
|
+
kind: 'aborted',
|
|
45
|
+
reason: 'empty-bundle',
|
|
46
|
+
droppedRequests: []
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
// Pin the publisher we'll use across the whole simulate call so that the publisher's rotation
|
|
50
|
+
// can't change l1TxUtils mid-flight.
|
|
51
|
+
const l1TxUtils = this.deps.getL1TxUtils();
|
|
52
|
+
const proposeRequest = validRequests.find((r)=>r.action === 'propose');
|
|
53
|
+
const simulateTimestamp = getLastL1SlotTimestampForL2Slot(targetSlot, this.deps.epochCache.getL1Constants());
|
|
54
|
+
const firstPassOverrides = await this.buildStateOverrides(!!proposeRequest);
|
|
55
|
+
const firstPass = await this.simulateAndDecode(l1TxUtils, validRequests, simulateTimestamp, firstPassOverrides);
|
|
56
|
+
if (firstPass.kind === 'fallback') {
|
|
57
|
+
this.log.warn('Bundle simulate fallback (eth_simulateV1 unavailable); caller will send bundle as-is', {
|
|
58
|
+
actions: validRequests.map((r)=>r.action)
|
|
59
|
+
});
|
|
60
|
+
return {
|
|
61
|
+
kind: 'fallback',
|
|
62
|
+
requests: validRequests,
|
|
63
|
+
droppedRequests: []
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (firstPass.survivors.length === 0) {
|
|
67
|
+
this.log.warn('All bundle entries dropped in simulation; aborting send', {
|
|
68
|
+
actions: validRequests.map((r)=>r.action)
|
|
69
|
+
});
|
|
70
|
+
return {
|
|
71
|
+
kind: 'aborted',
|
|
72
|
+
reason: 'all-reverted',
|
|
73
|
+
droppedRequests: firstPass.droppedRequests
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (firstPass.droppedRequests.length === 0) {
|
|
77
|
+
return this.buildSuccessResult(l1TxUtils, firstPass.survivors, [], firstPass.gasUsed, proposeRequest);
|
|
78
|
+
}
|
|
79
|
+
this.log.warn('Some bundle entries reverted; re-simulating reduced bundle', {
|
|
80
|
+
droppedActions: firstPass.droppedRequests.map((d)=>d.request.action),
|
|
81
|
+
remainingActions: firstPass.survivors.map((r)=>r.action)
|
|
82
|
+
});
|
|
83
|
+
// Rebuild overrides for the reduced bundle: if propose was dropped, we no longer need the blob-check override
|
|
84
|
+
const proposeSurvived = proposeRequest !== undefined && firstPass.survivors.includes(proposeRequest);
|
|
85
|
+
const secondPassOverrides = proposeSurvived ? firstPassOverrides : await this.buildStateOverrides(false);
|
|
86
|
+
const secondPass = await this.simulateAndDecode(l1TxUtils, firstPass.survivors, simulateTimestamp, secondPassOverrides);
|
|
87
|
+
if (secondPass.kind === 'fallback') {
|
|
88
|
+
this.log.warn('Bundle simulate errored on second pass (eth_simulateV1 unavailable); sending first-pass survivors as-is', {
|
|
89
|
+
actions: firstPass.survivors.map((r)=>r.action),
|
|
90
|
+
droppedActions: firstPass.droppedRequests.map((d)=>d.request.action)
|
|
91
|
+
});
|
|
92
|
+
return {
|
|
93
|
+
kind: 'fallback',
|
|
94
|
+
requests: firstPass.survivors,
|
|
95
|
+
droppedRequests: firstPass.droppedRequests
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
// We refuse to chase reverts through repeated trimming: anything other than a clean second pass aborts the whole send
|
|
99
|
+
if (secondPass.droppedRequests.length > 0) {
|
|
100
|
+
this.log.error('Re-simulate surfaced reverts; aborting send', {
|
|
101
|
+
secondPassDroppedActions: secondPass.droppedRequests.map((d)=>d.request.action)
|
|
102
|
+
});
|
|
103
|
+
return {
|
|
104
|
+
kind: 'aborted',
|
|
105
|
+
reason: 'second-pass-reverts',
|
|
106
|
+
droppedRequests: [
|
|
107
|
+
...firstPass.droppedRequests,
|
|
108
|
+
...secondPass.droppedRequests
|
|
109
|
+
]
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
return this.buildSuccessResult(l1TxUtils, secondPass.survivors, firstPass.droppedRequests, secondPass.gasUsed, proposeRequest);
|
|
113
|
+
}
|
|
114
|
+
buildSuccessResult(l1TxUtils, survivors, droppedRequests, bundleGasUsed, proposeRequest) {
|
|
115
|
+
const proposeSurvived = proposeRequest !== undefined && survivors.includes(proposeRequest);
|
|
116
|
+
const blobEvaluationGas = proposeSurvived ? proposeRequest?.blobEvaluationGas ?? 0n : 0n;
|
|
117
|
+
const gasLimit = this.computeGasLimit(l1TxUtils, bundleGasUsed, blobEvaluationGas);
|
|
118
|
+
this.log.debug('Bundle simulate complete', {
|
|
119
|
+
survivingRequests: survivors.length,
|
|
120
|
+
bundleGasUsed,
|
|
121
|
+
gasLimit,
|
|
122
|
+
actions: survivors.map((r)=>r.action)
|
|
123
|
+
});
|
|
124
|
+
return {
|
|
125
|
+
kind: 'success',
|
|
126
|
+
requests: survivors,
|
|
127
|
+
gasLimit,
|
|
128
|
+
droppedRequests
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* `gasLimit = bumpGasLimit(ceil(gasUsed * 64 / 63))`, plus blob evaluation gas if a propose
|
|
133
|
+
* survived, capped at the L1 block gas limit.
|
|
134
|
+
*/ computeGasLimit(l1TxUtils, bundleGasUsed, blobEvaluationGas) {
|
|
135
|
+
const gasUsedWithEip150 = (bundleGasUsed * 64n + 62n) / 63n;
|
|
136
|
+
const gasLimit = l1TxUtils.bumpGasLimit(gasUsedWithEip150) + blobEvaluationGas;
|
|
137
|
+
return gasLimit > MAX_L1_TX_LIMIT ? MAX_L1_TX_LIMIT : gasLimit;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* eth_simulateV1 cannot carry blob sidecar data, so disable the rollup's on-chain blob check
|
|
141
|
+
* when a propose is in the bundle.
|
|
142
|
+
*/ buildStateOverrides(hasProposeAction) {
|
|
143
|
+
return buildSimulationOverridesStateOverride(this.deps.rollupContract, hasProposeAction ? {
|
|
144
|
+
disableBlobCheck: true
|
|
145
|
+
} : undefined);
|
|
146
|
+
}
|
|
147
|
+
async simulateAndDecode(l1TxUtils, requests, simulateTimestamp, stateOverrides) {
|
|
148
|
+
let simResult;
|
|
149
|
+
try {
|
|
150
|
+
simResult = await Multicall3.simulateAggregate3(requests.map((r)=>({
|
|
151
|
+
to: r.request.to,
|
|
152
|
+
data: r.request.data,
|
|
153
|
+
abi: r.request.abi
|
|
154
|
+
})), l1TxUtils, {
|
|
155
|
+
blockOverrides: {
|
|
156
|
+
time: simulateTimestamp,
|
|
157
|
+
gasLimit: MAX_L1_TX_LIMIT * 2n
|
|
158
|
+
},
|
|
159
|
+
stateOverrides,
|
|
160
|
+
gas: MAX_L1_TX_LIMIT,
|
|
161
|
+
fallbackGasEstimate: MAX_L1_TX_LIMIT
|
|
162
|
+
});
|
|
163
|
+
} catch (err) {
|
|
164
|
+
this.log.warn('Bundle simulate threw; treating as fallback', {
|
|
165
|
+
err: formatViemError(err),
|
|
166
|
+
actions: requests.map((r)=>r.action)
|
|
167
|
+
});
|
|
168
|
+
return {
|
|
169
|
+
kind: 'fallback'
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
if (simResult.kind === 'fallback') {
|
|
173
|
+
return {
|
|
174
|
+
kind: 'fallback'
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
const survivors = [];
|
|
178
|
+
const droppedRequests = [];
|
|
179
|
+
for(let i = 0; i < requests.length; i++){
|
|
180
|
+
const entry = simResult.entries[i];
|
|
181
|
+
if (entry.success) {
|
|
182
|
+
survivors.push(requests[i]);
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
droppedRequests.push({
|
|
186
|
+
request: requests[i],
|
|
187
|
+
revertReason: entry.revertReason,
|
|
188
|
+
returnData: entry.returnData
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
kind: 'decoded',
|
|
193
|
+
survivors,
|
|
194
|
+
droppedRequests,
|
|
195
|
+
gasUsed: simResult.gasUsed
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -6,7 +6,6 @@ import type { GovernanceProposerContract, RollupContract } from '@aztec/ethereum
|
|
|
6
6
|
import type { L1TxUtils } from '@aztec/ethereum/l1-tx-utils';
|
|
7
7
|
import type { PublisherManager } from '@aztec/ethereum/publisher-manager';
|
|
8
8
|
import type { DateProvider } from '@aztec/foundation/timer';
|
|
9
|
-
import type { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
|
|
10
9
|
import type { TelemetryClient } from '@aztec/telemetry-client';
|
|
11
10
|
import { NodeKeystoreAdapter } from '@aztec/validator-client';
|
|
12
11
|
import type { SequencerClientConfig } from '../config.js';
|
|
@@ -31,7 +30,6 @@ export declare class SequencerPublisherFactory {
|
|
|
31
30
|
epochCache: EpochCache;
|
|
32
31
|
rollupContract: RollupContract;
|
|
33
32
|
governanceProposerContract: GovernanceProposerContract;
|
|
34
|
-
slashFactoryContract: SlashFactoryContract;
|
|
35
33
|
nodeKeyStore: NodeKeystoreAdapter;
|
|
36
34
|
logger?: Logger;
|
|
37
35
|
});
|
|
@@ -46,7 +44,7 @@ export declare class SequencerPublisherFactory {
|
|
|
46
44
|
* @returns A new SequencerPublisher instance.
|
|
47
45
|
*/
|
|
48
46
|
create(validatorAddress?: EthAddress): Promise<AttestorPublisherPair>;
|
|
49
|
-
/**
|
|
50
|
-
|
|
47
|
+
/** Stops all publishers managed by this factory. Used during sequencer shutdown. */
|
|
48
|
+
stopAll(): Promise<void>;
|
|
51
49
|
}
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
50
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VxdWVuY2VyLXB1Ymxpc2hlci1mYWN0b3J5LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcHVibGlzaGVyL3NlcXVlbmNlci1wdWJsaXNoZXItZmFjdG9yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDdkQsT0FBTyxFQUFFLEtBQUssTUFBTSxFQUFnQixNQUFNLHFCQUFxQixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDckUsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDckQsT0FBTyxLQUFLLEVBQUUsMEJBQTBCLEVBQUUsY0FBYyxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDNUYsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDN0QsT0FBTyxLQUFLLEVBQW1CLGdCQUFnQixFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFFM0YsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDNUQsT0FBTyxLQUFLLEVBQUUsZUFBZSxFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDL0QsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0seUJBQXlC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0JBQWdCLENBQUMsRUFBRSxVQUFVLEdBQUcsT0FBTyxDQUFDLHFCQUFxQixDQUFDLENBbURqRjtJQUVELG9GQUFvRjtJQUN2RSxPQUFPLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUVwQztDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencer-publisher-factory.d.ts","sourceRoot":"","sources":["../../src/publisher/sequencer-publisher-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,0BAA0B,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAE3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"sequencer-publisher-factory.d.ts","sourceRoot":"","sources":["../../src/publisher/sequencer-publisher-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,0BAA0B,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,KAAK,EAAE,SAAS,EAA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AmDjF;IAED,oFAAoF;IACvE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAEpC;CACF"}
|
|
@@ -59,7 +59,6 @@ export class SequencerPublisherFactory {
|
|
|
59
59
|
epochCache: this.deps.epochCache,
|
|
60
60
|
governanceProposerContract: this.deps.governanceProposerContract,
|
|
61
61
|
slashingProposerContract,
|
|
62
|
-
slashFactoryContract: this.deps.slashFactoryContract,
|
|
63
62
|
dateProvider: this.deps.dateProvider,
|
|
64
63
|
metrics: this.publisherMetrics,
|
|
65
64
|
lastActions: this.lastActions,
|
|
@@ -70,7 +69,7 @@ export class SequencerPublisherFactory {
|
|
|
70
69
|
publisher
|
|
71
70
|
};
|
|
72
71
|
}
|
|
73
|
-
/**
|
|
74
|
-
this.deps.publisherManager.
|
|
72
|
+
/** Stops all publishers managed by this factory. Used during sequencer shutdown. */ async stopAll() {
|
|
73
|
+
await this.deps.publisherManager.stop();
|
|
75
74
|
}
|
|
76
75
|
}
|