tendermint / light-client

DEPRECATED: A light client for tendermint, supporting signatures, proofs, and validation (see github.com/tendermint/tendermint/lite)
Other
17 stars 9 forks source link

Plugins don't need proof state get in the CLI #27

Closed rigelrozanski closed 7 years ago

rigelrozanski commented 7 years ago

It would be nice for a plugin to be able to not include the proof state get functionality as a part of the CLI. If the CLI is writting it's own query functions on top of this the get function becomes obsolete/confusing to the user to have this function exposed in the CLI.

Notes: the engine within this get command is still vital - we need it to power custom plugin query functions in the light-cli. Additionally I don't think it should be removed all together, because some simple plugins which don't need custom query functionality should be able to quickly bootstrap some query functionality as a part of proof state get so it's still good to have kicking around I reckon.

ethanfrey commented 7 years ago

Right now it is proof state get --app=XXX to specify which custom query.

I would move it to query state --app=XXX at the least. Maybe query state for raw binary proofs and query [app] for custom logic?

rigelrozanski commented 7 years ago

Okay, so we will have query app (for custom app logic) query state and query tx, I think we need the option for a plugin to not include CLI commands for query state or query tx if the plugin query app custom functions cover them

ethanfrey commented 7 years ago

I think it is query tx and query key now. tx should be general for all apps, lookup by hash, which is the only way possible in the current tendermint indexer (not app-specific).

I could make both of these subcommands not auto-registered, but force the programer to explicitly register them in the main.go file? I think it is a bit more work, but it is also a bit more explicit, which is good.

I have a mixed opinion. But it is only a few lines. I guess I'll just do it, since you are using this rapi more, and if it makes your life easier, why not?

ethanfrey commented 7 years ago

Resolved in commit 183f2f731f6d0fd517d8866e55d27d095727c407