chore(proto): add module safe query warning (#19743)

This commit is contained in:
Marko 2024-03-13 12:45:04 +01:00 committed by GitHub
parent db82004074
commit 7193d88814
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -36,7 +36,9 @@ var file_cosmos_query_v1_query_proto_extTypes = []protoimpl.ExtensionInfo{
var (
// 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

View File

@ -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
@ -32,4 +34,4 @@ extend google.protobuf.MethodOptions {
//
// When set to true, the query can safely be called
bool module_query_safe = 11110001;
}
}