Skip to content

Commit

Permalink
chore: add warning explanation of GetBlockWithTxs in `cosmos/tx/v1b…
Browse files Browse the repository at this point in the history
…eta1/service.proto`
  • Loading branch information
zemyblue committed Aug 22, 2023
1 parent f8d06b8 commit bf739e0
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21210,7 +21210,19 @@ paths:
'/cosmos/tx/v1beta1/txs/block/{height}':
get:
summary: GetBlockWithTxs fetches a block with decoded txs.
description: 'Since: cosmos-sdk 0.45.2'
description: >-
Since: cosmos-sdk 0.45.2

WARNING: In `GetBlockWithTxs` for compatibility with cosmos-sdk API, the
result converted from Ostracon block type

to tendermint block type without `entropy` is returned.

Therefore, verification fails with the tendermint block validation
method.

For original information, please check `GetBlockWithTxs` in
`lbm/tx/v1beta1/service.proto`.
operationId: GetBlockWithTxs
responses:
'200':
Expand Down
2 changes: 1 addition & 1 deletion docs/core/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8553,7 +8553,7 @@ Service defines a gRPC service for interacting with transactions.
| `GetTxsEvent` | [GetTxsEventRequest](#cosmos.tx.v1beta1.GetTxsEventRequest) | [GetTxsEventResponse](#cosmos.tx.v1beta1.GetTxsEventResponse) | GetTxsEvent fetches txs by event. | GET|/cosmos/tx/v1beta1/txs|
| `GetBlockWithTxs` | [GetBlockWithTxsRequest](#cosmos.tx.v1beta1.GetBlockWithTxsRequest) | [GetBlockWithTxsResponse](#cosmos.tx.v1beta1.GetBlockWithTxsResponse) | GetBlockWithTxs fetches a block with decoded txs.

Since: cosmos-sdk 0.45.2 | GET|/cosmos/tx/v1beta1/txs/block/{height}|
Since: cosmos-sdk 0.45.2 WARNING: In `GetBlockWithTxs` for compatibility with cosmos-sdk API, the result converted from Ostracon block type to tendermint block type without `entropy` is returned. Therefore, verification fails with the tendermint block validation method. For original information, please check `GetBlockWithTxs` in `lbm/tx/v1beta1/service.proto`. | GET|/cosmos/tx/v1beta1/txs/block/{height}|

<!-- end services -->

Expand Down
4 changes: 4 additions & 0 deletions proto/cosmos/tx/v1beta1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ service Service {
// GetBlockWithTxs fetches a block with decoded txs.
//
// Since: cosmos-sdk 0.45.2
// WARNING: In `GetBlockWithTxs` for compatibility with cosmos-sdk API, the result converted from Ostracon block type
// to tendermint block type without `entropy` is returned.
// Therefore, verification fails with the tendermint block validation method.
// For original information, please check `GetBlockWithTxs` in `lbm/tx/v1beta1/service.proto`.
rpc GetBlockWithTxs(GetBlockWithTxsRequest) returns (GetBlockWithTxsResponse) {
option (google.api.http).get = "/cosmos/tx/v1beta1/txs/block/{height}";
}
Expand Down
8 changes: 8 additions & 0 deletions types/tx/service.pb.go

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

0 comments on commit bf739e0

Please sign in to comment.