-
Notifications
You must be signed in to change notification settings - Fork 208
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
Make Stride a consumer chain #811
Conversation
Co-authored by: Dusan Maksimovic Stana Miric
… provider & consumer
…ide consumer and gaia provider
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.
@@ -6,12 +6,14 @@ import ( | |||
"path/filepath" | |||
|
|||
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" | |||
"github.com/cosmos/cosmos-sdk/x/genutil" |
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.
@shellvish if you have time, might make sense for you to review this file as well!
For now yes but there are ways running consumer without running provider for testing purpose. |
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.
resolution for #811 (comment)
app/proposals_whitelisting.go
Outdated
{MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyRedemptionRateInterval)}: {}, | ||
{MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyStrideCommission)}: {}, | ||
{MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyReinvestInterval)}: {}, | ||
// {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyValidatorRebalancingThreshold)}: {}, |
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.
We can remove this
app/proposals_whitelisting.go
Outdated
{MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyIbcTimeoutBlocks)}: {}, | ||
{MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyFeeTransferTimeoutNanos)}: {}, | ||
{MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeyMaxStakeICACallsPerEpoch)}: {}, | ||
// {MsgType: stakeibctypes.ModuleName, Key: string(stakeibctypes.KeySafetyMinRedemptionRateThreshold)}: {}, |
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.
We need to update the variable names that @strbrian sent in slack
app/proposals_whitelisting.go
Outdated
{MsgType: stakingtypes.ModuleName, Key: string(stakingtypes.KeyBondDenom)}: {}, | ||
//distribution | ||
{MsgType: distrtypes.ModuleName, Key: string(distrtypes.ParamStoreKeyCommunityTax)}: {}, | ||
// {MsgType: distrtypes.ModuleName, Key: string(distrtypes.ParamStoreKeyBaseProposerReward)}: {}, |
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.
Let's remove these
@@ -18,6 +20,19 @@ import ( | |||
stakeibctypes "github.com/Stride-Labs/stride/v12/x/stakeibc/types" | |||
) | |||
|
|||
var WhiteListModule = map[string]struct{}{ |
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.
Can you explain this list / where did it come from? Does this restrict proposals to param changes?
Do we also need to whitelist software upgrade proposals in the gov module?
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.
Good question!
That came from here.
https://github.com/cosmos/interchain-security/blob/main/app/consumer-democracy/proposals_whitelisting.go#L41-L52C1
That doesn't restrict proposal change proposals at all.
IsWhiteListModule is only used for whitelisting non-legacy proposals.
For soft-upgrade proposal, if we submit as legacy proposal, we don't need to whitelist software upgrade proposal in WhitelistModule.
But if we submit as non-legacy proposal, the software upgrade proposal must be whitelisted in WhitelistModule.
To enable both cases, I will add cancel/upgrade proposal types to WhitelistModule.
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.
Thanks for adding this. Will follow up with Informal to ask what set of permissions they recommend.
app/ante_handler.go
Outdated
@@ -41,7 +40,6 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { | |||
ante.NewSetUpContextDecorator(), | |||
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), | |||
// temporarily disabled so that chain can be tested locally without the provider chain running | |||
consumerante.NewMsgFilterDecorator(options.ConsumerKeeper), |
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 is this decorator unnecessary?
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.
It was originally disabled but enabling it blocked some IBC msgs while running integration tests(redemption).
So I removed it.
✗ [INTEGRATION-BASIC-GAIA] redemption works
(from function `WAIT_FOR_STRING' in file dockernet/tests/integration_tests.bats, line 0,
in test file dockernet/tests/integration_tests.bats, line 210)
`WAIT_FOR_STRING $STRIDE_LOGS "\[REDEMPTION] completed on $HOST_CHAIN_ID"' failed with status 130
code: 1
codespace: undefined
data: ""
events: []
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: tx contains unsupported message types at height 353
timestamp: ""
tx: null
txhash: 9783021376368CC3B5AD692940B006446B4E781A1446DD4DCCACACC277539115
Received SIGINT, aborting ...
bats warning: Executed 6 instead of expected 9 tests
This reverts commit b4abd61.
Context and purpose of the change
This consumer branch uses informal's ICS version for consumer chain.
How to test ICS with s->c transition
- ICS setup
- Test VP sharing between consumer and provider
Once new ICS channel is established, try unbonding on gaia.
And then, check VP on both stride and gaia.
You should have same VP for both gaia and stride nodes.
- Test reward distribution to provider validators
Some portion (currently 25%) of total rewards from stride chain are distributed to provider validators every 1k blocks.
Check if the validator rewards include stride IBC tokens on gaia after passing 1k blocks.
- Test staking rewards for stride governors
Remaining rewards (75%) should be distributed to stride governors and community pool on stride.
Check if the governor rewards increase continuously properly.
- Test staking/unstaking to Stride governors
Staking/Unstaking to governors should work as normal.
Check if tokens are bonded to governors and unbonded tokens are sent to delegators properly after unbonding period.