@aztec/node-lib 6.0.0-nightly.20260812 → 6.0.0-nightly.20260822
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.
|
@@ -69,11 +69,11 @@ import { Attributes, Metrics, createUpDownCounterWithDefault } from '@aztec/tele
|
|
|
69
69
|
// Record number of attempts until mined
|
|
70
70
|
const attempts = isCancelTx ? state.cancelTxHashes.length : state.txHashes.length;
|
|
71
71
|
this.txAttemptsUntilMined.record(attempts, attributes);
|
|
72
|
-
// Record gas
|
|
72
|
+
// Record fees per gas at end state, converted from wei to gwei to match metric unit definitions
|
|
73
73
|
const weiToGwei = 1e9;
|
|
74
|
-
const maxPriorityFeeGwei = Number(state.
|
|
75
|
-
const maxFeeGwei = Number(state.
|
|
76
|
-
const blobFeeGwei = state.
|
|
74
|
+
const maxPriorityFeeGwei = Number(state.feesPerGas.maxPriorityFeePerGas) / weiToGwei;
|
|
75
|
+
const maxFeeGwei = Number(state.feesPerGas.maxFeePerGas) / weiToGwei;
|
|
76
|
+
const blobFeeGwei = state.feesPerGas.maxFeePerBlobGas ? Number(state.feesPerGas.maxFeePerBlobGas) / weiToGwei : undefined;
|
|
77
77
|
this.maxPriorityFeeHistogram.record(maxPriorityFeeGwei, attributes);
|
|
78
78
|
this.maxFeeHistogram.record(maxFeeGwei, attributes);
|
|
79
79
|
if (blobFeeGwei !== undefined) {
|
|
@@ -86,4 +86,4 @@ export declare class L1TxStore implements IL1TxStore {
|
|
|
86
86
|
*/
|
|
87
87
|
private deserializeBlobInputs;
|
|
88
88
|
}
|
|
89
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
89
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibDFfdHhfc3RvcmUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdG9yZXMvbDFfdHhfc3RvcmUudHMiXSwibmFtZXMiOltdLC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SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CA0BvF;IAED;;;;OAIG;IACU,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAY9E;IAED;;;OAGG;IACU,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWvD;IAED;;;OAGG;IACU,cAAc,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAS/C;IAED;;OAEG;IACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAGlC;IAED;;OAEG;IACH,OAAO,CAAC,cAAc;IAkCtB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAgDxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAO3B;;OAEG;IACH,OAAO,CAAC,qBAAqB;CAY9B"}
|
|
@@ -189,10 +189,10 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
189
189
|
txHashes: state.txHashes,
|
|
190
190
|
cancelTxHashes: state.cancelTxHashes,
|
|
191
191
|
gasLimit: state.gasLimit.toString(),
|
|
192
|
-
|
|
193
|
-
maxFeePerGas: state.
|
|
194
|
-
maxPriorityFeePerGas: state.
|
|
195
|
-
maxFeePerBlobGas: state.
|
|
192
|
+
feesPerGas: {
|
|
193
|
+
maxFeePerGas: state.feesPerGas.maxFeePerGas.toString(),
|
|
194
|
+
maxPriorityFeePerGas: state.feesPerGas.maxPriorityFeePerGas.toString(),
|
|
195
|
+
maxFeePerBlobGas: state.feesPerGas.maxFeePerBlobGas?.toString()
|
|
196
196
|
},
|
|
197
197
|
txConfigOverrides,
|
|
198
198
|
request: {
|
|
@@ -213,6 +213,10 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
213
213
|
/**
|
|
214
214
|
* Deserializes a stored state back to L1TxState.
|
|
215
215
|
*/ deserializeState(stored, blobInputs) {
|
|
216
|
+
const feesPerGas = stored.feesPerGas ?? stored.gasPrice;
|
|
217
|
+
if (!feesPerGas) {
|
|
218
|
+
throw new Error(`State ${stored.id} has no fees per gas`);
|
|
219
|
+
}
|
|
216
220
|
const txConfigOverrides = {
|
|
217
221
|
...stored.txConfigOverrides,
|
|
218
222
|
gasLimit: stored.txConfigOverrides.gasLimit !== undefined ? BigInt(stored.txConfigOverrides.gasLimit) : undefined,
|
|
@@ -230,10 +234,10 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
230
234
|
txHashes: stored.txHashes,
|
|
231
235
|
cancelTxHashes: stored.cancelTxHashes,
|
|
232
236
|
gasLimit: BigInt(stored.gasLimit),
|
|
233
|
-
|
|
234
|
-
maxFeePerGas: BigInt(
|
|
235
|
-
maxPriorityFeePerGas: BigInt(
|
|
236
|
-
maxFeePerBlobGas:
|
|
237
|
+
feesPerGas: {
|
|
238
|
+
maxFeePerGas: BigInt(feesPerGas.maxFeePerGas),
|
|
239
|
+
maxPriorityFeePerGas: BigInt(feesPerGas.maxPriorityFeePerGas),
|
|
240
|
+
maxFeePerBlobGas: feesPerGas.maxFeePerBlobGas ? BigInt(feesPerGas.maxFeePerBlobGas) : undefined
|
|
237
241
|
},
|
|
238
242
|
txConfigOverrides,
|
|
239
243
|
request: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/node-lib",
|
|
3
|
-
"version": "6.0.0-nightly.
|
|
3
|
+
"version": "6.0.0-nightly.20260822",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"typedocOptions": {
|
|
6
6
|
"entryPoints": [
|
|
@@ -66,28 +66,20 @@
|
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@aztec/archiver": "6.0.0-nightly.
|
|
70
|
-
"@aztec/
|
|
71
|
-
"@aztec/
|
|
72
|
-
"@aztec/
|
|
73
|
-
"@aztec/
|
|
74
|
-
"@aztec/
|
|
75
|
-
"@aztec/
|
|
76
|
-
"@aztec/
|
|
77
|
-
"@aztec/
|
|
78
|
-
"@aztec/
|
|
79
|
-
"@aztec/prover-client": "6.0.0-nightly.20260812",
|
|
80
|
-
"@aztec/sequencer-client": "6.0.0-nightly.20260812",
|
|
81
|
-
"@aztec/simulator": "6.0.0-nightly.20260812",
|
|
82
|
-
"@aztec/stdlib": "6.0.0-nightly.20260812",
|
|
83
|
-
"@aztec/telemetry-client": "6.0.0-nightly.20260812",
|
|
84
|
-
"@aztec/validator-client": "6.0.0-nightly.20260812",
|
|
85
|
-
"@aztec/world-state": "6.0.0-nightly.20260812",
|
|
69
|
+
"@aztec/archiver": "6.0.0-nightly.20260822",
|
|
70
|
+
"@aztec/blob-lib": "6.0.0-nightly.20260822",
|
|
71
|
+
"@aztec/constants": "6.0.0-nightly.20260822",
|
|
72
|
+
"@aztec/ethereum": "6.0.0-nightly.20260822",
|
|
73
|
+
"@aztec/foundation": "6.0.0-nightly.20260822",
|
|
74
|
+
"@aztec/kv-store": "6.0.0-nightly.20260822",
|
|
75
|
+
"@aztec/p2p": "6.0.0-nightly.20260822",
|
|
76
|
+
"@aztec/stdlib": "6.0.0-nightly.20260822",
|
|
77
|
+
"@aztec/telemetry-client": "6.0.0-nightly.20260822",
|
|
78
|
+
"@aztec/world-state": "6.0.0-nightly.20260822",
|
|
86
79
|
"tslib": "^2.4.0"
|
|
87
80
|
},
|
|
88
81
|
"devDependencies": {
|
|
89
|
-
"@aztec/
|
|
90
|
-
"@aztec/node-keystore": "6.0.0-nightly.20260812",
|
|
82
|
+
"@aztec/node-keystore": "6.0.0-nightly.20260822",
|
|
91
83
|
"@jest/globals": "^30.0.0",
|
|
92
84
|
"@types/jest": "^30.0.0",
|
|
93
85
|
"@types/node": "^22.15.17",
|
|
@@ -92,12 +92,12 @@ export class L1TxMetrics implements IL1TxMetrics {
|
|
|
92
92
|
const attempts = isCancelTx ? state.cancelTxHashes.length : state.txHashes.length;
|
|
93
93
|
this.txAttemptsUntilMined.record(attempts, attributes);
|
|
94
94
|
|
|
95
|
-
// Record gas
|
|
95
|
+
// Record fees per gas at end state, converted from wei to gwei to match metric unit definitions
|
|
96
96
|
const weiToGwei = 1e9;
|
|
97
|
-
const maxPriorityFeeGwei = Number(state.
|
|
98
|
-
const maxFeeGwei = Number(state.
|
|
99
|
-
const blobFeeGwei = state.
|
|
100
|
-
? Number(state.
|
|
97
|
+
const maxPriorityFeeGwei = Number(state.feesPerGas.maxPriorityFeePerGas) / weiToGwei;
|
|
98
|
+
const maxFeeGwei = Number(state.feesPerGas.maxFeePerGas) / weiToGwei;
|
|
99
|
+
const blobFeeGwei = state.feesPerGas.maxFeePerBlobGas
|
|
100
|
+
? Number(state.feesPerGas.maxFeePerBlobGas) / weiToGwei
|
|
101
101
|
: undefined;
|
|
102
102
|
|
|
103
103
|
this.maxPriorityFeeHistogram.record(maxPriorityFeeGwei, attributes);
|
|
@@ -16,9 +16,9 @@ interface SerializableL1TxRequest {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* Serializable version of
|
|
19
|
+
* Serializable version of FeesPerGas for storage.
|
|
20
20
|
*/
|
|
21
|
-
interface
|
|
21
|
+
interface SerializableFeesPerGas {
|
|
22
22
|
maxFeePerGas: string;
|
|
23
23
|
maxPriorityFeePerGas: string;
|
|
24
24
|
maxFeePerBlobGas?: string;
|
|
@@ -57,7 +57,7 @@ interface SerializableL1TxState {
|
|
|
57
57
|
txHashes: string[];
|
|
58
58
|
cancelTxHashes: string[];
|
|
59
59
|
gasLimit: string;
|
|
60
|
-
|
|
60
|
+
feesPerGas: SerializableFeesPerGas;
|
|
61
61
|
txConfigOverrides: SerializableL1TxConfig;
|
|
62
62
|
request: SerializableL1TxRequest;
|
|
63
63
|
status: number;
|
|
@@ -69,6 +69,16 @@ interface SerializableL1TxState {
|
|
|
69
69
|
blobMetadata?: SerializableBlobMetadata;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Shape accepted when reading a state back. States written before the rename spelled `feesPerGas` as `gasPrice`, so
|
|
74
|
+
* both are optional here and `deserializeState` takes whichever is present. Nothing writes `gasPrice` any more; drop
|
|
75
|
+
* it once no store can hold states predating the rename.
|
|
76
|
+
*/
|
|
77
|
+
type StoredL1TxState = Omit<SerializableL1TxState, 'feesPerGas'> & {
|
|
78
|
+
feesPerGas?: SerializableFeesPerGas;
|
|
79
|
+
gasPrice?: SerializableFeesPerGas;
|
|
80
|
+
};
|
|
81
|
+
|
|
72
82
|
/**
|
|
73
83
|
* Serializable blob inputs for separate storage.
|
|
74
84
|
*/
|
|
@@ -167,7 +177,7 @@ export class L1TxStore implements IL1TxStore {
|
|
|
167
177
|
const stateId = parseInt(stateIdStr, 10);
|
|
168
178
|
|
|
169
179
|
try {
|
|
170
|
-
const serialized:
|
|
180
|
+
const serialized: StoredL1TxState = JSON.parse(stateJson);
|
|
171
181
|
|
|
172
182
|
// Load blobs if they exist
|
|
173
183
|
let blobInputs: L1BlobInputs | undefined;
|
|
@@ -207,7 +217,7 @@ export class L1TxStore implements IL1TxStore {
|
|
|
207
217
|
}
|
|
208
218
|
|
|
209
219
|
try {
|
|
210
|
-
const serialized:
|
|
220
|
+
const serialized: StoredL1TxState = JSON.parse(stateJson);
|
|
211
221
|
|
|
212
222
|
// Load blobs if they exist
|
|
213
223
|
let blobInputs: L1BlobInputs | undefined;
|
|
@@ -300,10 +310,10 @@ export class L1TxStore implements IL1TxStore {
|
|
|
300
310
|
txHashes: state.txHashes,
|
|
301
311
|
cancelTxHashes: state.cancelTxHashes,
|
|
302
312
|
gasLimit: state.gasLimit.toString(),
|
|
303
|
-
|
|
304
|
-
maxFeePerGas: state.
|
|
305
|
-
maxPriorityFeePerGas: state.
|
|
306
|
-
maxFeePerBlobGas: state.
|
|
313
|
+
feesPerGas: {
|
|
314
|
+
maxFeePerGas: state.feesPerGas.maxFeePerGas.toString(),
|
|
315
|
+
maxPriorityFeePerGas: state.feesPerGas.maxPriorityFeePerGas.toString(),
|
|
316
|
+
maxFeePerBlobGas: state.feesPerGas.maxFeePerBlobGas?.toString(),
|
|
307
317
|
},
|
|
308
318
|
txConfigOverrides,
|
|
309
319
|
request: {
|
|
@@ -325,7 +335,12 @@ export class L1TxStore implements IL1TxStore {
|
|
|
325
335
|
/**
|
|
326
336
|
* Deserializes a stored state back to L1TxState.
|
|
327
337
|
*/
|
|
328
|
-
private deserializeState(stored:
|
|
338
|
+
private deserializeState(stored: StoredL1TxState, blobInputs?: L1BlobInputs): L1TxState {
|
|
339
|
+
const feesPerGas = stored.feesPerGas ?? stored.gasPrice;
|
|
340
|
+
if (!feesPerGas) {
|
|
341
|
+
throw new Error(`State ${stored.id} has no fees per gas`);
|
|
342
|
+
}
|
|
343
|
+
|
|
329
344
|
const txConfigOverrides: L1TxConfig = {
|
|
330
345
|
...stored.txConfigOverrides,
|
|
331
346
|
gasLimit: stored.txConfigOverrides.gasLimit !== undefined ? BigInt(stored.txConfigOverrides.gasLimit) : undefined,
|
|
@@ -348,10 +363,10 @@ export class L1TxStore implements IL1TxStore {
|
|
|
348
363
|
txHashes: stored.txHashes as `0x${string}`[],
|
|
349
364
|
cancelTxHashes: stored.cancelTxHashes as `0x${string}`[],
|
|
350
365
|
gasLimit: BigInt(stored.gasLimit),
|
|
351
|
-
|
|
352
|
-
maxFeePerGas: BigInt(
|
|
353
|
-
maxPriorityFeePerGas: BigInt(
|
|
354
|
-
maxFeePerBlobGas:
|
|
366
|
+
feesPerGas: {
|
|
367
|
+
maxFeePerGas: BigInt(feesPerGas.maxFeePerGas),
|
|
368
|
+
maxPriorityFeePerGas: BigInt(feesPerGas.maxPriorityFeePerGas),
|
|
369
|
+
maxFeePerBlobGas: feesPerGas.maxFeePerBlobGas ? BigInt(feesPerGas.maxFeePerBlobGas) : undefined,
|
|
355
370
|
},
|
|
356
371
|
txConfigOverrides,
|
|
357
372
|
request: {
|