diff --git a/disperser/apiserver/disperse_blob_v2.go b/disperser/apiserver/disperse_blob_v2.go index d39d75f2cd..304724eb64 100644 --- a/disperser/apiserver/disperse_blob_v2.go +++ b/disperser/apiserver/disperse_blob_v2.go @@ -7,7 +7,6 @@ import ( "github.com/Layr-Labs/eigenda/api" pb "github.com/Layr-Labs/eigenda/api/grpc/disperser/v2" - "github.com/Layr-Labs/eigenda/common" corev2 "github.com/Layr-Labs/eigenda/core/v2" dispv2 "github.com/Layr-Labs/eigenda/disperser/common/v2" "github.com/Layr-Labs/eigenda/encoding" @@ -19,17 +18,12 @@ func (s *DispersalServerV2) DisperseBlob(ctx context.Context, req *pb.DisperseBl return nil, err } - origin, err := common.GetClientAddress(ctx, s.rateConfig.ClientIPHeader, 2, true) - if err != nil { - return nil, api.NewErrorInvalidArg(err.Error()) - } - data := req.GetData() blobHeader, err := corev2.BlobHeaderFromProtobuf(req.GetBlobHeader()) if err != nil { return nil, api.NewErrorInternal(err.Error()) } - s.logger.Debug("received a new blob dispersal request", "origin", origin, "blobSizeBytes", len(data), "quorums", req.GetBlobHeader().GetQuorumNumbers()) + s.logger.Debug("received a new blob dispersal request", "blobSizeBytes", len(data), "quorums", req.GetBlobHeader().GetQuorumNumbers()) // TODO(ian-shim): handle payments and check rate limits diff --git a/disperser/apiserver/server_v2.go b/disperser/apiserver/server_v2.go index 06cb69b04e..fec4437bc0 100644 --- a/disperser/apiserver/server_v2.go +++ b/disperser/apiserver/server_v2.go @@ -33,12 +33,10 @@ type DispersalServerV2 struct { pb.UnimplementedDisperserServer serverConfig disperser.ServerConfig - rateConfig RateConfig blobStore *blobstore.BlobStore blobMetadataStore *blobstore.BlobMetadataStore chainReader core.Reader - ratelimiter common.RateLimiter authenticator corev2.BlobRequestAuthenticator prover encoding.Prover logger logging.Logger @@ -67,12 +65,10 @@ func NewDispersalServerV2( return &DispersalServerV2{ serverConfig: serverConfig, - rateConfig: rateConfig, blobStore: blobStore, blobMetadataStore: blobMetadataStore, chainReader: chainReader, - ratelimiter: ratelimiter, authenticator: authenticator, prover: prover, logger: logger, @@ -105,10 +101,6 @@ func (s *DispersalServerV2) Start(ctx context.Context) error { return fmt.Errorf("failed to refresh onchain quorum state: %w", err) } - if err := s.RefreshAllowlist(); err != nil { - return fmt.Errorf("failed to refresh allowlist: %w", err) - } - go func() { ticker := time.NewTicker(s.onchainStateRefreshInterval) defer ticker.Stop() @@ -125,21 +117,6 @@ func (s *DispersalServerV2) Start(ctx context.Context) error { } }() - go func() { - t := time.NewTicker(s.rateConfig.AllowlistRefreshInterval) - defer t.Stop() - for { - select { - case <-t.C: - if err := s.RefreshAllowlist(); err != nil { - s.logger.Error("failed to refresh allowlist", "err", err) - } - case <-ctx.Done(): - return - } - } - }() - s.logger.Info("GRPC Listening", "port", s.serverConfig.GrpcPort, "address", listener.Addr().String()) if err := gs.Serve(listener); err != nil { @@ -186,22 +163,6 @@ func (s *DispersalServerV2) GetBlobCommitment(ctx context.Context, req *pb.BlobC }}, nil } -func (s *DispersalServerV2) RefreshAllowlist() error { - s.logger.Debug("Refreshing onchain quorum state") - al, err := ReadAllowlistFromFile(s.rateConfig.AllowlistFile) - if err != nil { - return fmt.Errorf("failed to load allowlist: %w", err) - } - s.rateConfig.Allowlist = al - for account, rateInfoByQuorum := range al { - for quorumID, rateInfo := range rateInfoByQuorum { - s.logger.Info("[Allowlist]", "account", account, "name", rateInfo.Name, "quorumID", quorumID, "throughput", rateInfo.Throughput, "blobRate", rateInfo.BlobRate) - } - } - - return nil -} - // refreshOnchainState refreshes the onchain quorum state. // It should be called periodically to keep the state up to date. // **Note** that there is no lock. If the state is being updated concurrently, it may lead to inconsistent state. diff --git a/disperser/cmd/controller/config.go b/disperser/cmd/controller/config.go index 1a5ded7edd..00483ee202 100644 --- a/disperser/cmd/controller/config.go +++ b/disperser/cmd/controller/config.go @@ -31,7 +31,6 @@ type Config struct { IndexerConfig indexer.Config ChainStateConfig thegraph.Config UseGraph bool - IndexerDataDir string BLSOperatorStateRetrieverAddr string EigenDAServiceManagerAddr string @@ -84,7 +83,6 @@ func NewConfig(ctx *cli.Context) (Config, error) { IndexerConfig: indexer.ReadIndexerConfig(ctx), ChainStateConfig: thegraph.ReadCLIConfig(ctx), UseGraph: ctx.GlobalBool(flags.UseGraphFlag.Name), - IndexerDataDir: ctx.GlobalString(flags.IndexerDataDirFlag.Name), BLSOperatorStateRetrieverAddr: ctx.GlobalString(flags.BlsOperatorStateRetrieverFlag.Name), EigenDAServiceManagerAddr: ctx.GlobalString(flags.EigenDAServiceManagerFlag.Name),