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

output of ibc client consensus-states can't be correlated with /commit?height #190

Closed
3 tasks
randomshinichi opened this issue May 24, 2021 · 0 comments · Fixed by #192
Closed
3 tasks

Comments

@randomshinichi
Copy link

randomshinichi commented May 24, 2021

Summary of Bug

It is important that the root hash appears the same as something in curl localhost:26657/commit?height=70

The block heights in this example output are not the same but you can see that the string representation of the hashes are different, according to @colin-axner at https://discord.com/channels/669268347736686612/669275066919288853/841984105885073438

$ gaiad q ibc client consensus-states 07-tendermint-0 --node tcp://localhost:26557
consensus_states:
- consensus_state:
    '@type': /ibc.lightclients.tendermint.v1.ConsensusState
    next_validators_hash: 3148339C61255AE1A98DA1B6B62F57C6FA7EAD063CAB0A8C6CCD7FD8D2AAE4CD
    root:
      hash: Y+2dLM/uuJ3lxpp90e8MonDvn+PfwMwWmodwroQLys4=
    timestamp: "2021-05-22T17:40:32.277958269Z"
  height:
    revision_height: "52"
    revision_number: "0"
- consensus_state:
    '@type': /ibc.lightclients.tendermint.v1.ConsensusState
    next_validators_hash: 3148339C61255AE1A98DA1B6B62F57C6FA7EAD063CAB0A8C6CCD7FD8D2AAE4CD
    root:
      hash: Ma/zINnVxIcxRPSBilxyzpjzCwxenAR6GCckVI2eu8o=
    timestamp: "2021-05-22T17:40:36.349481639Z"
  height:
    revision_height: "56"
    revision_number: "0"
- consensus_state:
    '@type': /ibc.lightclients.tendermint.v1.ConsensusState
    next_validators_hash: 3148339C61255AE1A98DA1B6B62F57C6FA7EAD063CAB0A8C6CCD7FD8D2AAE4CD
    root:
      hash: +TIkydiT1bCLfz0qO+KQGdflktwXYEMz7WcIbluOyJg=
    timestamp: "2021-05-22T17:40:42.465748418Z"
  height:
    revision_height: "62"
    revision_number: "0"
- consensus_state:
    '@type': /ibc.lightclients.tendermint.v1.ConsensusState
    next_validators_hash: 3148339C61255AE1A98DA1B6B62F57C6FA7EAD063CAB0A8C6CCD7FD8D2AAE4CD
    root:
      hash: hTSQ2v5IatDGFvc7oet1rPVTQG+vhL+LpeGHrGM0q+A=
    timestamp: "2021-05-22T17:40:46.540158237Z"
  height:
    revision_height: "66"
    revision_number: "0"
- consensus_state:
    '@type': /ibc.lightclients.tendermint.v1.ConsensusState
    next_validators_hash: 3148339C61255AE1A98DA1B6B62F57C6FA7EAD063CAB0A8C6CCD7FD8D2AAE4CD
    root:
      hash: CAqL92EzczlhNIFVA31nEJTV0Vf0/IamXiwHCEMfhls=
    timestamp: "2021-05-22T17:40:52.654294222Z"
  height:
    revision_height: "72"
    revision_number: "0"
- consensus_state:
    '@type': /ibc.lightclients.tendermint.v1.ConsensusState
    next_validators_hash: 3148339C61255AE1A98DA1B6B62F57C6FA7EAD063CAB0A8C6CCD7FD8D2AAE4CD
    root:
      hash: Iqx2xnu8y/2sQ6g7EKfpkBw/YxPiS3NDksYNJhKzXtQ=
    timestamp: "2021-05-22T17:40:56.725723594Z"
  height:
    revision_height: "76"
    revision_number: "0"
pagination:
  next_key: null
  total: "0"
$ curl localhost:26657/commit?height=70
{
  "jsonrpc": "2.0",
  "id": -1,
  "result": {
    "signed_header": {
      "header": {
        "version": {
          "block": "11"
        },
        "chain_id": "wasmdlocal",
        "height": "70",
        "time": "2021-05-22T17:06:24.945921498Z",
        "last_block_id": {
          "hash": "BFD79481181393C07624680CB2FFCF98FC0CA13A810EAEDAF99EEE117530E2C3",
          "parts": {
            "total": 1,
            "hash": "BF7E0BC1DCC70D6F88522F5E941E8CE0A9F8FFF2623CB346E0DBA8419F13D8CF"
          }
        },
        "last_commit_hash": "0871E3E26E359B8C86E72D205A8A609EA9E369DDEAF348ADC94B1AE1F78E2309",
        "data_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        "validators_hash": "B27189A358F6D20965B1BC2CF47564EF2A9B5D6A2C0D6CB7BE1F922BE39110E9",
        "next_validators_hash": "B27189A358F6D20965B1BC2CF47564EF2A9B5D6A2C0D6CB7BE1F922BE39110E9",
        "consensus_hash": "048091BC7DDC283F77BFBF91D73C44DA58C3DF8A9CBC867405D8B7F3DAADA22F",
        "app_hash": "2AD963954E56AD5055D66D1D92D19CBEA6FF65A1DF246F13293C5548B6974691",
        "last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        "evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
        "proposer_address": "2A4AEFBCD5934C1C7D80540822CC978DDE7BBF89"
      },
      "commit": {
        "height": "70",
        "round": 0,
        "block_id": {
>>>>>>>>> "hash": "78AD39C7DBB0C28AA1DD4DBF909E8FC37522CAB177484871AB3FBD18B2F165B4", <<<<<<<<<<<<<<<<
          "parts": {
            "total": 1,
            "hash": "0292B8FC1A1FC2862699AD0CC33AEB5719DC183EA04705C1D4C8F01C0ABAD3E2"
          }
        },
        "signatures": [
          {
            "block_id_flag": 2,
            "validator_address": "2A4AEFBCD5934C1C7D80540822CC978DDE7BBF89",
            "timestamp": "2021-05-22T17:06:29.957359812Z",
            "signature": "RsbFvAANBPXdeGYHwBZsHUeHU/uJzWNWrbQ5UZa1lsUTpKALUPdTTnBwRjvnpbX44z3oH1RefHup+ZPjOf2UDQ=="
          }
        ]
      }
    },
    "canonical": true
  }

Version

gaiad version 4.2.1

Steps to Reproduce

gaiad q ibc client consensus-states 07-tendermint-0 --node tcp://localhost:26557
curl localhost:26657/commit?height=...
The block hashes should have the same representation.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
faddat referenced this issue in notional-labs/ibc-go Feb 23, 2022
CosmosCar pushed a commit to caelus-labs/ibc-go that referenced this issue Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants