-
Notifications
You must be signed in to change notification settings - Fork 44
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
feat: set stargate querier accepted list #1083
Conversation
Codecov ReportBase: 80.52% // Head: 80.76% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1083 +/- ##
==========================================
+ Coverage 80.52% 80.76% +0.23%
==========================================
Files 180 185 +5
Lines 15804 16618 +814
==========================================
+ Hits 12726 13421 +695
- Misses 2522 2610 +88
- Partials 556 587 +31
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
d58b7b7
to
380f303
Compare
1c511bd
to
476143f
Compare
@@ -282,7 +282,7 @@ replace ( | |||
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 | |||
|
|||
// Our wasmd branch is: https://github.com/desmos-labs/wasmd v0.30.x-desmos | |||
github.com/CosmWasm/wasmd => github.com/desmos-labs/wasmd v0.30.0-desmos.1 | |||
github.com/CosmWasm/wasmd => github.com/desmos-labs/wasmd v0.30.0-desmos.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to v0.30.0-desmos.2 to have custom AnyResolver to have the custom format of Any{}
for desmos-bindings, see:
https://github.com/desmos-labs/wasmd/commit/8fa03330f6d5def43464166f60cb34e7de351cbd
And it also fixes the protoResponse pointer marshaling without reset issue, see:
https://github.com/desmos-labs/wasmd/commit/b5cfa16e978097b2e11835c175ec1818d61a52f8
@@ -63,7 +77,59 @@ func NewDesmosCustomQueryPlugin( | |||
querier := wasmdesmos.NewQuerier(queriers) | |||
|
|||
return wasm.QueryPlugins{ | |||
Custom: querier.QueryCustom, | |||
Stargate: wasmkeeper.AcceptListStargateQuerier(GetStargateAcceptedQueries(), grpcQueryRouter, cdc), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allowing all desmos custom moduels' querier for stargate feature. Our queries do not have non-deterministic issue.
Note: cosmos-sdk stargate querier has non-deterministic issue since some of the queries allow to retrieve historical data, like staking.HistoricalInfo
. The result of historical queries will be influenced by validator pruning setting, as a result, occurs non-deterministic issue.
cf66d6c
to
25b6ab5
Compare
25b6ab5
to
9d5a2e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, I only have one small comment.
Can you also please add a changelog entry as well?
@@ -23,7 +23,7 @@ func RandomizeGenState(simState *module.SimulationState) { | |||
members := randomUserGroupsMembers(simState.Rand, simState.Accounts, groups) | |||
acl := randomACL(simState.Rand, simState.Accounts, subspaces) | |||
initialSubspaceID, subspacesData := getSubspacesDataEntries(subspaces, sections, groups) | |||
grants := append(randomUserGrants(simState.Rand, simState.Accounts, subspaces), randomGroupGrants(simState.Rand, simState.Accounts, groups)...) | |||
grants := append(randomUserGrants(simState.Rand, simState.Accounts, subspaces), randomGroupGrants(simState.Rand, groups)...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was the code inside this simulation changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous simulation test is failed since the behaviour was wrong. The granter must be a subspace treasury instead of a random user address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notting to add to Riccardo's comments.
@RiccardoM Updated changeset. |
Description
This PR set stargate querier accepted list to enable wasm contract to query the allowed data from the chain query router.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change