polytope-labs / hyperbridge

Hyperbridge is a hyperscalable coprocessor for verifiable, cross-chain interoperability
https://docs.hyperbridge.network/
Apache License 2.0
107 stars 33 forks source link

Fix truncated block hash in ismp_queryEvents* #260

Closed seunlanlege closed 1 month ago

seunlanlege commented 1 month ago

Before

{
  "jsonrpc": "2.0",
  "result": {
    "0x265c…399d": [ // display
      {
        "meta": {
          "block_hash": "0x265c08d74ad68963d7b236cf7dab5ec3a1205b3c0195ad000e3786694470399d",
          "transaction_hash": "0x8a15927e7f9c53b653772e561fdba806ad6cb619959eac75587a6262d2e4f6c8",
          "block_number": 821396
        },
        "event": {
          "StateMachineUpdated": {
            "state_machine_id": {
              "state_id": "BSC",
              "consensus_state_id": "BSC0"
            },
            "latest_height": 42174000
          }
        }
      },
      {
        "meta": {
          "block_hash": "0x265c08d74ad68963d7b236cf7dab5ec3a1205b3c0195ad000e3786694470399d",
          "transaction_hash": "0x954229bd5e8e653999f26abc9c02ce7f171e4f9935c149b46c0201c6cb82cccd",
          "block_number": 821396
        },
        "event": {
          "PostRequest": {
            "source": "BSC",
            "dest": "ETHE",
            "nonce": 2501,
            "from": "0x8e4ca395cfaa033a71fc618792fce99106633b90",
            "to": "0x8e4ca395cfaa033a71fc618792fce99106633b90",
            "timeout_timestamp": 1721249124,
            "body": "0x68656c6c6f2066726f6d20425343"
          }
        }
      },
      {
        "meta": {
          "block_hash": "0x265c08d74ad68963d7b236cf7dab5ec3a1205b3c0195ad000e3786694470399d",
          "transaction_hash": "0x954229bd5e8e653999f26abc9c02ce7f171e4f9935c149b46c0201c6cb82cccd",
          "block_number": 821396
        },
        "event": {
          "PostRequestHandled": {
            "commitment": "0x61895cd35a71ca4552c6d995408ccab270e0da7c4c911aa2abba7771ee84871a",
            "relayer": "0x588177cf191e890d83b10e9653cfd663c8a382d5afce8518636dd9565c22a631"
          }
        }
      }
    ]
  },
  "id": 38
}

After

{
  "jsonrpc": "2.0",
  "result": {
    "0x265c08d74ad68963d7b236cf7dab5ec3a1205b3c0195ad000e3786694470399d": [ // debug
      {
        "meta": {
          "block_hash": "0x265c08d74ad68963d7b236cf7dab5ec3a1205b3c0195ad000e3786694470399d",
          "transaction_hash": "0x8a15927e7f9c53b653772e561fdba806ad6cb619959eac75587a6262d2e4f6c8",
          "block_number": 821396
        },
        "event": {
          "StateMachineUpdated": {
            "state_machine_id": {
              "state_id": "BSC",
              "consensus_state_id": "BSC0"
            },
            "latest_height": 42174000
          }
        }
      },
      {
        "meta": {
          "block_hash": "0x265c08d74ad68963d7b236cf7dab5ec3a1205b3c0195ad000e3786694470399d",
          "transaction_hash": "0x954229bd5e8e653999f26abc9c02ce7f171e4f9935c149b46c0201c6cb82cccd",
          "block_number": 821396
        },
        "event": {
          "PostRequest": {
            "source": "BSC",
            "dest": "ETHE",
            "nonce": 2501,
            "from": "0x8e4ca395cfaa033a71fc618792fce99106633b90",
            "to": "0x8e4ca395cfaa033a71fc618792fce99106633b90",
            "timeout_timestamp": 1721249124,
            "body": "0x68656c6c6f2066726f6d20425343"
          }
        }
      },
      {
        "meta": {
          "block_hash": "0x265c08d74ad68963d7b236cf7dab5ec3a1205b3c0195ad000e3786694470399d",
          "transaction_hash": "0x954229bd5e8e653999f26abc9c02ce7f171e4f9935c149b46c0201c6cb82cccd",
          "block_number": 821396
        },
        "event": {
          "PostRequestHandled": {
            "commitment": "0x61895cd35a71ca4552c6d995408ccab270e0da7c4c911aa2abba7771ee84871a",
            "relayer": "0x588177cf191e890d83b10e9653cfd663c8a382d5afce8518636dd9565c22a631"
          }
        }
      }
    ]
  },
  "id": 38
}