cosmos / cosmjs

The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.

Home Page:https://cosmos.github.io/cosmjs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing earliest block in RPC sync info

livthomas opened this issue · comments

Cosmjs only parses the following fields from sync_info record returned by /status RPC method:

  • catching_up
  • latest_app_hash
  • latest_block_hash
  • latest_block_height
  • latest_block_time

But there are also other fields present in sync_info which are not processed by cosmjs:

  • earliest_app_hash
  • earliest_block_hash
  • earliest_block_height
  • earliest_block_time

Steps to Reproduce

  1. Try to hit /status endpoint on any public RPC node (e.g. https://cosmos-rpc.rockrpc.net/status).
  2. See what fields are returned within result.sync_info.
  3. Look at RpcSyncInfo interface in both tendermint34 and tendermint37 adaptors.

Thank you for bringing this up. Sounds like a straight forwards addition to the tendermint-rpc packet. Do you want to work on a PR for that?

Yes, I'm already working on it.

Done in #1449