@aztec/archiver 0.0.1-commit.9593d84 → 0.0.1-commit.96bb3f7
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 +14 -14
- package/dest/archiver/archiver.d.ts +105 -85
- package/dest/archiver/archiver.d.ts.map +1 -1
- package/dest/archiver/archiver.js +949 -255
- package/dest/archiver/archiver_store.d.ts +109 -49
- package/dest/archiver/archiver_store.d.ts.map +1 -1
- package/dest/archiver/archiver_store_test_suite.d.ts +1 -1
- package/dest/archiver/archiver_store_test_suite.d.ts.map +1 -1
- package/dest/archiver/archiver_store_test_suite.js +1871 -390
- package/dest/archiver/config.d.ts +5 -4
- package/dest/archiver/config.d.ts.map +1 -1
- package/dest/archiver/config.js +12 -5
- package/dest/archiver/errors.d.ts +25 -1
- package/dest/archiver/errors.d.ts.map +1 -1
- package/dest/archiver/errors.js +37 -0
- package/dest/archiver/index.d.ts +2 -2
- package/dest/archiver/index.d.ts.map +1 -1
- package/dest/archiver/instrumentation.d.ts +3 -1
- package/dest/archiver/instrumentation.d.ts.map +1 -1
- package/dest/archiver/instrumentation.js +22 -59
- package/dest/archiver/kv_archiver_store/block_store.d.ts +60 -20
- package/dest/archiver/kv_archiver_store/block_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/block_store.js +345 -89
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts +2 -2
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/contract_class_store.js +1 -1
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +2 -2
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +49 -58
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.js +68 -48
- package/dest/archiver/kv_archiver_store/log_store.d.ts +12 -16
- package/dest/archiver/kv_archiver_store/log_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/log_store.js +149 -84
- package/dest/archiver/kv_archiver_store/message_store.d.ts +6 -5
- package/dest/archiver/kv_archiver_store/message_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/message_store.js +15 -14
- package/dest/archiver/l1/bin/retrieve-calldata.d.ts +3 -0
- package/dest/archiver/l1/bin/retrieve-calldata.d.ts.map +1 -0
- package/dest/archiver/l1/bin/retrieve-calldata.js +149 -0
- package/dest/archiver/l1/calldata_retriever.d.ts +112 -0
- package/dest/archiver/l1/calldata_retriever.d.ts.map +1 -0
- package/dest/archiver/l1/calldata_retriever.js +471 -0
- package/dest/archiver/l1/data_retrieval.d.ts +90 -0
- package/dest/archiver/l1/data_retrieval.d.ts.map +1 -0
- package/dest/archiver/{data_retrieval.js → l1/data_retrieval.js} +52 -107
- package/dest/archiver/l1/debug_tx.d.ts +19 -0
- package/dest/archiver/l1/debug_tx.d.ts.map +1 -0
- package/dest/archiver/l1/debug_tx.js +73 -0
- package/dest/archiver/l1/spire_proposer.d.ts +70 -0
- package/dest/archiver/l1/spire_proposer.d.ts.map +1 -0
- package/dest/archiver/l1/spire_proposer.js +157 -0
- package/dest/archiver/l1/trace_tx.d.ts +97 -0
- package/dest/archiver/l1/trace_tx.d.ts.map +1 -0
- package/dest/archiver/l1/trace_tx.js +91 -0
- package/dest/archiver/l1/types.d.ts +12 -0
- package/dest/archiver/l1/types.d.ts.map +1 -0
- package/dest/archiver/l1/types.js +3 -0
- package/dest/archiver/l1/validate_trace.d.ts +29 -0
- package/dest/archiver/l1/validate_trace.d.ts.map +1 -0
- package/dest/archiver/l1/validate_trace.js +150 -0
- package/dest/archiver/structs/inbox_message.d.ts +4 -4
- package/dest/archiver/structs/inbox_message.d.ts.map +1 -1
- package/dest/archiver/structs/inbox_message.js +6 -5
- package/dest/archiver/structs/published.d.ts +1 -2
- package/dest/archiver/structs/published.d.ts.map +1 -1
- package/dest/archiver/validation.d.ts +4 -4
- package/dest/archiver/validation.d.ts.map +1 -1
- package/dest/archiver/validation.js +1 -1
- package/dest/factory.d.ts +2 -2
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +4 -3
- package/dest/index.d.ts +2 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- package/dest/test/mock_archiver.d.ts +16 -8
- package/dest/test/mock_archiver.d.ts.map +1 -1
- package/dest/test/mock_archiver.js +19 -14
- package/dest/test/mock_l1_to_l2_message_source.d.ts +7 -6
- package/dest/test/mock_l1_to_l2_message_source.d.ts.map +1 -1
- package/dest/test/mock_l1_to_l2_message_source.js +21 -11
- package/dest/test/mock_l2_block_source.d.ts +23 -8
- package/dest/test/mock_l2_block_source.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.js +95 -35
- package/dest/test/mock_structs.d.ts +3 -2
- package/dest/test/mock_structs.d.ts.map +1 -1
- package/dest/test/mock_structs.js +9 -8
- package/package.json +17 -16
- package/src/archiver/archiver.ts +751 -344
- package/src/archiver/archiver_store.ts +123 -48
- package/src/archiver/archiver_store_test_suite.ts +1943 -365
- package/src/archiver/config.ts +17 -12
- package/src/archiver/errors.ts +64 -0
- package/src/archiver/index.ts +1 -1
- package/src/archiver/instrumentation.ts +24 -59
- package/src/archiver/kv_archiver_store/block_store.ts +475 -106
- package/src/archiver/kv_archiver_store/contract_class_store.ts +1 -1
- package/src/archiver/kv_archiver_store/contract_instance_store.ts +1 -1
- package/src/archiver/kv_archiver_store/kv_archiver_store.ts +92 -72
- package/src/archiver/kv_archiver_store/log_store.ts +209 -99
- package/src/archiver/kv_archiver_store/message_store.ts +21 -18
- package/src/archiver/l1/README.md +98 -0
- package/src/archiver/l1/bin/retrieve-calldata.ts +182 -0
- package/src/archiver/l1/calldata_retriever.ts +641 -0
- package/src/archiver/{data_retrieval.ts → l1/data_retrieval.ts} +101 -165
- package/src/archiver/l1/debug_tx.ts +99 -0
- package/src/archiver/l1/spire_proposer.ts +160 -0
- package/src/archiver/l1/trace_tx.ts +128 -0
- package/src/archiver/l1/types.ts +13 -0
- package/src/archiver/l1/validate_trace.ts +211 -0
- package/src/archiver/structs/inbox_message.ts +8 -8
- package/src/archiver/structs/published.ts +0 -1
- package/src/archiver/validation.ts +6 -6
- package/src/factory.ts +4 -3
- package/src/index.ts +1 -1
- package/src/test/fixtures/debug_traceTransaction-multicall3.json +88 -0
- package/src/test/fixtures/debug_traceTransaction-multiplePropose.json +153 -0
- package/src/test/fixtures/debug_traceTransaction-proxied.json +122 -0
- package/src/test/fixtures/trace_transaction-multicall3.json +65 -0
- package/src/test/fixtures/trace_transaction-multiplePropose.json +319 -0
- package/src/test/fixtures/trace_transaction-proxied.json +128 -0
- package/src/test/fixtures/trace_transaction-randomRevert.json +216 -0
- package/src/test/mock_archiver.ts +22 -16
- package/src/test/mock_l1_to_l2_message_source.ts +18 -11
- package/src/test/mock_l2_block_source.ts +115 -37
- package/src/test/mock_structs.ts +10 -9
- package/dest/archiver/data_retrieval.d.ts +0 -79
- package/dest/archiver/data_retrieval.d.ts.map +0 -1
package/src/archiver/config.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
l1ContractAddressesMapping,
|
|
6
|
-
l1ContractsConfigMappings,
|
|
7
|
-
l1ReaderConfigMappings,
|
|
8
|
-
} from '@aztec/ethereum';
|
|
1
|
+
import { type BlobClientConfig, blobClientConfigMapping } from '@aztec/blob-client/client/config';
|
|
2
|
+
import { type L1ContractsConfig, l1ContractsConfigMappings } from '@aztec/ethereum/config';
|
|
3
|
+
import { l1ContractAddressesMapping } from '@aztec/ethereum/l1-contract-addresses';
|
|
4
|
+
import { type L1ReaderConfig, l1ReaderConfigMappings } from '@aztec/ethereum/l1-reader';
|
|
9
5
|
import {
|
|
10
6
|
type ConfigMappingsType,
|
|
11
7
|
booleanConfigHelper,
|
|
@@ -22,10 +18,14 @@ import type { ArchiverSpecificConfig } from '@aztec/stdlib/interfaces/server';
|
|
|
22
18
|
* Results of calls to eth_blockNumber are cached by viem with this cache being updated periodically at the interval specified by viemPollingIntervalMS.
|
|
23
19
|
* As a result the maximum observed polling time for new blocks will be viemPollingIntervalMS + archiverPollingIntervalMS.
|
|
24
20
|
*/
|
|
25
|
-
export type ArchiverConfig = ArchiverSpecificConfig &
|
|
21
|
+
export type ArchiverConfig = ArchiverSpecificConfig &
|
|
22
|
+
L1ReaderConfig &
|
|
23
|
+
L1ContractsConfig &
|
|
24
|
+
BlobClientConfig &
|
|
25
|
+
ChainConfig;
|
|
26
26
|
|
|
27
27
|
export const archiverConfigMappings: ConfigMappingsType<ArchiverConfig> = {
|
|
28
|
-
...
|
|
28
|
+
...blobClientConfigMapping,
|
|
29
29
|
archiverPollingIntervalMS: {
|
|
30
30
|
env: 'ARCHIVER_POLLING_INTERVAL_MS',
|
|
31
31
|
description: 'The polling interval in ms for retrieving new L2 blocks and encrypted logs.',
|
|
@@ -46,8 +46,8 @@ export const archiverConfigMappings: ConfigMappingsType<ArchiverConfig> = {
|
|
|
46
46
|
parseEnv: (val: string | undefined) => (val ? +val : undefined),
|
|
47
47
|
description: 'The maximum possible size of the archiver DB in KB. Overwrites the general dataStoreMapSizeKb.',
|
|
48
48
|
},
|
|
49
|
-
|
|
50
|
-
description: '
|
|
49
|
+
skipValidateCheckpointAttestations: {
|
|
50
|
+
description: 'Skip validating checkpoint attestations (for testing purposes only)',
|
|
51
51
|
...booleanConfigHelper(false),
|
|
52
52
|
},
|
|
53
53
|
maxAllowedEthClientDriftSeconds: {
|
|
@@ -55,6 +55,11 @@ export const archiverConfigMappings: ConfigMappingsType<ArchiverConfig> = {
|
|
|
55
55
|
description: 'Maximum allowed drift in seconds between the Ethereum client and current time.',
|
|
56
56
|
...numberConfigHelper(300),
|
|
57
57
|
},
|
|
58
|
+
ethereumAllowNoDebugHosts: {
|
|
59
|
+
env: 'ETHEREUM_ALLOW_NO_DEBUG_HOSTS',
|
|
60
|
+
description: 'Whether to allow starting the archiver without debug/trace method support on Ethereum hosts',
|
|
61
|
+
...booleanConfigHelper(true),
|
|
62
|
+
},
|
|
58
63
|
...chainConfigMappings,
|
|
59
64
|
...l1ReaderConfigMappings,
|
|
60
65
|
viemPollingIntervalMS: {
|
package/src/archiver/errors.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Fr } from '@aztec/foundation/schemas';
|
|
2
|
+
|
|
1
3
|
export class NoBlobBodiesFoundError extends Error {
|
|
2
4
|
constructor(l2BlockNum: number) {
|
|
3
5
|
super(`No blob bodies found for block ${l2BlockNum}`);
|
|
@@ -24,3 +26,65 @@ export class BlockNumberNotSequentialError extends Error {
|
|
|
24
26
|
);
|
|
25
27
|
}
|
|
26
28
|
}
|
|
29
|
+
|
|
30
|
+
export class InitialCheckpointNumberNotSequentialError extends Error {
|
|
31
|
+
constructor(
|
|
32
|
+
public readonly newCheckpointNumber: number,
|
|
33
|
+
public readonly previousCheckpointNumber: number | undefined,
|
|
34
|
+
) {
|
|
35
|
+
super(
|
|
36
|
+
`Cannot insert new checkpoint ${newCheckpointNumber} given previous checkpoint number in store is ${
|
|
37
|
+
previousCheckpointNumber ?? 'undefined'
|
|
38
|
+
}`,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export class CheckpointNumberNotSequentialError extends Error {
|
|
44
|
+
constructor(newCheckpointNumber: number, previous: number | undefined) {
|
|
45
|
+
super(
|
|
46
|
+
`Cannot insert new checkpoint ${newCheckpointNumber} given previous checkpoint number in batch is ${previous ?? 'undefined'}`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export class CheckpointNumberNotConsistentError extends Error {
|
|
52
|
+
constructor(newCheckpointNumber: number, previous: number | undefined) {
|
|
53
|
+
super(
|
|
54
|
+
`Cannot insert block for new checkpoint ${newCheckpointNumber} given previous block was checkpoint ${previous ?? 'undefined'}`,
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export class BlockIndexNotSequentialError extends Error {
|
|
60
|
+
constructor(newBlockIndex: number, previousBlockIndex: number | undefined) {
|
|
61
|
+
super(
|
|
62
|
+
`Cannot insert new block at checkpoint index ${newBlockIndex} given previous block index is ${previousBlockIndex ?? 'undefined'}`,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class BlockArchiveNotConsistentError extends Error {
|
|
68
|
+
constructor(
|
|
69
|
+
newBlockNumber: number,
|
|
70
|
+
previousBlockNumber: number | undefined,
|
|
71
|
+
newBlockArchive: Fr,
|
|
72
|
+
previousBlockArchive: Fr,
|
|
73
|
+
) {
|
|
74
|
+
super(
|
|
75
|
+
`Cannot insert new block number ${newBlockNumber} with archive ${newBlockArchive.toString()} previous block number is ${previousBlockNumber ?? 'undefined'}, previous archive is ${previousBlockArchive?.toString() ?? 'undefined'}`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export class CheckpointNotFoundError extends Error {
|
|
81
|
+
constructor(checkpointNumber: number) {
|
|
82
|
+
super(`Failed to find expected checkpoint number ${checkpointNumber}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export class BlockNotFoundError extends Error {
|
|
87
|
+
constructor(blockNumber: number) {
|
|
88
|
+
super(`Failed to find expected block number ${blockNumber}`);
|
|
89
|
+
}
|
|
90
|
+
}
|
package/src/archiver/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './archiver.js';
|
|
2
2
|
export * from './config.js';
|
|
3
|
-
export { type
|
|
3
|
+
export { type L1PublishedData } from './structs/published.js';
|
|
4
4
|
export type { ArchiverDataStore } from './archiver_store.js';
|
|
5
5
|
export { KVArchiverDataStore, ARCHIVER_DB_VERSION } from './kv_archiver_store/kv_archiver_store.js';
|
|
6
6
|
export { ContractInstanceStore } from './kv_archiver_store/contract_instance_store.js';
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
type TelemetryClient,
|
|
11
11
|
type Tracer,
|
|
12
12
|
type UpDownCounter,
|
|
13
|
-
ValueType,
|
|
14
13
|
} from '@aztec/telemetry-client';
|
|
15
14
|
|
|
16
15
|
export class ArchiverInstrumentation {
|
|
@@ -34,6 +33,8 @@ export class ArchiverInstrumentation {
|
|
|
34
33
|
private syncDurationPerMessage: Histogram;
|
|
35
34
|
private syncMessageCount: UpDownCounter;
|
|
36
35
|
|
|
36
|
+
private blockProposalTxTargetCount: UpDownCounter;
|
|
37
|
+
|
|
37
38
|
private log = createLogger('archiver:instrumentation');
|
|
38
39
|
|
|
39
40
|
private constructor(
|
|
@@ -43,76 +44,33 @@ export class ArchiverInstrumentation {
|
|
|
43
44
|
this.tracer = telemetry.getTracer('Archiver');
|
|
44
45
|
const meter = telemetry.getMeter('Archiver');
|
|
45
46
|
|
|
46
|
-
this.blockHeight = meter.createGauge(Metrics.ARCHIVER_BLOCK_HEIGHT
|
|
47
|
-
description: 'The height of the latest block processed by the archiver',
|
|
48
|
-
valueType: ValueType.INT,
|
|
49
|
-
});
|
|
47
|
+
this.blockHeight = meter.createGauge(Metrics.ARCHIVER_BLOCK_HEIGHT);
|
|
50
48
|
|
|
51
|
-
this.l1BlockHeight = meter.createGauge(Metrics.ARCHIVER_L1_BLOCK_HEIGHT
|
|
52
|
-
description: 'The height of the latest L1 block processed by the archiver',
|
|
53
|
-
valueType: ValueType.INT,
|
|
54
|
-
});
|
|
49
|
+
this.l1BlockHeight = meter.createGauge(Metrics.ARCHIVER_L1_BLOCK_HEIGHT);
|
|
55
50
|
|
|
56
|
-
this.txCount = meter.createUpDownCounter(Metrics.ARCHIVER_TOTAL_TXS
|
|
57
|
-
description: 'The total number of transactions',
|
|
58
|
-
valueType: ValueType.INT,
|
|
59
|
-
});
|
|
51
|
+
this.txCount = meter.createUpDownCounter(Metrics.ARCHIVER_TOTAL_TXS);
|
|
60
52
|
|
|
61
|
-
this.proofsSubmittedCount = meter.createUpDownCounter(Metrics.ARCHIVER_ROLLUP_PROOF_COUNT
|
|
62
|
-
description: 'Number of proofs submitted',
|
|
63
|
-
valueType: ValueType.INT,
|
|
64
|
-
});
|
|
53
|
+
this.proofsSubmittedCount = meter.createUpDownCounter(Metrics.ARCHIVER_ROLLUP_PROOF_COUNT);
|
|
65
54
|
|
|
66
|
-
this.proofsSubmittedDelay = meter.createHistogram(Metrics.ARCHIVER_ROLLUP_PROOF_DELAY
|
|
67
|
-
unit: 'ms',
|
|
68
|
-
description: 'Time after a block is submitted until its proof is published',
|
|
69
|
-
valueType: ValueType.INT,
|
|
70
|
-
});
|
|
55
|
+
this.proofsSubmittedDelay = meter.createHistogram(Metrics.ARCHIVER_ROLLUP_PROOF_DELAY);
|
|
71
56
|
|
|
72
|
-
this.syncDurationPerBlock = meter.createHistogram(Metrics.ARCHIVER_SYNC_PER_BLOCK
|
|
73
|
-
unit: 'ms',
|
|
74
|
-
description: 'Duration to sync a block',
|
|
75
|
-
valueType: ValueType.INT,
|
|
76
|
-
});
|
|
57
|
+
this.syncDurationPerBlock = meter.createHistogram(Metrics.ARCHIVER_SYNC_PER_BLOCK);
|
|
77
58
|
|
|
78
|
-
this.syncBlockCount = meter.createUpDownCounter(Metrics.ARCHIVER_SYNC_BLOCK_COUNT
|
|
79
|
-
description: 'Number of blocks synced from L1',
|
|
80
|
-
valueType: ValueType.INT,
|
|
81
|
-
});
|
|
59
|
+
this.syncBlockCount = meter.createUpDownCounter(Metrics.ARCHIVER_SYNC_BLOCK_COUNT);
|
|
82
60
|
|
|
83
|
-
this.manaPerBlock = meter.createHistogram(Metrics.ARCHIVER_MANA_PER_BLOCK
|
|
84
|
-
description: 'The mana consumed by blocks',
|
|
85
|
-
valueType: ValueType.DOUBLE,
|
|
86
|
-
unit: 'Mmana',
|
|
87
|
-
});
|
|
61
|
+
this.manaPerBlock = meter.createHistogram(Metrics.ARCHIVER_MANA_PER_BLOCK);
|
|
88
62
|
|
|
89
|
-
this.txsPerBlock = meter.createHistogram(Metrics.ARCHIVER_TXS_PER_BLOCK
|
|
90
|
-
description: 'The block tx count',
|
|
91
|
-
valueType: ValueType.INT,
|
|
92
|
-
unit: 'tx',
|
|
93
|
-
});
|
|
63
|
+
this.txsPerBlock = meter.createHistogram(Metrics.ARCHIVER_TXS_PER_BLOCK);
|
|
94
64
|
|
|
95
|
-
this.syncDurationPerMessage = meter.createHistogram(Metrics.ARCHIVER_SYNC_PER_MESSAGE
|
|
96
|
-
unit: 'ms',
|
|
97
|
-
description: 'Duration to sync a message',
|
|
98
|
-
valueType: ValueType.INT,
|
|
99
|
-
});
|
|
65
|
+
this.syncDurationPerMessage = meter.createHistogram(Metrics.ARCHIVER_SYNC_PER_MESSAGE);
|
|
100
66
|
|
|
101
|
-
this.syncMessageCount = meter.createUpDownCounter(Metrics.ARCHIVER_SYNC_MESSAGE_COUNT
|
|
102
|
-
description: 'Number of L1 to L2 messages synced',
|
|
103
|
-
valueType: ValueType.INT,
|
|
104
|
-
});
|
|
67
|
+
this.syncMessageCount = meter.createUpDownCounter(Metrics.ARCHIVER_SYNC_MESSAGE_COUNT);
|
|
105
68
|
|
|
106
|
-
this.pruneDuration = meter.createHistogram(Metrics.ARCHIVER_PRUNE_DURATION
|
|
107
|
-
unit: 'ms',
|
|
108
|
-
description: 'Duration to sync a message',
|
|
109
|
-
valueType: ValueType.INT,
|
|
110
|
-
});
|
|
69
|
+
this.pruneDuration = meter.createHistogram(Metrics.ARCHIVER_PRUNE_DURATION);
|
|
111
70
|
|
|
112
|
-
this.pruneCount = meter.createUpDownCounter(Metrics.ARCHIVER_PRUNE_COUNT
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
71
|
+
this.pruneCount = meter.createUpDownCounter(Metrics.ARCHIVER_PRUNE_COUNT);
|
|
72
|
+
|
|
73
|
+
this.blockProposalTxTargetCount = meter.createUpDownCounter(Metrics.ARCHIVER_BLOCK_PROPOSAL_TX_TARGET_COUNT);
|
|
116
74
|
|
|
117
75
|
this.dbMetrics = new LmdbMetrics(
|
|
118
76
|
meter,
|
|
@@ -184,4 +142,11 @@ export class ArchiverInstrumentation {
|
|
|
184
142
|
public updateL1BlockHeight(blockNumber: bigint) {
|
|
185
143
|
this.l1BlockHeight.record(Number(blockNumber));
|
|
186
144
|
}
|
|
145
|
+
|
|
146
|
+
public recordBlockProposalTxTarget(target: string, usedTrace: boolean) {
|
|
147
|
+
this.blockProposalTxTargetCount.add(1, {
|
|
148
|
+
[Attributes.L1_BLOCK_PROPOSAL_TX_TARGET]: target.toLowerCase(),
|
|
149
|
+
[Attributes.L1_BLOCK_PROPOSAL_USED_TRACE]: usedTrace,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
187
152
|
}
|