DefiantLabs / cosmos-upgrades

a tool to search for scheduled cosmos upgrades
MIT License
4 stars 2 forks source link

REST Health checks are failing in multiple ways, either fix or eliminate health checks #33

Open pharr117 opened 11 months ago

pharr117 commented 11 months ago

We fail early in the update info workflow by hitting RPC and REST servers to check for health.

We use the following function:

https://github.com/DefiantLabs/cosmos-upgrades/blob/619fed10f32388844c628aa5c58035516528aa88/app.py#L133-L147

The problem is:

  1. Not all REST servers provide a /health endpoint
  2. Not all Chains use the gov module, making the /cosmos/gov/v1beta1/proposals?proposal_status=2 endpoint a bad check (see Noble and NobleTestnet for examples)

We either need to:

  1. Fix the health checks to use a more reliable endpoint
  2. Eliminate health checks entirely and just go straight into the worfklow

Some considerations:

  1. Picking a reliable endpoint will require an endpoint available on ALL chain servers. Module specific endpoints may not be useful here
  2. The health checks are useful in getting a list of healthy servers from the Chain Registry. Sometimes the servers in the Chain Registry API map are not working and unavailable and pre-checking for health lets us pick out proper endpoints to use