-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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/Genesis Generalization #4159
Conversation
d67d665
to
a45a6f3
Compare
ACK modulo ensuring any API-breaking changes are included before a release is cut |
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.
Re-reviewed this again. Generally happy with the approaches taken thus far. Although I still cannot settle with the fact that x/genutils
and x/genaccounts
are primary modules (@cwgoes voiced valid concerns here). I really do think this warrants further discussion. Namely, the following:
x/genutils
should really be renamed tox/gentx
x/genutils
has a hodgepodge of commands inx/genutils/client
. I recommend only keeping the gentx related commands and moving the rest to commands undergaia/cmd/*
.
- Both the
x/genutils
(x/gentx
) andx/genaccounts
modules should really be sub-modules/packages underx/auth
. Vesting accounts doesn't really change this because that will eventually be abstracted away (somehow).
I'll be more than happy to make a PR targeted against this PR with the changes I recommended (given that they're agreed upon).
Regardless of my objections here, I don't think this should be merged prior to @jaekwon taking at least a glimpse at this PR.
okay so, I disagree with are moving some of the “util” commands back into gaia (namely, ValidateGenesis, and Init should be common importable code by other modules - however I think it’s fine is testnet live in gaia). So I suppose we could further separate out RE: Also I do not believe that we should be using sub-modules. |
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.
ACK 🎉
b93f077
to
2bc901b
Compare
2ba6c00
to
dc320a3
Compare
550ebdd
to
e7f9c5a
Compare
… into rigel/genesis-generalization3
closes #3006
REF affects #3976
Previously reviewed (now closed) PRs on this code: #4033 #4128 #4208
Followup PR: #4296
Followup issues: #4297 #4298 #4299
A good place to start reviewing is from the high level pattern structs defined and described in:
cosmos-sdk/types/module.go
Lines 1 to 21 in 2053b83
from here it's important to see how this implementation drastically simplifies
cmd/gaia/app/
as well asgaiad
(client simplification on the way see followup PR: #4296 - the followup shouldn't block this PR p.s.)Initialization logic previously located in
app/init
as well as other genesis code scallywaggered intocmd/gaia/app/genesis.go
has been refactored into two new modules which fit the high level module pattern and thus are initialized like modules:x/genaccounts
x/genutil
Also worth mentioning that nearly all of the existing testing has been preserved however due to some of the jimmyshimming of original test locations, they have now been moved out from gaia and into the appropriate modules test files (in
x/genutil
orx/genaccounts
).There is a lot of refactoring and improvements to code-organization in this PR - please feel free to ask all dumb questions as to why specific things have been moved - there is a justification for every little move in here.
docs/
)sdkch add [section] [stanza] [message]
Files changed
in the github PR explorerFor Admin Use: