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

tendermint node: show useful error when tendermint has not been initialised #4303

Closed
melekes opened this issue Jan 13, 2020 · 4 comments · Fixed by #4512
Closed

tendermint node: show useful error when tendermint has not been initialised #4303

melekes opened this issue Jan 13, 2020 · 4 comments · Fixed by #4512
Assignees
Labels
T:enhancement Type: Enhancement

Comments

@melekes
Copy link
Contributor

melekes commented Jan 13, 2020

#4286

TMHOME="/Users/daniel/go/src/github.com/tendermint/thome" tendermint node --proxy_app=unix:///Users/daniel/go/src/github.com/kvstore/example.sock

ERROR: 1 error(s) decoding:

* error decoding 'consensus.create_empty_blocks_interval': time: invalid duration 

We should output more useful error instead of ^ for better usability.

@melekes melekes added help wanted good first issue Contributions Welcome!! T:enhancement Type: Enhancement labels Jan 13, 2020
@melekes melekes changed the title tendermint node: useful error when tendermint has not been initialised tendermint node: show useful error when tendermint has not been initialised Jan 13, 2020
@SomeMoosery
Copy link

This would be my first issue but I can take a look into this and see if I can come up with a PR shortly!

@SomeMoosery
Copy link

SomeMoosery commented Jan 16, 2020

#4312 - PR here!

@melekes melekes removed good first issue Contributions Welcome!! help wanted labels Jan 20, 2020
@melekes melekes self-assigned this Mar 2, 2020
@melekes
Copy link
Contributor Author

melekes commented Mar 2, 2020

Question: should we initialize Tendermint instead of showing an error?

pros:

  • users don't have to call tendermint init

cons:

  • potential errors due to misconfiguration (e.g. configuration exists in DIR1, but TM_HOME=DIR2 was used in command line => new configuration created)

@erikgrinaker
Copy link
Contributor

I think we should throw a hard error. Explicit is better than implicit, and this is something that would be done rarely.

melekes added a commit that referenced this issue Mar 2, 2020
Closes #4303

Before:

```
TMHOME="/Users/daniel/go/src/github.com/tendermint/thome" tendermint node --proxy_app=unix:///Users/daniel/go/src/github.com/kvstore/example.sock

ERROR: 1 error(s) decoding:

* error decoding 'consensus.create_empty_blocks_interval': time: invalid duration
```

After:

```
$ TMHOME=/tmp ./build/tendermint node --proxy_app=kvstore
ERROR: failed to create node: Couldn't read GenesisDoc file: open /tmp/config/genesis.json: no such file or directory
```
@mergify mergify bot closed this as completed in #4512 Mar 2, 2020
mergify bot pushed a commit that referenced this issue Mar 2, 2020
Closes #4303

Before:

```
TMHOME="/Users/daniel/go/src/github.com/tendermint/thome" tendermint node --proxy_app=unix:///Users/daniel/go/src/github.com/kvstore/example.sock

ERROR: 1 error(s) decoding:

* error decoding 'consensus.create_empty_blocks_interval': time: invalid duration
```

After:

```
$ TMHOME=/tmp ./build/tendermint node --proxy_app=kvstore
ERROR: failed to create node: Couldn't read GenesisDoc file: open /tmp/config/genesis.json: no such file or directory
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T:enhancement Type: Enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants