From 0ad76fcf4812feebf06d5a63a5a999a63c0c6cad Mon Sep 17 00:00:00 2001 From: jsy1218 <91580504+jsy1218@users.noreply.github.com> Date: Mon, 16 Mar 2026 16:11:16 -0700 Subject: [PATCH 1/2] Revert "Revert "fix: pin base v4 subgraph ellipfra index directly (for oncall issue)" (#1384)" This reverts commit fe276c02bd8265b13406af74bd0140ef32a0ddf4. --- bin/app.ts | 12 ++++++++++++ bin/stacks/routing-api-stack.ts | 6 ++++++ bin/stacks/routing-caching-stack.ts | 10 ++++++++++ lib/cron/cache-config.ts | 2 +- 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/bin/app.ts b/bin/app.ts index 2f70b6a9e3..14dfdbc36f 100644 --- a/bin/app.ts +++ b/bin/app.ts @@ -40,6 +40,8 @@ export class RoutingAPIStage extends Stage { alchemyQueryKey?: string alchemyQueryKey2?: string graphBaseV4SubgraphId?: string + graphBaseV4DeploymentId?: string + graphBaseV4IndexId?: string graphXlayerV4Id?: string graphXlayerV3Id?: string graphXLayerV2Id?: string @@ -115,6 +117,8 @@ export class RoutingAPIStage extends Stage { alchemyQueryKey, alchemyQueryKey2, graphBaseV4SubgraphId, + graphBaseV4DeploymentId, + graphBaseV4IndexId, graphXlayerV4Id, graphXlayerV3Id, graphXLayerV2Id, @@ -189,6 +193,8 @@ export class RoutingAPIStage extends Stage { alchemyQueryKey, alchemyQueryKey2, graphBaseV4SubgraphId, + graphBaseV4DeploymentId, + graphBaseV4IndexId, graphXlayerV4Id, graphXlayerV3Id, graphXLayerV2Id, @@ -444,6 +450,8 @@ export class RoutingAPIPipeline extends Stack { // below secret namings are wrong, but we take it as is graphBearerToken: alchemySubgraphSecret.secretValueFromJson('alchemy-bearer-token').toString(), graphBaseV4SubgraphId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-subgraph-id').toString(), + graphBaseV4DeploymentId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-deployment-id').toString(), + graphBaseV4IndexId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-index-id').toString(), graphXlayerV4Id: routingApiNewSecrets.secretValueFromJson('GRAPH_XLAYER_V4_ID').toString(), graphXlayerV3Id: routingApiNewSecrets.secretValueFromJson('GRAPH_XLAYER_V3_ID').toString(), graphXLayerV2Id: routingApiNewSecrets.secretValueFromJson('GRAPH_XLAYER_V2_ID').toString(), @@ -535,6 +543,8 @@ export class RoutingAPIPipeline extends Stack { // below secret namings are wrong, but we take it as is graphBearerToken: alchemySubgraphSecret.secretValueFromJson('alchemy-bearer-token').toString(), graphBaseV4SubgraphId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-subgraph-id').toString(), + graphBaseV4DeploymentId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-deployment-id').toString(), + graphBaseV4IndexId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-index-id').toString(), graphXlayerV4Id: routingApiNewSecrets.secretValueFromJson('GRAPH_XLAYER_V4_ID').toString(), graphXlayerV3Id: routingApiNewSecrets.secretValueFromJson('GRAPH_XLAYER_V3_ID').toString(), graphXLayerV2Id: routingApiNewSecrets.secretValueFromJson('GRAPH_XLAYER_V2_ID').toString(), @@ -743,6 +753,8 @@ new RoutingAPIStack(app, 'RoutingAPIStack', { alchemyQueryKey: process.env.ALCHEMY_QUERY_KEY!, alchemyQueryKey2: process.env.ALCHEMY_QUERY_KEY_2!, graphBaseV4SubgraphId: process.env.GRAPH_BASE_V4_SUBGRAPH_ID!, + graphBaseV4DeploymentId: process.env.GRAPH_BASE_V4_DEPLOYMENT_ID!, + graphBaseV4IndexId: process.env.GRAPH_BASE_V4_INDEX_ID!, graphXlayerV4Id: process.env.GRAPH_XLAYER_V4_ID!, graphXlayerV3Id: process.env.GRAPH_XLAYER_V4_ID!, graphXLayerV2Id: process.env.GRAPH_XLAYER_V4_ID!, diff --git a/bin/stacks/routing-api-stack.ts b/bin/stacks/routing-api-stack.ts index df39f487c6..75837340a0 100644 --- a/bin/stacks/routing-api-stack.ts +++ b/bin/stacks/routing-api-stack.ts @@ -52,6 +52,8 @@ export class RoutingAPIStack extends cdk.Stack { alchemyQueryKey?: string alchemyQueryKey2?: string graphBaseV4SubgraphId?: string + graphBaseV4DeploymentId?: string + graphBaseV4IndexId?: string graphXlayerV4Id?: string graphXlayerV3Id?: string graphXLayerV2Id?: string @@ -129,6 +131,8 @@ export class RoutingAPIStack extends cdk.Stack { alchemyQueryKey, alchemyQueryKey2, graphBaseV4SubgraphId, + graphBaseV4DeploymentId, + graphBaseV4IndexId, graphXlayerV4Id, graphXlayerV3Id, graphXLayerV2Id, @@ -202,6 +206,8 @@ export class RoutingAPIStack extends cdk.Stack { alchemyQueryKey, alchemyQueryKey2, graphBaseV4SubgraphId, + graphBaseV4DeploymentId, + graphBaseV4IndexId, graphXlayerV4Id, graphXlayerV3Id, graphXLayerV2Id, diff --git a/bin/stacks/routing-caching-stack.ts b/bin/stacks/routing-caching-stack.ts index 1380f6ad24..dd3bdca8d4 100644 --- a/bin/stacks/routing-caching-stack.ts +++ b/bin/stacks/routing-caching-stack.ts @@ -29,6 +29,8 @@ export interface RoutingCachingStackProps extends cdk.NestedStackProps { alchemyQueryKey?: string alchemyQueryKey2?: string graphBaseV4SubgraphId?: string + graphBaseV4DeploymentId?: string + graphBaseV4IndexId?: string graphXlayerV4Id?: string graphXlayerV3Id?: string graphXLayerV2Id?: string @@ -93,6 +95,8 @@ export class RoutingCachingStack extends cdk.NestedStack { public readonly alchemyQueryKey: string | undefined = undefined public readonly alchemyQueryKey2: string | undefined = undefined public readonly graphBaseV4SubgraphId: string | undefined = undefined + public readonly graphBaseV4DeploymentId: string | undefined = undefined + public readonly graphBaseV4IndexId: string | undefined = undefined public readonly graphXlayerV4Id: string | undefined = undefined public readonly graphXlayerV3Id: string | undefined = undefined public readonly graphXLayerV2Id: string | undefined = undefined @@ -153,6 +157,8 @@ export class RoutingCachingStack extends cdk.NestedStack { alchemyQueryKey, alchemyQueryKey2, graphBaseV4SubgraphId, + graphBaseV4DeploymentId, + graphBaseV4IndexId, graphXlayerV4Id, graphXlayerV3Id, graphXLayerV2Id, @@ -211,6 +217,8 @@ export class RoutingCachingStack extends cdk.NestedStack { this.alchemyQueryKey = alchemyQueryKey this.alchemyQueryKey2 = alchemyQueryKey2 this.graphBaseV4SubgraphId = graphBaseV4SubgraphId + this.graphBaseV4DeploymentId = graphBaseV4DeploymentId + this.graphBaseV4IndexId = graphBaseV4IndexId this.graphXlayerV4Id = graphXlayerV4Id this.graphXlayerV3Id = graphXlayerV3Id this.graphXLayerV2Id = graphXLayerV2Id @@ -346,6 +354,8 @@ export class RoutingCachingStack extends cdk.NestedStack { ALCHEMY_QUERY_KEY: this.alchemyQueryKey ?? '', ALCHEMY_QUERY_KEY_2: this.alchemyQueryKey2 ?? '', GRAPH_BASE_V4_SUBGRAPH_ID: this.graphBaseV4SubgraphId ?? '', + GRAPH_BASE_V4_DEPLOYMENT_ID: this.graphBaseV4DeploymentId ?? '', + GRAPH_BASE_V4_INDEX_ID: this.graphBaseV4IndexId ?? '', GRAPH_XLAYER_V4_ID: this.graphXlayerV4Id ?? '', GRAPH_XLAYER_V3_ID: this.graphXlayerV3Id ?? '', GRAPH_XLAYER_V2_ID: this.graphXLayerV2Id ?? '', diff --git a/lib/cron/cache-config.ts b/lib/cron/cache-config.ts index 08502cc2e8..da958d61ba 100644 --- a/lib/cron/cache-config.ts +++ b/lib/cron/cache-config.ts @@ -137,7 +137,7 @@ export const v4SubgraphUrlOverride = (chainId: ChainId) => { case ChainId.ARBITRUM_ONE: return `https://api.aws-us-east-1.goldsky.com/c/uniswap2/gn/subgraphs/id/${process.env.GOLD_SKY_ARBITRUM_V4_ID}` case ChainId.BASE: - return `https://gateway.thegraph.com/api/subgraphs/id/${process.env.GRAPH_BASE_V4_SUBGRAPH_ID}` + return `https://gateway.thegraph.com/api/deployments/id/${process.env.GRAPH_BASE_V4_DEPLOYMENT_ID}/indexers/id/${process.env.GRAPH_BASE_V4_INDEX_ID}` case ChainId.POLYGON: return `https://api.aws-us-east-1.goldsky.com/c/uniswap2/gn/subgraphs/id/${process.env.GOLD_SKY_POLYGON_V4_ID}` case ChainId.WORLDCHAIN: From d3443f9dd019ce22fbcebd58cf89d1f62caaf3b9 Mon Sep 17 00:00:00 2001 From: jsy1218 <91580504+jsy1218@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:04:00 -0700 Subject: [PATCH 2/2] fix: pin base v4 subgraph ellipfra index directly (for oncall issue) --- bin/app.ts | 6 ------ bin/stacks/routing-api-stack.ts | 3 --- bin/stacks/routing-caching-stack.ts | 5 ----- 3 files changed, 14 deletions(-) diff --git a/bin/app.ts b/bin/app.ts index 14dfdbc36f..f82cc55e0b 100644 --- a/bin/app.ts +++ b/bin/app.ts @@ -39,7 +39,6 @@ export class RoutingAPIStage extends Stage { unicornSecret: string alchemyQueryKey?: string alchemyQueryKey2?: string - graphBaseV4SubgraphId?: string graphBaseV4DeploymentId?: string graphBaseV4IndexId?: string graphXlayerV4Id?: string @@ -116,7 +115,6 @@ export class RoutingAPIStage extends Stage { unicornSecret, alchemyQueryKey, alchemyQueryKey2, - graphBaseV4SubgraphId, graphBaseV4DeploymentId, graphBaseV4IndexId, graphXlayerV4Id, @@ -192,7 +190,6 @@ export class RoutingAPIStage extends Stage { unicornSecret, alchemyQueryKey, alchemyQueryKey2, - graphBaseV4SubgraphId, graphBaseV4DeploymentId, graphBaseV4IndexId, graphXlayerV4Id, @@ -449,7 +446,6 @@ export class RoutingAPIPipeline extends Stack { // bearer token and base subgraph id are not from alchemy subgraph, but from the graph // below secret namings are wrong, but we take it as is graphBearerToken: alchemySubgraphSecret.secretValueFromJson('alchemy-bearer-token').toString(), - graphBaseV4SubgraphId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-subgraph-id').toString(), graphBaseV4DeploymentId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-deployment-id').toString(), graphBaseV4IndexId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-index-id').toString(), graphXlayerV4Id: routingApiNewSecrets.secretValueFromJson('GRAPH_XLAYER_V4_ID').toString(), @@ -542,7 +538,6 @@ export class RoutingAPIPipeline extends Stack { // bearer token and base subgraph id are not from alchemy subgraph, but from the graph // below secret namings are wrong, but we take it as is graphBearerToken: alchemySubgraphSecret.secretValueFromJson('alchemy-bearer-token').toString(), - graphBaseV4SubgraphId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-subgraph-id').toString(), graphBaseV4DeploymentId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-deployment-id').toString(), graphBaseV4IndexId: alchemySubgraphSecret.secretValueFromJson('alchemy-base-v4-index-id').toString(), graphXlayerV4Id: routingApiNewSecrets.secretValueFromJson('GRAPH_XLAYER_V4_ID').toString(), @@ -752,7 +747,6 @@ new RoutingAPIStack(app, 'RoutingAPIStack', { uniGraphQLHeaderOrigin: process.env.GQL_H_ORGN!, alchemyQueryKey: process.env.ALCHEMY_QUERY_KEY!, alchemyQueryKey2: process.env.ALCHEMY_QUERY_KEY_2!, - graphBaseV4SubgraphId: process.env.GRAPH_BASE_V4_SUBGRAPH_ID!, graphBaseV4DeploymentId: process.env.GRAPH_BASE_V4_DEPLOYMENT_ID!, graphBaseV4IndexId: process.env.GRAPH_BASE_V4_INDEX_ID!, graphXlayerV4Id: process.env.GRAPH_XLAYER_V4_ID!, diff --git a/bin/stacks/routing-api-stack.ts b/bin/stacks/routing-api-stack.ts index 75837340a0..c62ff8f10f 100644 --- a/bin/stacks/routing-api-stack.ts +++ b/bin/stacks/routing-api-stack.ts @@ -51,7 +51,6 @@ export class RoutingAPIStack extends cdk.Stack { unicornSecret: string alchemyQueryKey?: string alchemyQueryKey2?: string - graphBaseV4SubgraphId?: string graphBaseV4DeploymentId?: string graphBaseV4IndexId?: string graphXlayerV4Id?: string @@ -130,7 +129,6 @@ export class RoutingAPIStack extends cdk.Stack { unicornSecret, alchemyQueryKey, alchemyQueryKey2, - graphBaseV4SubgraphId, graphBaseV4DeploymentId, graphBaseV4IndexId, graphXlayerV4Id, @@ -205,7 +203,6 @@ export class RoutingAPIStack extends cdk.Stack { hosted_zone, alchemyQueryKey, alchemyQueryKey2, - graphBaseV4SubgraphId, graphBaseV4DeploymentId, graphBaseV4IndexId, graphXlayerV4Id, diff --git a/bin/stacks/routing-caching-stack.ts b/bin/stacks/routing-caching-stack.ts index dd3bdca8d4..0a0bac0332 100644 --- a/bin/stacks/routing-caching-stack.ts +++ b/bin/stacks/routing-caching-stack.ts @@ -28,7 +28,6 @@ export interface RoutingCachingStackProps extends cdk.NestedStackProps { chatbotSNSArn?: string alchemyQueryKey?: string alchemyQueryKey2?: string - graphBaseV4SubgraphId?: string graphBaseV4DeploymentId?: string graphBaseV4IndexId?: string graphXlayerV4Id?: string @@ -94,7 +93,6 @@ export class RoutingCachingStack extends cdk.NestedStack { public readonly poolCacheLambdaNameArray: string[] = [] public readonly alchemyQueryKey: string | undefined = undefined public readonly alchemyQueryKey2: string | undefined = undefined - public readonly graphBaseV4SubgraphId: string | undefined = undefined public readonly graphBaseV4DeploymentId: string | undefined = undefined public readonly graphBaseV4IndexId: string | undefined = undefined public readonly graphXlayerV4Id: string | undefined = undefined @@ -156,7 +154,6 @@ export class RoutingCachingStack extends cdk.NestedStack { chatbotSNSArn, alchemyQueryKey, alchemyQueryKey2, - graphBaseV4SubgraphId, graphBaseV4DeploymentId, graphBaseV4IndexId, graphXlayerV4Id, @@ -216,7 +213,6 @@ export class RoutingCachingStack extends cdk.NestedStack { this.alchemyQueryKey = alchemyQueryKey this.alchemyQueryKey2 = alchemyQueryKey2 - this.graphBaseV4SubgraphId = graphBaseV4SubgraphId this.graphBaseV4DeploymentId = graphBaseV4DeploymentId this.graphBaseV4IndexId = graphBaseV4IndexId this.graphXlayerV4Id = graphXlayerV4Id @@ -353,7 +349,6 @@ export class RoutingCachingStack extends cdk.NestedStack { POOL_CACHE_GZIP_KEY: this.poolCacheGzipKey, ALCHEMY_QUERY_KEY: this.alchemyQueryKey ?? '', ALCHEMY_QUERY_KEY_2: this.alchemyQueryKey2 ?? '', - GRAPH_BASE_V4_SUBGRAPH_ID: this.graphBaseV4SubgraphId ?? '', GRAPH_BASE_V4_DEPLOYMENT_ID: this.graphBaseV4DeploymentId ?? '', GRAPH_BASE_V4_INDEX_ID: this.graphBaseV4IndexId ?? '', GRAPH_XLAYER_V4_ID: this.graphXlayerV4Id ?? '',