Skip to content
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

Make init command more customizable #878

Closed
rigelrozanski opened this issue Apr 18, 2018 · 7 comments · Fixed by #889
Closed

Make init command more customizable #878

rigelrozanski opened this issue Apr 18, 2018 · 7 comments · Fixed by #889
Assignees
Labels

Comments

@rigelrozanski
Copy link
Contributor

Currently the init command (within server/init.go) is quite restrictive - you cannot add new flags, pretty much the only thing you can do is pass in a function which is used to populate the the genesis config file. For gaia for instance, I would like to have the init command take certain options to allow for various numbers validators being created in the genesis config. Additionally it would be useful to be able to specify the addresses that may have tokens in them and how much tokens... For these reasons and more I think we need to totally reconfigure the init command and create something much more customizable which the app.go file can import and extend/modify with functions.

The ability to create a much more streamlined init process should be able to greatly ease some of the annoyances with testnet setup as well.

@adrianbrink @cwgoes @ebuchman

@rigelrozanski
Copy link
Contributor Author

rigelrozanski commented Apr 18, 2018

related to #709, #241

@rigelrozanski rigelrozanski self-assigned this Apr 20, 2018
@MikeSofaer
Copy link

MikeSofaer commented Apr 20, 2018

I think that by default init should not create a genesis.json. Creating one is not a standard production use case and should require an explicit option.

@MikeSofaer
Copy link

I think init should create an output file that can be sent to a maintainer to help construct a genesis.json. So init.json should look like

{ address: "ADDR", public_key: "PUB_KEY", public_ip: "PUB_IP", node_id: "NODE_ID" }

In this way everyone can run init before the launch meeting and send in the init.json and the genesis.json and peers/ips config file can be sent out in advance.

@rigelrozanski
Copy link
Contributor Author

@MikeSofaer yeah I was thinking something similar to the init.json file - the situation which creates the full on genesis.json is useful for single-node testing and can be set by a flag, but I agree that the default functionality should be constructed for the test-net situation

  • I'm thinking of including init as a part of baseapp and have it be infinitely extendable/modifiable by your application

@cwgoes
Copy link
Contributor

cwgoes commented Apr 20, 2018

I like the idea of a command designed specifically for production workflow - but I think we should keep the simple init functionality which writes everything required for start - really useful for simple testing.

Perhaps we could rename the current init functionality unsafe_init.

@rigelrozanski rigelrozanski mentioned this issue Apr 20, 2018
4 tasks
@rigelrozanski
Copy link
Contributor Author

I like the idea of having it all in one command - init for testing where it does write the files is good as a flag. But it doesn't really matter can be different for each Application

@kidinamoto01
Copy link
Contributor

in the staking module the default token for staking is steak,

const stakingToken = "steak"

we should make the genesis file consistent with design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants