From 08d1c90d023a9688dc956f738674d307a41cf242 Mon Sep 17 00:00:00 2001 From: Ian Shim <100327837+ian-shim@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:17:45 -0800 Subject: [PATCH] Remove duplicate flags from relay (#944) --- relay/cmd/config.go | 2 +- relay/cmd/flags/flags.go | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/relay/cmd/config.go b/relay/cmd/config.go index ff1513d172..e1358f6430 100644 --- a/relay/cmd/config.go +++ b/relay/cmd/config.go @@ -94,7 +94,7 @@ func NewConfig(ctx *cli.Context) (Config, error) { InternalGetCoefficientsTimeout: ctx.Duration(flags.InternalGetCoefficientsTimeoutFlag.Name), }, }, - EthClientConfig: geth.ReadEthClientConfig(ctx), + EthClientConfig: geth.ReadEthClientConfigRPCOnly(ctx), BLSOperatorStateRetrieverAddr: ctx.String(flags.BlsOperatorStateRetrieverAddrFlag.Name), EigenDAServiceManagerAddr: ctx.String(flags.EigenDAServiceManagerAddrFlag.Name), ChainStateConfig: thegraph.ReadCLIConfig(ctx), diff --git a/relay/cmd/flags/flags.go b/relay/cmd/flags/flags.go index 0bb24ce2ae..837c6cf9e1 100644 --- a/relay/cmd/flags/flags.go +++ b/relay/cmd/flags/flags.go @@ -6,6 +6,7 @@ import ( "github.com/Layr-Labs/eigenda/common" "github.com/Layr-Labs/eigenda/common/aws" "github.com/Layr-Labs/eigenda/common/geth" + "github.com/Layr-Labs/eigenda/core/thegraph" "github.com/urfave/cli" ) @@ -204,13 +205,6 @@ var ( Required: true, EnvVar: common.PrefixEnvVar(envVarPrefix, "EIGEN_DA_SERVICE_MANAGER_ADDR"), } - IndexerPullIntervalFlag = cli.DurationFlag{ - Name: common.PrefixFlag(FlagPrefix, "indexer-pull-interval"), - Usage: "Interval to pull from the indexer", - Required: false, - EnvVar: common.PrefixEnvVar(envVarPrefix, "INDEXER_PULL_INTERVAL"), - Value: 5 * time.Minute, - } AuthenticationKeyCacheSizeFlag = cli.IntFlag{ Name: common.PrefixFlag(FlagPrefix, "authentication-key-cache-size"), Usage: "Max number of items in the authentication key cache", @@ -289,8 +283,6 @@ var requiredFlags = []cli.Flag{ RelayIDsFlag, BlsOperatorStateRetrieverAddrFlag, EigenDAServiceManagerAddrFlag, - AuthenticationTimeoutFlag, - AuthenticationDisabledFlag, } var optionalFlags = []cli.Flag{ @@ -316,7 +308,6 @@ var optionalFlags = []cli.Flag{ MaxGetChunkBytesPerSecondClientFlag, GetChunkBytesBurstinessClientFlag, MaxConcurrentGetChunkOpsClientFlag, - IndexerPullIntervalFlag, AuthenticationKeyCacheSizeFlag, AuthenticationTimeoutFlag, AuthenticationDisabledFlag, @@ -336,4 +327,5 @@ func init() { Flags = append(Flags, common.LoggerCLIFlags(envVarPrefix, FlagPrefix)...) Flags = append(Flags, aws.ClientFlags(envVarPrefix, FlagPrefix)...) Flags = append(Flags, geth.EthClientFlags(envVarPrefix)...) + Flags = append(Flags, thegraph.CLIFlags(envVarPrefix)...) }