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

Make --state-root-hash optional and query the newest one automatically when not provided #79

Open
hoffmannjan opened this issue Jun 23, 2023 · 4 comments
Assignees

Comments

@hoffmannjan
Copy link
Contributor

hoffmannjan commented Jun 23, 2023

For example when I'm running casper-client get-dictionary-item the --state-root-hash is required which sometimes is kind of irritating that I need to get the newest one by running another command.
We can make it optional and let the user know what happens under the hood.
Make sense @darthsiroftardis @Fraser999 @bpr ? :)

@RitaMAllenCA
Copy link

RitaMAllenCA commented Jun 26, 2023

after some discussion, the engineering team is not aligned on doing this work. The objective is to remove the awkward way we currently get info out of the client. This was one idea - we will meet to propose alternatives.

@hoffmannjan
Copy link
Contributor Author

hoffmannjan commented Jul 6, 2023

As discussed with @bpr I checked all the methods and listem them below:

  • this methods rely on block-identifier and as help says if not provided the last block added to the chain as known at the given node will be used - so we can consider them as user-friendly

    • get-block
    • get-block-transfers
    • list-deploys
    • get-era-summary
    • get-account
    • get-auction-info
  • this methods requires state-root-hash or block-identifier- maybe we can as well use the last state-root-hash or last block-identifier if arguments won't be provided?

    • query-global-state
    • query-balance
  • this method requires only state-root-hash - maybe we can as well use the last state-root-hash if argument won't be provided?

    • get-dictionary-item

@hoffmannjan
Copy link
Contributor Author

can't solve in 1.X, can be solved in 2.0 cc: @darthsiroftardis

@MParlikar
Copy link

The casper-client is inconsistent, for the time being, I want to fix the 3 inconsistent end points and provide the state root hash in the response, to avoid confusion. With 2.0, and update to the client will be required once the RPC is changed. Please proceed with the modifications.

@RBYGLLS RBYGLLS assigned gRoussac and unassigned hoffmannjan and ACStoneCL Jan 23, 2024
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

No branches or pull requests

5 participants