-
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
R4R: module inter-dependency cleanup #3621
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3621 +/- ##
===========================================
- Coverage 60.99% 60.91% -0.09%
===========================================
Files 187 188 +1
Lines 14069 14084 +15
===========================================
- Hits 8582 8579 -3
- Misses 4943 4961 +18
Partials 544 544 |
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.
These changes seem reasonable to me, but I wonder if we should start using subpackages in types/
for generic types or functions associated with modules - e.g. for the staking code for default denomination & power conversions - the types/
package is pretty wide-ranging at the moment.
@rigelrozanski maybe in a followup PR? This is getting pretty big already. |
|
||
// return all delegations used during genesis dump | ||
// TODO: remove this func, change all usage for iterate functionality | ||
func (k Keeper) GetAllSDKDelegations(ctx sdk.Context) (delegations []sdk.Delegation) { |
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 do we have SDK
in this function name?
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.
Any suggestions for alternative names? I agree this is less than ideal - however I've marked this function for removal (while addressing #3386) so I'm not too too concerned about getting it perfect. Basically, this function is the same as GetAllDelegations
except returning in sdk.Delegation
instead os staking.Delegations
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 except for the GetSDK*
function names, not sure what it should be called, but I don't think we should have SDK in the method/function sigs.
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 👍
Looks like there is a conflict here @rigelrozanski. Also read through this in detail and it didn't appear to have anything breaking. Can you confirm thats the case? |
@jackzampolin the only thing which is api breaking is the rename from There are no state-machine breaking changes |
Awesome! Thank you for the rebase @rigelrozanski |
This is preperation PR for #2935 which effectively moves invariance checks from simulation testing to core functionality. As a part of this I wanted to remove inter-module dependencies (sometimes we've been more lax when it comes to testing). During this process I also noticed that outside of testing there were intermodule dependencies, so I took the liberty of clearing these up - as a part of this introducing some new expected keepers within modules which lacked that design.
Notes on where I attempted to remove inter-dependency:
_test
filesThere is still more cleanup due (see above points!) - but this PR is a good first step in de-spagetting the modules
REF: #3556
docs/
)PENDING.md
with issue #Files changed
in the github PR explorerFor Admin Use: