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

chainbuilder: graceful shutdown #3921

Open
Wondertan opened this issue Sep 30, 2024 · 0 comments
Open

chainbuilder: graceful shutdown #3921

Wondertan opened this issue Sep 30, 2024 · 0 comments
Labels
enhancement New feature or request external

Comments

@Wondertan
Copy link
Member

Summary

Graceful shutdown for chainbuilder in case shutdown was requested during chain generation, making it aware of all the necessary conditions for the validator to run successfully right after.

Problem Definition

chainbuilder may take days to generate a long chain, which may stop for whatever reason. However, stopping chain generation, as it currently is, makes the resulting chain unusable, and running the validator over fails for various reasons.

Proposal

It's hard to tell how hard to implement this feature and what exactly needs to be done. Potentially, this depends on whether CometBFT components support graceful shutdown. Generally, the exact proposal is to catch the first CTRL-C via notify.Context, which terminates chain generation on the current block and ensures all the prerequisites for the block are met. Also, optionally, for the following CTRL+C we could terminate the process forcefully(this is how it works in the node)

@Wondertan Wondertan added the enhancement New feature or request label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request external
Projects
None yet
Development

No branches or pull requests

1 participant