-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: decouple x/params
from simapp
#12259
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
263fa5e
feat: decouple `x/params` from simapp
julienrbrt 5c3e288
updates
julienrbrt 3ec8249
updates
julienrbrt 5aabf9c
Merge branch 'main' into julien/params-decouple-simapp
julienrbrt ad0a1db
use staking keeper
julienrbrt 295b617
Merge branch 'main' into julien/params-decouple-simapp
tac0turtle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package sims | ||
|
||
// Default simulation operation weights for messages and gov proposals | ||
const ( | ||
DefaultWeightMsgSend int = 100 | ||
DefaultWeightMsgMultiSend int = 10 | ||
DefaultWeightMsgSetWithdrawAddress int = 50 | ||
DefaultWeightMsgWithdrawDelegationReward int = 50 | ||
DefaultWeightMsgWithdrawValidatorCommission int = 50 | ||
DefaultWeightMsgFundCommunityPool int = 50 | ||
DefaultWeightMsgDeposit int = 100 | ||
DefaultWeightMsgVote int = 67 | ||
DefaultWeightMsgVoteWeighted int = 33 | ||
DefaultWeightMsgUnjail int = 100 | ||
DefaultWeightMsgCreateValidator int = 100 | ||
DefaultWeightMsgEditValidator int = 5 | ||
DefaultWeightMsgDelegate int = 100 | ||
DefaultWeightMsgUndelegate int = 100 | ||
DefaultWeightMsgBeginRedelegate int = 100 | ||
DefaultWeightMsgCancelUnbondingDelegation int = 100 | ||
|
||
DefaultWeightCommunitySpendProposal int = 5 | ||
DefaultWeightTextProposal int = 5 | ||
DefaultWeightParamChangeProposal int = 5 | ||
|
||
// feegrant | ||
DefaultWeightGrantAllowance int = 100 | ||
DefaultWeightRevokeAllowance int = 100 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
# App Wiring | ||
|
||
The minimal app-wiring configuration for `x/params` is as follows: | ||
|
||
+++ https://github.com/cosmos/cosmos-sdk/blob/main/x/params/testutil/app.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
modules: | ||
- name: runtime | ||
config: | ||
"@type": cosmos.app.runtime.v1alpha1.Module | ||
|
||
app_name: ParamsApp | ||
|
||
begin_blockers: [staking, auth, bank, genutil, params] | ||
end_blockers: [staking, auth, bank, genutil, params] | ||
init_genesis: [auth, bank, staking, genutil, params] | ||
|
||
- name: auth | ||
config: | ||
"@type": cosmos.auth.module.v1.Module | ||
bech32_prefix: cosmos | ||
module_account_permissions: | ||
- account: fee_collector | ||
- account: bonded_tokens_pool | ||
permissions: [burner, staking] | ||
- account: not_bonded_tokens_pool | ||
permissions: [burner, staking] | ||
|
||
- name: bank | ||
config: | ||
"@type": cosmos.bank.module.v1.Module | ||
|
||
- name: params | ||
config: | ||
"@type": cosmos.params.module.v1.Module | ||
|
||
- name: tx | ||
config: | ||
"@type": cosmos.tx.module.v1.Module | ||
|
||
- name: staking | ||
config: | ||
"@type": cosmos.staking.module.v1.Module | ||
|
||
- name: genutil | ||
config: | ||
"@type": cosmos.genutil.module.v1.Module |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@aaronc Shouldn't we use another
app.yaml
for this specific test? I feel like the defaultapp.yaml
fromtestutil
should contain the minimum modules required for the tested specific module. Here, gov does not fall into this category.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.
Not really following. Can you explain more?
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.
What I meant is from my understanding the app.yaml of a module should be minimalistic. That means only requiring modules that are dependencies or strictly required for running the module app.
Here we need to add as well the gov module which isn't a dependency of params.
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.
That makes sense but seems like the tests were written in a tightly coupled way so they depend on gov... We'll need to do some refactoring of tests probably