From 062c77df40ebf22026aca435d129e8ef6ff097c1 Mon Sep 17 00:00:00 2001 From: avichalp Date: Wed, 31 May 2023 22:41:10 +0800 Subject: [PATCH 1/2] Add healthbot config for calibration Signed-off-by: avichalp --- docker/deployed/testnet/healthbot/config.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docker/deployed/testnet/healthbot/config.json b/docker/deployed/testnet/healthbot/config.json index 987641d5..088f3a61 100644 --- a/docker/deployed/testnet/healthbot/config.json +++ b/docker/deployed/testnet/healthbot/config.json @@ -30,6 +30,16 @@ "ReceiptTimeout": "40s", "Tablename": "${HEALTHBOT_POLYGON_MUMBAI_TABLE}" } + }, + { + "ChainID": 314159, + "WalletPrivateKey": "${HEALTHBOT_FILECOIN_CALIBRATION_PRIVATE_KEY}", + "GlifAPIKey": "${HEALTHBOT_GLIF_FILECOIN_CALIBRATION_API_KEY}", + "Probe": { + "CheckInterval": "5m", + "ReceiptTimeout": "300s", + "Tablename": "${HEALTHBOT_FILECOIN_CALIBRATION_TABLE}" + } } ] } \ No newline at end of file From dede88b12932417f01a7316a2065c80589c40155 Mon Sep 17 00:00:00 2001 From: avichalp Date: Wed, 31 May 2023 23:19:14 +0800 Subject: [PATCH 2/2] Use glif API key from config Signed-off-by: avichalp --- cmd/healthbot/config.go | 1 + cmd/healthbot/main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/healthbot/config.go b/cmd/healthbot/config.go index 95477caa..7a9cd4ef 100644 --- a/cmd/healthbot/config.go +++ b/cmd/healthbot/config.go @@ -31,6 +31,7 @@ type ChainConfig struct { WalletPrivateKey string AlchemyAPIKey string AnkrAPIKey string + GlifAPIKey string Probe struct { CheckInterval string `default:"15s"` ReceiptTimeout string `default:"20s"` diff --git a/cmd/healthbot/main.go b/cmd/healthbot/main.go index ea09a16f..8c882cca 100644 --- a/cmd/healthbot/main.go +++ b/cmd/healthbot/main.go @@ -62,7 +62,7 @@ func main() { opts := []clientV1.NewClientOption{clientV1.NewClientChain(chain)} if chain.ID == 314159 { // Glif API key is empty string because currently we are using the free tier (public node) - opts = append(opts, clientV1.NewClientGlifAPIKey("")) + opts = append(opts, clientV1.NewClientGlifAPIKey(chainCfg.GlifAPIKey)) } else { opts = append(opts, clientV1.NewClientAlchemyAPIKey(chainCfg.AlchemyAPIKey)) }