Add support for graceful halt via server config#4059
Conversation
|
@ebuchman given the BaseApp has knowledge of the height to halt at, where is the most appropriate to check and gracefully exit while respecting the ABCI semantics? |
Codecov Report
@@ Coverage Diff @@
## develop #4059 +/- ##
===========================================
- Coverage 60.21% 60.17% -0.04%
===========================================
Files 212 212
Lines 15155 15165 +10
===========================================
Hits 9126 9126
- Misses 5405 5414 +9
- Partials 624 625 +1 |
rigelrozanski
left a comment
There was a problem hiding this comment.
Is there a document describing how a validator would change the halting height on a live node? I'm assuming one would just write to the config live somehow
|
@rigelrozanski I'll add a section to the docs somewhere on this new config feature. There currently isn't a way to do it live. You must, set the config and start (or restart) your node for the change to pickup. |
|
@rigelrozanski I added a section to the |
| return err | ||
| } | ||
|
|
||
| // TODO: Rename config file to server.toml as it's not particular to Gaia |
| you want your node to shutdown or by passing the `--halt-height` flag to `gaiad`. | ||
| The node will shutdown with a zero exit code at that given height after committing | ||
| the block. | ||
|
|
There was a problem hiding this comment.
This can be set only at boot time right? Do you think will be possible to undo this at runtime, or to set/change this flag at runtime, let's say a governance proposal that proposed to update at height X got downvoted but I started a node with this this --halt-height X
Probably even if it's true it makes sense to do it in a separate PR
There was a problem hiding this comment.
Good question @sabau. This value can be set at any time really but the node would have to be restarted for it to take effect. There currently isn't a way to do this at runtime. I think there is some crossover functionality between this and the software upgrade module/process we plan to have. Essentially, to do this at runtime, it would have to be parameter somewhere.
sabau
left a comment
There was a problem hiding this comment.
I left a question more than a comment, if it makes sense probably should be addressed as a following PR
|
Answered your (good) question @sabau. I think it's safe to merge this PR for now until we have a more established software upgrade process. I'm thinking we should maybe even get this into a v0.34.2 patch release along with some other small bits. |
…#6) Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
…#6) Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Add support for a
halt-heightin the node's server-config/CLI to gracefully halt and shutdown a node.closes: #3981
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/)Added a relevant changelog entry:
sdkch add [section] [stanza] [message]rereviewed
Files changedin the github PR explorerFor Admin Use: