envio 3.3.0-alpha.4 → 3.3.0-alpha.5

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.
@@ -0,0 +1,100 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Utils from "./Utils.res.mjs";
4
+ import * as Primitive_int from "@rescript/runtime/lib/es6/Primitive_int.js";
5
+ import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
6
+
7
+ function deriveEffectiveStartBlock(registrationBlock, contractStartBlock) {
8
+ return Primitive_int.max(Primitive_int.max(registrationBlock, 0), Stdlib_Option.getOr(contractStartBlock, 0));
9
+ }
10
+
11
+ function makeContractConfigs(eventConfigs) {
12
+ let contractConfigs = {};
13
+ eventConfigs.forEach(ec => {
14
+ let match = contractConfigs[ec.contractName];
15
+ if (match !== undefined) {
16
+ let startBlock = match.startBlock;
17
+ let match$1 = ec.startBlock;
18
+ contractConfigs[ec.contractName] = {
19
+ startBlock: startBlock !== undefined ? (
20
+ match$1 !== undefined ? Primitive_int.min(startBlock, match$1) : startBlock
21
+ ) : (
22
+ match$1 !== undefined ? match$1 : undefined
23
+ )
24
+ };
25
+ return;
26
+ }
27
+ contractConfigs[ec.contractName] = {
28
+ startBlock: ec.startBlock
29
+ };
30
+ });
31
+ return contractConfigs;
32
+ }
33
+
34
+ function makeIndexingAddress(contract, contractConfigs) {
35
+ let match = contractConfigs[contract.contractName];
36
+ let contractStartBlock = match !== undefined ? match.startBlock : undefined;
37
+ return {
38
+ address: contract.address,
39
+ contractName: contract.contractName,
40
+ registrationBlock: contract.registrationBlock,
41
+ effectiveStartBlock: deriveEffectiveStartBlock(contract.registrationBlock, contractStartBlock)
42
+ };
43
+ }
44
+
45
+ function make(contractConfigs, addresses) {
46
+ let indexingAddresses = {};
47
+ addresses.forEach(contract => {
48
+ indexingAddresses[contract.address] = makeIndexingAddress(contract, contractConfigs);
49
+ });
50
+ return indexingAddresses;
51
+ }
52
+
53
+ function get(indexingAddresses, address) {
54
+ return indexingAddresses[address];
55
+ }
56
+
57
+ function size(indexingAddresses) {
58
+ return Utils.Dict.size(indexingAddresses);
59
+ }
60
+
61
+ function getContractAddresses(indexingAddresses, contractName) {
62
+ let addresses = [];
63
+ Utils.Dict.forEach(indexingAddresses, ia => {
64
+ if (ia.contractName === contractName) {
65
+ addresses.push(ia.address);
66
+ return;
67
+ }
68
+ });
69
+ return addresses;
70
+ }
71
+
72
+ function rawForFilter(indexingAddresses) {
73
+ return indexingAddresses;
74
+ }
75
+
76
+ function register(indexingAddresses, additions) {
77
+ Object.assign(indexingAddresses, additions);
78
+ }
79
+
80
+ function rollbackInPlace(indexingAddresses, targetBlockNumber) {
81
+ Utils.Dict.forEachWithKey(indexingAddresses, (indexingContract, address) => {
82
+ if (indexingContract.registrationBlock > targetBlockNumber) {
83
+ return Utils.Dict.deleteInPlace(indexingAddresses, address);
84
+ }
85
+ });
86
+ }
87
+
88
+ export {
89
+ deriveEffectiveStartBlock,
90
+ makeContractConfigs,
91
+ makeIndexingAddress,
92
+ make,
93
+ get,
94
+ size,
95
+ getContractAddresses,
96
+ rawForFilter,
97
+ register,
98
+ rollbackInPlace,
99
+ }
100
+ /* Utils Not a pure module */
@@ -0,0 +1,32 @@
1
+ type indexingAddress = Internal.indexingContract
2
+
3
+ type contractConfig = {startBlock: option<int>}
4
+
5
+ type t
6
+
7
+ let deriveEffectiveStartBlock: (~registrationBlock: int, ~contractStartBlock: option<int>) => int
8
+
9
+ let makeContractConfigs: (~eventConfigs: array<Internal.eventConfig>) => dict<contractConfig>
10
+
11
+ let makeIndexingAddress: (
12
+ ~contract: Internal.indexingAddress,
13
+ ~contractConfigs: dict<contractConfig>,
14
+ ) => indexingAddress
15
+
16
+ let make: (~contractConfigs: dict<contractConfig>, ~addresses: array<Internal.indexingAddress>) => t
17
+
18
+ let get: (t, string) => option<indexingAddress>
19
+
20
+ let size: t => int
21
+
22
+ let getContractAddresses: (t, ~contractName: string) => array<Address.t>
23
+
24
+ // Underlying dict for the precompiled `clientAddressFilter` only, which does raw
25
+ // `indexingAddresses[srcAddress]` access in generated JS. Don't use elsewhere —
26
+ // prefer the domain accessors so the opaque type stays enforced.
27
+ let rawForFilter: t => dict<indexingAddress>
28
+
29
+ let register: (t, dict<indexingAddress>) => unit
30
+
31
+ // Deletes addresses registered after `targetBlockNumber` from the index in place.
32
+ let rollbackInPlace: (t, ~targetBlockNumber: int) => unit
package/src/Main.res CHANGED
@@ -168,18 +168,7 @@ let buildChainsObject = (~config: Config.t) => {
168
168
  | Some(state) => {
169
169
  let chain = ChainMap.Chain.makeUnsafe(~chainId=chainConfig.id)
170
170
  let chainState = state->IndexerState.getChainState(~chain)
171
- let indexingAddresses = chainState->ChainState.indexingAddresses
172
-
173
- // Collect all addresses for this contract name from indexingAddresses
174
- let addresses = []
175
- let values = indexingAddresses->Dict.valuesToArray
176
- for idx in 0 to values->Array.length - 1 {
177
- let indexingContract = values->Array.getUnsafe(idx)
178
- if indexingContract.contractName === contract.name {
179
- addresses->Array.push(indexingContract.address)->ignore
180
- }
181
- }
182
- addresses
171
+ chainState->ChainState.contractAddresses(~contractName=contract.name)
183
172
  }
184
173
  // Before the global state is available (eg during handler
185
174
  // module load after resume), combine static addresses from config
@@ -627,9 +616,9 @@ let startServer = (~getState, ~persistence: Persistence.t, ~isDevelopmentMode: b
627
616
  app->get("/metrics", (_req, res) => {
628
617
  res->set("Content-Type", PromClient.defaultRegister->PromClient.getContentType)
629
618
  let _ =
630
- PromClient.defaultRegister
631
- ->PromClient.metrics
632
- ->Promise.thenResolve(metrics => res->endWithData(metrics))
619
+ Metrics.collect(~state=indexerStateRef.contents)->Promise.thenResolve(metrics =>
620
+ res->endWithData(metrics)
621
+ )
633
622
  })
634
623
 
635
624
  app->get("/metrics/runtime", (_req, res) => {
package/src/Main.res.mjs CHANGED
@@ -6,6 +6,7 @@ import * as Envio from "./Envio.res.mjs";
6
6
  import * as Utils from "./Utils.res.mjs";
7
7
  import * as Config from "./Config.res.mjs";
8
8
  import * as Logging from "./Logging.res.mjs";
9
+ import * as Metrics from "./Metrics.res.mjs";
9
10
  import Express from "express";
10
11
  import * as Process from "process";
11
12
  import * as ChainMap from "./ChainMap.res.mjs";
@@ -165,29 +166,20 @@ function buildChainsObject(config) {
165
166
  if (state !== undefined) {
166
167
  let chain = ChainMap.Chain.makeUnsafe(chainConfig.id);
167
168
  let chainState = IndexerState.getChainState(Primitive_option.valFromOption(state), chain);
168
- let indexingAddresses = ChainState.indexingAddresses(chainState);
169
- let addresses = [];
170
- let values = Object.values(indexingAddresses);
171
- for (let idx = 0, idx_finish = values.length; idx < idx_finish; ++idx) {
172
- let indexingContract = values[idx];
173
- if (indexingContract.contractName === contract.name) {
174
- addresses.push(indexingContract.address);
175
- }
176
- }
177
- return addresses;
169
+ return ChainState.contractAddresses(chainState, contract.name);
178
170
  }
179
171
  let chainState$1 = getInitialChainState(chainConfig.id);
180
172
  if (chainState$1 === undefined) {
181
173
  return contract.addresses;
182
174
  }
183
- let addresses$1 = contract.addresses.slice();
175
+ let addresses = contract.addresses.slice();
184
176
  chainState$1.indexingAddresses.forEach(dc => {
185
177
  if (dc.contractName === contract.name) {
186
- addresses$1.push(dc.address);
178
+ addresses.push(dc.address);
187
179
  return;
188
180
  }
189
181
  });
190
- return addresses$1;
182
+ return addresses;
191
183
  }
192
184
  });
193
185
  Object.defineProperty(chainObj, contract.name, {
@@ -486,7 +478,7 @@ function startServer(getState, persistence, isDevelopmentMode) {
486
478
  });
487
479
  app.get("/metrics", (_req, res) => {
488
480
  res.set("Content-Type", PromClient.register.contentType);
489
- PromClient.register.metrics().then(metrics => res.end(metrics));
481
+ Metrics.collect(indexerStateRef.contents).then(metrics => res.end(metrics));
490
482
  });
491
483
  app.get("/metrics/runtime", (_req, res) => {
492
484
  res.set("Content-Type", runtimeRegistry.contentType);
@@ -0,0 +1,33 @@
1
+ // Pull-based metrics computed from live indexer state at scrape time, merged with
2
+ // the imperatively-updated prom-client default registry. Used because the address
3
+ // index is mutated in place (no single update site to fire a gauge from).
4
+
5
+ let indexingAddressesName = "envio_indexing_addresses"
6
+ let indexingAddressesHelp = "The number of addresses indexed on chain. Includes both static and dynamic addresses."
7
+
8
+ // Render a gauge straight from the per-chain dict, one sample per key, without
9
+ // materialising an intermediate samples array. Accumulate into one string rather
10
+ // than building a lines array to join: `++` compiles to JS `+=`, which V8 grows
11
+ // as a ConsString instead of recopying.
12
+ let renderGauge = (~name, ~help, ~chains: dict<'a>, ~value: 'a => int) => {
13
+ let out = ref(`# HELP ${name} ${help}\n# TYPE ${name} gauge`)
14
+ let prefix = `\n${name}{chainId="`
15
+ chains->Utils.Dict.forEachWithKey((chain, chainId) => {
16
+ out := out.contents ++ prefix ++ chainId ++ `"} ` ++ value(chain)->Int.toString
17
+ })
18
+ out.contents
19
+ }
20
+
21
+ let collect = async (~state: option<IndexerState.t>) => {
22
+ let base = await PromClient.defaultRegister->PromClient.metrics
23
+ switch state {
24
+ | None => base
25
+ | Some(state) =>
26
+ `${base}${renderGauge(
27
+ ~name=indexingAddressesName,
28
+ ~help=indexingAddressesHelp,
29
+ ~chains=state->IndexerState.chainStates,
30
+ ~value=cs => (cs->ChainState.toChainData).numAddresses,
31
+ )}\n`
32
+ }
33
+ }
@@ -0,0 +1,39 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Utils from "./Utils.res.mjs";
4
+ import * as ChainState from "./ChainState.res.mjs";
5
+ import * as PromClient from "prom-client";
6
+ import * as IndexerState from "./IndexerState.res.mjs";
7
+ import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
8
+
9
+ let indexingAddressesName = "envio_indexing_addresses";
10
+
11
+ let indexingAddressesHelp = "The number of addresses indexed on chain. Includes both static and dynamic addresses.";
12
+
13
+ function renderGauge(name, help, chains, value) {
14
+ let out = {
15
+ contents: `# HELP ` + name + ` ` + help + `\n# TYPE ` + name + ` gauge`
16
+ };
17
+ let prefix = `\n` + name + `{chainId="`;
18
+ Utils.Dict.forEachWithKey(chains, (chain, chainId) => {
19
+ out.contents = out.contents + prefix + chainId + `"} ` + value(chain).toString();
20
+ });
21
+ return out.contents;
22
+ }
23
+
24
+ async function collect(state) {
25
+ let base = await PromClient.register.metrics();
26
+ if (state !== undefined) {
27
+ return base + renderGauge(indexingAddressesName, indexingAddressesHelp, IndexerState.chainStates(Primitive_option.valFromOption(state)), cs => ChainState.toChainData(cs).numAddresses) + `\n`;
28
+ } else {
29
+ return base;
30
+ }
31
+ }
32
+
33
+ export {
34
+ indexingAddressesName,
35
+ indexingAddressesHelp,
36
+ renderGauge,
37
+ collect,
38
+ }
39
+ /* Utils Not a pure module */
@@ -246,10 +246,7 @@ module PreloadHandler = {
246
246
  )
247
247
  operations->Utils.Dict.deleteInPlace(key)
248
248
  }
249
- sumTimeCounter->SafeCounter.handleFloat(
250
- ~labels,
251
- ~value=timerRef->Performance.secondsSince,
252
- )
249
+ sumTimeCounter->SafeCounter.handleFloat(~labels, ~value=timerRef->Performance.secondsSince)
253
250
  count->SafeCounter.increment(~labels)
254
251
  }
255
252
  }
@@ -339,18 +336,6 @@ module ProcessStartTimeSeconds = {
339
336
  }
340
337
  }
341
338
 
342
- module IndexingAddresses = {
343
- let gauge = SafeGauge.makeOrThrow(
344
- ~name="envio_indexing_addresses",
345
- ~help="The number of addresses indexed on chain. Includes both static and dynamic addresses.",
346
- ~labelSchema=chainIdLabelsSchema,
347
- )
348
-
349
- let set = (~addressesCount, ~chainId) => {
350
- gauge->SafeGauge.handleInt(~labels=chainId, ~value=addressesCount)
351
- }
352
- }
353
-
354
339
  module IndexingConcurrency = {
355
340
  let gauge = SafeGauge.makeOrThrow(
356
341
  ~name="envio_indexing_concurrency",
@@ -800,10 +785,7 @@ module StorageLoad = {
800
785
  )
801
786
  operations->Utils.Dict.deleteInPlace(key)
802
787
  }
803
- sumTimeCounter->SafeCounter.handleFloat(
804
- ~labels,
805
- ~value=timerRef->Performance.secondsSince,
806
- )
788
+ sumTimeCounter->SafeCounter.handleFloat(~labels, ~value=timerRef->Performance.secondsSince)
807
789
  counter->SafeCounter.increment(~labels)
808
790
  whereSizeCounter->SafeCounter.handleInt(~labels, ~value=whereSize)
809
791
  sizeCounter->SafeCounter.handleInt(~labels, ~value=size)
@@ -389,39 +389,28 @@ let ProcessStartTimeSeconds = {
389
389
  set: set$3
390
390
  };
391
391
 
392
- let gauge$4 = makeOrThrow$1("envio_indexing_addresses", "The number of addresses indexed on chain. Includes both static and dynamic addresses.", chainIdLabelsSchema);
392
+ let gauge$4 = makeOrThrow$1("envio_indexing_concurrency", "The number of executing concurrent queries to the chain data-source.", chainIdLabelsSchema);
393
393
 
394
- function set$4(addressesCount, chainId) {
395
- handleInt$1(gauge$4, chainId, addressesCount);
394
+ function set$4(concurrency, chainId) {
395
+ handleInt$1(gauge$4, chainId, concurrency);
396
396
  }
397
397
 
398
- let IndexingAddresses = {
398
+ let IndexingConcurrency = {
399
399
  gauge: gauge$4,
400
400
  set: set$4
401
401
  };
402
402
 
403
- let gauge$5 = makeOrThrow$1("envio_indexing_concurrency", "The number of executing concurrent queries to the chain data-source.", chainIdLabelsSchema);
403
+ let gauge$5 = makeOrThrow$1("envio_indexing_partitions", "The number of partitions used to split fetching logic by addresses and block ranges.", chainIdLabelsSchema);
404
404
 
405
- function set$5(concurrency, chainId) {
406
- handleInt$1(gauge$5, chainId, concurrency);
405
+ function set$5(partitionsCount, chainId) {
406
+ handleInt$1(gauge$5, chainId, partitionsCount);
407
407
  }
408
408
 
409
- let IndexingConcurrency = {
409
+ let IndexingPartitions = {
410
410
  gauge: gauge$5,
411
411
  set: set$5
412
412
  };
413
413
 
414
- let gauge$6 = makeOrThrow$1("envio_indexing_partitions", "The number of partitions used to split fetching logic by addresses and block ranges.", chainIdLabelsSchema);
415
-
416
- function set$6(partitionsCount, chainId) {
417
- handleInt$1(gauge$6, chainId, partitionsCount);
418
- }
419
-
420
- let IndexingPartitions = {
421
- gauge: gauge$6,
422
- set: set$6
423
- };
424
-
425
414
  let counter = makeOrThrow("envio_indexing_idle_seconds", "The time the indexer source syncing has been idle. A high value may indicate the source sync is a bottleneck.", chainIdLabelsSchema);
426
415
 
427
416
  let IndexingIdleTime = {
@@ -440,51 +429,51 @@ let IndexingQueryTime = {
440
429
  counter: counter$2
441
430
  };
442
431
 
443
- let gauge$7 = makeOrThrow$1("envio_indexing_buffer_size", "The current number of items in the indexing buffer.", chainIdLabelsSchema);
432
+ let gauge$6 = makeOrThrow$1("envio_indexing_buffer_size", "The current number of items in the indexing buffer.", chainIdLabelsSchema);
444
433
 
445
- function set$7(bufferSize, chainId) {
446
- handleInt$1(gauge$7, chainId, bufferSize);
434
+ function set$6(bufferSize, chainId) {
435
+ handleInt$1(gauge$6, chainId, bufferSize);
447
436
  }
448
437
 
449
438
  let IndexingBufferSize = {
450
- gauge: gauge$7,
451
- set: set$7
439
+ gauge: gauge$6,
440
+ set: set$6
452
441
  };
453
442
 
454
- let gauge$8 = PromClient.Gauge.makeGauge({
443
+ let gauge$7 = PromClient.Gauge.makeGauge({
455
444
  name: "envio_indexing_target_buffer_size",
456
445
  help: "The indexer-wide target buffer size shared across all chains. The actual number of items in the queue may exceed this value, but the indexer always tries to keep the buffer filled up to this target."
457
446
  });
458
447
 
459
- function set$8(targetBufferSize) {
460
- gauge$8.set(targetBufferSize);
448
+ function set$7(targetBufferSize) {
449
+ gauge$7.set(targetBufferSize);
461
450
  }
462
451
 
463
452
  let IndexingTargetBufferSize = {
464
- gauge: gauge$8,
465
- set: set$8
453
+ gauge: gauge$7,
454
+ set: set$7
466
455
  };
467
456
 
468
- let gauge$9 = makeOrThrow$1("envio_indexing_buffer_block", "The highest block number that has been fully fetched by the indexer.", chainIdLabelsSchema);
457
+ let gauge$8 = makeOrThrow$1("envio_indexing_buffer_block", "The highest block number that has been fully fetched by the indexer.", chainIdLabelsSchema);
469
458
 
470
- function set$9(blockNumber, chainId) {
471
- handleInt$1(gauge$9, chainId, blockNumber);
459
+ function set$8(blockNumber, chainId) {
460
+ handleInt$1(gauge$8, chainId, blockNumber);
472
461
  }
473
462
 
474
463
  let IndexingBufferBlockNumber = {
475
- gauge: gauge$9,
476
- set: set$9
464
+ gauge: gauge$8,
465
+ set: set$8
477
466
  };
478
467
 
479
- let gauge$10 = makeOrThrow$1("envio_indexing_end_block", "The block number to stop indexing at. (inclusive)", chainIdLabelsSchema);
468
+ let gauge$9 = makeOrThrow$1("envio_indexing_end_block", "The block number to stop indexing at. (inclusive)", chainIdLabelsSchema);
480
469
 
481
- function set$10(endBlock, chainId) {
482
- handleInt$1(gauge$10, chainId, endBlock);
470
+ function set$9(endBlock, chainId) {
471
+ handleInt$1(gauge$9, chainId, endBlock);
483
472
  }
484
473
 
485
474
  let IndexingEndBlock = {
486
- gauge: gauge$10,
487
- set: set$10
475
+ gauge: gauge$9,
476
+ set: set$9
488
477
  };
489
478
 
490
479
  let sourceLabelsSchema = S$RescriptSchema.schema(s => ({
@@ -525,18 +514,18 @@ let SourceRequestCount = {
525
514
  addSeconds: addSeconds
526
515
  };
527
516
 
528
- let gauge$11 = makeOrThrow$1("envio_source_known_height", "The latest known block number reported by the source. This value may lag behind the actual chain height, as it is updated only when queried.", sourceLabelsSchema);
517
+ let gauge$10 = makeOrThrow$1("envio_source_known_height", "The latest known block number reported by the source. This value may lag behind the actual chain height, as it is updated only when queried.", sourceLabelsSchema);
529
518
 
530
- function set$11(sourceName, chainId, blockNumber) {
531
- handleInt$1(gauge$11, {
519
+ function set$10(sourceName, chainId, blockNumber) {
520
+ handleInt$1(gauge$10, {
532
521
  source: sourceName,
533
522
  chainId: chainId
534
523
  }, blockNumber);
535
524
  }
536
525
 
537
526
  let SourceHeight = {
538
- gauge: gauge$11,
539
- set: set$11
527
+ gauge: gauge$10,
528
+ set: set$10
540
529
  };
541
530
 
542
531
  let counter$4 = makeOrThrow("envio_reorg_detected_total", "Total number of reorgs detected", chainIdLabelsSchema);
@@ -550,43 +539,43 @@ let ReorgCount = {
550
539
  increment: increment$5
551
540
  };
552
541
 
553
- let gauge$12 = makeOrThrow$1("envio_reorg_detected_block", "The block number where reorg was detected the last time. This doesn't mean that the block was reorged, this is simply where we found block hash to be different.", chainIdLabelsSchema);
542
+ let gauge$11 = makeOrThrow$1("envio_reorg_detected_block", "The block number where reorg was detected the last time. This doesn't mean that the block was reorged, this is simply where we found block hash to be different.", chainIdLabelsSchema);
554
543
 
555
- function set$12(blockNumber, chain) {
556
- handleInt$1(gauge$12, chain, blockNumber);
544
+ function set$11(blockNumber, chain) {
545
+ handleInt$1(gauge$11, chain, blockNumber);
557
546
  }
558
547
 
559
548
  let ReorgDetectionBlockNumber = {
560
- gauge: gauge$12,
561
- set: set$12
549
+ gauge: gauge$11,
550
+ set: set$11
562
551
  };
563
552
 
564
- let gauge$13 = PromClient.Gauge.makeGauge({
553
+ let gauge$12 = PromClient.Gauge.makeGauge({
565
554
  name: "envio_reorg_threshold",
566
555
  help: "Whether indexing is currently within the reorg threshold"
567
556
  });
568
557
 
569
- function set$13(isInReorgThreshold) {
570
- gauge$13.set(isInReorgThreshold ? 1 : 0);
558
+ function set$12(isInReorgThreshold) {
559
+ gauge$12.set(isInReorgThreshold ? 1 : 0);
571
560
  }
572
561
 
573
562
  let ReorgThreshold = {
574
- gauge: gauge$13,
575
- set: set$13
563
+ gauge: gauge$12,
564
+ set: set$12
576
565
  };
577
566
 
578
- let gauge$14 = PromClient.Gauge.makeGauge({
567
+ let gauge$13 = PromClient.Gauge.makeGauge({
579
568
  name: "envio_rollback_enabled",
580
569
  help: "Whether rollback on reorg is enabled"
581
570
  });
582
571
 
583
- function set$14(enabled) {
584
- gauge$14.set(enabled ? 1 : 0);
572
+ function set$13(enabled) {
573
+ gauge$13.set(enabled ? 1 : 0);
585
574
  }
586
575
 
587
576
  let RollbackEnabled = {
588
- gauge: gauge$14,
589
- set: set$14
577
+ gauge: gauge$13,
578
+ set: set$13
590
579
  };
591
580
 
592
581
  let timeCounter$3 = PromClient.Counter.makeCounter({
@@ -635,62 +624,62 @@ let RollbackHistoryPrune = {
635
624
  increment: increment$7
636
625
  };
637
626
 
638
- let gauge$15 = makeOrThrow$1("envio_rollback_target_block", "The block number reorg was rollbacked to the last time.", chainIdLabelsSchema);
627
+ let gauge$14 = makeOrThrow$1("envio_rollback_target_block", "The block number reorg was rollbacked to the last time.", chainIdLabelsSchema);
639
628
 
640
- function set$15(blockNumber, chain) {
641
- handleInt$1(gauge$15, chain, blockNumber);
629
+ function set$14(blockNumber, chain) {
630
+ handleInt$1(gauge$14, chain, blockNumber);
642
631
  }
643
632
 
644
633
  let RollbackTargetBlockNumber = {
645
- gauge: gauge$15,
646
- set: set$15
634
+ gauge: gauge$14,
635
+ set: set$14
647
636
  };
648
637
 
649
- let gauge$16 = PromClient.Gauge.makeGauge({
638
+ let gauge$15 = PromClient.Gauge.makeGauge({
650
639
  name: "envio_processing_max_batch_size",
651
640
  help: "The maximum number of items to process in a single batch."
652
641
  });
653
642
 
654
- function set$16(maxBatchSize) {
655
- gauge$16.set(maxBatchSize);
643
+ function set$15(maxBatchSize) {
644
+ gauge$15.set(maxBatchSize);
656
645
  }
657
646
 
658
647
  let ProcessingMaxBatchSize = {
659
- gauge: gauge$16,
660
- set: set$16
648
+ gauge: gauge$15,
649
+ set: set$15
661
650
  };
662
651
 
663
- let gauge$17 = makeOrThrow$1("envio_progress_block", "The block number of the latest block processed and stored in the database.", chainIdLabelsSchema);
652
+ let gauge$16 = makeOrThrow$1("envio_progress_block", "The block number of the latest block processed and stored in the database.", chainIdLabelsSchema);
664
653
 
665
- function set$17(blockNumber, chainId) {
666
- handleInt$1(gauge$17, chainId, blockNumber);
654
+ function set$16(blockNumber, chainId) {
655
+ handleInt$1(gauge$16, chainId, blockNumber);
667
656
  }
668
657
 
669
658
  let ProgressBlockNumber = {
670
- gauge: gauge$17,
671
- set: set$17
659
+ gauge: gauge$16,
660
+ set: set$16
672
661
  };
673
662
 
674
- let gauge$18 = makeOrThrow$1("envio_progress_events", "The number of events processed and reflected in the database.", chainIdLabelsSchema);
663
+ let gauge$17 = makeOrThrow$1("envio_progress_events", "The number of events processed and reflected in the database.", chainIdLabelsSchema);
675
664
 
676
- function set$18(processedCount, chainId) {
677
- handleFloat$1(gauge$18, chainId, processedCount);
665
+ function set$17(processedCount, chainId) {
666
+ handleFloat$1(gauge$17, chainId, processedCount);
678
667
  }
679
668
 
680
669
  let ProgressEventsCount = {
681
- gauge: gauge$18,
682
- set: set$18
670
+ gauge: gauge$17,
671
+ set: set$17
683
672
  };
684
673
 
685
- let gauge$19 = makeOrThrow$1("envio_progress_latency", "The latency in milliseconds between the latest processed event creation and the time it was written to storage.", chainIdLabelsSchema);
674
+ let gauge$18 = makeOrThrow$1("envio_progress_latency", "The latency in milliseconds between the latest processed event creation and the time it was written to storage.", chainIdLabelsSchema);
686
675
 
687
- function set$19(latencyMs, chainId) {
688
- handleInt$1(gauge$19, chainId, latencyMs);
676
+ function set$18(latencyMs, chainId) {
677
+ handleInt$1(gauge$18, chainId, latencyMs);
689
678
  }
690
679
 
691
680
  let ProgressLatency = {
692
- gauge: gauge$19,
693
- set: set$19
681
+ gauge: gauge$18,
682
+ set: set$18
694
683
  };
695
684
 
696
685
  let effectLabelsSchema = S$RescriptSchema.object(s => s.f("effect", S$RescriptSchema.string));
@@ -710,15 +699,15 @@ let EffectCalls = {
710
699
  activeCallsCount: activeCallsCount
711
700
  };
712
701
 
713
- let gauge$20 = makeOrThrow$1("envio_effect_cache", "The number of items in the effect cache.", effectLabelsSchema);
702
+ let gauge$19 = makeOrThrow$1("envio_effect_cache", "The number of items in the effect cache.", effectLabelsSchema);
714
703
 
715
- function set$20(count, effectName) {
716
- handleInt$1(gauge$20, effectName, count);
704
+ function set$19(count, effectName) {
705
+ handleInt$1(gauge$19, effectName, count);
717
706
  }
718
707
 
719
708
  let EffectCacheCount = {
720
- gauge: gauge$20,
721
- set: set$20
709
+ gauge: gauge$19,
710
+ set: set$19
722
711
  };
723
712
 
724
713
  let counter$7 = makeOrThrow("envio_effect_cache_invalidations", "The number of effect cache invalidations.", effectLabelsSchema);
@@ -732,18 +721,18 @@ let EffectCacheInvalidationsCount = {
732
721
  increment: increment$8
733
722
  };
734
723
 
735
- let gauge$21 = makeOrThrow$1("envio_effect_queue", "The number of effect calls waiting in the rate limit queue.", effectLabelsSchema);
724
+ let gauge$20 = makeOrThrow$1("envio_effect_queue", "The number of effect calls waiting in the rate limit queue.", effectLabelsSchema);
736
725
 
737
726
  let timeCounter$6 = makeOrThrow("envio_effect_queue_wait_seconds", "The time spent waiting in the rate limit queue.", effectLabelsSchema);
738
727
 
739
- function set$21(count, effectName) {
740
- handleInt$1(gauge$21, effectName, count);
728
+ function set$20(count, effectName) {
729
+ handleInt$1(gauge$20, effectName, count);
741
730
  }
742
731
 
743
732
  let EffectQueueCount = {
744
- gauge: gauge$21,
733
+ gauge: gauge$20,
745
734
  timeCounter: timeCounter$6,
746
- set: set$21
735
+ set: set$20
747
736
  };
748
737
 
749
738
  let loadLabelsSchema = S$RescriptSchema.schema(s => ({
@@ -846,7 +835,6 @@ export {
846
835
  IndexingKnownHeight,
847
836
  Info,
848
837
  ProcessStartTimeSeconds,
849
- IndexingAddresses,
850
838
  IndexingConcurrency,
851
839
  IndexingPartitions,
852
840
  IndexingIdleTime,