envio 3.3.0-alpha.0 → 3.3.0-alpha.1
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/package.json +6 -6
- package/src/ChainFetching.res +6 -8
- package/src/ChainFetching.res.mjs +3 -3
- package/src/ChainState.res +26 -1
- package/src/ChainState.res.mjs +15 -0
- package/src/ChainState.resi +2 -0
- package/src/CrossChainState.res +97 -72
- package/src/CrossChainState.res.mjs +68 -44
- package/src/CrossChainState.resi +1 -9
- package/src/Env.res +0 -7
- package/src/Env.res.mjs +0 -6
- package/src/FetchState.res +92 -22
- package/src/FetchState.res.mjs +87 -14
- package/src/IndexerLoop.res +2 -3
- package/src/IndexerLoop.res.mjs +1 -1
- package/src/IndexerState.res +0 -8
- package/src/IndexerState.res.mjs +4 -8
- package/src/IndexerState.resi +0 -4
- package/src/Main.res.mjs +1 -1
- package/src/Prometheus.res +0 -11
- package/src/Prometheus.res.mjs +83 -98
- package/src/sources/SourceManager.res +9 -8
- package/src/sources/SourceManager.res.mjs +21 -26
- package/src/sources/SourceManager.resi +2 -3
package/src/Prometheus.res.mjs
CHANGED
|
@@ -400,42 +400,28 @@ let IndexingAddresses = {
|
|
|
400
400
|
set: set$4
|
|
401
401
|
};
|
|
402
402
|
|
|
403
|
-
let gauge$5 =
|
|
404
|
-
name: "envio_indexing_max_concurrency",
|
|
405
|
-
help: "The maximum number of concurrent data-source queries across the whole indexer."
|
|
406
|
-
});
|
|
403
|
+
let gauge$5 = makeOrThrow$1("envio_indexing_concurrency", "The number of executing concurrent queries to the chain data-source.", chainIdLabelsSchema);
|
|
407
404
|
|
|
408
|
-
function set$5(
|
|
409
|
-
gauge$5
|
|
405
|
+
function set$5(concurrency, chainId) {
|
|
406
|
+
handleInt$1(gauge$5, chainId, concurrency);
|
|
410
407
|
}
|
|
411
408
|
|
|
412
|
-
let
|
|
409
|
+
let IndexingConcurrency = {
|
|
413
410
|
gauge: gauge$5,
|
|
414
411
|
set: set$5
|
|
415
412
|
};
|
|
416
413
|
|
|
417
|
-
let gauge$6 = makeOrThrow$1("
|
|
414
|
+
let gauge$6 = makeOrThrow$1("envio_indexing_partitions", "The number of partitions used to split fetching logic by addresses and block ranges.", chainIdLabelsSchema);
|
|
418
415
|
|
|
419
|
-
function set$6(
|
|
420
|
-
handleInt$1(gauge$6, chainId,
|
|
416
|
+
function set$6(partitionsCount, chainId) {
|
|
417
|
+
handleInt$1(gauge$6, chainId, partitionsCount);
|
|
421
418
|
}
|
|
422
419
|
|
|
423
|
-
let
|
|
420
|
+
let IndexingPartitions = {
|
|
424
421
|
gauge: gauge$6,
|
|
425
422
|
set: set$6
|
|
426
423
|
};
|
|
427
424
|
|
|
428
|
-
let gauge$7 = makeOrThrow$1("envio_indexing_partitions", "The number of partitions used to split fetching logic by addresses and block ranges.", chainIdLabelsSchema);
|
|
429
|
-
|
|
430
|
-
function set$7(partitionsCount, chainId) {
|
|
431
|
-
handleInt$1(gauge$7, chainId, partitionsCount);
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
let IndexingPartitions = {
|
|
435
|
-
gauge: gauge$7,
|
|
436
|
-
set: set$7
|
|
437
|
-
};
|
|
438
|
-
|
|
439
425
|
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);
|
|
440
426
|
|
|
441
427
|
let IndexingIdleTime = {
|
|
@@ -454,51 +440,51 @@ let IndexingQueryTime = {
|
|
|
454
440
|
counter: counter$2
|
|
455
441
|
};
|
|
456
442
|
|
|
457
|
-
let gauge$
|
|
443
|
+
let gauge$7 = makeOrThrow$1("envio_indexing_buffer_size", "The current number of items in the indexing buffer.", chainIdLabelsSchema);
|
|
458
444
|
|
|
459
|
-
function set$
|
|
460
|
-
handleInt$1(gauge$
|
|
445
|
+
function set$7(bufferSize, chainId) {
|
|
446
|
+
handleInt$1(gauge$7, chainId, bufferSize);
|
|
461
447
|
}
|
|
462
448
|
|
|
463
449
|
let IndexingBufferSize = {
|
|
464
|
-
gauge: gauge$
|
|
465
|
-
set: set$
|
|
450
|
+
gauge: gauge$7,
|
|
451
|
+
set: set$7
|
|
466
452
|
};
|
|
467
453
|
|
|
468
|
-
let gauge$
|
|
454
|
+
let gauge$8 = PromClient.Gauge.makeGauge({
|
|
469
455
|
name: "envio_indexing_target_buffer_size",
|
|
470
456
|
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."
|
|
471
457
|
});
|
|
472
458
|
|
|
473
|
-
function set$
|
|
474
|
-
gauge$
|
|
459
|
+
function set$8(targetBufferSize) {
|
|
460
|
+
gauge$8.set(targetBufferSize);
|
|
475
461
|
}
|
|
476
462
|
|
|
477
463
|
let IndexingTargetBufferSize = {
|
|
478
|
-
gauge: gauge$
|
|
479
|
-
set: set$
|
|
464
|
+
gauge: gauge$8,
|
|
465
|
+
set: set$8
|
|
480
466
|
};
|
|
481
467
|
|
|
482
|
-
let gauge$
|
|
468
|
+
let gauge$9 = makeOrThrow$1("envio_indexing_buffer_block", "The highest block number that has been fully fetched by the indexer.", chainIdLabelsSchema);
|
|
483
469
|
|
|
484
|
-
function set$
|
|
485
|
-
handleInt$1(gauge$
|
|
470
|
+
function set$9(blockNumber, chainId) {
|
|
471
|
+
handleInt$1(gauge$9, chainId, blockNumber);
|
|
486
472
|
}
|
|
487
473
|
|
|
488
474
|
let IndexingBufferBlockNumber = {
|
|
489
|
-
gauge: gauge$
|
|
490
|
-
set: set$
|
|
475
|
+
gauge: gauge$9,
|
|
476
|
+
set: set$9
|
|
491
477
|
};
|
|
492
478
|
|
|
493
|
-
let gauge$
|
|
479
|
+
let gauge$10 = makeOrThrow$1("envio_indexing_end_block", "The block number to stop indexing at. (inclusive)", chainIdLabelsSchema);
|
|
494
480
|
|
|
495
|
-
function set$
|
|
496
|
-
handleInt$1(gauge$
|
|
481
|
+
function set$10(endBlock, chainId) {
|
|
482
|
+
handleInt$1(gauge$10, chainId, endBlock);
|
|
497
483
|
}
|
|
498
484
|
|
|
499
485
|
let IndexingEndBlock = {
|
|
500
|
-
gauge: gauge$
|
|
501
|
-
set: set$
|
|
486
|
+
gauge: gauge$10,
|
|
487
|
+
set: set$10
|
|
502
488
|
};
|
|
503
489
|
|
|
504
490
|
let sourceLabelsSchema = S$RescriptSchema.schema(s => ({
|
|
@@ -539,18 +525,18 @@ let SourceRequestCount = {
|
|
|
539
525
|
addSeconds: addSeconds
|
|
540
526
|
};
|
|
541
527
|
|
|
542
|
-
let gauge$
|
|
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);
|
|
543
529
|
|
|
544
|
-
function set$
|
|
545
|
-
handleInt$1(gauge$
|
|
530
|
+
function set$11(sourceName, chainId, blockNumber) {
|
|
531
|
+
handleInt$1(gauge$11, {
|
|
546
532
|
source: sourceName,
|
|
547
533
|
chainId: chainId
|
|
548
534
|
}, blockNumber);
|
|
549
535
|
}
|
|
550
536
|
|
|
551
537
|
let SourceHeight = {
|
|
552
|
-
gauge: gauge$
|
|
553
|
-
set: set$
|
|
538
|
+
gauge: gauge$11,
|
|
539
|
+
set: set$11
|
|
554
540
|
};
|
|
555
541
|
|
|
556
542
|
let counter$4 = makeOrThrow("envio_reorg_detected_total", "Total number of reorgs detected", chainIdLabelsSchema);
|
|
@@ -564,43 +550,43 @@ let ReorgCount = {
|
|
|
564
550
|
increment: increment$5
|
|
565
551
|
};
|
|
566
552
|
|
|
567
|
-
let gauge$
|
|
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);
|
|
568
554
|
|
|
569
|
-
function set$
|
|
570
|
-
handleInt$1(gauge$
|
|
555
|
+
function set$12(blockNumber, chain) {
|
|
556
|
+
handleInt$1(gauge$12, chain, blockNumber);
|
|
571
557
|
}
|
|
572
558
|
|
|
573
559
|
let ReorgDetectionBlockNumber = {
|
|
574
|
-
gauge: gauge$
|
|
575
|
-
set: set$
|
|
560
|
+
gauge: gauge$12,
|
|
561
|
+
set: set$12
|
|
576
562
|
};
|
|
577
563
|
|
|
578
|
-
let gauge$
|
|
564
|
+
let gauge$13 = PromClient.Gauge.makeGauge({
|
|
579
565
|
name: "envio_reorg_threshold",
|
|
580
566
|
help: "Whether indexing is currently within the reorg threshold"
|
|
581
567
|
});
|
|
582
568
|
|
|
583
|
-
function set$
|
|
584
|
-
gauge$
|
|
569
|
+
function set$13(isInReorgThreshold) {
|
|
570
|
+
gauge$13.set(isInReorgThreshold ? 1 : 0);
|
|
585
571
|
}
|
|
586
572
|
|
|
587
573
|
let ReorgThreshold = {
|
|
588
|
-
gauge: gauge$
|
|
589
|
-
set: set$
|
|
574
|
+
gauge: gauge$13,
|
|
575
|
+
set: set$13
|
|
590
576
|
};
|
|
591
577
|
|
|
592
|
-
let gauge$
|
|
578
|
+
let gauge$14 = PromClient.Gauge.makeGauge({
|
|
593
579
|
name: "envio_rollback_enabled",
|
|
594
580
|
help: "Whether rollback on reorg is enabled"
|
|
595
581
|
});
|
|
596
582
|
|
|
597
|
-
function set$
|
|
598
|
-
gauge$
|
|
583
|
+
function set$14(enabled) {
|
|
584
|
+
gauge$14.set(enabled ? 1 : 0);
|
|
599
585
|
}
|
|
600
586
|
|
|
601
587
|
let RollbackEnabled = {
|
|
602
|
-
gauge: gauge$
|
|
603
|
-
set: set$
|
|
588
|
+
gauge: gauge$14,
|
|
589
|
+
set: set$14
|
|
604
590
|
};
|
|
605
591
|
|
|
606
592
|
let timeCounter$3 = PromClient.Counter.makeCounter({
|
|
@@ -649,62 +635,62 @@ let RollbackHistoryPrune = {
|
|
|
649
635
|
increment: increment$7
|
|
650
636
|
};
|
|
651
637
|
|
|
652
|
-
let gauge$
|
|
638
|
+
let gauge$15 = makeOrThrow$1("envio_rollback_target_block", "The block number reorg was rollbacked to the last time.", chainIdLabelsSchema);
|
|
653
639
|
|
|
654
|
-
function set$
|
|
655
|
-
handleInt$1(gauge$
|
|
640
|
+
function set$15(blockNumber, chain) {
|
|
641
|
+
handleInt$1(gauge$15, chain, blockNumber);
|
|
656
642
|
}
|
|
657
643
|
|
|
658
644
|
let RollbackTargetBlockNumber = {
|
|
659
|
-
gauge: gauge$
|
|
660
|
-
set: set$
|
|
645
|
+
gauge: gauge$15,
|
|
646
|
+
set: set$15
|
|
661
647
|
};
|
|
662
648
|
|
|
663
|
-
let gauge$
|
|
649
|
+
let gauge$16 = PromClient.Gauge.makeGauge({
|
|
664
650
|
name: "envio_processing_max_batch_size",
|
|
665
651
|
help: "The maximum number of items to process in a single batch."
|
|
666
652
|
});
|
|
667
653
|
|
|
668
|
-
function set$
|
|
669
|
-
gauge$
|
|
654
|
+
function set$16(maxBatchSize) {
|
|
655
|
+
gauge$16.set(maxBatchSize);
|
|
670
656
|
}
|
|
671
657
|
|
|
672
658
|
let ProcessingMaxBatchSize = {
|
|
673
|
-
gauge: gauge$
|
|
674
|
-
set: set$
|
|
659
|
+
gauge: gauge$16,
|
|
660
|
+
set: set$16
|
|
675
661
|
};
|
|
676
662
|
|
|
677
|
-
let gauge$
|
|
663
|
+
let gauge$17 = makeOrThrow$1("envio_progress_block", "The block number of the latest block processed and stored in the database.", chainIdLabelsSchema);
|
|
678
664
|
|
|
679
|
-
function set$
|
|
680
|
-
handleInt$1(gauge$
|
|
665
|
+
function set$17(blockNumber, chainId) {
|
|
666
|
+
handleInt$1(gauge$17, chainId, blockNumber);
|
|
681
667
|
}
|
|
682
668
|
|
|
683
669
|
let ProgressBlockNumber = {
|
|
684
|
-
gauge: gauge$
|
|
685
|
-
set: set$
|
|
670
|
+
gauge: gauge$17,
|
|
671
|
+
set: set$17
|
|
686
672
|
};
|
|
687
673
|
|
|
688
|
-
let gauge$
|
|
674
|
+
let gauge$18 = makeOrThrow$1("envio_progress_events", "The number of events processed and reflected in the database.", chainIdLabelsSchema);
|
|
689
675
|
|
|
690
|
-
function set$
|
|
691
|
-
handleFloat$1(gauge$
|
|
676
|
+
function set$18(processedCount, chainId) {
|
|
677
|
+
handleFloat$1(gauge$18, chainId, processedCount);
|
|
692
678
|
}
|
|
693
679
|
|
|
694
680
|
let ProgressEventsCount = {
|
|
695
|
-
gauge: gauge$
|
|
696
|
-
set: set$
|
|
681
|
+
gauge: gauge$18,
|
|
682
|
+
set: set$18
|
|
697
683
|
};
|
|
698
684
|
|
|
699
|
-
let gauge$
|
|
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);
|
|
700
686
|
|
|
701
|
-
function set$
|
|
702
|
-
handleInt$1(gauge$
|
|
687
|
+
function set$19(latencyMs, chainId) {
|
|
688
|
+
handleInt$1(gauge$19, chainId, latencyMs);
|
|
703
689
|
}
|
|
704
690
|
|
|
705
691
|
let ProgressLatency = {
|
|
706
|
-
gauge: gauge$
|
|
707
|
-
set: set$
|
|
692
|
+
gauge: gauge$19,
|
|
693
|
+
set: set$19
|
|
708
694
|
};
|
|
709
695
|
|
|
710
696
|
let effectLabelsSchema = S$RescriptSchema.object(s => s.f("effect", S$RescriptSchema.string));
|
|
@@ -724,15 +710,15 @@ let EffectCalls = {
|
|
|
724
710
|
activeCallsCount: activeCallsCount
|
|
725
711
|
};
|
|
726
712
|
|
|
727
|
-
let gauge$
|
|
713
|
+
let gauge$20 = makeOrThrow$1("envio_effect_cache", "The number of items in the effect cache.", effectLabelsSchema);
|
|
728
714
|
|
|
729
|
-
function set$
|
|
730
|
-
handleInt$1(gauge$
|
|
715
|
+
function set$20(count, effectName) {
|
|
716
|
+
handleInt$1(gauge$20, effectName, count);
|
|
731
717
|
}
|
|
732
718
|
|
|
733
719
|
let EffectCacheCount = {
|
|
734
|
-
gauge: gauge$
|
|
735
|
-
set: set$
|
|
720
|
+
gauge: gauge$20,
|
|
721
|
+
set: set$20
|
|
736
722
|
};
|
|
737
723
|
|
|
738
724
|
let counter$7 = makeOrThrow("envio_effect_cache_invalidations", "The number of effect cache invalidations.", effectLabelsSchema);
|
|
@@ -746,18 +732,18 @@ let EffectCacheInvalidationsCount = {
|
|
|
746
732
|
increment: increment$8
|
|
747
733
|
};
|
|
748
734
|
|
|
749
|
-
let gauge$
|
|
735
|
+
let gauge$21 = makeOrThrow$1("envio_effect_queue", "The number of effect calls waiting in the rate limit queue.", effectLabelsSchema);
|
|
750
736
|
|
|
751
737
|
let timeCounter$6 = makeOrThrow("envio_effect_queue_wait_seconds", "The time spent waiting in the rate limit queue.", effectLabelsSchema);
|
|
752
738
|
|
|
753
|
-
function set$
|
|
754
|
-
handleInt$1(gauge$
|
|
739
|
+
function set$21(count, effectName) {
|
|
740
|
+
handleInt$1(gauge$21, effectName, count);
|
|
755
741
|
}
|
|
756
742
|
|
|
757
743
|
let EffectQueueCount = {
|
|
758
|
-
gauge: gauge$
|
|
744
|
+
gauge: gauge$21,
|
|
759
745
|
timeCounter: timeCounter$6,
|
|
760
|
-
set: set$
|
|
746
|
+
set: set$21
|
|
761
747
|
};
|
|
762
748
|
|
|
763
749
|
let loadLabelsSchema = S$RescriptSchema.schema(s => ({
|
|
@@ -861,7 +847,6 @@ export {
|
|
|
861
847
|
Info,
|
|
862
848
|
ProcessStartTimeSeconds,
|
|
863
849
|
IndexingAddresses,
|
|
864
|
-
IndexingMaxConcurrency,
|
|
865
850
|
IndexingConcurrency,
|
|
866
851
|
IndexingPartitions,
|
|
867
852
|
IndexingIdleTime,
|
|
@@ -217,20 +217,20 @@ let trackNewStatus = (sourceManager: t, ~newStatus) => {
|
|
|
217
217
|
sourceManager.status = newStatus
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
// Carry out the fetch decision made by CrossChainState.checkAndFetch: either
|
|
221
|
+
// dispatch the admitted queries or start waiting for a new block. Selection
|
|
222
|
+
// (getNextQuery + cross-chain admission) happens upstream so the budget is split
|
|
223
|
+
// per query across all chains.
|
|
224
|
+
let dispatch = async (
|
|
221
225
|
sourceManager: t,
|
|
222
226
|
~fetchState: FetchState.t,
|
|
223
227
|
~executeQuery,
|
|
224
228
|
~waitForNewBlock,
|
|
225
229
|
~onNewBlock,
|
|
226
|
-
~
|
|
227
|
-
~bufferLimit,
|
|
230
|
+
~action: FetchState.nextQuery,
|
|
228
231
|
~stateId,
|
|
229
232
|
) => {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
switch nextQuery {
|
|
233
|
-
| ReachedMaxConcurrency
|
|
233
|
+
switch action {
|
|
234
234
|
| NothingToQuery => ()
|
|
235
235
|
| WaitingForNewBlock =>
|
|
236
236
|
switch sourceManager.waitingForNewBlockStateId {
|
|
@@ -251,7 +251,8 @@ let fetchNext = async (
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
| Ready(queries) => {
|
|
254
|
-
|
|
254
|
+
// Queries are already marked in flight by ChainState.startFetchingQueries
|
|
255
|
+
// when they were admitted; here we just execute them.
|
|
255
256
|
sourceManager.fetchingPartitionsCount =
|
|
256
257
|
sourceManager.fetchingPartitionsCount + queries->Array.length
|
|
257
258
|
Prometheus.IndexingConcurrency.set(
|
|
@@ -177,33 +177,28 @@ function trackNewStatus(sourceManager, newStatus) {
|
|
|
177
177
|
sourceManager.status = newStatus;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
async function
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
case "ReachedMaxConcurrency" :
|
|
201
|
-
case "NothingToQuery" :
|
|
202
|
-
return;
|
|
180
|
+
async function dispatch(sourceManager, fetchState, executeQuery, waitForNewBlock, onNewBlock, action, stateId) {
|
|
181
|
+
if (typeof action !== "object") {
|
|
182
|
+
if (action !== "WaitingForNewBlock") {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
let waitingStateId = sourceManager.waitingForNewBlockStateId;
|
|
186
|
+
if (waitingStateId !== undefined && waitingStateId >= stateId) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
trackNewStatus(sourceManager, "WaitingForNewBlock");
|
|
190
|
+
sourceManager.waitingForNewBlockStateId = stateId;
|
|
191
|
+
let knownHeight = await waitForNewBlock(fetchState.knownHeight);
|
|
192
|
+
let waitingStateId$1 = sourceManager.waitingForNewBlockStateId;
|
|
193
|
+
if (waitingStateId$1 !== undefined && waitingStateId$1 === stateId) {
|
|
194
|
+
trackNewStatus(sourceManager, "Idle");
|
|
195
|
+
sourceManager.waitingForNewBlockStateId = undefined;
|
|
196
|
+
return onNewBlock(knownHeight);
|
|
197
|
+
} else {
|
|
198
|
+
return;
|
|
203
199
|
}
|
|
204
200
|
} else {
|
|
205
|
-
let queries =
|
|
206
|
-
FetchState.startFetchingQueries(fetchState, queries);
|
|
201
|
+
let queries = action._0;
|
|
207
202
|
sourceManager.fetchingPartitionsCount = sourceManager.fetchingPartitionsCount + queries.length | 0;
|
|
208
203
|
Prometheus.IndexingConcurrency.set(sourceManager.fetchingPartitionsCount, sourceManager.activeSource.chain);
|
|
209
204
|
trackNewStatus(sourceManager, "Querieng");
|
|
@@ -684,7 +679,7 @@ export {
|
|
|
684
679
|
getActiveSource,
|
|
685
680
|
inFlightCount,
|
|
686
681
|
onReorg,
|
|
687
|
-
|
|
682
|
+
dispatch,
|
|
688
683
|
waitForNewBlock,
|
|
689
684
|
executeQuery,
|
|
690
685
|
makeGetHeightRetryInterval,
|
|
@@ -25,14 +25,13 @@ let inFlightCount: t => int
|
|
|
25
25
|
|
|
26
26
|
let onReorg: (t, ~rollbackTargetBlock: int) => unit
|
|
27
27
|
|
|
28
|
-
let
|
|
28
|
+
let dispatch: (
|
|
29
29
|
t,
|
|
30
30
|
~fetchState: FetchState.t,
|
|
31
31
|
~executeQuery: FetchState.query => promise<unit>,
|
|
32
32
|
~waitForNewBlock: (~knownHeight: int) => promise<int>,
|
|
33
33
|
~onNewBlock: (~knownHeight: int) => unit,
|
|
34
|
-
~
|
|
35
|
-
~bufferLimit: int,
|
|
34
|
+
~action: FetchState.nextQuery,
|
|
36
35
|
~stateId: int,
|
|
37
36
|
) => promise<unit>
|
|
38
37
|
|