Open pshenmic opened 2 years ago
Remote block height is currently broken in v24, because insight is answering too slow, shall we create another task for fallin back to getchaintips?
Why it works in v0.23 then?
Why it works in v0.23 then?
In v23 there is no client timeout implemented and it simply waits for the response and it can take ages to receive the answer (that is why status command is slow in v23). If the request dropped by timeout with server, the command will throw an error
I'm not sure getchaintips
will help us to indicate that node is not actually syncing. @strophy what do you think?
getchaintips
will usually show if a particular node has at least heard of nodes with a higher block height, but really we should treat insight (and a fallback) as a reliable external source of block height. We should diagnose why insight is replying slowly instead maybe, there has been an update there in the last few weeks.
@strophy According to what you saying the fallback will confuse people because you don't know is it a view from outside or just vision of an isolated node.
In the event of a chain fork, everyone will be trying to figure out if they are on an isolated network or if the insight/fallback data is incorrect because the remote source ended up on a chain fork. I think the best option here in the status command is to provide multiple clearly labeled block heights to help people diagnose errors quickly, and highlight our height in green if matches insight.
Sounds good to me!
Expected Behavior
Dashmate
status
command have info about block height dataCurrent Behavior
It does not show block height data
Possible Solution
Add block height data to the status command. Additionally, the fallback strategy for obtaining best block height should be implemented. Call to the external blockchain explorer is used in dashmate status for obtaining the correct chain for best block height and its used as truth of source. This call can fail, server may be down, or other reasons, and this leads to the command fail as well. Add fallback to the getchaintips dashcore RPC method and mark the information as the local by coloring it in yellow.