-
Notifications
You must be signed in to change notification settings - Fork 23
docs: add config example with migration guide #375
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,34 @@ | ||||||
# Migration guide | ||||||
|
||||||
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. | ||||||
|
||||||
You just need to drop the config, use it in the `--config` args and add some additional environment variables. | ||||||
|
||||||
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. | ||||||
Comment on lines
+3
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you check a Markdown guide they say .md is supposed be formatted so that if you used |
||||||
|
||||||
## Missing configuration fields | ||||||
|
||||||
The new stack requires you adding an escrow subgraph, similar to the current network subgraph field. | ||||||
|
||||||
You can edit the config yourself and add the following fields: | ||||||
|
||||||
``` | ||||||
[subgraphs.escrow] | ||||||
query_url = "<escrow subgraph query url>" | ||||||
deployment_id = "<escrow deployment id>" | ||||||
``` | ||||||
|
||||||
You can also add these environment variables in your new setup: | ||||||
|
||||||
``` | ||||||
INDEXER_SUBGRAPHS__ESCROW__QUERY_URL=<escrow subgraph query url> | ||||||
INDEXER_SUBGRAPHS__ESCROW__DEPLOYMENT_ID=<escrow deployment id> | ||||||
``` | ||||||
|
||||||
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. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
## Booleans inside config | ||||||
|
||||||
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). | ||||||
|
||||||
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) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,54 @@ | ||||||||||
[indexer] | ||||||||||
indexer_address = "${INDEXER_SERVICE_INDEXER_ADDRESS}" | ||||||||||
operator_mnemonic = "${INDEXER_SERVICE_MNEMONIC}" | ||||||||||
|
||||||||||
[database] | ||||||||||
host = "${INDEXER_SERVICE_POSTGRES_HOST}" | ||||||||||
user = "${INDEXER_SERVICE_POSTGRES_USERNAME}" | ||||||||||
password = "${INDEXER_SERVICE_POSTGRES_PASSWORD}" | ||||||||||
database = "${INDEXER_SERVICE_POSTGRES_DATABASE}" | ||||||||||
|
||||||||||
[graph_node] | ||||||||||
# URL to your graph-node's query endpoint | ||||||||||
query_url = "${INDEXER_SERVICE_GRAPH_NODE_QUERY_ENDPOINT}" | ||||||||||
# URL to your graph-node's status endpoint | ||||||||||
status_url = "${INDEXER_SERVICE_GRAPH_NODE_STATUS_ENDPOINT}" | ||||||||||
|
||||||||||
[subgraphs.network] | ||||||||||
# Query URL for the Graph Network subgraph. | ||||||||||
query_url = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_ENDPOINT}" | ||||||||||
deployment_id = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_DEPLOYMENT}" | ||||||||||
|
||||||||||
# [subgraphs.escrow] | ||||||||||
# INDEXER_SUBGRAPHS__ESCROW__QUERY_URL | ||||||||||
# query_url = "" | ||||||||||
# INDEXER_SUBGRAPHS__ESCROW__DEPLOYMENT_ID | ||||||||||
# deployment_id = "" | ||||||||||
suchapalaver marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
||||||||||
[blockchain] | ||||||||||
chain_id = 42161 | ||||||||||
# Contract address of TAP's receipt aggregate voucher (RAV) verifier. | ||||||||||
receipts_verifier_address = "0x33f9E93266ce0E108fc85DdE2f71dab555A0F05a" | ||||||||||
|
||||||||||
############################################## | ||||||||||
# Specific configurations to indexer-service # | ||||||||||
############################################## | ||||||||||
[service] | ||||||||||
# Host and port to serve the indexer-service query endpoint. This one should have a | ||||||||||
# public ingress. | ||||||||||
host_and_port = "0.0.0.0:${INDEXER_SERVICE_PORT}" | ||||||||||
# Serve the network subgraph on `common.server.host_and_port`/network | ||||||||||
# INDEXER_SERVICE__SERVE_NETWORK_SUBGRAPH | ||||||||||
# serve_network_subgraph = false | ||||||||||
# Serve the escrow subgraph on `common.server.host_and_port`/escrow | ||||||||||
# INDEXER_SERVICE__SERVE_ESCROW_SUBGRAPH | ||||||||||
# serve_escrow_subgraph = false | ||||||||||
|
||||||||||
free_query_auth_token = "${INDEXER_SERVICE_FREE_QUERY_AUTH_TOKEN}" | ||||||||||
|
||||||||||
######################################## | ||||||||||
# Specific configurations to tap-agent # | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was taken from our default values. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
######################################## | ||||||||||
[tap.sender_aggregator_endpoints] | ||||||||||
# Key-Value of all senders and their aggregator endpoints | ||||||||||
0xDDE4cfFd3D9052A9cb618fC05a1Cd02be1f2F467 = "https://tap-aggregator.network.thegraph.com" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[indexer] | ||
indexer_address = "${INDEXER_SERVICE_INDEXER_ADDRESS}" | ||
operator_mnemonic = "${INDEXER_SERVICE_MNEMONIC}" | ||
|
||
[database] | ||
host = "${INDEXER_SERVICE_POSTGRES_HOST}" | ||
user = "${INDEXER_SERVICE_POSTGRES_USERNAME}" | ||
password = "${INDEXER_SERVICE_POSTGRES_PASSWORD}" | ||
database = "${INDEXER_SERVICE_POSTGRES_DATABASE}" | ||
|
||
[graph_node] | ||
# URL to your graph-node's query endpoint | ||
query_url = "${INDEXER_SERVICE_GRAPH_NODE_QUERY_ENDPOINT}" | ||
# URL to your graph-node's status endpoint | ||
status_url = "${INDEXER_SERVICE_GRAPH_NODE_STATUS_ENDPOINT}" | ||
|
||
[subgraphs.network] | ||
# Query URL for the Graph Network subgraph. | ||
query_url = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_ENDPOINT}" | ||
deployment_id = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_DEPLOYMENT}" | ||
|
||
# [subgraphs.escrow] | ||
# INDEXER_SUBGRAPHS__ESCROW__QUERY_URL | ||
# query_url = "" | ||
# INDEXER_SUBGRAPHS__ESCROW__DEPLOYMENT_ID | ||
# deployment_id = "" | ||
|
||
[blockchain] | ||
chain_id = 421614 | ||
# Contract address of TAP's receipt aggregate voucher (RAV) verifier. | ||
receipts_verifier_address = "0xfC24cE7a4428A6B89B52645243662A02BA734ECF" | ||
|
||
############################################## | ||
# Specific configurations to indexer-service # | ||
############################################## | ||
[service] | ||
# Host and port to serve the indexer-service query endpoint. This one should have a | ||
# public ingress. | ||
host_and_port = "0.0.0.0:${INDEXER_SERVICE_PORT}" | ||
# Serve the network subgraph on `common.server.host_and_port`/network | ||
# INDEXER_SERVICE__SERVE_NETWORK_SUBGRAPH | ||
# serve_network_subgraph = false | ||
# Serve the escrow subgraph on `common.server.host_and_port`/escrow | ||
# INDEXER_SERVICE__SERVE_ESCROW_SUBGRAPH | ||
# serve_escrow_subgraph = false | ||
|
||
free_query_auth_token = "${INDEXER_SERVICE_FREE_QUERY_AUTH_TOKEN}" | ||
|
||
######################################## | ||
# Specific configurations to tap-agent # | ||
######################################## | ||
[tap.sender_aggregator_endpoints] | ||
# Key-Value of all senders and their aggregator endpoints | ||
0xC3dDf37906724732FfD748057FEBe23379b0710D = "https://tap-aggregator.testnet.thegraph.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.