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

Rework exitwhensynced functionality #304

Merged

Conversation

uprendis
Copy link
Contributor

@uprendis uprendis commented May 9, 2022

Add --exitwhensynced.age and --exitwhensynced.epoch flags instead of --exitwhensynced flag:

  • --exitwhensynced.age may be used instead of --exitwhensynced to stop node once it syncs up to a relatively latest state. --exitwhensynced.age requires to specify an exact age threshold of what's considered a latest state (e.g. 5s)
  • --exitwhensynced.epoch allows to stop node exactly when it reaches a certain epoch. Its intended usecase is genesis files generation for a certain epoch

@uprendis uprendis requested review from hadv, cyberbono3 and rus-alex May 9, 2022 22:10
@uprendis uprendis requested a review from andrecronje as a code owner May 9, 2022 22:10
@hadv
Copy link
Contributor

hadv commented May 10, 2022

it sound a good feature, May we add more --exitwhensynced.block to stop node at a specific block height. it might be the use-cases for end-user due to account state is updated in block by block basis.

@uprendis
Copy link
Contributor Author

Unfortunately stopping node a specific block height wouldn't be trivial to implement. The atomic consensus message is event. Processing single event may lead to processing multiple blocks, so it's clear how to stop at some height >= condition but not exactly ==

@uprendis uprendis merged commit 873cca0 into Fantom-foundation:develop May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants