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

feat: implement querying for commit hash and proofs #156

Merged
merged 3 commits into from
Mar 25, 2022

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Mar 25, 2022

Context
osmosis-labs/osmosis#1137

Sample Query:

}root@roman-relayer:~# curl -X GET "localhost:26657/abci_query?path=\"%2Fstore%2Fproofs\"&height=3738243" -H "accept: application/json"
{
  "jsonrpc": "2.0",
  "id": -1,
  "result": {
    "response": {
      "code": 0,
      "log": "",
      "info": "",
      "index": "0",
      "key": "cHJvb2Zz",
      "value": "ehl2s43Sj+klwt5pKFjf4/pYvbNKejpT+z3LHILeGMM=",
      "proofOps": {
        "ops": [
          {
            "type": "ics23:simple",
            "key": "ZGlzdHJpYnV0aW9u",
            "data": "CoQCCgxkaXN0cmlidXRpb24SIKx7Dz+kx8ZLy/B4eZJUbtfqEK6p6wmUM8T5VcSTNmshGgkIARgBIAEqAQAiJwgBEgEBGiCgO5TgM6JBoSDQOEkW5flnF/dyAMpRSaut6pVEVTJvqSIlCAESIQGsAfi6pJMSzJaHc+Wjlf20mpYh8OIkbNMoKX88Q0pmACIlCAESIQG1/9gZ/96CAVXCYq6NXTp7lJ913MFPYoGGacnykPepoSInCAESAQEaIEW5aviA028cgbdfSQCmrIWKBOSnbpD4A/4CJKD5R/fuIicIARIBARogNkzkfbC0gqwiknjCkIHw9qQ0QlYi9CW85pmvi69Pdwg="
          },
           ...
        ]
      },
      "height": "3738243",
      "codespace": ""
    }
  }

@p0mvn p0mvn changed the title Implement querying for commit hash and proofs feat: implement querying for commit hash and proofs Mar 25, 2022
@p0mvn p0mvn requested a review from ValarDragon March 25, 2022 17:29
Copy link
Member

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, two minor comments!

@@ -567,19 +570,37 @@ func (rs *Store) getStoreByName(name string) types.Store {
// TODO: add proof for `multistore -> substore`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets update the godoc for the proofs special case?

Copy link
Member Author

@p0mvn p0mvn Mar 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wdym by that exactly? Updating the method comment or anything else?

godoc seems to be deprecated: https://pkg.go.dev/golang.org/x/tools/cmd/godoc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to merge, will update this in another PR if I didn't get it right

Copy link
Member

@ValarDragon ValarDragon Mar 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it just means adding a comment about the function for any exported token.

Theres sites that auto-compile this into a docs site. https://godocs.io/github.com/osmosis-labs/osmosis

store/rootmulti/store.go Outdated Show resolved Hide resolved
@p0mvn p0mvn merged commit 2ed314c into v0.45.0x-osmo-v7 Mar 25, 2022
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

Successfully merging this pull request may close these issues.

2 participants