Skip to content
Cosmopediaby Unity Nodes
DiscussionsMiscellaneousHow to retrieve latest block height using tendermint rpcForum ↗

How to retrieve latest block height using tendermint rpc

Miscellaneous3 posts543 views1 likesLast activity Apr 2024
IN
IncredibleOP
Apr 2024 1

I am going to set up a new node on mainnet following the steps illustrated in [Join the Cosmos Hub Mainnet | Cosmos Hub ]), while the node is syncing with the mainnet, I would like to retrieve the latest block height synced by the node using tendermint rpc from time to time, I couldn’t figure out how to do it, can someone please help? Thanks! and aslo how to get the seeds and persistent peers details

FR
freak12techno
Apr 2024
  1. curl localhost:26657/status would return latest_block_height field, which is node’s latest block height
  2. curl localhost:26657/block would return the latest block itself.

Replace 26657 with the port your Tendermint RPC is on, if needed.

IN
Incredible
Apr 2024

Hi thank you posting, I am having issues with curl http://127.0.0.1:26657/block
curl: (7) Failed to connect to “127.0.0.1” port 26657 after 0 ms: Connection refused, this is the first time initializing the node using snapshot looks like RPC server is not running, could you help with possible issues ?

← Back to Discussions