From c0e233fc75ea1c66c2f2c7ea2179499e0ed552d5 Mon Sep 17 00:00:00 2001 From: ftocal <46001274+ftocal@users.noreply.github.com> Date: Wed, 14 Feb 2024 15:06:09 -0300 Subject: [PATCH] Remove solana watcher from contract-watcher (#1087) --- contract-watcher/cmd/backfiller/run.go | 4 ---- contract-watcher/cmd/service/run.go | 12 ------------ contract-watcher/config/config.go | 2 -- contract-watcher/config/mainnet.go | 9 --------- contract-watcher/config/testnet.go | 9 --------- .../contract-watcher/contract-watcher-service.yaml | 7 ------- deploy/contract-watcher/env/production-mainnet.env | 1 - deploy/contract-watcher/env/production-testnet.env | 1 - deploy/contract-watcher/env/staging-mainnet.env | 1 - deploy/contract-watcher/env/staging-testnet.env | 1 - 10 files changed, 47 deletions(-) diff --git a/contract-watcher/cmd/backfiller/run.go b/contract-watcher/cmd/backfiller/run.go index 1ea458cd..4cfe9020 100644 --- a/contract-watcher/cmd/backfiller/run.go +++ b/contract-watcher/cmd/backfiller/run.go @@ -79,8 +79,6 @@ func newWatcherForMainnet(cfg *config.BackfillerConfiguration, repo *storage.Rep watcher = builder.CreateAnkrEvmWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.FANTOM_MAINNET, repo, metrics, logger) case config.AVALANCHE_MAINNET.ChainID.String(): watcher = builder.CreateAnkrEvmWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.AVALANCHE_MAINNET, repo, metrics, logger) - case config.SOLANA_MAINNET.ChainID.String(): - watcher = builder.CreateSolanaWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.SOLANA_MAINNET, logger, repo, metrics) case config.TERRA_MAINNET.ChainID.String(): watcher = builder.CreateTerraWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.TERRA_MAINNET, logger, repo, metrics) case config.APTOS_MAINNET.ChainID.String(): @@ -116,8 +114,6 @@ func newWatcherForTestnet(cfg *config.BackfillerConfiguration, repo *storage.Rep watcher = builder.CreateAnkrEvmWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.FANTOM_TESTNET, repo, metrics, logger) case config.AVALANCHE_TESTNET.ChainID.String(): watcher = builder.CreateAnkrEvmWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.AVALANCHE_TESTNET, repo, metrics, logger) - case config.SOLANA_TESTNET.ChainID.String(): - watcher = builder.CreateSolanaWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.SOLANA_TESTNET, logger, repo, metrics) case config.APTOS_TESTNET.ChainID.String(): watcher = builder.CreateAptosWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.APTOS_TESTNET, logger, repo, metrics) case config.OASIS_TESTNET.ChainID.String(): diff --git a/contract-watcher/cmd/service/run.go b/contract-watcher/cmd/service/run.go index 7fd6a600..fc6bf610 100644 --- a/contract-watcher/cmd/service/run.go +++ b/contract-watcher/cmd/service/run.go @@ -54,7 +54,6 @@ type watchersConfig struct { oasis *config.WatcherBlockchainAddresses optimism *config.WatcherBlockchainAddresses polygon *config.WatcherBlockchainAddresses - solana *config.WatcherBlockchain terra *config.WatcherBlockchain rateLimit rateLimitConfig } @@ -73,7 +72,6 @@ type rateLimitConfig struct { oasis int optimism int polygon int - solana int terra int } @@ -197,12 +195,6 @@ func newWatchers(config *config.ServiceConfiguration, testnetConfig *config.Test result = append(result, ethereumSepoliaWatcher) } - // add solana watcher - if watchers.solana != nil { - solanaWatcher := builder.CreateSolanaWatcher(watchers.rateLimit.solana, config.SolanaUrl, *watchers.solana, logger, repo, metrics) - result = append(result, solanaWatcher) - } - // add avalanche watcher if watchers.avalanche != nil { avalancheWatcher := builder.CreateEvmWatcher(watchers.rateLimit.avalanche, config.AvalancheUrl, *watchers.avalanche, logger, repo, metrics) @@ -288,7 +280,6 @@ func newWatchersForMainnet(cfg *config.ServiceConfiguration) *watchersConfig { oasis: &config.OASIS_MAINNET, optimism: &config.OPTIMISM_MAINNET, polygon: &config.POLYGON_MAINNET, - solana: &config.SOLANA_MAINNET, terra: &config.TERRA_MAINNET, rateLimit: rateLimitConfig{ @@ -303,7 +294,6 @@ func newWatchersForMainnet(cfg *config.ServiceConfiguration) *watchersConfig { oasis: cfg.OasisRequestsPerSecond, optimism: cfg.OptimismRequestsPerSecond, polygon: cfg.PolygonRequestsPerSecond, - solana: cfg.SolanaRequestsPerSecond, terra: cfg.TerraRequestsPerSecond, }, } @@ -327,7 +317,6 @@ func newWatchersForTestnet(cfg *config.ServiceConfiguration, testnetCfg *config. oasis: &config.OASIS_TESTNET, optimism: &config.OPTIMISM_TESTNET, polygon: &config.POLYGON_TESTNET, - solana: &config.SOLANA_TESTNET, rateLimit: rateLimitConfig{ ankr: cfg.AnkrRequestsPerSecond, avalanche: cfg.AvalancheRequestsPerSecond, @@ -342,7 +331,6 @@ func newWatchersForTestnet(cfg *config.ServiceConfiguration, testnetCfg *config. oasis: cfg.OasisRequestsPerSecond, optimism: cfg.OptimismRequestsPerSecond, polygon: cfg.PolygonRequestsPerSecond, - solana: cfg.SolanaRequestsPerSecond, terra: cfg.TerraRequestsPerSecond, }, } diff --git a/contract-watcher/config/config.go b/contract-watcher/config/config.go index 0cc70ff0..feb5e44c 100644 --- a/contract-watcher/config/config.go +++ b/contract-watcher/config/config.go @@ -34,8 +34,6 @@ type ServiceConfiguration struct { OasisRequestsPerSecond int `env:"OASIS_REQUESTS_PER_SECOND,required"` PolygonUrl string `env:"POLYGON_URL,required"` PolygonRequestsPerSecond int `env:"POLYGON_REQUESTS_PER_SECOND,required"` - SolanaUrl string `env:"SOLANA_URL,required"` - SolanaRequestsPerSecond int `env:"SOLANA_REQUESTS_PER_SECOND,required"` TerraUrl string `env:"TERRA_URL,required"` TerraRequestsPerSecond int `env:"TERRA_REQUESTS_PER_SECOND,required"` } diff --git a/contract-watcher/config/mainnet.go b/contract-watcher/config/mainnet.go index abfd04f4..5624ac99 100644 --- a/contract-watcher/config/mainnet.go +++ b/contract-watcher/config/mainnet.go @@ -166,15 +166,6 @@ var FANTOM_MAINNET = WatcherBlockchainAddresses{ }, } -var SOLANA_MAINNET = WatcherBlockchain{ - ChainID: vaa.ChainIDSolana, - Name: "solana", - Address: "wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb", - SizeBlocks: 10, - WaitSeconds: 10, - InitialBlock: 183675278, -} - var TERRA_MAINNET = WatcherBlockchain{ ChainID: vaa.ChainIDTerra, Name: "terra", diff --git a/contract-watcher/config/testnet.go b/contract-watcher/config/testnet.go index b2788140..41afe50f 100644 --- a/contract-watcher/config/testnet.go +++ b/contract-watcher/config/testnet.go @@ -176,15 +176,6 @@ var FANTOM_TESTNET = WatcherBlockchainAddresses{ }, } -var SOLANA_TESTNET = WatcherBlockchain{ - ChainID: vaa.ChainIDSolana, - Name: "solana", - Address: "DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe", - SizeBlocks: 10, - WaitSeconds: 10, - InitialBlock: 16820790, -} - var AVALANCHE_TESTNET = WatcherBlockchainAddresses{ ChainID: vaa.ChainIDAvalanche, Name: "avalanche_fuji", diff --git a/deploy/contract-watcher/contract-watcher-service.yaml b/deploy/contract-watcher/contract-watcher-service.yaml index 24bf28d9..b4481250 100644 --- a/deploy/contract-watcher/contract-watcher-service.yaml +++ b/deploy/contract-watcher/contract-watcher-service.yaml @@ -67,13 +67,6 @@ spec: key: ankr-url - name: ANKR_REQUESTS_PER_SECOND value: "{{ .ANKR_REQUESTS_PER_SECOND }}" - - name: SOLANA_URL - valueFrom: - secretKeyRef: - name: blockchain - key: solana-url - - name: SOLANA_REQUESTS_PER_SECOND - value: "{{ .SOLANA_REQUESTS_PER_SECOND }}" - name: TERRA_URL valueFrom: secretKeyRef: diff --git a/deploy/contract-watcher/env/production-mainnet.env b/deploy/contract-watcher/env/production-mainnet.env index b14fd1e6..73169306 100644 --- a/deploy/contract-watcher/env/production-mainnet.env +++ b/deploy/contract-watcher/env/production-mainnet.env @@ -23,7 +23,6 @@ OASIS_REQUESTS_PER_SECOND=3 OPTIMISM_REQUESTS_PER_SECOND=3 POLYGON_REQUESTS_PER_SECOND=3 SEI_REQUESTS_PER_SECOND=3 -SOLANA_REQUESTS_PER_SECOND=1000 SUI_REQUESTS_PER_SECOND=3 TERRA_REQUESTS_PER_SECOND=10 ALERT_ENABLED=true \ No newline at end of file diff --git a/deploy/contract-watcher/env/production-testnet.env b/deploy/contract-watcher/env/production-testnet.env index c25d2046..7c0aac9a 100644 --- a/deploy/contract-watcher/env/production-testnet.env +++ b/deploy/contract-watcher/env/production-testnet.env @@ -25,7 +25,6 @@ OASIS_REQUESTS_PER_SECOND=3 OPTIMISM_REQUESTS_PER_SECOND=3 POLYGON_REQUESTS_PER_SECOND=3 SEI_REQUESTS_PER_SECOND=3 -SOLANA_REQUESTS_PER_SECOND=5 SUI_REQUESTS_PER_SECOND=3 TERRA_REQUESTS_PER_SECOND=5 ALERT_ENABLED=false \ No newline at end of file diff --git a/deploy/contract-watcher/env/staging-mainnet.env b/deploy/contract-watcher/env/staging-mainnet.env index 2afa8b23..e8de45fa 100644 --- a/deploy/contract-watcher/env/staging-mainnet.env +++ b/deploy/contract-watcher/env/staging-mainnet.env @@ -22,7 +22,6 @@ MOONBEAM_REQUESTS_PER_SECOND=5 OASIS_REQUESTS_PER_SECOND=3 OPTIMISM_REQUESTS_PER_SECOND=3 POLYGON_REQUESTS_PER_SECOND=3 -SOLANA_REQUESTS_PER_SECOND=500 SEI_REQUESTS_PER_SECOND=3 SUI_REQUESTS_PER_SECOND=3 TERRA_REQUESTS_PER_SECOND=10 diff --git a/deploy/contract-watcher/env/staging-testnet.env b/deploy/contract-watcher/env/staging-testnet.env index 919fe31f..5c91056a 100644 --- a/deploy/contract-watcher/env/staging-testnet.env +++ b/deploy/contract-watcher/env/staging-testnet.env @@ -25,7 +25,6 @@ OASIS_REQUESTS_PER_SECOND=1 OPTIMISM_REQUESTS_PER_SECOND=1 POLYGON_REQUESTS_PER_SECOND=3 SEI_REQUESTS_PER_SECOND=3 -SOLANA_REQUESTS_PER_SECOND=2 SUI_REQUESTS_PER_SECOND=3 TERRA_REQUESTS_PER_SECOND=5 ALERT_ENABLED=false \ No newline at end of file