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

While testing cosmos-sdk, a test cleared my gaia-6002 #1461

Closed
davekaj opened this issue Jun 29, 2018 · 1 comment
Closed

While testing cosmos-sdk, a test cleared my gaia-6002 #1461

davekaj opened this issue Jun 29, 2018 · 1 comment
Assignees
Labels

Comments

@davekaj
Copy link
Contributor

davekaj commented Jun 29, 2018

tests.ExecuteT(t, "gaiad unsafe_reset_all")

tests.ExecuteT(t, "gaiad unsafe_reset_all")

tests.ExecuteT(t, "gaiad unsafe_reset_all")

These three lines call gaiad unsafe_reset_all. It cleared my entire gaia-6002 data.

I think this type of error shouldn't be possible. It is conceivable that a validator on mainnet could accidentally test these tests, clear their blockchain data, and get slashed.

These are the only three places in testing where this command is called

@ValarDragon
Copy link
Contributor

You're right, I'm able to reproduce this locally. We should just change all the commands in the cli_tests to have a different gaiad directory

@ValarDragon ValarDragon self-assigned this Jul 4, 2018
ValarDragon added a commit that referenced this issue Jul 4, 2018
* Makes all cli tests use .test_gaiad, .test_gaiacli instead of the
	same directories as the default binaries
* Abstracts alot of the functionality for setting up the server into
	a single function / file-wide constants. This is to reduce
	code duplication, especially since some of this functionality
	depends on each test setting up the keys in the same way.

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

No branches or pull requests

2 participants