Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Env. vars. for forking #4308

Merged
merged 2 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
9 changes: 8 additions & 1 deletion node/src/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)]
Expand Down Expand Up @@ -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<String>,

#[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<String>,
}

Expand Down