Skip to content

Commit fbdee8a

Browse files
authored
docs: add config example with migration guide (#375)
1 parent b1f984c commit fbdee8a

File tree

3 files changed

+142
-0
lines changed

3 files changed

+142
-0
lines changed

docs/migration-config/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Migration guide
2+
3+
In case you want to quickly migrate from the old stack into the new stack, you can use the following two configurations to help you to migrate without changing too much fields.
4+
5+
You just need to drop the config, use it in the `--config` args and add some additional environment variables.
6+
7+
Please take a deeper look in the config, but 90% of the time you'll be safe just using it. If you find any issues using this config, feel free to open an issue.
8+
9+
## Missing configuration fields
10+
11+
The new stack requires you adding an escrow subgraph, similar to the current network subgraph field.
12+
13+
You can edit the config yourself and add the following fields:
14+
15+
```
16+
[subgraphs.escrow]
17+
query_url = "<escrow subgraph query url>"
18+
deployment_id = "<escrow deployment id>"
19+
```
20+
21+
You can also add these environment variables in your new setup:
22+
23+
```
24+
INDEXER_SUBGRAPHS__ESCROW__QUERY_URL=<escrow subgraph query url>
25+
INDEXER_SUBGRAPHS__ESCROW__DEPLOYMENT_ID=<escrow deployment id>
26+
```
27+
28+
We recommend you migrating overtime to be fully in the configuration and don't need to provide multiple environment variables that can stay in plaintext, this will make your work easier.
29+
30+
## Booleans inside config
31+
32+
The configuration doesn't accept booleans as strings, so in case you had `INDEXER_SERVICE_SERVE_NETWORK_SUBGRAPH` environment variable, please update to `INDEXER_SERVICE__SERVE_NETWORK_SUBGRAPH` and use `true/false` as values (or you could update directly in the configuration).
33+
34+
Please update the config accordingly. Also, check it out the explanation for each field in [config/minimal-config-example.toml](config/minimal-config-example.toml) and also [config/maximal-config-example.toml](config/maximal-config-example.toml)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[indexer]
2+
indexer_address = "${INDEXER_SERVICE_INDEXER_ADDRESS}"
3+
operator_mnemonic = "${INDEXER_SERVICE_MNEMONIC}"
4+
5+
[database]
6+
host = "${INDEXER_SERVICE_POSTGRES_HOST}"
7+
user = "${INDEXER_SERVICE_POSTGRES_USERNAME}"
8+
password = "${INDEXER_SERVICE_POSTGRES_PASSWORD}"
9+
database = "${INDEXER_SERVICE_POSTGRES_DATABASE}"
10+
11+
[graph_node]
12+
# URL to your graph-node's query endpoint
13+
query_url = "${INDEXER_SERVICE_GRAPH_NODE_QUERY_ENDPOINT}"
14+
# URL to your graph-node's status endpoint
15+
status_url = "${INDEXER_SERVICE_GRAPH_NODE_STATUS_ENDPOINT}"
16+
17+
[subgraphs.network]
18+
# Query URL for the Graph Network subgraph.
19+
query_url = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_ENDPOINT}"
20+
deployment_id = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_DEPLOYMENT}"
21+
22+
# [subgraphs.escrow]
23+
# INDEXER_SUBGRAPHS__ESCROW__QUERY_URL
24+
# query_url = ""
25+
# INDEXER_SUBGRAPHS__ESCROW__DEPLOYMENT_ID
26+
# deployment_id = ""
27+
28+
[blockchain]
29+
chain_id = 42161
30+
# Contract address of TAP's receipt aggregate voucher (RAV) verifier.
31+
receipts_verifier_address = "0x33f9E93266ce0E108fc85DdE2f71dab555A0F05a"
32+
33+
##############################################
34+
# Specific configurations to indexer-service #
35+
##############################################
36+
[service]
37+
# Host and port to serve the indexer-service query endpoint. This one should have a
38+
# public ingress.
39+
host_and_port = "0.0.0.0:${INDEXER_SERVICE_PORT}"
40+
# Serve the network subgraph on `common.server.host_and_port`/network
41+
# INDEXER_SERVICE__SERVE_NETWORK_SUBGRAPH
42+
# serve_network_subgraph = false
43+
# Serve the escrow subgraph on `common.server.host_and_port`/escrow
44+
# INDEXER_SERVICE__SERVE_ESCROW_SUBGRAPH
45+
# serve_escrow_subgraph = false
46+
47+
free_query_auth_token = "${INDEXER_SERVICE_FREE_QUERY_AUTH_TOKEN}"
48+
49+
########################################
50+
# Specific configurations to tap-agent #
51+
########################################
52+
[tap.sender_aggregator_endpoints]
53+
# Key-Value of all senders and their aggregator endpoints
54+
0xDDE4cfFd3D9052A9cb618fC05a1Cd02be1f2F467 = "https://tap-aggregator.network.thegraph.com"
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[indexer]
2+
indexer_address = "${INDEXER_SERVICE_INDEXER_ADDRESS}"
3+
operator_mnemonic = "${INDEXER_SERVICE_MNEMONIC}"
4+
5+
[database]
6+
host = "${INDEXER_SERVICE_POSTGRES_HOST}"
7+
user = "${INDEXER_SERVICE_POSTGRES_USERNAME}"
8+
password = "${INDEXER_SERVICE_POSTGRES_PASSWORD}"
9+
database = "${INDEXER_SERVICE_POSTGRES_DATABASE}"
10+
11+
[graph_node]
12+
# URL to your graph-node's query endpoint
13+
query_url = "${INDEXER_SERVICE_GRAPH_NODE_QUERY_ENDPOINT}"
14+
# URL to your graph-node's status endpoint
15+
status_url = "${INDEXER_SERVICE_GRAPH_NODE_STATUS_ENDPOINT}"
16+
17+
[subgraphs.network]
18+
# Query URL for the Graph Network subgraph.
19+
query_url = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_ENDPOINT}"
20+
deployment_id = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_DEPLOYMENT}"
21+
22+
# [subgraphs.escrow]
23+
# INDEXER_SUBGRAPHS__ESCROW__QUERY_URL
24+
# query_url = ""
25+
# INDEXER_SUBGRAPHS__ESCROW__DEPLOYMENT_ID
26+
# deployment_id = ""
27+
28+
[blockchain]
29+
chain_id = 421614
30+
# Contract address of TAP's receipt aggregate voucher (RAV) verifier.
31+
receipts_verifier_address = "0xfC24cE7a4428A6B89B52645243662A02BA734ECF"
32+
33+
##############################################
34+
# Specific configurations to indexer-service #
35+
##############################################
36+
[service]
37+
# Host and port to serve the indexer-service query endpoint. This one should have a
38+
# public ingress.
39+
host_and_port = "0.0.0.0:${INDEXER_SERVICE_PORT}"
40+
# Serve the network subgraph on `common.server.host_and_port`/network
41+
# INDEXER_SERVICE__SERVE_NETWORK_SUBGRAPH
42+
# serve_network_subgraph = false
43+
# Serve the escrow subgraph on `common.server.host_and_port`/escrow
44+
# INDEXER_SERVICE__SERVE_ESCROW_SUBGRAPH
45+
# serve_escrow_subgraph = false
46+
47+
free_query_auth_token = "${INDEXER_SERVICE_FREE_QUERY_AUTH_TOKEN}"
48+
49+
########################################
50+
# Specific configurations to tap-agent #
51+
########################################
52+
[tap.sender_aggregator_endpoints]
53+
# Key-Value of all senders and their aggregator endpoints
54+
0xC3dDf37906724732FfD748057FEBe23379b0710D = "https://tap-aggregator.testnet.thegraph.com"

0 commit comments

Comments
 (0)