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

Easier way to kill genesis for dev purposes #157

Closed
rigelrozanski opened this issue Jul 6, 2017 · 8 comments
Closed

Easier way to kill genesis for dev purposes #157

rigelrozanski opened this issue Jul 6, 2017 · 8 comments
Labels
T:Docs Changes and features related to documentation.

Comments

@rigelrozanski
Copy link
Contributor

Just wish there was a better way than calling rm -rf ~/.basecoin if I need a new genesis - OR if the genesis file has changed. It doesn't make sense to include this in unsafe_reset_all based on tendermint/tendermint#571 wondering if it should be a hidden option in the Makefile with a tiny bit of logic: if $BCHOME exists use rm -rf $BCHOME otherwise rm -rf ~/.basecoin... not sure

@ethanfrey
Copy link
Contributor

I just use rm -rf $BCHOME, and basecli does have a reset_all to wipe it all out.

I know bucky doesn't like ever deleting genesis and config from tendermint. I don't really care.

Add a special basecoin command if you want and PR it. Or talk more with Bucky.

@zramsay
Copy link
Contributor

zramsay commented Aug 1, 2017

i'm a big fan of a clean command that defaults to mostly clean for dev purposes & additional cleaning via flags for nuke purposes

@ethanfrey
Copy link
Contributor

There is a basecoin unsafe_reset_all command. At one time it cleaned everything up. Then @ebuchman complained, saying it must only remove the state of the chain (blocks, wal, etc) and not touch the genesis file.

Since then I have been afraid of ever deleting the genesis file with any command. Please talk to @ebuchman and clarify an approach he would accept.

On the app I developed, basecli reset_all will wipe out everything, including keys, basecli init --force-reset will reinitialize all data, but not touch the keys. Both of which seem very usable for me. I am a supporter of this, but as said, bucky must agree.

@ebuchman
Copy link
Member

ebuchman commented Aug 2, 2017

I'm happy to have a command for wiping everything, and I don't have much opinion. The only opinion I'd enforce is consistency. If tendermint has a command unsafe_reset_all, and basecoin has the same command, the semantic effect should be identical - ie. reset all state to genesis. If you want to add unsafe_clear_all, or unsafe_delete_all or whatever, that's fine by me. could be unsafe_reset_all --delete ... don't care too much, anything that makes sense is fine, so long as we are consistent

@ethanfrey
Copy link
Contributor

Okay, @zramsay @rigelrozanski it's on you. Tell me what command you want to do this, and I'll do it (or rigel can just do it). Happy to close this issue.

@rigelrozanski
Copy link
Contributor Author

I'm fine to just continue using rm -rf for dev purpose. Alternatively we should keep the existing commands as is and include an alternative hidden dev command wipe_all which would kill everything including genesis

@ethanfrey
Copy link
Contributor

Nice idea with the hidden command Rigel.

Like the hidden trust node flag

@ethanfrey ethanfrey added the 0.7 label Aug 20, 2017
@zramsay zramsay added the T:Docs Changes and features related to documentation. label Aug 22, 2017
@jaekwon jaekwon removed the 0.7 label Jan 14, 2018
@ebuchman
Copy link
Member

stale, but also relevant for #324

ParthDesai pushed a commit to ChorusOne/cosmos-sdk that referenced this issue Apr 19, 2021
alexanderbez pushed a commit that referenced this issue Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T:Docs Changes and features related to documentation.
Projects
None yet
Development

No branches or pull requests

5 participants