-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
79b00d9
to
d2209bb
Compare
373a27b
to
490d897
Compare
Let's chat Monday so I can better understand the reasoning behind it, so I can review properly. I agree we need to make some changes here, just want to make them clean. |
@ethanfrey checkout its usage here: https://github.com/tendermint/trackomatron/blob/master/cmd/trackocli/proof.go |
Notes from the chat... Should invert the flow a bit more to allow registering custom flags for queries... One point is commands/common.go: GetCertifier() as a way to get common objects from command flags. Get by primary key is very different than lists by provability. Let's add a new subcommand to trackocli to test this stuff...
And experiment there on how to prove it. |
How to prove a list?
|
Address individual get queries (not lists): They sometimes have attributes, like Plugin needs to have full access to register it's own command. |
Checkout some code! I've added |
Okay, I think this needs a bash test. But from the review, I am confused by the flow. This is mainly due to my convoluted scheme to start with that you extended.... in
in https://github.com/tendermint/trackomatron/blob/master/cmd/trackocli/proof.go#L14 In https://github.com/tendermint/trackomatron/blob/master/commands/query.go#L339-L359 This works, but seems way too complex. And basically cuz you didn't want to rip apart my convoluted system. |
I want to make a proposal... let's see if I have time. |
Okay, I made a new branch Please just register the You can use this as a basis for all your query subcommands:
|
I think that is less boiler-plate and less confusing than the current approach. And you have full control of the command parsing. I register All other query subcommand names belong to your app. |
The only flag that |
With regards to your first comment that references code from trackomatron, be aware that the reason The code that you've described in your second comment will generate unnecessary code duplication. I've reduced the abstraction as much as possible within the latest commit - When I reflect it's really only one layer of abstraction more complex than the code you presented... pretty straight forward/clean, but yeah slightly more confusing than your example but eliminates unnecessary code dup. Lastly, your code updates all look good, I fully support removing the Presenters, doesn't make sense when you can have the app deal with it! |
Proofsubcmd ethan
Alright revised trackotron plan based on our conversion: Consolidate query and transactions into the light client, add the whole light client command as a subcommand of the full server node - This should make the codebase more digestible - this code dup issue becomes non-existent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I am happy with how it turned out.
Very productive conversations on design. Looking to get this cli in tip-top state :)
This is equivalent to RegisterQuerySubcommand within the heavy client, allows a space to have custom plugin proofs for custom flags and more complex responses.
Closes #13