diff --git a/app/data/compose/docker-compose-watcher-gelato.yml b/app/data/compose/docker-compose-watcher-gelato.yml index e2cb2801..fc607408 100644 --- a/app/data/compose/docker-compose-watcher-gelato.yml +++ b/app/data/compose/docker-compose-watcher-gelato.yml @@ -33,8 +33,8 @@ services: - ../config/watcher-gelato/watcher-params.env environment: CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} - CERC_ETH_SERVER_GQL_ENDPOINT: ${CERC_ETH_SERVER_GQL_ENDPOINT} - CERC_ETH_SERVER_RPC_ENDPOINT: ${CERC_ETH_SERVER_RPC_ENDPOINT} + CERC_IPLD_ETH_RPC: ${CERC_IPLD_ETH_RPC} + CERC_IPLD_ETH_GQL: ${CERC_IPLD_ETH_GQL} command: ["./start-job-runner.sh"] volumes: - ../config/watcher-gelato/watcher-config-template.toml:/app/environments/watcher-config-template.toml @@ -63,8 +63,8 @@ services: - ../config/watcher-gelato/watcher-params.env environment: CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} - CERC_ETH_SERVER_GQL_ENDPOINT: ${CERC_ETH_SERVER_GQL_ENDPOINT} - CERC_ETH_SERVER_RPC_ENDPOINT: ${CERC_ETH_SERVER_RPC_ENDPOINT} + CERC_IPLD_ETH_RPC: ${CERC_IPLD_ETH_RPC} + CERC_IPLD_ETH_GQL: ${CERC_IPLD_ETH_GQL} CERC_USE_STATE_SNAPSHOT: ${CERC_USE_STATE_SNAPSHOT} CERC_SNAPSHOT_GQL_ENDPOINT: ${CERC_SNAPSHOT_GQL_ENDPOINT} CERC_SNAPSHOT_BLOCKHASH: ${CERC_SNAPSHOT_BLOCKHASH} diff --git a/app/data/config/watcher-gelato/start-job-runner.sh b/app/data/config/watcher-gelato/start-job-runner.sh index e03157c9..44f9e86f 100755 --- a/app/data/config/watcher-gelato/start-job-runner.sh +++ b/app/data/config/watcher-gelato/start-job-runner.sh @@ -4,17 +4,17 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi -CERC_ETH_SERVER_GQL_ENDPOINT="${CERC_ETH_SERVER_GQL_ENDPOINT:-${DEFAULT_CERC_ETH_SERVER_GQL_ENDPOINT}}" -CERC_ETH_SERVER_RPC_ENDPOINT="${CERC_ETH_SERVER_RPC_ENDPOINT:-${DEFAULT_CERC_ETH_SERVER_RPC_ENDPOINT}}" +CERC_IPLD_ETH_RPC="${CERC_IPLD_ETH_RPC:-${DEFAULT_CERC_IPLD_ETH_RPC}}" +CERC_IPLD_ETH_GQL="${CERC_IPLD_ETH_GQL:-${DEFAULT_CERC_IPLD_ETH_GQL}}" -echo "Using ETH server GQL endpoint ${CERC_ETH_SERVER_GQL_ENDPOINT}" -echo "Using ETH server RPC endpoint ${CERC_ETH_SERVER_RPC_ENDPOINT}" +echo "Using ETH server RPC endpoint ${CERC_IPLD_ETH_RPC}" +echo "Using ETH server GQL endpoint ${CERC_IPLD_ETH_GQL}" # Read in the config template TOML file and modify it WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml) WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \ - sed -E "s|REPLACE_WITH_ETH_SERVER_GQL_ENDPOINT|${CERC_ETH_SERVER_GQL_ENDPOINT}|g; \ - s|REPLACE_WITH_ETH_SERVER_RPC_ENDPOINT|${CERC_ETH_SERVER_RPC_ENDPOINT}| ") + sed -E "s|REPLACE_WITH_CERC_IPLD_ETH_GQL|${CERC_IPLD_ETH_GQL}|g; \ + s|REPLACE_WITH_CERC_IPLD_ETH_RPC|${CERC_IPLD_ETH_RPC}| ") # Write the modified content to a new file echo "$WATCHER_CONFIG" > environments/local.toml diff --git a/app/data/config/watcher-gelato/start-server.sh b/app/data/config/watcher-gelato/start-server.sh index a5f0ee3e..4cd3cd73 100755 --- a/app/data/config/watcher-gelato/start-server.sh +++ b/app/data/config/watcher-gelato/start-server.sh @@ -4,19 +4,19 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi -CERC_ETH_SERVER_GQL_ENDPOINT="${CERC_ETH_SERVER_GQL_ENDPOINT:-${DEFAULT_CERC_ETH_SERVER_GQL_ENDPOINT}}" -CERC_ETH_SERVER_RPC_ENDPOINT="${CERC_ETH_SERVER_RPC_ENDPOINT:-${DEFAULT_CERC_ETH_SERVER_RPC_ENDPOINT}}" +CERC_IPLD_ETH_RPC="${CERC_IPLD_ETH_RPC:-${DEFAULT_CERC_IPLD_ETH_RPC}}" +CERC_IPLD_ETH_GQL="${CERC_IPLD_ETH_GQL:-${DEFAULT_CERC_IPLD_ETH_GQL}}" CERC_USE_STATE_SNAPSHOT="${CERC_USE_STATE_SNAPSHOT:-${DEFAULT_CERC_USE_STATE_SNAPSHOT}}" -echo "Using ETH server GQL endpoint ${CERC_ETH_SERVER_GQL_ENDPOINT}" -echo "Using ETH server RPC endpoint ${CERC_ETH_SERVER_RPC_ENDPOINT}" +echo "Using ETH server RPC endpoint ${CERC_IPLD_ETH_RPC}" +echo "Using ETH server GQL endpoint ${CERC_IPLD_ETH_GQL}" # Read in the config template TOML file and modify it WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml) WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \ - sed -E "s|REPLACE_WITH_ETH_SERVER_GQL_ENDPOINT|${CERC_ETH_SERVER_GQL_ENDPOINT}|g; \ - s|REPLACE_WITH_ETH_SERVER_RPC_ENDPOINT|${CERC_ETH_SERVER_RPC_ENDPOINT}| ") + sed -E "s|REPLACE_WITH_CERC_IPLD_ETH_GQL|${CERC_IPLD_ETH_GQL}|g; \ + s|REPLACE_WITH_CERC_IPLD_ETH_RPC|${CERC_IPLD_ETH_RPC}| ") # Write the modified content to a new file echo "$WATCHER_CONFIG" > environments/local.toml diff --git a/app/data/config/watcher-gelato/watcher-config-template.toml b/app/data/config/watcher-gelato/watcher-config-template.toml index e69607e8..19c3a2f1 100644 --- a/app/data/config/watcher-gelato/watcher-config-template.toml +++ b/app/data/config/watcher-gelato/watcher-config-template.toml @@ -57,8 +57,8 @@ [upstream] [upstream.ethServer] - gqlApiEndpoint = "REPLACE_WITH_ETH_SERVER_GQL_ENDPOINT" - rpcProviderEndpoint = "REPLACE_WITH_ETH_SERVER_RPC_ENDPOINT" + gqlApiEndpoint = "REPLACE_WITH_CERC_IPLD_ETH_GQL" + rpcProviderEndpoint = "REPLACE_WITH_CERC_IPLD_ETH_RPC" [upstream.cache] name = "requests" diff --git a/app/data/config/watcher-gelato/watcher-params.env b/app/data/config/watcher-gelato/watcher-params.env index 2ad2478f..f7913b1b 100644 --- a/app/data/config/watcher-gelato/watcher-params.env +++ b/app/data/config/watcher-gelato/watcher-params.env @@ -1,6 +1,6 @@ # ipld-eth-server endpoints -DEFAULT_CERC_ETH_SERVER_GQL_ENDPOINT="http://ipld-eth-server:8083/graphql" -DEFAULT_CERC_ETH_SERVER_RPC_ENDPOINT="http://ipld-eth-server:8082" +CERC_IPLD_ETH_RPC="http://ipld-eth-server:8082" +DEFAULT_CERC_IPLD_ETH_GQL="http://ipld-eth-server:8083/graphql" # Gelato start block DEFAULT_CERC_GELATO_START_BLOCK=11361987 diff --git a/app/data/stacks/azimuth/README.md b/app/data/stacks/azimuth/README.md index d3e377da..c4e1671f 100644 --- a/app/data/stacks/azimuth/README.md +++ b/app/data/stacks/azimuth/README.md @@ -4,7 +4,7 @@ Instructions to setup and deploy Azimuth Watcher stack ## Setup -Prerequisite: ipld-eth-server RPC and GQL endpoints +Prerequisite: `ipld-eth-server` RPC and GQL endpoints Clone required repositories: @@ -41,7 +41,7 @@ This should create the required docker images in the local image registry. CERC_IPLD_ETH_GQL= ``` -* NOTE: If ipld-eth-server is running on the host machine, use `host.docker.internal` as the hostname to access host ports +* NOTE: If `ipld-eth-server` is running on the host machine, use `host.docker.internal` as the hostname to access host ports ### Deploy the stack diff --git a/app/data/stacks/gelato/README.md b/app/data/stacks/gelato/README.md index 3fb9708b..4baaee51 100644 --- a/app/data/stacks/gelato/README.md +++ b/app/data/stacks/gelato/README.md @@ -4,7 +4,7 @@ Instructions to setup and deploy Gelato watcher using [laconic-stack-orchestrato ## Setup -Prerequisite: `ipld-eth-server` endpoints +Prerequisite: `ipld-eth-server` RPC and GQL endpoints Clone required repositories: @@ -38,8 +38,8 @@ Create and update an env file to be used in the next step ([defaults](../../conf ```bash # External ipld-eth-server endpoints - CERC_ETH_SERVER_GQL_ENDPOINT= - CERC_ETH_SERVER_RPC_ENDPOINT= + CERC_IPLD_ETH_RPC= + CERC_IPLD_ETH_GQL= # Whether to use a state snapshot to initialize the watcher CERC_USE_STATE_SNAPSHOT=false