-
Notifications
You must be signed in to change notification settings - Fork 138
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
Standalone to consumer changeover - recycle existing transfer channel #832
Conversation
…nsumer chain upgrade height
…o jstr/onchain_upgrade_to_consumer_chain_840
…merge conflict fix issue
Co-authored-by: yaruwangway <69694322+yaruwangway@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
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.
Looks good!
e2e tests will be added at a later point
@@ -111,7 +111,7 @@ func (k Keeper) Slash(ctx sdk.Context, addr sdk.ConsAddress, infractionHeight, p | |||
|
|||
// If this is a previously standalone chain and infraction happened before the changeover was completed, | |||
// slash only on the standalone staking keeper. | |||
if k.IsPrevStandaloneChain() && infractionHeight < k.FirstConsumerHeight(ctx) { | |||
if k.IsPrevStandaloneChain(ctx) && infractionHeight < k.FirstConsumerHeight(ctx) { | |||
k.standaloneStakingKeeper.Slash(ctx, addr, infractionHeight, power, slashFactor, stakingtypes.InfractionEmpty) |
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 dig into how exactly consumer chains using the democracy module or other things will populate standaloneStakingKeeper
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 do you mean? That's the staking module with the native token from when the chain was a standalone chain.
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.
LGTM
Description
Allows previously standalone chains to use the already existing transfer channel from the standalone chain
Linked issues
Closes: #782
Epic: #756
Type of change
If you've checked more than one of the first three boxes, consider splitting this PR into multiple PRs!
Feature
: Changes and/or adds code behavior, irrelevant to bug fixesFix
: Changes and/or adds code behavior, specifically to fix a bugRefactor
: Changes existing code style, naming, structure, etc.Testing
: Adds testingDocs
: Adds documentationRegression tests
Existing handshake tests like
TestOnChanOpenAck
New behavior tests
CRUD unit tests, and new integration test in
changeover.go
Versioning Implications
If the above box is checked, which version should be bumped?
MAJOR
: Consensus breaking changes to both the provider and consumers(s), including updates/breaking changes to IBC communication between provider and consumer(s)MINOR
: Consensus breaking changes which affect either only the provider or only the consumer(s)PATCH
: Non consensus breaking changesTargeting
Please select one of the following: