Readiness status of the fullnode
GET/p2p/readiness
Returns 200 if the fullnode should be considered ready from the perspective of the sync mechanism.
Returns 503 otherwise. The response will contain the reason why it is not ready in this case.
We currently check 2 things for the readiness:
- Whether the fullnode has recent block activity, i.e. if the fullnode has blocks with recent timestamps.
- Whether the fullnode has at least one synced peer
It's possible to customize the behavior of this endpoint by tweaking what should be considered recent activity. See the setting P2P_RECENT_ACTIVITY_THRESHOLD_MULTIPLIER and the comment above it in hathor/conf/settings.py for more info.
Responses
- 200
- 503
Ready
- application/json
- Schema
- ready
Schema
any
Ready
{
"success": true
}
Not Ready
- application/json
- Schema
- no_recent_activity
- no_synced_peer
Schema
any
Node with no recent activity
{
"success": false,
"reason": "Node doesn't have recent blocks"
}
Node with no synced peer
{
"success": false,
"reason": "Node doesn't have a synced peer"
}
Loading...