@secondlayer/subgraphs 4.1.2 → 4.1.3
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/dist/src/index.js +28 -19
- package/dist/src/index.js.map +5 -5
- package/dist/src/runtime/catchup.js +25 -19
- package/dist/src/runtime/catchup.js.map +4 -4
- package/dist/src/runtime/processor.js +28 -19
- package/dist/src/runtime/processor.js.map +5 -5
- package/dist/src/runtime/reindex.js +28 -19
- package/dist/src/runtime/reindex.js.map +5 -5
- package/dist/src/runtime/reorg.js +25 -19
- package/dist/src/runtime/reorg.js.map +4 -4
- package/dist/src/runtime/replay.js +4 -1
- package/dist/src/runtime/replay.js.map +3 -3
- package/dist/src/service.js +28 -19
- package/dist/src/service.js.map +5 -5
- package/package.json +1 -1
|
@@ -3206,6 +3206,9 @@ function decoderNamesForIndexEventTypes(eventTypes) {
|
|
|
3206
3206
|
function decoderNamesForSubgraph(subgraph) {
|
|
3207
3207
|
return decoderNamesForIndexEventTypes(referencedIndexEventTypes(subgraph));
|
|
3208
3208
|
}
|
|
3209
|
+
function usesDecodedIndexPlane(subgraph) {
|
|
3210
|
+
return process.env.SUBGRAPH_SOURCE === "streams-index" && isStreamsIndexEligible(subgraph);
|
|
3211
|
+
}
|
|
3209
3212
|
function committedHeight(cursor) {
|
|
3210
3213
|
if (!cursor)
|
|
3211
3214
|
return null;
|
|
@@ -3364,25 +3367,28 @@ async function catchUpSubgraph(subgraph, subgraphName) {
|
|
|
3364
3367
|
const rawTip = await source.getTip();
|
|
3365
3368
|
if (rawTip <= 0)
|
|
3366
3369
|
return 0;
|
|
3367
|
-
|
|
3368
|
-
if (
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3370
|
+
let chainTip = rawTip;
|
|
3371
|
+
if (usesDecodedIndexPlane(subgraph)) {
|
|
3372
|
+
const bound = await boundSourceTip(rawTip, decoderNamesForSubgraph(subgraph));
|
|
3373
|
+
if (!bound.ok) {
|
|
3374
|
+
logger8.warn("Subgraph catch-up stalled: missing decoder checkpoint", {
|
|
3375
|
+
event: "subgraph_catchup_decoder_stall",
|
|
3376
|
+
subgraph: subgraphName,
|
|
3377
|
+
missing: bound.missing
|
|
3378
|
+
});
|
|
3379
|
+
return 0;
|
|
3380
|
+
}
|
|
3381
|
+
if (bound.floor !== null && bound.floor < rawTip) {
|
|
3382
|
+
logger8.debug("Subgraph catch-up tip bounded by decoder progress", {
|
|
3383
|
+
event: "subgraph_catchup_decoder_floor",
|
|
3384
|
+
subgraph: subgraphName,
|
|
3385
|
+
rawTip,
|
|
3386
|
+
floor: bound.floor,
|
|
3387
|
+
tip: bound.tip
|
|
3388
|
+
});
|
|
3389
|
+
}
|
|
3390
|
+
chainTip = bound.tip;
|
|
3384
3391
|
}
|
|
3385
|
-
const chainTip = bound.tip;
|
|
3386
3392
|
if (chainTip <= 0 || lastProcessedBlock >= chainTip)
|
|
3387
3393
|
return 0;
|
|
3388
3394
|
const subgraphStart = Number(subgraphRow.start_block) || 1;
|
|
@@ -3520,5 +3526,5 @@ export {
|
|
|
3520
3526
|
bumpReorgEpoch
|
|
3521
3527
|
};
|
|
3522
3528
|
|
|
3523
|
-
//# debugId=
|
|
3529
|
+
//# debugId=841E1C15E01A14D064756E2164756E21
|
|
3524
3530
|
//# sourceMappingURL=catchup.js.map
|