From f443f22c6f840f18212cb56ba43f92165fb300c8 Mon Sep 17 00:00:00 2001 From: Jian Xiao <99709935+jianoaix@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:32:14 -0700 Subject: [PATCH] Revert "fix: inconsistent 'retriever' (#468)" (#479) --- common/ratelimit/ratelimit_test.go | 4 ++-- core/indexer/state_test.go | 4 ++-- core/thegraph/state_integration_test.go | 2 +- disperser/cmd/apiserver/flags/flags.go | 2 +- disperser/cmd/batcher/flags/flags.go | 2 +- disperser/cmd/dataapi/flags/flags.go | 2 +- inabox/deploy/config.go | 10 +++++----- inabox/deploy/config_types.go | 2 +- inabox/deploy/deploy.go | 2 +- inabox/deploy/env_vars.go | 10 +++++----- inabox/tests/integration_suite_test.go | 2 +- node/flags/flags.go | 2 +- node/plugin/config.go | 2 +- node/plugin/tests/plugin_test.go | 4 ++-- operators/churner/flags/flags.go | 2 +- operators/churner/tests/churner_test.go | 6 +++--- retriever/cmd/main.go | 4 ++-- retriever/flags/flags.go | 2 +- 18 files changed, 32 insertions(+), 32 deletions(-) diff --git a/common/ratelimit/ratelimit_test.go b/common/ratelimit/ratelimit_test.go index 751acc2252..0555f2e748 100644 --- a/common/ratelimit/ratelimit_test.go +++ b/common/ratelimit/ratelimit_test.go @@ -38,11 +38,11 @@ func TestRatelimit(t *testing.T) { ctx := context.Background() - retrieverID := "testRetriever" + retreiverID := "testRetriever" params := []common.RequestParams{ { - RequesterID: retrieverID, + RequesterID: retreiverID, BlobSize: 10, Rate: 100, }, diff --git a/core/indexer/state_test.go b/core/indexer/state_test.go index 302572977f..edc89378e0 100644 --- a/core/indexer/state_test.go +++ b/core/indexer/state_test.go @@ -83,7 +83,7 @@ func mustMakeOperatorTransactor(env *deploy.Config, op deploy.OperatorVars, logg c, err := geth.NewClient(config, gethcommon.Address{}, 0, logger) Expect(err).ToNot(HaveOccurred()) - tx, err := eth.NewTransactor(logger, c, op.NODE_BLS_OPERATOR_STATE_RETRIEVER, op.NODE_EIGENDA_SERVICE_MANAGER) + tx, err := eth.NewTransactor(logger, c, op.NODE_BLS_OPERATOR_STATE_RETRIVER, op.NODE_EIGENDA_SERVICE_MANAGER) Expect(err).To(BeNil()) return tx @@ -118,7 +118,7 @@ func mustMakeTestClients(env *deploy.Config, privateKey string, logger logging.L func mustMakeChainState(env *deploy.Config, store indexer.HeaderStore, logger logging.Logger) *indexedstate.IndexedChainState { client, rpcClient := mustMakeTestClients(env, env.Batcher[0].BATCHER_PRIVATE_KEY, logger) - tx, err := eth.NewTransactor(logger, client, env.EigenDA.OperatorStateRetriever, env.EigenDA.ServiceManager) + tx, err := eth.NewTransactor(logger, client, env.EigenDA.OperatorStateRetreiver, env.EigenDA.ServiceManager) Expect(err).ToNot(HaveOccurred()) var ( diff --git a/core/thegraph/state_integration_test.go b/core/thegraph/state_integration_test.go index 42cf5fa9d1..7d8d647ed2 100644 --- a/core/thegraph/state_integration_test.go +++ b/core/thegraph/state_integration_test.go @@ -83,7 +83,7 @@ func TestIndexerIntegration(t *testing.T) { logger := logging.NewNoopLogger() client := mustMakeTestClient(t, testConfig, testConfig.Batcher[0].BATCHER_PRIVATE_KEY, logger) - tx, err := eth.NewTransactor(logger, client, testConfig.EigenDA.OperatorStateRetriever, testConfig.EigenDA.ServiceManager) + tx, err := eth.NewTransactor(logger, client, testConfig.EigenDA.OperatorStateRetreiver, testConfig.EigenDA.ServiceManager) assert.NoError(t, err) cs := thegraph.NewIndexedChainState(eth.NewChainState(tx, client), graphql.NewClient(graphUrl, nil), logger) diff --git a/disperser/cmd/apiserver/flags/flags.go b/disperser/cmd/apiserver/flags/flags.go index 01e890ccc7..dc13c1155c 100644 --- a/disperser/cmd/apiserver/flags/flags.go +++ b/disperser/cmd/apiserver/flags/flags.go @@ -47,7 +47,7 @@ var ( Name: common.PrefixFlag(FlagPrefix, "bls-operator-state-retriever"), Usage: "Address of the BLS Operator State Retriever", Required: true, - EnvVar: common.PrefixEnvVar(envVarPrefix, "BLS_OPERATOR_STATE_RETRIEVER"), + EnvVar: common.PrefixEnvVar(envVarPrefix, "BLS_OPERATOR_STATE_RETRIVER"), } EigenDAServiceManagerFlag = cli.StringFlag{ Name: common.PrefixFlag(FlagPrefix, "eigenda-service-manager"), diff --git a/disperser/cmd/batcher/flags/flags.go b/disperser/cmd/batcher/flags/flags.go index 62f29b516c..8a239131b6 100644 --- a/disperser/cmd/batcher/flags/flags.go +++ b/disperser/cmd/batcher/flags/flags.go @@ -39,7 +39,7 @@ var ( Name: common.PrefixFlag(FlagPrefix, "bls-operator-state-retriever"), Usage: "Address of the BLS Operator State Retriever", Required: true, - EnvVar: common.PrefixEnvVar(envVarPrefix, "BLS_OPERATOR_STATE_RETRIEVER"), + EnvVar: common.PrefixEnvVar(envVarPrefix, "BLS_OPERATOR_STATE_RETRIVER"), } EigenDAServiceManagerFlag = cli.StringFlag{ Name: common.PrefixFlag(FlagPrefix, "eigenda-service-manager"), diff --git a/disperser/cmd/dataapi/flags/flags.go b/disperser/cmd/dataapi/flags/flags.go index 759e394f9e..453b25a721 100644 --- a/disperser/cmd/dataapi/flags/flags.go +++ b/disperser/cmd/dataapi/flags/flags.go @@ -74,7 +74,7 @@ var ( Name: common.PrefixFlag(FlagPrefix, "bls-operator-state-retriever"), Usage: "Address of the BLS Operator State Retriever", Required: true, - EnvVar: common.PrefixEnvVar(envVarPrefix, "BLS_OPERATOR_STATE_RETRIEVER"), + EnvVar: common.PrefixEnvVar(envVarPrefix, "BLS_OPERATOR_STATE_RETRIVER"), } EigenDAServiceManagerFlag = cli.StringFlag{ Name: common.PrefixFlag(FlagPrefix, "eigenda-service-manager"), diff --git a/inabox/deploy/config.go b/inabox/deploy/config.go index 6edf8c7fed..db62acb307 100644 --- a/inabox/deploy/config.go +++ b/inabox/deploy/config.go @@ -137,7 +137,7 @@ func (env *Config) generateChurnerVars(ind int, graphUrl, logPath, grpcPort stri v := ChurnerVars{ CHURNER_HOSTNAME: "", CHURNER_GRPC_PORT: grpcPort, - CHURNER_BLS_OPERATOR_STATE_RETRIEVER: env.EigenDA.OperatorStateRetriever, + CHURNER_BLS_OPERATOR_STATE_RETRIVER: env.EigenDA.OperatorStateRetreiver, CHURNER_EIGENDA_SERVICE_MANAGER: env.EigenDA.ServiceManager, CHURNER_CHAIN_RPC: "", @@ -184,7 +184,7 @@ func (env *Config) generateDisperserVars(ind int, key, address, logPath, dbPath, DISPERSER_SERVER_BUCKET_MULTIPLIERS: "1", DISPERSER_SERVER_COUNT_FAILED: "true", - DISPERSER_SERVER_BLS_OPERATOR_STATE_RETRIEVER: env.EigenDA.OperatorStateRetriever, + DISPERSER_SERVER_BLS_OPERATOR_STATE_RETRIVER: env.EigenDA.OperatorStateRetreiver, DISPERSER_SERVER_EIGENDA_SERVICE_MANAGER: env.EigenDA.ServiceManager, DISPERSER_SERVER_ENABLE_DUAL_QUORUMS: "true", @@ -204,7 +204,7 @@ func (env *Config) generateBatcherVars(ind int, key, graphUrl, logPath string) B BATCHER_ENABLE_METRICS: "true", BATCHER_METRICS_HTTP_PORT: "9094", BATCHER_PULL_INTERVAL: "5s", - BATCHER_BLS_OPERATOR_STATE_RETRIEVER: env.EigenDA.OperatorStateRetriever, + BATCHER_BLS_OPERATOR_STATE_RETRIVER: env.EigenDA.OperatorStateRetreiver, BATCHER_EIGENDA_SERVICE_MANAGER: env.EigenDA.ServiceManager, BATCHER_SRS_ORDER: "300000", BATCHER_CHAIN_RPC: "", @@ -289,7 +289,7 @@ func (env *Config) generateOperatorVars(ind int, name, key, churnerUrl, logPath, NODE_ECDSA_KEY_FILE: ecdsaKeyFile, NODE_BLS_KEY_PASSWORD: blsPassword, NODE_ECDSA_KEY_PASSWORD: ecdsaPassword, - NODE_BLS_OPERATOR_STATE_RETRIEVER: env.EigenDA.OperatorStateRetriever, + NODE_BLS_OPERATOR_STATE_RETRIVER: env.EigenDA.OperatorStateRetreiver, NODE_EIGENDA_SERVICE_MANAGER: env.EigenDA.ServiceManager, NODE_REGISTER_AT_NODE_START: "true", NODE_CHURNER_URL: churnerUrl, @@ -323,7 +323,7 @@ func (env *Config) generateRetrieverVars(ind int, key string, graphUrl, logPath, RETRIEVER_HOSTNAME: "", RETRIEVER_GRPC_PORT: grpcPort, RETRIEVER_TIMEOUT: "10s", - RETRIEVER_BLS_OPERATOR_STATE_RETRIEVER: env.EigenDA.OperatorStateRetriever, + RETRIEVER_BLS_OPERATOR_STATE_RETRIVER: env.EigenDA.OperatorStateRetreiver, RETRIEVER_EIGENDA_SERVICE_MANAGER: env.EigenDA.ServiceManager, RETRIEVER_NUM_CONNECTIONS: "10", diff --git a/inabox/deploy/config_types.go b/inabox/deploy/config_types.go index 81bb01b48f..875a70b803 100644 --- a/inabox/deploy/config_types.go +++ b/inabox/deploy/config_types.go @@ -100,7 +100,7 @@ func (cfg *EigenDADeployConfig) MarshalJSON() ([]byte, error) { type EigenDAContract struct { Deployer string `yaml:"deployer"` ServiceManager string `json:"eigenDAServiceManager"` - OperatorStateRetriever string `json:"operatorStateRetriever"` + OperatorStateRetreiver string `json:"operatorStateRetriever"` BlsApkRegistry string `json:"blsApkRegistry"` RegistryCoordinator string `json:"registryCoordinator"` } diff --git a/inabox/deploy/deploy.go b/inabox/deploy/deploy.go index ec49a786a9..08fea56c72 100644 --- a/inabox/deploy/deploy.go +++ b/inabox/deploy/deploy.go @@ -200,7 +200,7 @@ func (env *Config) RunNodePluginBinary(operation string, operator OperatorVars) "NODE_SOCKET=" + socket, "NODE_QUORUM_ID_LIST=" + operator.NODE_QUORUM_ID_LIST, "NODE_CHAIN_RPC=" + operator.NODE_CHAIN_RPC, - "NODE_BLS_OPERATOR_STATE_RETRIEVER=" + operator.NODE_BLS_OPERATOR_STATE_RETRIEVER, + "NODE_BLS_OPERATOR_STATE_RETRIVER=" + operator.NODE_BLS_OPERATOR_STATE_RETRIVER, "NODE_EIGENDA_SERVICE_MANAGER=" + operator.NODE_EIGENDA_SERVICE_MANAGER, "NODE_CHURNER_URL=" + operator.NODE_CHURNER_URL, "NODE_NUM_CONFIRMATIONS=0", diff --git a/inabox/deploy/env_vars.go b/inabox/deploy/env_vars.go index d7d149d7c2..fa64211064 100644 --- a/inabox/deploy/env_vars.go +++ b/inabox/deploy/env_vars.go @@ -11,7 +11,7 @@ type DisperserVars struct { DISPERSER_SERVER_RATE_BUCKET_TABLE_NAME string - DISPERSER_SERVER_BLS_OPERATOR_STATE_RETRIEVER string + DISPERSER_SERVER_BLS_OPERATOR_STATE_RETRIVER string DISPERSER_SERVER_EIGENDA_SERVICE_MANAGER string @@ -92,7 +92,7 @@ type BatcherVars struct { BATCHER_PULL_INTERVAL string - BATCHER_BLS_OPERATOR_STATE_RETRIEVER string + BATCHER_BLS_OPERATOR_STATE_RETRIVER string BATCHER_EIGENDA_SERVICE_MANAGER string @@ -260,7 +260,7 @@ type OperatorVars struct { NODE_ECDSA_KEY_PASSWORD string - NODE_BLS_OPERATOR_STATE_RETRIEVER string + NODE_BLS_OPERATOR_STATE_RETRIVER string NODE_EIGENDA_SERVICE_MANAGER string @@ -343,7 +343,7 @@ type RetrieverVars struct { RETRIEVER_TIMEOUT string - RETRIEVER_BLS_OPERATOR_STATE_RETRIEVER string + RETRIEVER_BLS_OPERATOR_STATE_RETRIVER string RETRIEVER_EIGENDA_SERVICE_MANAGER string @@ -410,7 +410,7 @@ type ChurnerVars struct { CHURNER_GRAPH_URL string - CHURNER_BLS_OPERATOR_STATE_RETRIEVER string + CHURNER_BLS_OPERATOR_STATE_RETRIVER string CHURNER_EIGENDA_SERVICE_MANAGER string diff --git a/inabox/tests/integration_suite_test.go b/inabox/tests/integration_suite_test.go index d4e0032e96..bb13e23e28 100644 --- a/inabox/tests/integration_suite_test.go +++ b/inabox/tests/integration_suite_test.go @@ -149,7 +149,7 @@ func setupRetrievalClient(testConfig *deploy.Config) error { if err != nil { log.Fatalln("could not start tcp listener", err) } - tx, err := eth.NewTransactor(logger, client, testConfig.Retriever.RETRIEVER_BLS_OPERATOR_STATE_RETRIEVER, testConfig.Retriever.RETRIEVER_EIGENDA_SERVICE_MANAGER) + tx, err := eth.NewTransactor(logger, client, testConfig.Retriever.RETRIEVER_BLS_OPERATOR_STATE_RETRIVER, testConfig.Retriever.RETRIEVER_EIGENDA_SERVICE_MANAGER) if err != nil { return err } diff --git a/node/flags/flags.go b/node/flags/flags.go index dc5f33bab2..7da53f6867 100644 --- a/node/flags/flags.go +++ b/node/flags/flags.go @@ -121,7 +121,7 @@ var ( Name: common.PrefixFlag(FlagPrefix, "bls-operator-state-retriever"), Usage: "Address of the BLS Operator State Retriever", Required: true, - EnvVar: common.PrefixEnvVar(EnvVarPrefix, "BLS_OPERATOR_STATE_RETRIEVER"), + EnvVar: common.PrefixEnvVar(EnvVarPrefix, "BLS_OPERATOR_STATE_RETRIVER"), } EigenDAServiceManagerFlag = cli.StringFlag{ Name: common.PrefixFlag(FlagPrefix, "eigenda-service-manager"), diff --git a/node/plugin/config.go b/node/plugin/config.go index 9cff0192ae..1c3ee1ad9c 100644 --- a/node/plugin/config.go +++ b/node/plugin/config.go @@ -89,7 +89,7 @@ var ( Name: "bls-operator-state-retriever", Usage: "Address of the BLS Operator State Retriever", Required: true, - EnvVar: common.PrefixEnvVar(flags.EnvVarPrefix, "BLS_OPERATOR_STATE_RETRIEVER"), + EnvVar: common.PrefixEnvVar(flags.EnvVarPrefix, "BLS_OPERATOR_STATE_RETRIVER"), } EigenDAServiceManagerFlag = cli.StringFlag{ Name: "eigenda-service-manager", diff --git a/node/plugin/tests/plugin_test.go b/node/plugin/tests/plugin_test.go index d15158fdd2..72dc752501 100644 --- a/node/plugin/tests/plugin_test.go +++ b/node/plugin/tests/plugin_test.go @@ -195,7 +195,7 @@ func getOperatorId(t *testing.T, operator deploy.OperatorVars) [32]byte { assert.NoError(t, err) assert.NotNil(t, client) - transactor, err := eth.NewTransactor(logger, client, operator.NODE_BLS_OPERATOR_STATE_RETRIEVER, operator.NODE_EIGENDA_SERVICE_MANAGER) + transactor, err := eth.NewTransactor(logger, client, operator.NODE_BLS_OPERATOR_STATE_RETRIVER, operator.NODE_EIGENDA_SERVICE_MANAGER) assert.NoError(t, err) assert.NotNil(t, transactor) @@ -230,7 +230,7 @@ func getTransactor(t *testing.T, operator deploy.OperatorVars) *eth.Transactor { assert.NoError(t, err) assert.NotNil(t, client) - transactor, err := eth.NewTransactor(logger, client, operator.NODE_BLS_OPERATOR_STATE_RETRIEVER, operator.NODE_EIGENDA_SERVICE_MANAGER) + transactor, err := eth.NewTransactor(logger, client, operator.NODE_BLS_OPERATOR_STATE_RETRIVER, operator.NODE_EIGENDA_SERVICE_MANAGER) assert.NoError(t, err) assert.NotNil(t, transactor) diff --git a/operators/churner/flags/flags.go b/operators/churner/flags/flags.go index 963156d02d..5ed800d5e1 100644 --- a/operators/churner/flags/flags.go +++ b/operators/churner/flags/flags.go @@ -41,7 +41,7 @@ var ( Name: common.PrefixFlag(FlagPrefix, "bls-operator-state-retriever"), Usage: "Address of the BLS Operator State Retriever", Required: true, - EnvVar: common.PrefixEnvVar(envPrefix, "BLS_OPERATOR_STATE_RETRIEVER"), + EnvVar: common.PrefixEnvVar(envPrefix, "BLS_OPERATOR_STATE_RETRIVER"), } EigenDAServiceManagerFlag = cli.StringFlag{ Name: common.PrefixFlag(FlagPrefix, "eigenda-service-manager"), diff --git a/operators/churner/tests/churner_test.go b/operators/churner/tests/churner_test.go index 99e8fbb81a..0f5486b95a 100644 --- a/operators/churner/tests/churner_test.go +++ b/operators/churner/tests/churner_test.go @@ -124,7 +124,7 @@ func TestChurner(t *testing.T) { salt := [32]byte{} copy(salt[:], crypto.Keccak256([]byte("churn"), []byte(time.Now().String()))) expiry := big.NewInt((time.Now().Add(10 * time.Minute)).Unix()) - tx, err = createTransactorFromScratch(*privateKey, testConfig.EigenDA.OperatorStateRetriever, testConfig.EigenDA.ServiceManager, logger) + tx, err = createTransactorFromScratch(*privateKey, testConfig.EigenDA.OperatorStateRetreiver, testConfig.EigenDA.ServiceManager, logger) assert.NoError(t, err) if i >= testConfig.Services.Counts.NumMaxOperatorCount { // This operator will churn others @@ -212,13 +212,13 @@ func newTestServer(t *testing.T) *churner.Server { NumRetries: numRetries, }, LoggerConfig: common.DefaultLoggerConfig(), - BLSOperatorStateRetrieverAddr: testConfig.EigenDA.OperatorStateRetriever, + BLSOperatorStateRetrieverAddr: testConfig.EigenDA.OperatorStateRetreiver, EigenDAServiceManagerAddr: testConfig.EigenDA.ServiceManager, } operatorTransactorChurner, err := createTransactorFromScratch( churnerPrivateKeyHex, - testConfig.EigenDA.OperatorStateRetriever, + testConfig.EigenDA.OperatorStateRetreiver, testConfig.EigenDA.ServiceManager, logger, ) diff --git a/retriever/cmd/main.go b/retriever/cmd/main.go index f4bf5d6d22..4513c05c80 100644 --- a/retriever/cmd/main.go +++ b/retriever/cmd/main.go @@ -18,7 +18,7 @@ import ( "github.com/Layr-Labs/eigenda/core/thegraph" "github.com/Layr-Labs/eigenda/encoding/kzg/verifier" "github.com/Layr-Labs/eigenda/retriever" - retrievereth "github.com/Layr-Labs/eigenda/retriever/eth" + retrivereth "github.com/Layr-Labs/eigenda/retriever/eth" "github.com/Layr-Labs/eigenda/retriever/flags" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/rpc" @@ -135,7 +135,7 @@ func RetrieverMain(ctx *cli.Context) error { log.Fatalln("could not start tcp listener", err) } - chainClient := retrievereth.NewChainClient(gethClient, logger) + chainClient := retrivereth.NewChainClient(gethClient, logger) retrieverServiceServer := retriever.NewServer(config, logger, retrievalClient, v, ics, chainClient) if err = retrieverServiceServer.Start(context.Background()); err != nil { log.Fatalln("failed to start retriever service server", err) diff --git a/retriever/flags/flags.go b/retriever/flags/flags.go index 4cd5499f00..91e161110e 100644 --- a/retriever/flags/flags.go +++ b/retriever/flags/flags.go @@ -37,7 +37,7 @@ var ( Name: common.PrefixFlag(FlagPrefix, "bls-operator-state-retriever"), Usage: "Address of the BLS Operator State Retriever", Required: true, - EnvVar: common.PrefixEnvVar(envPrefix, "BLS_OPERATOR_STATE_RETRIEVER"), + EnvVar: common.PrefixEnvVar(envPrefix, "BLS_OPERATOR_STATE_RETRIVER"), } EigenDAServiceManagerFlag = cli.StringFlag{ Name: common.PrefixFlag(FlagPrefix, "eigenda-service-manager"),