From 5601926b94ba41001757effa18c145901f042589 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 362eb19561d..d40a4267359 100644 --- a/node/src/opt.rs +++ b/node/src/opt.rs @@ -37,6 +37,7 @@ pub struct Opt { #[structopt( long, + env = "START_BLOCK", value_name = "BLOCK_HASH:BLOCK_NUMBER", help = "block hash and number that the subgraph passed will start indexing at" )] @@ -207,11 +208,17 @@ pub struct Opt { #[structopt( long, value_name = "IPFS_HASH", + env = "DEBUG_FORK", help = "IPFS hash of the subgraph manifest that you want to fork" )] pub debug_fork: Option, - #[structopt(long, value_name = "URL", help = "Base URL for forking subgraphs")] + #[structopt( + long, + value_name = "URL", + env = "FORK_BASE", + help = "Base URL for forking subgraphs" + )] pub fork_base: Option, } From c10a562601586cfe0513651ef835586936117853 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 2f4ce087502..4b3f85e231e 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -187,3 +187,7 @@ happens, subgraphs might process inconsistent data. Defaults to 250. identified as unused, `graph-node` will wait at least this long before actually deleting the data (value is in minutes, defaults to 360, i.e. 6 hours) +- `START_BLOCK`: block hash:block number where the forked subgraph will start indexing at +- `FORK_BASE`: api url for where the graph node will fork from, use `https://api.thegraph.com/subgraphs/id/` + for the hosted service. +- `DEBUG_FORK`: the IPFS hash id of the subgraph to fork \ No newline at end of file