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

Signal --prune complete #24344

Closed
dapplion opened this issue Feb 7, 2022 · 6 comments
Closed

Signal --prune complete #24344

dapplion opened this issue Feb 7, 2022 · 6 comments

Comments

@dapplion
Copy link

dapplion commented Feb 7, 2022

Rationale

For automated managers of Geth nodes (i.e. DAppNode dappnode/DNP_DAPPMANAGER#915) it would be necessary to know reliably that --prune has completed (either successfully or not), in order to restart Geth without --prune flag. To my knowledge the only signal that pruning is done is a log to stdout.

Implementation

Touch a flag file when prune is complete if some flag is set, i.e. --prune-flag-file. Otherwise if the team can assure that the printed log to stdout is reliable enough and won't ever change without a breaking change notice that should work too but it's a bit more ugly.

Let me know if that makes sense or what you think is a better strategy

@rjl493456442
Copy link
Member

Do you mean geth snapshot --prune? If so it's will be deprecated in the following months.
New state scheme will be applied into Geth so that pruning is always enabled by default.

@dapplion
Copy link
Author

dapplion commented Feb 8, 2022

Do you mean geth snapshot --prune? If so it's will be deprecated in the following months. New state scheme will be applied into Geth so that pruning is always enabled by default.

Any issue or tracker I can follow for this? What would you suggest as best solution short term while that's in development?

@yorickdowne
Copy link

yorickdowne commented Feb 8, 2022

Any issue or tracker I can follow for this? What would you suggest as best solution short term while that's in development?

#23427 looks relevant as does #23733

@holiman
Copy link
Contributor

holiman commented Feb 10, 2022

We don't have --prune, we only have geth snapshot --prune-state

@holiman
Copy link
Contributor

holiman commented Feb 10, 2022

Also, once it's done, the process will exit. Why is that not sufficient? I mean, you could always do
geth snapshot --prune-state; touch pruning_done && notify "done now" more or less

@dapplion
Copy link
Author

Also, once it's done, the process will exit. Why is that not sufficient? I mean, you could always do geth snapshot --prune-state; touch pruning_done && notify "done now" more or less

That's sufficient yes, sorry I wasn't aware of this fact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants