Open stmax82 opened 10 months ago
It appears to be SDK issue
Has the /ready endpoint gotten worse? I use the endpoint in A1CN to know if I need to show the syncing page or the dashboard page. I used to have a timeout on startup to skip the first section of incorrect reporting. It's not ideal, but it worked.
Lately, however, the /ready endpoint has reported that the node is ready after doing a fast catchup but before being fully caught up. There's usually a few thousand blocks that need to be downloaded after a catchup. It used to be that /ready would report that the node wasn't ready while those needed to be downloaded. Now (v3.25.0-stable) /ready reports ready during that final stretch.
Note that I'm not using the SDK. I'm making my own REST calls to the node.
To determine if a node is ready / fully synched I'm calling the python client's ready() function. Internally this is probably making a HTTP GET /ready request.
I noticed that a few seconds after starting the node, ready returns OK instead of status 503. Only after a while it switches to status 503 and then back to OK once it is fully synched.
Here's a python script to reproduce the problem:
To reproduce the problem:
You'll see the following output:
As you can see it incorrectly starts with "node is ready", then switches to "node is not ready, status 503" and finally back to "node is ready".
I also repeatedly ran
goal node status
while the node was starting and it displayed the following (note entry number 4):While the node was starting it shows "Sync Time: 0.0s". The client.ready() returns OK. Only once the sync time starts increasing, the client.ready() returns status 503 (not ready).
Your environment