-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
Add an option to stop geth once in sync #16400
Comments
I agree, it would be a nice feature. I'll flag this as |
I would also like something like I don't know how we could conceivably do this if it's doing a fast-sync and the |
@holiman can I work on this? |
@lsgrep you'd be very welcome! |
@lsgrep If you are busy, can I do this issue? |
Hi @zaq1tomo , I am working on it :) |
Thanks for your reply @isghe, I got and leave it to you. |
Hi @holiman is this issue still open? We are considering adding a Gitcoin bounty for this issue. |
Hi, sorry for not updating this issue. I've been a bit busy for the past month, and it is over. Now I have the time to work on PR. |
@lsgrep please let me know if you put down your work on this as I'd like to pick up this issue. |
Anyone is looking into this issue? Otherwise I want to take my first stab at it @lsgrep @kielbarry @holiman @chevdor |
@rbval Happy to see activity here so thanks for the question. |
I am not working on this so feel free! |
Ill take a look then! |
Making some commits looking to have something committed/pushed by monday at the latest |
please, how can i be removed, from this notification? Someone wrote by mistake my nick |
@ahlusar1989 I have some code setup and am testing it at the moment, I still need to implement the light mode portion |
I have a lightnode version and have a pull request out, I am awaiting feedback and testing |
Most of it seems to be working and formatted correctly. The main question I am being asked is what should occur if it is archiving, is there any opinions on this |
@lhendre I wonder what your suggestion is. Is your code ready for a PR? |
Hi, @adamschmideg my suggestion for that, if it is archiving, is that it also turns off when synced. There is a PR out and they asked me to make a modification. I was using a channel to determine when the code was done syncing and they asked me to change it to an event. The change has been made and the code has been pushed. I am testing on my computer and waiting feedback on the PR. |
PR being reviewed: #17321 |
@karalabe has reservations he'll formulate |
The code has been updated based on the reservations, awaiting feedback on the PR |
Code was merged in. The code takes in a boolean flag and stops when the download done event is fired |
I think this issue should be closed. |
Agreed |
Indeed! |
This is not a bug but a feature request aiming at having more users in sync, faster and more consistently, especially for those not operating nodes running 100% of the time.
Similar issue reported for parity: openethereum/parity-ethereum#8244
In the early days, Geth has been built as a node and the priority was/is obviously to never stop or break.Today, if we consider the users operating nodes on servers, this is still critical that geth nodes never stops.
We also need to consider another class of users: those who use Geth daily (or almost) and start/stop geth all the time. For those, it used to be fast syncing their node: a few minutes or an hour at max would fetch a good week or too of blocks.
This is no longer the case. Nowadays, not syncing every day becomes quickly painful.
I propose the addition of a new flag that would stop and exit when the chain has been caught up.
It could something like:
geth --exit-when-synced N
With N being the number of seconds to keep running once the chain is in sync. N=0 means geth exists immediately once the chain is caught up.
Having this flag means users could sync all their geth chains (fundation, ropsten, rinkeby) overnight on a single machine by simply chaining the syncs:
Once all the syncs are done, the poor (but warm) laptop could go back to rest for a good part of the night.
Recently, as a workaround to that, I published https://github.com/chevdor/ethup. One benefit of
ethup
is that it supports parity as well but I think it would be more elegant to have a solution directly in geth, without having to install additional npm packages.The text was updated successfully, but these errors were encountered: