I'm running a solana node using the solana-validator
command (see Solana docs).
And I'd like to know if my validator is ready to connect to the http/rpc/ws port. What's the quickest way to do check to see if it's synced?
Currently, I'm using wscat
to check to see if I can connect to the websocket, but am unable to. I'm not sure if that's because the node isn't setup right, or it's not synced, etc.
I know if I run solana gossip
I should be able to see my IP in the list that populates... but is that the best way?
Run a curl
command against your node for block height:
curl http://<IP>:<PORT> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getBlockHeight"}'
And you'll get an output like:
{"jsonrpc":"2.0","result":105334870,"id":1}
Compare this to some other node, like a block explorer, and see if you're up to speed.