@aztec/node-lib 0.0.1-commit.e6bd8901 → 0.0.1-commit.f146247c
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/actions/snapshot-sync.js +1 -1
- package/dest/factories/l1_tx_utils.js +1 -1
- package/dest/metrics/l1_tx_metrics.d.ts +1 -1
- package/dest/metrics/l1_tx_metrics.d.ts.map +1 -1
- package/dest/metrics/l1_tx_metrics.js +10 -5
- package/package.json +21 -21
- package/src/actions/snapshot-sync.ts +1 -1
- package/src/factories/l1_tx_utils.ts +1 -1
- package/src/metrics/l1_tx_metrics.ts +13 -5
|
@@ -3,7 +3,7 @@ import { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
|
3
3
|
import { getPublicClient } from '@aztec/ethereum/client';
|
|
4
4
|
import { tryRmDir } from '@aztec/foundation/fs';
|
|
5
5
|
import { P2P_STORE_NAME } from '@aztec/p2p';
|
|
6
|
-
import { DatabaseVersionManager } from '@aztec/stdlib/database-version';
|
|
6
|
+
import { DatabaseVersionManager } from '@aztec/stdlib/database-version/manager';
|
|
7
7
|
import { createReadOnlyFileStore } from '@aztec/stdlib/file-store';
|
|
8
8
|
import { downloadSnapshot, getLatestSnapshotMetadata, makeSnapshotPaths } from '@aztec/stdlib/snapshots';
|
|
9
9
|
import { NATIVE_WORLD_STATE_DBS, WORLD_STATE_DB_VERSION, WORLD_STATE_DIR } from '@aztec/world-state';
|
|
@@ -13,7 +13,7 @@ const L1_TX_STORE_NAME = 'l1-tx-utils';
|
|
|
13
13
|
// Note that we do NOT bind them to the rollup address, since we still need to
|
|
14
14
|
// monitor and cancel txs for previous rollups to free up our nonces.
|
|
15
15
|
const noRollupConfig = omit(config, 'l1Contracts');
|
|
16
|
-
const kvStore = await createStore(L1_TX_STORE_NAME, L1TxStore.SCHEMA_VERSION, noRollupConfig, logger);
|
|
16
|
+
const kvStore = await createStore(L1_TX_STORE_NAME, L1TxStore.SCHEMA_VERSION, noRollupConfig, logger.getBindings());
|
|
17
17
|
const store = new L1TxStore(kvStore, logger);
|
|
18
18
|
const meter = deps.telemetry.getMeter('L1TxUtils');
|
|
19
19
|
const metrics = new L1TxMetrics(meter, config.scope ?? 'other', logger);
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibDFfdHhfbWV0cmljcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21ldHJpY3MvbDFfdHhfbWV0cmljcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsU0FBUyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFHM0UsT0FBTyxFQUdMLEtBQUssS0FBSyxFQUlYLE1BQU0seUJBQXlCLENBQUM7QUFFakMsTUFBTSxNQUFNLFNBQVMsR0FBRyxXQUFXLEdBQUcsUUFBUSxHQUFHLE9BQU8sQ0FBQztBQUV6RDs7R0FFRztBQUNILHFCQUFhLFdBQVksWUFBVyxZQUFZO0lBbUI1QyxPQUFPLENBQUMsS0FBSztJQUNiLE9BQU8sQ0FBQyxLQUFLO0lBQ2IsT0FBTyxDQUFDLE1BQU07SUFuQmhCLE9BQU8sQ0FBQyxlQUFlLENBQVk7SUFHbkMsT0FBTyxDQUFDLG9CQUFvQixDQUFZO0lBR3hDLE9BQU8sQ0FBQyxZQUFZLENBQWdCO0lBQ3BDLE9BQU8sQ0FBQyxlQUFlLENBQWdCO0lBQ3ZDLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBZ0I7SUFDeEMsT0FBTyxDQUFDLGVBQWUsQ0FBZ0I7SUFHdkMsT0FBTyxDQUFDLHVCQUF1QixDQUFZO0lBQzNDLE9BQU8sQ0FBQyxlQUFlLENBQVk7SUFDbkMsT0FBTyxDQUFDLGdCQUFnQixDQUFZO0lBRXBDLFlBQ1UsS0FBSyxFQUFFLEtBQUssRUFDWixLQUFLLEdBQUUsU0FBbUIsRUFDMUIsTUFBTSx5Q0FBc0MsRUFvQnJEO0lBRUQ7Ozs7T0FJRztJQUNJLGFBQWEsQ0FBQyxLQUFLLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxJQUFJLEdBQUcsSUFBSSxDQW9EOUQ7SUFFTSxlQUFlLENBQUMsS0FBSyxFQUFFLFNBQVMsR0FBRyxJQUFJLENBaUI3QztDQUNGIn0=
|
|
@@ -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,EAGL,KAAK,KAAK,EAIX,MAAM,yBAAyB,CAAC;AAEjC,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,EAoBrD;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 } from '@aztec/telemetry-client';
|
|
3
|
+
import { Attributes, Metrics, createUpDownCounterWithDefault } from '@aztec/telemetry-client';
|
|
4
4
|
/**
|
|
5
5
|
* Metrics for L1 transaction utils tracking tx lifecycle and gas costs.
|
|
6
6
|
*/ export class L1TxMetrics {
|
|
@@ -26,10 +26,15 @@ import { Attributes, Metrics } from '@aztec/telemetry-client';
|
|
|
26
26
|
this.logger = logger;
|
|
27
27
|
this.txMinedDuration = this.meter.createHistogram(Metrics.L1_TX_MINED_DURATION);
|
|
28
28
|
this.txAttemptsUntilMined = this.meter.createHistogram(Metrics.L1_TX_ATTEMPTS_UNTIL_MINED);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const scopeAttributes = [
|
|
30
|
+
{
|
|
31
|
+
[Attributes.L1_TX_SCOPE]: this.scope
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
this.txMinedCount = createUpDownCounterWithDefault(this.meter, Metrics.L1_TX_MINED_COUNT, scopeAttributes);
|
|
35
|
+
this.txRevertedCount = createUpDownCounterWithDefault(this.meter, Metrics.L1_TX_REVERTED_COUNT, scopeAttributes);
|
|
36
|
+
this.txCancelledCount = createUpDownCounterWithDefault(this.meter, Metrics.L1_TX_CANCELLED_COUNT, scopeAttributes);
|
|
37
|
+
this.txNotMinedCount = createUpDownCounterWithDefault(this.meter, Metrics.L1_TX_NOT_MINED_COUNT, scopeAttributes);
|
|
33
38
|
this.maxPriorityFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_MAX_PRIORITY_FEE);
|
|
34
39
|
this.maxFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_MAX_FEE);
|
|
35
40
|
this.blobFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_BLOB_FEE);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/node-lib",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.f146247c",
|
|
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": "0.0.1-commit.
|
|
61
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
62
|
-
"@aztec/blob-client": "0.0.1-commit.
|
|
63
|
-
"@aztec/constants": "0.0.1-commit.
|
|
64
|
-
"@aztec/epoch-cache": "0.0.1-commit.
|
|
65
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
66
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
67
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
68
|
-
"@aztec/merkle-tree": "0.0.1-commit.
|
|
69
|
-
"@aztec/p2p": "0.0.1-commit.
|
|
70
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
71
|
-
"@aztec/prover-client": "0.0.1-commit.
|
|
72
|
-
"@aztec/sequencer-client": "0.0.1-commit.
|
|
73
|
-
"@aztec/simulator": "0.0.1-commit.
|
|
74
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
75
|
-
"@aztec/telemetry-client": "0.0.1-commit.
|
|
76
|
-
"@aztec/validator-client": "0.0.1-commit.
|
|
77
|
-
"@aztec/world-state": "0.0.1-commit.
|
|
60
|
+
"@aztec/archiver": "0.0.1-commit.f146247c",
|
|
61
|
+
"@aztec/bb-prover": "0.0.1-commit.f146247c",
|
|
62
|
+
"@aztec/blob-client": "0.0.1-commit.f146247c",
|
|
63
|
+
"@aztec/constants": "0.0.1-commit.f146247c",
|
|
64
|
+
"@aztec/epoch-cache": "0.0.1-commit.f146247c",
|
|
65
|
+
"@aztec/ethereum": "0.0.1-commit.f146247c",
|
|
66
|
+
"@aztec/foundation": "0.0.1-commit.f146247c",
|
|
67
|
+
"@aztec/kv-store": "0.0.1-commit.f146247c",
|
|
68
|
+
"@aztec/merkle-tree": "0.0.1-commit.f146247c",
|
|
69
|
+
"@aztec/p2p": "0.0.1-commit.f146247c",
|
|
70
|
+
"@aztec/protocol-contracts": "0.0.1-commit.f146247c",
|
|
71
|
+
"@aztec/prover-client": "0.0.1-commit.f146247c",
|
|
72
|
+
"@aztec/sequencer-client": "0.0.1-commit.f146247c",
|
|
73
|
+
"@aztec/simulator": "0.0.1-commit.f146247c",
|
|
74
|
+
"@aztec/stdlib": "0.0.1-commit.f146247c",
|
|
75
|
+
"@aztec/telemetry-client": "0.0.1-commit.f146247c",
|
|
76
|
+
"@aztec/validator-client": "0.0.1-commit.f146247c",
|
|
77
|
+
"@aztec/world-state": "0.0.1-commit.f146247c",
|
|
78
78
|
"tslib": "^2.4.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@aztec/blob-lib": "0.0.1-commit.
|
|
82
|
-
"@aztec/node-keystore": "0.0.1-commit.
|
|
81
|
+
"@aztec/blob-lib": "0.0.1-commit.f146247c",
|
|
82
|
+
"@aztec/node-keystore": "0.0.1-commit.f146247c",
|
|
83
83
|
"@jest/globals": "^30.0.0",
|
|
84
84
|
"@types/jest": "^30.0.0",
|
|
85
85
|
"@types/node": "^22.15.17",
|
|
@@ -8,7 +8,7 @@ import type { Logger } from '@aztec/foundation/log';
|
|
|
8
8
|
import type { DataStoreConfig } from '@aztec/kv-store/config';
|
|
9
9
|
import { P2P_STORE_NAME } from '@aztec/p2p';
|
|
10
10
|
import type { ChainConfig } from '@aztec/stdlib/config';
|
|
11
|
-
import { DatabaseVersionManager } from '@aztec/stdlib/database-version';
|
|
11
|
+
import { DatabaseVersionManager } from '@aztec/stdlib/database-version/manager';
|
|
12
12
|
import { type ReadOnlyFileStore, createReadOnlyFileStore } from '@aztec/stdlib/file-store';
|
|
13
13
|
import {
|
|
14
14
|
type SnapshotMetadata,
|
|
@@ -40,7 +40,7 @@ async function createSharedDeps(
|
|
|
40
40
|
// Note that we do NOT bind them to the rollup address, since we still need to
|
|
41
41
|
// monitor and cancel txs for previous rollups to free up our nonces.
|
|
42
42
|
const noRollupConfig = omit(config, 'l1Contracts');
|
|
43
|
-
const kvStore = await createStore(L1_TX_STORE_NAME, L1TxStore.SCHEMA_VERSION, noRollupConfig, logger);
|
|
43
|
+
const kvStore = await createStore(L1_TX_STORE_NAME, L1TxStore.SCHEMA_VERSION, noRollupConfig, logger.getBindings());
|
|
44
44
|
const store = new L1TxStore(kvStore, logger);
|
|
45
45
|
|
|
46
46
|
const meter = deps.telemetry.getMeter('L1TxUtils');
|
|
@@ -1,7 +1,14 @@
|
|
|
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 {
|
|
4
|
+
import {
|
|
5
|
+
Attributes,
|
|
6
|
+
type Histogram,
|
|
7
|
+
type Meter,
|
|
8
|
+
Metrics,
|
|
9
|
+
type UpDownCounter,
|
|
10
|
+
createUpDownCounterWithDefault,
|
|
11
|
+
} from '@aztec/telemetry-client';
|
|
5
12
|
|
|
6
13
|
export type L1TxScope = 'sequencer' | 'prover' | 'other';
|
|
7
14
|
|
|
@@ -35,13 +42,14 @@ export class L1TxMetrics implements IL1TxMetrics {
|
|
|
35
42
|
|
|
36
43
|
this.txAttemptsUntilMined = this.meter.createHistogram(Metrics.L1_TX_ATTEMPTS_UNTIL_MINED);
|
|
37
44
|
|
|
38
|
-
|
|
45
|
+
const scopeAttributes = [{ [Attributes.L1_TX_SCOPE]: this.scope }];
|
|
46
|
+
this.txMinedCount = createUpDownCounterWithDefault(this.meter, Metrics.L1_TX_MINED_COUNT, scopeAttributes);
|
|
39
47
|
|
|
40
|
-
this.txRevertedCount = this.meter
|
|
48
|
+
this.txRevertedCount = createUpDownCounterWithDefault(this.meter, Metrics.L1_TX_REVERTED_COUNT, scopeAttributes);
|
|
41
49
|
|
|
42
|
-
this.txCancelledCount = this.meter
|
|
50
|
+
this.txCancelledCount = createUpDownCounterWithDefault(this.meter, Metrics.L1_TX_CANCELLED_COUNT, scopeAttributes);
|
|
43
51
|
|
|
44
|
-
this.txNotMinedCount = this.meter
|
|
52
|
+
this.txNotMinedCount = createUpDownCounterWithDefault(this.meter, Metrics.L1_TX_NOT_MINED_COUNT, scopeAttributes);
|
|
45
53
|
|
|
46
54
|
this.maxPriorityFeeHistogram = this.meter.createHistogram(Metrics.L1_TX_MAX_PRIORITY_FEE);
|
|
47
55
|
|