@secondlayer/subgraphs 3.25.0 → 3.26.0

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.
@@ -2598,6 +2598,10 @@ async function resolveRoute(subgraphName, targetDb) {
2598
2598
  version: row?.version ?? ""
2599
2599
  };
2600
2600
  routeCache.set(subgraphName, route);
2601
+ logger7.info("subgraph handler dispatch path resolved", {
2602
+ subgraph: subgraphName,
2603
+ path: sandboxEnabled({ sandbox_workers: route.sandboxWorkers }) ? "sandbox" : "in-process"
2604
+ });
2601
2605
  return route;
2602
2606
  }
2603
2607
  function invalidateSubgraphRoute(subgraphName) {
@@ -3349,9 +3353,9 @@ async function processBlockRange(def, opts) {
3349
3353
  return { blocksProcessed, totalEventsProcessed, totalErrors, aborted };
3350
3354
  }
3351
3355
  async function resolveBlockRange(source, def, opts) {
3352
- const fromBlock = opts?.fromBlock ?? def.startBlock ?? 1;
3353
- const toBlock = opts?.toBlock != null ? opts.toBlock : await source.getTip();
3354
- return { fromBlock, toBlock };
3356
+ const definitionStart = def.startBlock ?? 1;
3357
+ const fromBlock = opts?.startBlockFloor != null ? Math.max(definitionStart, opts.startBlockFloor) : definitionStart;
3358
+ return { fromBlock, toBlock: await source.getTip() };
3355
3359
  }
3356
3360
  async function clearReindexMetadata(db, subgraphName) {
3357
3361
  await db.updateTable("subgraphs").set({ reindex_from_block: null, reindex_to_block: null }).where("name", "=", subgraphName).execute();
@@ -4199,8 +4203,7 @@ async function runSubgraphOperation(operation, signal) {
4199
4203
  return result2.processed;
4200
4204
  }
4201
4205
  const result = await reindexSubgraph(def, {
4202
- fromBlock: operation.from_block == null ? undefined : Number(operation.from_block),
4203
- toBlock: operation.to_block == null ? undefined : Number(operation.to_block),
4206
+ startBlockFloor: operation.from_block == null ? undefined : Number(operation.from_block),
4204
4207
  schemaName,
4205
4208
  operationId: operation.id,
4206
4209
  signal
@@ -4412,5 +4415,5 @@ export {
4412
4415
  startSubgraphOperationRunner
4413
4416
  };
4414
4417
 
4415
- //# debugId=7B4DE0EDDFD3613764756E2164756E21
4418
+ //# debugId=6207636F26ECACDC64756E2164756E21
4416
4419
  //# sourceMappingURL=processor.js.map