dojoengine / dojo

Dojo is a toolchain for building provable games and applications
https://dojoengine.org
Apache License 2.0
420 stars 175 forks source link

[Katana] Implement `is_alive` to check that the devnet is running #502

Closed JorikSchellekens closed 1 year ago

JorikSchellekens commented 1 year ago

It would be great if the devnets exposed the same endpoint to check the devnet's liveness.

https://github.com/0xSpaceShard/starknet-devnet/blob/4a8d028c5babea9616041781d21e337b55d7936d/starknet_devnet/blueprints/base.py#L72

tarrencev commented 1 year ago

We don't expose a REST api right now. What is your usecase for the is_alive? For a managed deployment (i.e. k8s health checks) or to sanity check during development?

JorikSchellekens commented 1 year ago

We're working on a remix plugin. We wish to communicate the devnet's liveness to the end user with a status icon. With starknet-devnet we ping the is_alive URL regularly to achieve this. We would like to have something similar for Katana!

tarrencev commented 1 year ago

Gotcha! For now, perhaps you could ping the starknet_chainId rpc endpoint?

In the future, we could add a /healthz rest endpoint to support health checks, but it will take a bit more effort since we don't provide a rest api right now

JorikSchellekens commented 1 year ago

Yes, that's probably more portable! Will update on the remix side and close my pr!