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

appd tendermint show-... silently creates files if they don't exist #8478

Closed
4 tasks
michaelfig opened this issue Jan 29, 2021 · 3 comments · Fixed by #8481
Closed
4 tasks

appd tendermint show-... silently creates files if they don't exist #8478

michaelfig opened this issue Jan 29, 2021 · 3 comments · Fixed by #8481

Comments

@michaelfig
Copy link
Contributor

Summary of Bug

appd tendermint show-... silently creates the home directory and generates a new node-id/validator info/private key if it does not exist. This leads to difficult-to-debug circumstances when run on a different machine or as a different user than the validator node you are attempting to query.

It would be crisper to fail with an error if appd init has not already been run for the home directory.

Version

v0.41.0

Steps to Reproduce

soil:golang michael$ ls -l /tmp/nonexistent
ls: /tmp/nonexistent: No such file or directory
soil:golang michael$ appd --home=/tmp/nonexistent tendermint show-validator
agoricvalconspub1zcjduepq2udl3q5whwppfg0pec546kqa0246fx285qem0hk0vg3ag2um3krqna85yu
soil:golang michael$ ls -l /tmp/nonexistent
total 0
drwx------  4 michael  wheel  128 Jan 29 16:20 config
drwx------  2 michael  wheel   64 Jan 29 16:20 data
soil:golang michael$ 

I would prefer to see:

soil:golang michael$ appd --home=/tmp/nonexistent tendermint show-validator
open /tmp/nonexistent/config/priv_validator_key.json: no such file or directory
soil:golang michael$

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@michaelfig
Copy link
Contributor Author

I have a small patch I'm currently using in v0.41.0...agoric-labs:mfig/v0.41.0

@alexanderbez
Copy link
Contributor

@michaelfig why not submit this as a PR? Does your patch work?

@michaelfig
Copy link
Contributor Author

@michaelfig why not submit this as a PR? Does your patch work?

Works for me, I just wasn't sure if there was a more desirable fix. I'll submit it!

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

Successfully merging a pull request may close this issue.

2 participants