Skip to content

Commit

Permalink
feat: pass Options in grpc proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
tzdybal committed Sep 13, 2024
1 parent 1d02213 commit 4521f9a
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 114 deletions.
2 changes: 1 addition & 1 deletion proto/da/da.proto
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ message SubmitRequest {
repeated Blob blobs = 1;
double gas_price = 2;
Namespace namespace = 3;
optional bytes options = 4;
bytes options = 4;
}

// SubmitResponse is the response type for the Submit rpc method.
Expand Down
1 change: 1 addition & 0 deletions proxy/grpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ func (c *Client) SubmitWithOptions(ctx context.Context, blobs []da.Blob, gasPric
Blobs: blobsDA2PB(blobs),
GasPrice: gasPrice,
Namespace: &pbda.Namespace{Value: namespace},
Options: options,
}

resp, err := c.client.Submit(ctx, req)
Expand Down
2 changes: 1 addition & 1 deletion proxy/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (p *proxySrv) GetProofs(ctx context.Context, request *pbda.GetProofsRequest
func (p *proxySrv) Submit(ctx context.Context, request *pbda.SubmitRequest) (*pbda.SubmitResponse, error) {
blobs := blobsPB2DA(request.Blobs)

ids, err := p.target.Submit(ctx, blobs, request.GasPrice, request.Namespace.GetValue())
ids, err := p.target.SubmitWithOptions(ctx, blobs, request.GasPrice, request.Namespace.GetValue(), request.Options)
if err != nil {
return nil, err
}
Expand Down
167 changes: 55 additions & 112 deletions types/pb/da/da.pb.go

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

0 comments on commit 4521f9a

Please sign in to comment.