Add a stack for Gelato watcher #394

Merged
prathamesh0 merged 5 commits from pm-gelato-stack into main 2023-05-16 03:39:09 +00:00
7 changed files with 25 additions and 25 deletions
Showing only changes of commit 35270d08e2 - Show all commits

View File

@ -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}

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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