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

Don't timeout if offline or bootstrapping before genesis #14328

Merged

Conversation

psteckler
Copy link
Member

@psteckler psteckler commented Oct 11, 2023

If we see an Offline online status before genesis, don't restart libp2p or raise a timeout. Similarly, if the active status is Bootstrapping before genesis, don't set the bootstrap timeout.

Also: fixed obsolete comment.

Before this change, verified it was possible to crash the daemon via the Offline_shutdown exception, by setting the offline timeout and the stabilize interval to small values.

To test the fix, set the low values for the offline timeout and stabilize interval, disabled the is_seed check, set the genesis timestamp to sometime in 2024, and inverted the after_genesis result, so that the offline timeout was checked before genesis. Ran that twice, both times the node crashed with the offline too long error after a couple of minutes. Then, ran after_genesis normally, so that the offline timeout was not checked before genesis, and the node did not crash after running for 10 minutes.

@psteckler psteckler requested a review from a team as a code owner October 11, 2023 19:53
@psteckler
Copy link
Member Author

!ci-build-me

@psteckler
Copy link
Member Author

!ci-build-me

@deepthiskumar
Copy link
Member

Could you add to the PR description, how you tested the change?

@psteckler
Copy link
Member Author

Could you add to the PR description, how you tested the change?

Done. / @deepthiskumar

@deepthiskumar
Copy link
Member

!ci-build-me

@deepthiskumar
Copy link
Member

!approved-for-mainnet

@psteckler
Copy link
Member Author

!ci-build-me

@psteckler
Copy link
Member Author

!ci-build-me

@deepthiskumar
Copy link
Member

!approved-for-mainnet

@psteckler
Copy link
Member Author

!ci-build-me

@deepthiskumar
Copy link
Member

!approved-for-mainnet

@psteckler psteckler merged commit 2bbce00 into berkeley Oct 17, 2023
2 checks passed
@psteckler psteckler deleted the feature/no-offline-bootstrap-timeouts-before-genesis branch October 17, 2023 22:39
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.

2 participants