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

chore: expose main_chain_height endpoint for watchdog #207

Closed
wants to merge 1 commit into from

Conversation

maksymar
Copy link
Contributor

@maksymar maksymar commented May 15, 2023

This change exposes main_chain_height for the watchdog.

Currently watchdog canister gets the information about the latest block height from the bitcoin canister via metrics page parsing. It works fine in production, but it's a blocker for writing end-to-end tests with a fake bitcoin canister. The reason is that both canisters are running locally and have to send/receive HTTPS requests. Unfortunately making HTTPS outcalls locally is not currently supported by dfx.

The solution would be to switch from making HTTPS outcall to making an inter-canister call to the bitcoin canister. This does not have limitations on running locally. And conceptually it's the right thing to do to exchange information between canisters via inter-canister calls, and not by parsing HTML.

The goal is to switch from reading it via metrics page parsing to making an inter-canister call.

@maksymar maksymar requested a review from a team as a code owner May 15, 2023 12:45
Copy link
Collaborator

@ielashi ielashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Response on slack:

Hey Maksym, I’d hold off on that change for a bit, as that requires a change in the internet computer specification.

Other people also requested a similar endpoint, but we’ll have to think a bit more in terms of how we want to expose it, and what other information we should include as well.

@maksymar maksymar marked this pull request as draft May 15, 2023 13:34
@maksymar
Copy link
Contributor Author

... I’d hold off on that change for a bit ...

Ok, I'm turning this PR into a draft mode then.

@ielashi ielashi closed this May 30, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants