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.
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/genutilsshould really be renamed tox/gentxx/genutilshas 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/genaccountsmodules 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. |
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/initas well as other genesis code scallywaggered intocmd/gaia/app/genesis.gohas been refactored into two new modules which fit the high level module pattern and thus are initialized like modules:x/genaccountsx/genutilAlso 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/genutilorx/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 changedin the github PR explorerFor Admin Use: