From cc20a05dd26aed66678c993312f990fdc10dc9a1 Mon Sep 17 00:00:00 2001 From: Buckram Date: Fri, 28 Jul 2023 16:44:11 +0300 Subject: [PATCH 1/6] whitelist AccountLockedCoins --- wasmbinding/stargate_whitelist.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go index 1107fa4f291..959ac00e5cd 100644 --- a/wasmbinding/stargate_whitelist.go +++ b/wasmbinding/stargate_whitelist.go @@ -105,6 +105,7 @@ func init() { // lockup setWhitelistedQuery("/osmosis.lockup.Query/ModuleBalance", &lockuptypes.ModuleBalanceResponse{}) setWhitelistedQuery("/osmosis.lockup.Query/ModuleLockedAmount", &lockuptypes.ModuleLockedAmountResponse{}) + setWhitelistedQuery("/osmosis.lockup.Query/AccountLockedCoins", &lockuptypes.AccountLockedCoinsResponse{}) setWhitelistedQuery("/osmosis.lockup.Query/AccountUnlockableCoins", &lockuptypes.AccountUnlockableCoinsResponse{}) setWhitelistedQuery("/osmosis.lockup.Query/AccountUnlockingCoins", &lockuptypes.AccountUnlockingCoinsResponse{}) setWhitelistedQuery("/osmosis.lockup.Query/LockedDenom", &lockuptypes.LockedDenomResponse{}) From b62b69bbf91bbed81739504b5afb3935a9af91de Mon Sep 17 00:00:00 2001 From: Buckram Date: Fri, 28 Jul 2023 16:53:20 +0300 Subject: [PATCH 2/6] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2eae12f5cb1..859ffc9a930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### API breaks +* [#5906](https://github.com/osmosis-labs/osmosis/pull/5906) Add `AccountLockedCoins` query in lockup module to stargate whitelist. + ### State Breaking * [#5532](https://github.com/osmosis-labs/osmosis/pull/5532) fix: Fix x/tokenfactory genesis import denoms reset x/bank existing denom metadata From 75765b52a31d09866fce6d4233c97ec13f6e757c Mon Sep 17 00:00:00 2001 From: Buckram Date: Fri, 28 Jul 2023 16:53:51 +0300 Subject: [PATCH 3/6] format changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 859ffc9a930..bf8ee9e9378 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased ### API breaks + * [#5906](https://github.com/osmosis-labs/osmosis/pull/5906) Add `AccountLockedCoins` query in lockup module to stargate whitelist. ### State Breaking From cfa858a5549729dbfa912b71f586291242ecf62d Mon Sep 17 00:00:00 2001 From: Buckram Date: Fri, 28 Jul 2023 18:50:56 +0300 Subject: [PATCH 4/6] add gov.query/proposal --- CHANGELOG.md | 2 +- wasmbinding/stargate_whitelist.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf8ee9e9378..c457593d4b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### API breaks -* [#5906](https://github.com/osmosis-labs/osmosis/pull/5906) Add `AccountLockedCoins` query in lockup module to stargate whitelist. +* [#5906](https://github.com/osmosis-labs/osmosis/pull/5906) Add `AccountLockedCoins` query in lockup module and `Proposal` in gov module to stargate whitelist. ### State Breaking diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go index 959ac00e5cd..fda103ef8ed 100644 --- a/wasmbinding/stargate_whitelist.go +++ b/wasmbinding/stargate_whitelist.go @@ -67,6 +67,7 @@ func init() { setWhitelistedQuery("/cosmos.gov.v1beta1.Query/Deposit", &govtypes.QueryDepositResponse{}) setWhitelistedQuery("/cosmos.gov.v1beta1.Query/Params", &govtypes.QueryParamsResponse{}) setWhitelistedQuery("/cosmos.gov.v1beta1.Query/Vote", &govtypes.QueryVoteResponse{}) + setWhitelistedQuery("/cosmos.gov.v1beta1.Query/Proposal", &govtypes.QueryProposalResponse{}) // slashing setWhitelistedQuery("/cosmos.slashing.v1beta1.Query/Params", &slashingtypes.QueryParamsResponse{}) From f301f85ab281598d531a016b8e5082d966217f0e Mon Sep 17 00:00:00 2001 From: Buckram Date: Mon, 7 Aug 2023 17:17:57 +0300 Subject: [PATCH 5/6] remove query proposal from whitelist --- CHANGELOG.md | 2 +- wasmbinding/stargate_whitelist.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c457593d4b3..bf8ee9e9378 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### API breaks -* [#5906](https://github.com/osmosis-labs/osmosis/pull/5906) Add `AccountLockedCoins` query in lockup module and `Proposal` in gov module to stargate whitelist. +* [#5906](https://github.com/osmosis-labs/osmosis/pull/5906) Add `AccountLockedCoins` query in lockup module to stargate whitelist. ### State Breaking diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go index fda103ef8ed..959ac00e5cd 100644 --- a/wasmbinding/stargate_whitelist.go +++ b/wasmbinding/stargate_whitelist.go @@ -67,7 +67,6 @@ func init() { setWhitelistedQuery("/cosmos.gov.v1beta1.Query/Deposit", &govtypes.QueryDepositResponse{}) setWhitelistedQuery("/cosmos.gov.v1beta1.Query/Params", &govtypes.QueryParamsResponse{}) setWhitelistedQuery("/cosmos.gov.v1beta1.Query/Vote", &govtypes.QueryVoteResponse{}) - setWhitelistedQuery("/cosmos.gov.v1beta1.Query/Proposal", &govtypes.QueryProposalResponse{}) // slashing setWhitelistedQuery("/cosmos.slashing.v1beta1.Query/Params", &slashingtypes.QueryParamsResponse{}) From 068e52bdef8fb6fd49bfbf47104ed2b8a752883d Mon Sep 17 00:00:00 2001 From: Buckram Date: Fri, 18 Aug 2023 18:06:02 +0300 Subject: [PATCH 6/6] summarize reply via comment --- wasmbinding/stargate_whitelist.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go index eea3b714079..ea1e7f44017 100644 --- a/wasmbinding/stargate_whitelist.go +++ b/wasmbinding/stargate_whitelist.go @@ -105,6 +105,7 @@ func init() { // lockup setWhitelistedQuery("/osmosis.lockup.Query/ModuleBalance", &lockuptypes.ModuleBalanceResponse{}) setWhitelistedQuery("/osmosis.lockup.Query/ModuleLockedAmount", &lockuptypes.ModuleLockedAmountResponse{}) + // Warning: it iterates over every single lock account has, which means this query can have unbounded gas setWhitelistedQuery("/osmosis.lockup.Query/AccountLockedCoins", &lockuptypes.AccountLockedCoinsResponse{}) setWhitelistedQuery("/osmosis.lockup.Query/AccountUnlockableCoins", &lockuptypes.AccountUnlockableCoinsResponse{}) setWhitelistedQuery("/osmosis.lockup.Query/AccountUnlockingCoins", &lockuptypes.AccountUnlockingCoinsResponse{})