Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed unused parameters for improved code readability. #521

Merged
merged 4 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/proto/node/node.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ service Dispersal {
service Retrieval {
// RetrieveChunks retrieves the chunks for a blob custodied at the Node.
rpc RetrieveChunks(RetrieveChunksRequest) returns (RetrieveChunksReply) {}
// Similar to RetrieveChunks, this just returns the header of the blob.
// GetBlobHeader is similar to RetrieveChunks, this just returns the header of the blob.
rpc GetBlobHeader(GetBlobHeaderRequest) returns (GetBlobHeaderReply) {}
}

Expand Down
2 changes: 1 addition & 1 deletion common/ratelimit.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type RateBucketParams struct {
}

// GetClientAddress returns the client address from the context. If the header is not empty, it will
// take the ip address located at the `numProxies position from the end of the header. If the ip address cannot be
// take the ip address located at the `numProxies` position from the end of the header. If the ip address cannot be
// found in the header, it will use the connection ip if `allowDirectConnectionFallback` is true. Otherwise, it will return
// an error.
func GetClientAddress(ctx context.Context, header string, numProxies int, allowDirectConnectionFallback bool) (string, error) {
Expand Down
2 changes: 1 addition & 1 deletion encoding/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type G2Commitment bn254.G2Affine
// LengthProof is a polynomial commitment on G2 (e.g. a kzg commitment) used for low degree proof
type LengthProof = G2Commitment

// The proof used to open a commitment. In the case of Kzg, this is also a kzg commitment, and is different from a Commitment only semantically.
// Proof is used to open a commitment. In the case of Kzg, this is also a kzg commitment, and is different from a Commitment only semantically.
type Proof = bn254.G1Affine

// Symbol is a symbol in the field used for polynomial commitments
Expand Down
2 changes: 1 addition & 1 deletion encoding/rs/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (g *Encoder) Encode(inputFr []fr.Element) (*GlobalPoly, []Frame, []uint32,
return poly, frames, indices, nil
}

// This Function takes extended evaluation data and bundles relevant information into Frame.
// MakeFrames function takes extended evaluation data and bundles relevant information into Frame.
// Every frame is verifiable to the commitment.
func (g *Encoder) MakeFrames(
polyEvals []fr.Element,
Expand Down
4 changes: 2 additions & 2 deletions indexer/accumulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ type Accumulator interface {

UpdateObject(object AccumulatorObject, header *Header, event Event) (AccumulatorObject, error)

// Serialize object takes the accumulator object, and serializes it using the rules for the specified fork.
// SerializeObject takes the accumulator object, and serializes it using the rules for the specified fork.
SerializeObject(object AccumulatorObject, fork UpgradeFork) ([]byte, error)

// DeSerialize object deserializes an accumulator object using the rules for the specified fork.
// DeserializeObject deserializes an accumulator object using the rules for the specified fork.
DeserializeObject(data []byte, fork UpgradeFork) (AccumulatorObject, error)
}
2 changes: 1 addition & 1 deletion retriever/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func RetrieverMain(ctx *cli.Context) error {
}

chainClient := retrivereth.NewChainClient(gethClient, logger)
retrieverServiceServer := retriever.NewServer(config, logger, retrievalClient, v, ics, chainClient)
retrieverServiceServer := retriever.NewServer(config, logger, retrievalClient, ics, chainClient)
if err = retrieverServiceServer.Start(context.Background()); err != nil {
log.Fatalln("failed to start retriever service server", err)
}
Expand Down
2 changes: 0 additions & 2 deletions retriever/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
pb "github.com/Layr-Labs/eigenda/api/grpc/retriever"
"github.com/Layr-Labs/eigenda/clients"
"github.com/Layr-Labs/eigenda/core"
"github.com/Layr-Labs/eigenda/encoding"
"github.com/Layr-Labs/eigenda/retriever/eth"
"github.com/Layr-Labs/eigensdk-go/logging"
gcommon "github.com/ethereum/go-ethereum/common"
Expand All @@ -28,7 +27,6 @@ func NewServer(
config *Config,
logger logging.Logger,
retrievalClient clients.RetrievalClient,
verifier encoding.Verifier,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter has not been used and should be removed.

indexedState core.IndexedChainState,
chainClient eth.ChainClient,
) *Server {
Expand Down
4 changes: 2 additions & 2 deletions retriever/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ func newTestServer(t *testing.T) *retriever.Server {
log.Fatalf("failed to create new mocked chain data: %s", err)
}

_, v, err := makeTestComponents()
_, _, err = makeTestComponents()
if err != nil {
log.Fatal(err)
}

retrievalClient = &clientsmock.MockRetrievalClient{}
chainClient = mock.NewMockChainClient()
return retriever.NewServer(config, logger, retrievalClient, v, indexedChainState, chainClient)
return retriever.NewServer(config, logger, retrievalClient, indexedChainState, chainClient)
}

func TestRetrieveBlob(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion test/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func mustMakeRetriever(cst core.IndexedChainState, logger logging.Logger) (*comm
gethClient := &commonmock.MockEthClient{}
retrievalClient := &clientsmock.MockRetrievalClient{}
chainClient := retrievermock.NewMockChainClient()
server := retriever.NewServer(config, logger, retrievalClient, v, cst, chainClient)
server := retriever.NewServer(config, logger, retrievalClient, cst, chainClient)

return gethClient, TestRetriever{
Server: server,
Expand Down
Loading