@aztec/node-lib 4.0.0-nightly.20260108 → 4.0.0-nightly.20260111
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.
|
@@ -26,4 +26,4 @@ export declare class L1TxMetrics implements IL1TxMetrics {
|
|
|
26
26
|
recordMinedTx(state: L1TxState, l1Timestamp: Date): void;
|
|
27
27
|
recordDroppedTx(state: L1TxState): void;
|
|
28
28
|
}
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibDFfdHhfbWV0cmljcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21ldHJpY3MvbDFfdHhfbWV0cmljcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsU0FBUyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFHM0UsT0FBTyxFQUE4QixLQUFLLEtBQUssRUFBK0IsTUFBTSx5QkFBeUIsQ0FBQztBQUU5RyxNQUFNLE1BQU0sU0FBUyxHQUFHLFdBQVcsR0FBRyxRQUFRLEdBQUcsT0FBTyxDQUFDO0FBRXpEOztHQUVHO0FBQ0gscUJBQWEsV0FBWSxZQUFXLFlBQVk7SUFtQjVDLE9BQU8sQ0FBQyxLQUFLO0lBQ2IsT0FBTyxDQUFDLEtBQUs7SUFDYixPQUFPLENBQUMsTUFBTTtJQW5CaEIsT0FBTyxDQUFDLGVBQWUsQ0FBWTtJQUduQyxPQUFPLENBQUMsb0JBQW9CLENBQVk7SUFHeEMsT0FBTyxDQUFDLFlBQVksQ0FBZ0I7SUFDcEMsT0FBTyxDQUFDLGVBQWUsQ0FBZ0I7SUFDdkMsT0FBTyxDQUFDLGdCQUFnQixDQUFnQjtJQUN4QyxPQUFPLENBQUMsZUFBZSxDQUFnQjtJQUd2QyxPQUFPLENBQUMsdUJBQXVCLENBQVk7SUFDM0MsT0FBTyxDQUFDLGVBQWUsQ0FBWTtJQUNuQyxPQUFPLENBQUMsZ0JBQWdCLENBQVk7SUFFcEMsWUFDVSxLQUFLLEVBQUUsS0FBSyxFQUNaLEtBQUssR0FBRSxTQUFtQixFQUMxQixNQUFNLHlDQUFzQyxFQW1CckQ7SUFFRDs7OztPQUlHO0lBQ0ksYUFBYSxDQUFDLEtBQUssRUFBRSxTQUFTLEVBQUUsV0FBVyxFQUFFLElBQUksR0FBRyxJQUFJLENBb0Q5RDtJQUVNLGVBQWUsQ0FBQyxLQUFLLEVBQUUsU0FBUyxHQUFHLElBQUksQ0FpQjdDO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"l1_tx_metrics.d.ts","sourceRoot":"","sources":["../../src/metrics/l1_tx_metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAG3E,OAAO,
|
|
1
|
+
{"version":3,"file":"l1_tx_metrics.d.ts","sourceRoot":"","sources":["../../src/metrics/l1_tx_metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAG3E,OAAO,EAA8B,KAAK,KAAK,EAA+B,MAAM,yBAAyB,CAAC;AAE9G,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD;;GAEG;AACH,qBAAa,WAAY,YAAW,YAAY;IAmB5C,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,MAAM;IAnBhB,OAAO,CAAC,eAAe,CAAY;IAGnC,OAAO,CAAC,oBAAoB,CAAY;IAGxC,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,eAAe,CAAgB;IACvC,OAAO,CAAC,gBAAgB,CAAgB;IACxC,OAAO,CAAC,eAAe,CAAgB;IAGvC,OAAO,CAAC,uBAAuB,CAAY;IAC3C,OAAO,CAAC,eAAe,CAAY;IACnC,OAAO,CAAC,gBAAgB,CAAY;IAEpC,YACU,KAAK,EAAE,KAAK,EACZ,KAAK,GAAE,SAAmB,EAC1B,MAAM,yCAAsC,EAmBrD;IAED;;;;OAIG;IACI,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,GAAG,IAAI,CAoD9D;IAEM,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAiB7C;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TxUtilsState } from '@aztec/ethereum/l1-tx-utils';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
-
import { Attributes, Metrics
|
|
3
|
+
import { Attributes, Metrics } from '@aztec/telemetry-client';
|
|
4
4
|
/**
|
|
5
5
|
* Metrics for L1 transaction utils tracking tx lifecycle and gas costs.
|
|
6
6
|
*/ export class L1TxMetrics {
|
|
@@ -24,47 +24,15 @@ import { Attributes, Metrics, ValueType } from '@aztec/telemetry-client';
|
|
|
24
24
|
this.meter = meter;
|
|
25
25
|
this.scope = scope;
|
|
26
26
|
this.logger = logger;
|
|
27
|
-
this.txMinedDuration = this.meter.createHistogram(Metrics.L1_TX_MINED_DURATION
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
this.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
37
|
-
this.txMinedCount = this.meter.createUpDownCounter(Metrics.L1_TX_MINED_COUNT, {
|
|
38
|
-
description: 'Count of transactions successfully mined',
|
|
39
|
-
valueType: ValueType.INT
|
|
40
|
-
});
|
|
41
|
-
this.txRevertedCount = this.meter.createUpDownCounter(Metrics.L1_TX_REVERTED_COUNT, {
|
|
42
|
-
description: 'Count of transactions that reverted',
|
|
43
|
-
valueType: ValueType.INT
|
|
44
|
-
});
|
|
45
|
-
this.txCancelledCount = this.meter.createUpDownCounter(Metrics.L1_TX_CANCELLED_COUNT, {
|
|
46
|
-
description: 'Count of transactions cancelled',
|
|
47
|
-
valueType: ValueType.INT
|
|
48
|
-
});
|
|
49
|
-
this.txNotMinedCount = this.meter.createUpDownCounter(Metrics.L1_TX_NOT_MINED_COUNT, {
|
|
50
|
-
description: 'Count of transactions not mined (timed out)',
|
|
51
|
-
valueType: ValueType.INT
|
|
52
|
-
});
|
|
53
|
-
this.maxPriorityFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_MAX_PRIORITY_FEE, {
|
|
54
|
-
description: 'Max priority fee per gas at tx end state (in wei)',
|
|
55
|
-
unit: 'wei',
|
|
56
|
-
valueType: ValueType.INT
|
|
57
|
-
});
|
|
58
|
-
this.maxFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_MAX_FEE, {
|
|
59
|
-
description: 'Max fee per gas at tx end state (in wei)',
|
|
60
|
-
unit: 'wei',
|
|
61
|
-
valueType: ValueType.INT
|
|
62
|
-
});
|
|
63
|
-
this.blobFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_BLOB_FEE, {
|
|
64
|
-
description: 'Max fee per blob gas at tx end state (in wei)',
|
|
65
|
-
unit: 'wei',
|
|
66
|
-
valueType: ValueType.INT
|
|
67
|
-
});
|
|
27
|
+
this.txMinedDuration = this.meter.createHistogram(Metrics.L1_TX_MINED_DURATION);
|
|
28
|
+
this.txAttemptsUntilMined = this.meter.createHistogram(Metrics.L1_TX_ATTEMPTS_UNTIL_MINED);
|
|
29
|
+
this.txMinedCount = this.meter.createUpDownCounter(Metrics.L1_TX_MINED_COUNT);
|
|
30
|
+
this.txRevertedCount = this.meter.createUpDownCounter(Metrics.L1_TX_REVERTED_COUNT);
|
|
31
|
+
this.txCancelledCount = this.meter.createUpDownCounter(Metrics.L1_TX_CANCELLED_COUNT);
|
|
32
|
+
this.txNotMinedCount = this.meter.createUpDownCounter(Metrics.L1_TX_NOT_MINED_COUNT);
|
|
33
|
+
this.maxPriorityFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_MAX_PRIORITY_FEE);
|
|
34
|
+
this.maxFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_MAX_FEE);
|
|
35
|
+
this.blobFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_BLOB_FEE);
|
|
68
36
|
}
|
|
69
37
|
/**
|
|
70
38
|
* Records metrics when a transaction is mined.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/node-lib",
|
|
3
|
-
"version": "4.0.0-nightly.
|
|
3
|
+
"version": "4.0.0-nightly.20260111",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./actions": "./dest/actions/index.js",
|
|
@@ -57,29 +57,29 @@
|
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@aztec/archiver": "4.0.0-nightly.
|
|
61
|
-
"@aztec/bb-prover": "4.0.0-nightly.
|
|
62
|
-
"@aztec/blob-client": "4.0.0-nightly.
|
|
63
|
-
"@aztec/constants": "4.0.0-nightly.
|
|
64
|
-
"@aztec/epoch-cache": "4.0.0-nightly.
|
|
65
|
-
"@aztec/ethereum": "4.0.0-nightly.
|
|
66
|
-
"@aztec/foundation": "4.0.0-nightly.
|
|
67
|
-
"@aztec/kv-store": "4.0.0-nightly.
|
|
68
|
-
"@aztec/merkle-tree": "4.0.0-nightly.
|
|
69
|
-
"@aztec/p2p": "4.0.0-nightly.
|
|
70
|
-
"@aztec/protocol-contracts": "4.0.0-nightly.
|
|
71
|
-
"@aztec/prover-client": "4.0.0-nightly.
|
|
72
|
-
"@aztec/sequencer-client": "4.0.0-nightly.
|
|
73
|
-
"@aztec/simulator": "4.0.0-nightly.
|
|
74
|
-
"@aztec/stdlib": "4.0.0-nightly.
|
|
75
|
-
"@aztec/telemetry-client": "4.0.0-nightly.
|
|
76
|
-
"@aztec/validator-client": "4.0.0-nightly.
|
|
77
|
-
"@aztec/world-state": "4.0.0-nightly.
|
|
60
|
+
"@aztec/archiver": "4.0.0-nightly.20260111",
|
|
61
|
+
"@aztec/bb-prover": "4.0.0-nightly.20260111",
|
|
62
|
+
"@aztec/blob-client": "4.0.0-nightly.20260111",
|
|
63
|
+
"@aztec/constants": "4.0.0-nightly.20260111",
|
|
64
|
+
"@aztec/epoch-cache": "4.0.0-nightly.20260111",
|
|
65
|
+
"@aztec/ethereum": "4.0.0-nightly.20260111",
|
|
66
|
+
"@aztec/foundation": "4.0.0-nightly.20260111",
|
|
67
|
+
"@aztec/kv-store": "4.0.0-nightly.20260111",
|
|
68
|
+
"@aztec/merkle-tree": "4.0.0-nightly.20260111",
|
|
69
|
+
"@aztec/p2p": "4.0.0-nightly.20260111",
|
|
70
|
+
"@aztec/protocol-contracts": "4.0.0-nightly.20260111",
|
|
71
|
+
"@aztec/prover-client": "4.0.0-nightly.20260111",
|
|
72
|
+
"@aztec/sequencer-client": "4.0.0-nightly.20260111",
|
|
73
|
+
"@aztec/simulator": "4.0.0-nightly.20260111",
|
|
74
|
+
"@aztec/stdlib": "4.0.0-nightly.20260111",
|
|
75
|
+
"@aztec/telemetry-client": "4.0.0-nightly.20260111",
|
|
76
|
+
"@aztec/validator-client": "4.0.0-nightly.20260111",
|
|
77
|
+
"@aztec/world-state": "4.0.0-nightly.20260111",
|
|
78
78
|
"tslib": "^2.4.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@aztec/blob-lib": "4.0.0-nightly.
|
|
82
|
-
"@aztec/node-keystore": "4.0.0-nightly.
|
|
81
|
+
"@aztec/blob-lib": "4.0.0-nightly.20260111",
|
|
82
|
+
"@aztec/node-keystore": "4.0.0-nightly.20260111",
|
|
83
83
|
"@jest/globals": "^30.0.0",
|
|
84
84
|
"@types/jest": "^30.0.0",
|
|
85
85
|
"@types/node": "^22.15.17",
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import type { IL1TxMetrics, L1TxState } from '@aztec/ethereum/l1-tx-utils';
|
|
2
2
|
import { TxUtilsState } from '@aztec/ethereum/l1-tx-utils';
|
|
3
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
|
-
import {
|
|
5
|
-
Attributes,
|
|
6
|
-
type Histogram,
|
|
7
|
-
type Meter,
|
|
8
|
-
Metrics,
|
|
9
|
-
type UpDownCounter,
|
|
10
|
-
ValueType,
|
|
11
|
-
} from '@aztec/telemetry-client';
|
|
4
|
+
import { Attributes, type Histogram, type Meter, Metrics, type UpDownCounter } from '@aztec/telemetry-client';
|
|
12
5
|
|
|
13
6
|
export type L1TxScope = 'sequencer' | 'prover' | 'other';
|
|
14
7
|
|
|
@@ -38,55 +31,23 @@ export class L1TxMetrics implements IL1TxMetrics {
|
|
|
38
31
|
private scope: L1TxScope = 'other',
|
|
39
32
|
private logger = createLogger('l1-tx-utils:metrics'),
|
|
40
33
|
) {
|
|
41
|
-
this.txMinedDuration = this.meter.createHistogram(Metrics.L1_TX_MINED_DURATION
|
|
42
|
-
description: 'Time from initial tx send until mined',
|
|
43
|
-
unit: 's',
|
|
44
|
-
valueType: ValueType.INT,
|
|
45
|
-
});
|
|
34
|
+
this.txMinedDuration = this.meter.createHistogram(Metrics.L1_TX_MINED_DURATION);
|
|
46
35
|
|
|
47
|
-
this.txAttemptsUntilMined = this.meter.createHistogram(Metrics.L1_TX_ATTEMPTS_UNTIL_MINED
|
|
48
|
-
description: 'Number of tx attempts (including speed-ups) until mined',
|
|
49
|
-
unit: 'attempts',
|
|
50
|
-
valueType: ValueType.INT,
|
|
51
|
-
});
|
|
36
|
+
this.txAttemptsUntilMined = this.meter.createHistogram(Metrics.L1_TX_ATTEMPTS_UNTIL_MINED);
|
|
52
37
|
|
|
53
|
-
this.txMinedCount = this.meter.createUpDownCounter(Metrics.L1_TX_MINED_COUNT
|
|
54
|
-
description: 'Count of transactions successfully mined',
|
|
55
|
-
valueType: ValueType.INT,
|
|
56
|
-
});
|
|
38
|
+
this.txMinedCount = this.meter.createUpDownCounter(Metrics.L1_TX_MINED_COUNT);
|
|
57
39
|
|
|
58
|
-
this.txRevertedCount = this.meter.createUpDownCounter(Metrics.L1_TX_REVERTED_COUNT
|
|
59
|
-
description: 'Count of transactions that reverted',
|
|
60
|
-
valueType: ValueType.INT,
|
|
61
|
-
});
|
|
40
|
+
this.txRevertedCount = this.meter.createUpDownCounter(Metrics.L1_TX_REVERTED_COUNT);
|
|
62
41
|
|
|
63
|
-
this.txCancelledCount = this.meter.createUpDownCounter(Metrics.L1_TX_CANCELLED_COUNT
|
|
64
|
-
description: 'Count of transactions cancelled',
|
|
65
|
-
valueType: ValueType.INT,
|
|
66
|
-
});
|
|
42
|
+
this.txCancelledCount = this.meter.createUpDownCounter(Metrics.L1_TX_CANCELLED_COUNT);
|
|
67
43
|
|
|
68
|
-
this.txNotMinedCount = this.meter.createUpDownCounter(Metrics.L1_TX_NOT_MINED_COUNT
|
|
69
|
-
description: 'Count of transactions not mined (timed out)',
|
|
70
|
-
valueType: ValueType.INT,
|
|
71
|
-
});
|
|
44
|
+
this.txNotMinedCount = this.meter.createUpDownCounter(Metrics.L1_TX_NOT_MINED_COUNT);
|
|
72
45
|
|
|
73
|
-
this.maxPriorityFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_MAX_PRIORITY_FEE
|
|
74
|
-
description: 'Max priority fee per gas at tx end state (in wei)',
|
|
75
|
-
unit: 'wei',
|
|
76
|
-
valueType: ValueType.INT,
|
|
77
|
-
});
|
|
46
|
+
this.maxPriorityFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_MAX_PRIORITY_FEE);
|
|
78
47
|
|
|
79
|
-
this.maxFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_MAX_FEE
|
|
80
|
-
description: 'Max fee per gas at tx end state (in wei)',
|
|
81
|
-
unit: 'wei',
|
|
82
|
-
valueType: ValueType.INT,
|
|
83
|
-
});
|
|
48
|
+
this.maxFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_MAX_FEE);
|
|
84
49
|
|
|
85
|
-
this.blobFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_BLOB_FEE
|
|
86
|
-
description: 'Max fee per blob gas at tx end state (in wei)',
|
|
87
|
-
unit: 'wei',
|
|
88
|
-
valueType: ValueType.INT,
|
|
89
|
-
});
|
|
50
|
+
this.blobFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_BLOB_FEE);
|
|
90
51
|
}
|
|
91
52
|
|
|
92
53
|
/**
|