-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Node watcher app #4689
Comments
Hey @b00f, it is true that the SDK contains consistent changes and will continue to do so for quite some time, but this sort of solution isn't needed for "soft-forks" upgrades afaict. All point releases are non-breaking and can be upgraded to safely at any time without needing to have height conditionals or a sidecar process under most circumstances. That being said, the idea of a sidecar process was initially introduced by @ebuchman with regards to live breaking major upgrades (hard-forks). There are already a few threads in which this topic is discussed. There has been discussion with the Regen team on how to integrate our migration work with their upgrade module. This work coupled with the ref: #4471 I suggest discussion continue on those threads instead of this one. |
Upgrading proposal is a good idea for hard forks and halting the node makes sense. (However still I don't understand why genesis should be updated for a live chain? #4409) |
#4233 is an interesting approach that should match your needs. This is very similar to your idea, but runs inside the node code itself, and allows upgrade hooks to auto-migrate. Can you review this and maybe add a feature request or two. I just started working on this PR to help finish it up. It would be great if it covered the needs of all projects. And yes, I agree. Stopping a blockchain, and starting from a new genesis doesn't seem like the most elegant solution unless absolutely necessary in an emergency. From General Workflow Let's assume we are running v0.34.0 of our software in our testnet and want to upgrade to v0.36.0. Generally the gaiad/regend/etc binary will restart on crash, but then will execute this BeginBlocker When the binary restarts with the upgraded version (here v0.36.0), it will detect we have registered the |
There are two ways for updating/upgrading an application: an application can updates himself, or a watcher updates the app. Both ways have good and bad points. For a blockchain application I believe the second way is more elegant. So far I haven't seen any blockchain adopted this idea. BTW, Thanks for your full explanation. |
Closing in favor of #4233 |
Thank you, @b00f, and I think you have very good ideas on what is needed to make the blockchain more usable. I have been working on some of these solutions as well, and happy to have more input on them. The general idea is you have some supervisor (systemd?) that restarts the app when it crashes. It runs from a known location. Maybe it runs When we plan the upgrade, the admin can before hand download the v0.36.0 docker image, but it is not yet running. Then add a
The current (v0.34.0) app will panic and die. When the supervisor restarts, it will now run the v0.36.0 version, which is now linked to the deploy tag. Does this make sense? I have not yet done this in a production system, just explaining the design we consider. Happy for any suggestion on how to make that cleaner. |
Yup, It makes sense perfectly. Unfortunately upgradability is the last thing developers think about. Devils are always hide themselves inside the code. @ethanfrey Thank you for your time and explanation. I am still learning but I am trying my best! Let me know if you need any help. |
Summary
Node watcher app for updating a node
Problem Definition
Currently cosmos-sdk is under heavy changes. This might cause application to face soft-fork. Updating a node is not an easy task for blockchains. Classic approach is keeping the fork history inside the code. Something like this:
That will make the code more messy and probably buggy.
Proposal
I am going to share an idea and open a discussion about it.
An node-watcher app can be developed. This node-watcher is responsible to run the blockchain. node-watcher can read a repo (ex. github page) to check the upcoming changes. It can simply hold this information:
node-watcher downloads and run the node due to this information. When a soft-fork is going to happen we can update this page to notify all node-watcher to be ready to restart the node automatically.
For Admin Use
The text was updated successfully, but these errors were encountered: