Skip to content

Commit

Permalink
node: Document that --node-id must be unique but constant between res…
Browse files Browse the repository at this point in the history
…tarts
  • Loading branch information
pwilczynskiclearcode authored and leoyvens committed Feb 10, 2022
1 parent 8b5cf75 commit 73bb308
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,13 @@ OPTIONS:
--ethereum-ws <NETWORK_NAME:[CAPABILITIES]:URL>
Ethereum network name (e.g. 'mainnet'), optional comma-seperated capabilities (eg `full,archive), and an Ethereum WebSocket URL, separated by a ':'
--node-id <NODE_ID>
A unique identifier for this node instance. Should have the same value between consecutive node restarts [default: default]
--http-port <PORT> Port for the GraphQL HTTP server [default: 8000]
--ipfs <HOST:PORT> HTTP address of an IPFS node
--node-id <NODE_ID> a unique identifier for this node [default: default]
--postgres-url <URL> Location of the Postgres database used for storing entities
--subgraph <[NAME:]IPFS_HASH> name and IPFS hash of the subgraph manifest
--subgraph <[NAME:]IPFS_HASH> Name and IPFS hash of the subgraph manifest
--ws-port <PORT> Port for the GraphQL WebSocket server [default: 8001]
```

Expand Down
3 changes: 2 additions & 1 deletion docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ those.

- `GRAPH_NODE_ID`: sets the node ID, allowing to run multiple Graph Nodes
in parallel and deploy to specific nodes; each ID must be unique among the set
of nodes.
of nodes. A single node should have the same value between consecutive restarts.
Subgraphs get assigned to node IDs and are not reassigned to other nodes automatically.
- `GRAPH_LOG`: control log levels, the same way that `RUST_LOG` is described
[here](https://docs.rs/env_logger/0.6.0/env_logger/)
- `THEGRAPH_STORE_POSTGRES_DIESEL_URL`: postgres instance used when running
Expand Down
2 changes: 1 addition & 1 deletion node/src/bin/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub struct Opt {
default_value = "default",
value_name = "NODE_ID",
env = "GRAPH_NODE_ID",
help = "a unique identifier for this node\n"
help = "a unique identifier for this node.\nShould have the same value between consecutive node restarts\n"
)]
pub node_id: String,
#[structopt(
Expand Down
2 changes: 1 addition & 1 deletion node/src/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ pub struct Opt {
default_value = "default",
value_name = "NODE_ID",
env = "GRAPH_NODE_ID",
help = "a unique identifier for this node"
help = "a unique identifier for this node. Should have the same value between consecutive node restarts"
)]
pub node_id: String,
#[structopt(long, help = "Enable debug logging")]
Expand Down

0 comments on commit 73bb308

Please sign in to comment.