Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-shim committed Mar 18, 2024
1 parent a002ac2 commit dd6deeb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion api/docs/disperser.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ AuthenticationData contains the signature of the BlobAuthHeader.

### BlobAuthHeader
BlobAuthHeader contains information about the blob for the client to verify and sign.
- Once payments are enabled, the BlobAuthHeader the KZG commitment to the blob, which the client
- Once payments are enabled, the BlobAuthHeader will contain the KZG commitment to the blob, which the client
will verify and sign. Having the client verify the KZG commitment instead of calculating it avoids
the need for the client to have the KZG structured reference string (SRS), which can be large.
The signed KZG commitment prevents the disperser from sending a different blob to the DA Nodes
Expand Down
2 changes: 1 addition & 1 deletion api/proto/disperser/disperser.proto
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ message AuthenticatedReply {
}

// BlobAuthHeader contains information about the blob for the client to verify and sign.
// - Once payments are enabled, the BlobAuthHeader the KZG commitment to the blob, which the client
// - Once payments are enabled, the BlobAuthHeader will contain the KZG commitment to the blob, which the client
// will verify and sign. Having the client verify the KZG commitment instead of calculating it avoids
// the need for the client to have the KZG structured reference string (SRS), which can be large.
// The signed KZG commitment prevents the disperser from sending a different blob to the DA Nodes
Expand Down
2 changes: 1 addition & 1 deletion core/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ type BlobHeader struct {
QuorumInfos []*BlobQuorumInfo

// AccountID is the account that is paying for the blob to be stored
AccountID AccountID `json:"account_id"`
AccountID AccountID
}

func (b *BlobHeader) GetQuorumInfo(quorum QuorumID) *BlobQuorumInfo {
Expand Down
6 changes: 3 additions & 3 deletions disperser/apiserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (s *DispersalServer) DisperseBlobAuthenticated(stream pb.Disperser_Disperse
return api.NewInvalidArgError(fmt.Sprintf("error receiving next message: %v", err))
}

request, ok := in.Payload.(*pb.AuthenticatedRequest_DisperseRequest)
request, ok := in.GetPayload().(*pb.AuthenticatedRequest_DisperseRequest)
if !ok {
return api.NewInvalidArgError("missing DisperseBlobRequest")
}
Expand Down Expand Up @@ -136,7 +136,7 @@ func (s *DispersalServer) DisperseBlobAuthenticated(stream pb.Disperser_Disperse
return api.NewInvalidArgError(fmt.Sprintf("error receiving next message: %v", err))
}

challengeReply, ok := in.Payload.(*pb.AuthenticatedRequest_AuthenticationData)
challengeReply, ok := in.GetPayload().(*pb.AuthenticatedRequest_AuthenticationData)
if !ok {
return api.NewInvalidArgError("expected AuthenticationData")
}
Expand Down Expand Up @@ -252,7 +252,7 @@ func (s *DispersalServer) disperseBlob(ctx context.Context, blob *core.Blob, aut
return nil, api.NewInvalidArgError(err.Error())
}

s.logger.Debug("received a new blob request", "origin", origin, "securityParams", strings.Join(securityParamsStrings, ", "))
s.logger.Debug("received a new blob dispersal request", "origin", origin, "securityParams", strings.Join(securityParamsStrings, ", "))

err = s.validateBlobRequest(ctx, blob)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions node/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (s *Server) serveDispersal() error {
addr := fmt.Sprintf("%s:%s", localhost, s.config.InternalDispersalPort)
listener, err := net.Listen("tcp", addr)
if err != nil {
s.logger.Fatalf("Could not start tcp listener: %w", err)
s.logger.Fatalf("Could not start tcp listener: %v", err)
}

opt := grpc.MaxRecvMsgSize(1024 * 1024 * 1024) // 1 GiB
Expand All @@ -107,7 +107,7 @@ func (s *Server) serveRetrieval() error {
addr := fmt.Sprintf("%s:%s", localhost, s.config.InternalRetrievalPort)
listener, err := net.Listen("tcp", addr)
if err != nil {
s.logger.Fatalf("Could not start tcp listener: %w", err)
s.logger.Fatalf("Could not start tcp listener: %v", err)
}

opt := grpc.MaxRecvMsgSize(1024 * 1024 * 300) // 300 MiB
Expand Down
2 changes: 1 addition & 1 deletion node/grpc/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func GetBatchHeader(in *pb.StoreChunksRequest) (*core.BatchHeader, error) {
var batchRoot [32]byte
copy(batchRoot[:], in.GetBatchHeader().GetBatchRoot())
batchHeader := core.BatchHeader{
ReferenceBlockNumber: uint(in.BatchHeader.ReferenceBlockNumber),
ReferenceBlockNumber: uint(in.GetBatchHeader().GetReferenceBlockNumber()),
BatchRoot: batchRoot,
}
return &batchHeader, nil
Expand Down
2 changes: 1 addition & 1 deletion retriever/eth/chain_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type chainClient struct {
logger logging.Logger
}

func NewChainClient(ethClient common.EthClient, logger logging.Logger) *chainClient {
func NewChainClient(ethClient common.EthClient, logger logging.Logger) ChainClient {
return &chainClient{
ethClient: ethClient,
logger: logger,
Expand Down

0 comments on commit dd6deeb

Please sign in to comment.