From cfc3cd78ac3324f4aa0f83b2229f1189fe46317a Mon Sep 17 00:00:00 2001 From: Jeff Wu Date: Tue, 29 Mar 2022 12:00:22 -0700 Subject: [PATCH 1/2] adding env params for forking opts --- node/src/opt.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/node/src/opt.rs b/node/src/opt.rs index c40c1c50d2d..321cf47b0cd 100644 --- a/node/src/opt.rs +++ b/node/src/opt.rs @@ -37,6 +37,7 @@ pub struct Opt { #[clap( long, + env = "GRAPH_START_BLOCK", value_name = "BLOCK_HASH:BLOCK_NUMBER", help = "block hash and number that the subgraph passed will start indexing at" )] @@ -217,11 +218,17 @@ pub struct Opt { #[clap( long, value_name = "IPFS_HASH", + env = "GRAPH_DEBUG_FORK", help = "IPFS hash of the subgraph manifest that you want to fork" )] pub debug_fork: Option, - #[clap(long, value_name = "URL", help = "Base URL for forking subgraphs")] + #[clap( + long, + value_name = "URL", + env = "GRAPH_FORK_BASE", + help = "Base URL for forking subgraphs" + )] pub fork_base: Option, } From a7316f00682462caaf61f10f84ddf326b9966df5 Mon Sep 17 00:00:00 2001 From: Jeff Wu Date: Tue, 29 Mar 2022 12:05:45 -0700 Subject: [PATCH 2/2] adding documentation --- docs/environment-variables.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/environment-variables.md b/docs/environment-variables.md index 58ca21c71bf..310c83e0a5e 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -215,3 +215,7 @@ those. copying or grafting should take. This limits how long transactions for such long running operations will be, and therefore helps control bloat in other tables. Value is in seconds and defaults to 180s. +- `GRAPH_START_BLOCK`: block hash:block number where the forked subgraph will start indexing at. +- `GRAPH_FORK_BASE`: api url for where the graph node will fork from, use `https://api.thegraph.com/subgraphs/id/` + for the hosted service. +- `GRAPH_DEBUG_FORK`: the IPFS hash id of the subgraph to fork.