Skip to content

Commit

Permalink
chore(proto): add module safe query warning (cosmos#19743)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Mar 13, 2024
1 parent db82004 commit 7193d88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion api/cosmos/query/v1/query.pulsar.go

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

6 changes: 4 additions & 2 deletions proto/cosmos/query/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ option go_package = "github.com/cosmos/cosmos-sdk/types/query";
extend google.protobuf.MethodOptions {
// module_query_safe is set to true when the query is safe to be called from
// within the state machine, for example from another module's Keeper, via
// ADR-033 calls or from CosmWasm contracts.
// a query router calls or from CosmWasm contracts.
// WARNING: marking a query as safe in a non consensus breaking release may cause non determinism.
// It is recommended to only mark a query as safe in a consensus breaking release.
// Concretely, it means that the query is:
// 1. deterministic: given a block height, returns the exact same response
// upon multiple calls; and doesn't introduce any state-machine-breaking
Expand All @@ -32,4 +34,4 @@ extend google.protobuf.MethodOptions {
//
// When set to true, the query can safely be called
bool module_query_safe = 11110001;
}
}

0 comments on commit 7193d88

Please sign in to comment.