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

Redefine cosmos proto changed in lbm to lbm's proto #885

Closed
4 tasks
zemyblue opened this issue Feb 8, 2023 · 0 comments · Fixed by #892
Closed
4 tasks

Redefine cosmos proto changed in lbm to lbm's proto #885

zemyblue opened this issue Feb 8, 2023 · 0 comments · Fixed by #892
Assignees
Milestone

Comments

@zemyblue
Copy link
Member

zemyblue commented Feb 8, 2023

Summary

Redefine cosmos proto changed in lbm to lbm's proto

Problem Definition

We are modifying the original cosmos-sdk's protobuf files, but there are compatibility issues. So we need to roll back to cosmos-sdk's proto or separate the changed message to a custom lbm proto.

changed messages

  • base.abci.v1beta1.abci.TxResponse: add index
  • tx.v1beta1.service.GetBlockWithTxsResponse: Block is ostracon's Block

Proposal

Use new lbm proto message for the changed cosmos-sdk proto messages.

lbm.base.abci.v1beta1.abci.TxResponse

  • It's a best solution that remove index.
  • If not, add lbm service query, and response not supported in cosmos.base.abci.v1beta1.Service.

lbm.tx.v1beta1.Service

  • add lbm.tx.v1beta1.Service/GetBlockWithTxs
  • response ignored or not supported in cosmos.tx.v1beta1.Service/GetBlockWithTxs

lbm/tx/v1beta1/service.proto

// Service defines a gRPC service for interacting with transactions.
service Service {
  // GetBlockWithTxs fetches a block with decoded txs.
  //
  // Since: lbm-sdk 0.47.0
  rpc GetBlockWithTxs(GetBlockWithTxsRequest) returns (GetBlockWithTxsResponse) {
    option (google.api.http).get = "/lbm/tx/v1beta1/txs/block/{height}";
  }
}

// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs
// RPC method.
//
// Since: cosmos-sdk 0.45.2
message GetBlockWithTxsRequest {
  // height is the height of the block to query.
  int64 height = 1;
  // pagination defines a pagination for the request.
  cosmos.base.query.v1beta1.PageRequest pagination = 2;
}

// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method.
//
// Since: lbm-sdk 0.47.0
message GetBlockWithTxsResponse {
  // txs are the transactions in the block.
  repeated cosmos.tx.v1beta1.Tx txs = 1;
  .tendermint.types.BlockID     block_id = 2;
  .ostracon.types.Block         block = 3;
  // pagination defines a pagination for the response.
  cosmos.base.query.v1beta1.PageResponse pagination = 4;
}

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant