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

[Feature]: Have a way to fetch halt-height from the node API somehow #19032

Closed
freak12techno opened this issue Jan 11, 2024 · 4 comments · Fixed by #19043
Closed

[Feature]: Have a way to fetch halt-height from the node API somehow #19032

freak12techno opened this issue Jan 11, 2024 · 4 comments · Fixed by #19043

Comments

@freak12techno
Copy link
Contributor

Summary

Would be lovely if there would be a way to get the halt-height of a specific node via the API it exposes (either via LCD or Tendermint/CometBFT API)

Problem Definition

I am developing an exporter called https://github.com/QuokkaStake/cosmos-node-exporter.
It is designed for node runners/validators as a source of data to build alerts on metrics from chain/node, such as: whether there are upcoming upgrades, whether the voting power is above 0, etc.
It takes data from multiple sources, such as filesystem, Github and the node APIs.

One of the really useful alerts I have for myself is alert that will fire once there are less than 30 minutes before the upcoming upgrade.
This works for governance upgrades, but sometimes the chain developers decide to coordinate a chain halt so everybody would set a halt-height and stop the chain, then upgrade their nodes and restart their binaries with the new ones. (Namely, the Neutron chain had such an upgrade just yesterday.)

I want to build alerts on when the halt-height is less than 30 minutes from now (for cases I set a halt-height somewhere in the future and want to remind myself the node will shut down soon), and expose this metric from my exporter, so Prometheus would scrape it, evaluate alerts based on it and Alertmanager would sent me alerts For calculating it, I need somehow to get the halt-height from the node.
I can already take it from the app.toml directly, but that won't be possible to get it if I do not have the access to the node's filesystem, so ideal solution would be to have it exposed by the API.

I already know there are some disadvantages to this as this is something that node owners probably won't want to expose, or maybe there are some other disadvantages, but anyways this would be lovely to have.

Proposed Feature

Having an API method to return node's halt-height. Can be either RPC method/endpoint, or LCD method/endpoint, or both.

@alexanderbez
Copy link
Contributor

Yeah, this should be pretty easy via the existing /cosmos/base/node/v1beta1/config endpoint.

@freak12techno
Copy link
Contributor Author

Wow, that was fast. @alexanderbez appreciate this a lot, and can you also clarify which release to expect it in?

@julienrbrt
Copy link
Member

julienrbrt commented Jan 13, 2024

It will be included in v0.50.3, planned for Monday.

@tac0turtle tac0turtle removed this from Cosmos-SDK Feb 29, 2024
@freak12techno
Copy link
Contributor Author

@alexanderbez this seems to not work for me on provider chain (Hub incentivised testnet) - there's a field in REST/gRPC response but it's always 0, even if the halt-height is set to a value > 0. Can you check?

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

Successfully merging a pull request may close this issue.

3 participants