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

BeaconChainController.start() future should complete when all services started #8981

Closed
wants to merge 4 commits into from

Conversation

Nashatyrev
Copy link
Contributor

PR Description

PR addresses the issue described in comment: #8980 (comment)

  1. BeaconChainController.start() returned Future should complete when all 'sub-services' are up and running
  2. Move abrupt System.exit() to the upper level from the BeaconChainController to have more control on startup errors (for example in unit tests)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

@Nashatyrev Nashatyrev changed the title refactor/node-service-start-1 BeaconChainController.start() future should complete when all services started Jan 10, 2025
@@ -347,12 +347,17 @@
LOG.debug("Starting {}", this.getClass().getSimpleName());
forkChoiceExecutor.start();
return initialize()
.thenCompose(__ -> timerService.start())

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter '__' is never used.
@@ -347,12 +347,17 @@
LOG.debug("Starting {}", this.getClass().getSimpleName());
forkChoiceExecutor.start();
return initialize()
.thenCompose(__ -> timerService.start())
.thenCompose(__ -> recentChainData.getStoreInitializedFuture())

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter '__' is never used.
(err) -> LOG.debug("rejected execution poll failed", err)));
public SafeFuture<Void> start() {
return SafeFuture.of(metricsEndpoint.start())
.thenCompose(__ -> metricsPublisher.start())

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter '__' is never used.
public SafeFuture<Void> start() {
return SafeFuture.of(metricsEndpoint.start())
.thenCompose(__ -> metricsPublisher.start())
.thenCompose(__ -> getServiceController().start())

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter '__' is never used.
@Nashatyrev
Copy link
Contributor Author

Oh, it looks like that doesn't work with pre-genesis start. Services are expected to start after genesis only.
Then these changes are not valid :(

@Nashatyrev Nashatyrev closed this Jan 10, 2025
@Nashatyrev Nashatyrev deleted the refactor/node-service-start-1 branch January 13, 2025 13:50
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.

1 participant