Skip to content
This repository has been archived by the owner on Jul 6, 2018. It is now read-only.

Add query flags to light client #13

Closed
rigelrozanski opened this issue May 2, 2017 · 8 comments
Closed

Add query flags to light client #13

rigelrozanski opened this issue May 2, 2017 · 8 comments

Comments

@rigelrozanski
Copy link
Contributor

For consistency I believe it makes sense to include a light client (tmcli and basecli) query command which can be accessed in a similar way to in the native applications... Is there not a way to currently do this already? If so, let me know here, but yeah nonetheless still makes sense to include as a second level command beside tx

@ethanfrey
Copy link
Contributor

There is a command called "proof", which does what query does. Plus like 3 levels of cryptogrpahic checks before accepting any answer.

There should be no functionality in light-client that trusts an answer without proof. Or course there is a little now, but as the rpc advances that should drop to 0, so people can build on it and just trust the results.

Is that a good enough answer? Or is there something I am missing?

@rigelrozanski
Copy link
Contributor Author

Okay so right now basecli proof has state get, how would one query an account using this? Are we just missing a bit of functionality to query an account from state, which might be in the form state get account which would add the state key automatically to the presented hex account? Makes sense?

@ethanfrey
Copy link
Contributor

I think I did this... basecli proof state get --app=account --key=deadbeef or something like this.

Let's talk about this

@ethanfrey
Copy link
Contributor

No complaints after this explanation, closing issue.

@rigelrozanski
Copy link
Contributor Author

HEY! I've got some complaints... I think that we need the ability to add flags to the query command, not sufficient to not be able to query without flags, with the trackomatron plugin, I need the ability to query for specific lists of profiles, The only way I know of to query right now through the light cli would be to do something like

basecli proof state get --app=account --key=$ME

I can add a new presenter which will enable new unmarshalling structs under app, but this doesn't allow me to add modifiers to how information should be queried... any ideas? I'm thinking we proof to be more versatile for plugins like txs currently is... thoughts?

@rigelrozanski rigelrozanski reopened this Jun 2, 2017
@rigelrozanski
Copy link
Contributor Author

rigelrozanski commented Jun 2, 2017

Check out the complexity of the query functionality I need: definitely need options above simply providing the key to query... mostly surrounds querying lists of profiles or invoices
https://github.com/tendermint/trackomatron/blob/master/cmd/tracko/commands/query.go

@rigelrozanski rigelrozanski changed the title query command Add query flags to light client Jun 2, 2017
@rigelrozanski
Copy link
Contributor Author

Another, note it might actually be okay, an light-client application will just need to build its own query commands which call a loop of proof state get for making more complex queries... Will test out, leave this issue open until this is successfully resolved. ALSO this all changes if a reimplementation of basecoin includes batch queries

@ethanfrey
Copy link
Contributor

Bigger refactor on all the query stuff and now addressed by changes in pr #21

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

No branches or pull requests

2 participants