-
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: Broken-Invar Tx - aka. Crisis module #3656
Conversation
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 the spec, some notes. I think we should keep this as simple as possible initially.
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 @rigelrozanski - structure is mostly solid I think; see comments.
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.
Just a few comments on the code 👍
Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>
@cwgoes I've added in usage of all the invariants from the crisis module instead of the previously restrictive list: cosmos-sdk/cmd/gaia/app/invariants.go Lines 19 to 26 in 148d21e
Now a bunch of import/export tests fail in distribution. Notably here is a fast/simple failing test:
|
ReferenceCountInvariant = keeper.ReferenceCountInvariant | ||
CreateTestInputDefault = keeper.CreateTestInputDefault | ||
CreateTestInputAdvanced = keeper.CreateTestInputAdvanced | ||
TestAddrs = keeper.TestAddrs |
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 is TestAddrs
? Anything pertaining to tests?
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.
yes, they are predefined addresses to test with.
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.
In that case I don't think they should be defined or set here.
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.
Could you be more specific? How better should this be organized?
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.
I just don't think they should be set or defined in "core" code. i.e. keep them in tests files or test utilities.
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.
so this is defined in a "test" file (aka keeper/test_common.go
) I'm kinda peeved at all the code dup between the this test_common.go file across all the modules... but maybe it's worth refactoring into a new testing utilities package like x/testing_utilities
- what you think of that?
Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>
ReferenceCountInvariant = keeper.ReferenceCountInvariant | ||
CreateTestInputDefault = keeper.CreateTestInputDefault | ||
CreateTestInputAdvanced = keeper.CreateTestInputAdvanced | ||
TestAddrs = keeper.TestAddrs |
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.
I just don't think they should be set or defined in "core" code. i.e. keep them in tests files or test utilities.
af03c33
to
5db5051
Compare
ACK though see comment at https://github.com/cosmos/cosmos-sdk/pull/3999/files#r270145744 |
This PR also introduces
gaiad assert-invariants-blockly
closes #2935
offshoot-issue #3967
docs/
)PENDING.md
with issue #Files changed
in the github PR explorerFor Admin Use: