Skip to content

Commit

Permalink
Merge pull request #440 from tablelandnetwork/jsign/healthbotnewtestnet
Browse files Browse the repository at this point in the history
Healthbot fixes and re-enabling & Docker images updating
  • Loading branch information
jsign authored Jan 20, 2023
2 parents e7dd50a + c172ef3 commit bafe3e4
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
git fetch && git checkout -f ${{ github.sha }}
cd docker
make testnet-up
HEALTHBOT_ENABLED=true make testnet-up
# Wait to start and double-check we're running the expected version.
# This helps having a green check in the GH Action be high-signal that everything is fine.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ test-replayhistory:

# Lint
lint:
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.49.0 run
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1 run
.PHONY: lint

# OpenAPI
Expand Down
2 changes: 1 addition & 1 deletion cmd/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19.0-alpine as builder
FROM golang:1.19.5-alpine as builder

RUN apk --no-cache add make build-base git

Expand Down
2 changes: 1 addition & 1 deletion cmd/api/Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19.0-alpine as builder
FROM golang:1.19.5-alpine as builder

RUN apk --no-cache add make build-base git

Expand Down
2 changes: 1 addition & 1 deletion cmd/healthbot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19.0-alpine as builder
FROM golang:1.19.5-alpine as builder

RUN apk --no-cache add make build-base git

Expand Down
1 change: 1 addition & 0 deletions cmd/healthbot/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type config struct {
type ChainConfig struct {
ChainID int
WalletPrivateKey string
AlchemyAPIKey string
Probe struct {
CheckInterval string `default:"15s"`
ReceiptTimeout string `default:"20s"`
Expand Down
3 changes: 2 additions & 1 deletion cmd/healthbot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ func main() {
log.Fatal().Int("chain_id", chainCfg.ChainID).Msg("the chain id isn't supported in the Tableland client")
}

client, err := clientV1.NewClient(ctx, wallet, clientV1.NewClientChain(chain))
client, err := clientV1.NewClient(
ctx, wallet, clientV1.NewClientChain(chain), clientV1.NewClientAlchemyAPIKey(chainCfg.AlchemyAPIKey))
if err != nil {
log.Fatal().Err(err).Msg("error creating tbl client")
}
Expand Down
4 changes: 2 additions & 2 deletions docker/deployed/docker-compose.observability.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
prometheus:
image: prom/prometheus:v2.39.1
image: prom/prometheus:v2.41.0
container_name: prometheus
volumes:
- ${PWD}/observability/prometheus:/etc/prometheus
Expand All @@ -12,7 +12,7 @@ services:
restart: unless-stopped

grafana:
image: grafana/grafana:9.2.2
image: grafana/grafana:9.3.2
container_name: grafana
volumes:
- ${PWD}/observability/grafana/provisioning:/etc/grafana/provisioning
Expand Down
4 changes: 3 additions & 1 deletion docker/deployed/staging/healthbot/.env_healthbot.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
HEALTHBOT_OPTIMISM_GOERLI_PRIVATE_KEY=
HEALTHBOT_OPTIMISM_GOERLI_TABLE=
HEALTHBOT_OPTIMISM_GOERLI_API_KEY=
HEALTHBOT_OPTIMISM_GOERLI_TABLE=

3 changes: 2 additions & 1 deletion docker/deployed/staging/healthbot/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
},
"Chains": [
{
"ChainID": 5,
"ChainID": 420,
"WalletPrivateKey": "${HEALTHBOT_OPTIMISM_GOERLI_PRIVATE_KEY}",
"AlchemyAPIKey": "${HEALTHBOT_OPTIMISM_GOERLI_API_KEY}",
"Probe": {
"CheckInterval": "360s",
"ReceiptTimeout": "20s",
Expand Down
4 changes: 4 additions & 0 deletions docker/deployed/testnet/healthbot/.env_healthbot.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
HEALTHBOT_ETHEREUM_GOERLI_PRIVATE_KEY=
HEALTHBOT_ETHEREUM_GOERLI_API_KEY=
HEALTHBOT_ETHEREUM_GOERLI_TABLE=
HEALTHBOT_POLYGON_MUMBAI_PRIVATE_KEY=
HEALTHBOT_POLYGON_MUMBAI_API_KEY=
HEALTHBOT_POLYGON_MUMBAI_TABLE=
HEALTHBOT_ARBITRUM_GOERLI_PRIVATE_KEY=
HEALTHBOT_ARBITRUM_GOERLI_API_KEY=
HEALTHBOT_ARBITRUM_GOERLI_TABLE=
HEALTHBOT_OPTIMISM_GOERLI_PRIVATE_KEY=
HEALTHBOT_OPTIMISM_GOERLI_API_KEY=
HEALTHBOT_OPTIMISM_GOERLI_TABLE=

6 changes: 5 additions & 1 deletion docker/deployed/testnet/healthbot/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
},
"Chains": [
{
"Name": 421613,
"ChainID": 421613,
"WalletPrivateKey": "${HEALTHBOT_ARBITRUM_GOERLI_PRIVATE_KEY}",
"AlchemyAPIKey": "${HEALTHBOT_ALCHEMY_ARBITRUM_GOERLI_API_KEY}",
"Probe": {
"CheckInterval": "360s",
"ReceiptTimeout": "25s",
Expand All @@ -19,6 +20,7 @@
{
"ChainID": 5,
"WalletPrivateKey": "${HEALTHBOT_ETHEREUM_GOERLI_PRIVATE_KEY}",
"AlchemyAPIKey": "${HEALTHBOT_ALCHEMY_ETHEREUM_GOERLI_API_KEY}",
"Probe": {
"CheckInterval": "1h",
"ReceiptTimeout": "90s",
Expand All @@ -28,6 +30,7 @@
{
"ChainID": 80001,
"WalletPrivateKey": "${HEALTHBOT_POLYGON_MUMBAI_PRIVATE_KEY}",
"AlchemyAPIKey": "${HEALTHBOT_ALCHEMY_POLYGON_MUMBAI_API_KEY}",
"Probe": {
"CheckInterval": "240s",
"ReceiptTimeout": "40s",
Expand All @@ -37,6 +40,7 @@
{
"ChainID": 420,
"WalletPrivateKey": "${HEALTHBOT_OPTIMISM_GOERLI_PRIVATE_KEY}",
"AlchemyAPIKey": "${HEALTHBOT_ALCHEMY_OPTIMISM_GOERLI_API_KEY}",
"Probe": {
"CheckInterval": "360s",
"ReceiptTimeout": "25s",
Expand Down

0 comments on commit bafe3e4

Please sign in to comment.