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

Minor fixes #358

Merged
merged 1 commit into from
Mar 18, 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/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
15 changes: 8 additions & 7 deletions api/grpc/churner/churner.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/grpc/disperser/disperser.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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
Loading