-
Notifications
You must be signed in to change notification settings - Fork 132
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 - staking functionalities #794
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>
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. Great work @smarshall-spitzbart
@@ -427,7 +427,7 @@ func New( | |||
authtypes.FeeCollectorName, | |||
) | |||
|
|||
// Setting the staking keeper is only needed for standalone to consumer changeover chains | |||
// Setting the standalone staking keeper is only needed for standalone to consumer changeover chains |
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.
Nomenclature is strange to me, why not just refer to it as Sovereign to Consumer? Or is there a precedent that was decided already for this?
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.
Yea there is a precedent here: #757 (comment). "Sovereign" could make it seem like consumers have no sovereignty
tests/integration/slashing.go
Outdated
suite.consumerChain.NextBlock() | ||
suite.consumerChain.NextBlock() | ||
suite.consumerChain.NextBlock() | ||
suite.consumerChain.NextBlock() | ||
suite.consumerChain.NextBlock() |
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 not just iterate here or write a function to pass time?
func (suite *CCVTestSuite) produceEmptyBlocks(blocks int){
for blocks > 0 {
suite.consumerChain.NextBlock()
blocks--
}
}
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.
"empty blocks" is kind of true since no txs are submitted. But when we do something like this it's usually a sanity check that beginblock/endblock do or do not trigger some code. Reasoning is usually a case by case basis
For loop makes sense tho cb9a1ec
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.
Great work @smarshall-spitzbart! Check my comments
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Description
Implements the decisions about how the main staking methods should be handled for a chain going through a standalone to consumer changeover.
Linked issues
Closes: #781
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
Tests added in
validators_test.go
, integration test added inslashing.go
New behavior tests
Behavior of normal consumer and normal democracy consumer shouldn't be affected
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: