Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Healthcheck doesn't consider mine-on-demand EVMs #2589

Open
3 tasks done
hellowodl opened this issue Nov 13, 2024 · 1 comment
Open
3 tasks done

Healthcheck doesn't consider mine-on-demand EVMs #2589

hellowodl opened this issue Nov 13, 2024 · 1 comment

Comments

@hellowodl
Copy link

hellowodl commented Nov 13, 2024

Prerequisites

  • Are you running the latest version(s)?
  • Have you searched the documentation for your issue?
  • Did you search for an existing issue or pull request?

Description

The indexer's healthcheck relies on the last time a block was mined.
Though there are various EVMs out there that mine blocks on demand, eg. rollup based chains or local development environments. Thus the current healthcheck doesn't work for all scenarios anymore.

The culprit is this method:

Details

Local Environment: @subql/cli/5.3.0 darwin-arm64 node-v20.18.0
Query Version: v2.15.2 (docker)
Indexer Version: v5.1.7 (docker)
Network Details:

  • Foundry/Anvil

Steps to Reproduce

  1. Deploy an example project with Anvil as the EVM/RPC
  2. Wait for a few seconds
  3. Healthcheck fails

Example project: I can create one on-request, though I don't have the time at the moment.

Expected behavior: The healthcheck preferably should check whether new blocks are mined instead of failing based upon time.

Actual behavior: When no new blocks are created within a certain time, the indexer's health check fails.

If desired I could write a fix. Though I'd like to know whether that is desired and what the desired route of implementation would be from you guys.

@stwiname
Copy link
Collaborator

Hi @hellowodl, thanks for your issue, this issue has been in the back of our mind but not big enough to consider addressing.

The health check is just a best guess that a growing chain is a healthy chain (and therefore a healthy RPC and indexer).

I think we can drop the requirement that the latest height by the RPC needs to grow.

So an unhealthy node is where the current indexing height is < the RPC reported chain height and not increasing within the interval. Otherwise its false.

If you have time to make this change it would be appreciated otherwise we will add it to our backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants