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

Validator client HTTP API wouldn't start without a beacon node #5019

Open
chong-he opened this issue Dec 19, 2023 · 1 comment
Open

Validator client HTTP API wouldn't start without a beacon node #5019

chong-he opened this issue Dec 19, 2023 · 1 comment
Labels
good first issue Good for newcomers HTTP-API val-client Relates to the validator client binary

Comments

@chong-he
Copy link
Member

Description

Starting lighthouse vc –http alone wouldn’t start the validator client HTTP API. HTTP API queries will get connection refused.

Once lighthouse bn –http is started, only then the validator client logs INFO HTTP API started and HTTP API queries works. If the bn is stopped afterwards, the validator client HTTP API calls still work.

From @michaelsproul, the reason being that the validator client waits to fetch genesis from the BN on start-up here:

// Perform some potentially long-running initialization tasks.
let (genesis_time, genesis_validators_root) = tokio::select! {
tuple = init_from_beacon_node(&beacon_nodes, &proposer_nodes, &context) => tuple?,
() = context.executor.exit() => return Err("Shutting down".to_string())
};

Version

Lighthouse v4.5.0-441fc16

Present Behaviour

Starting lighthouse vc –http alone wouldn’t start the validator client HTTP API

Expected Behaviour

Starting lighthouse vc –http alone should start the validator client HTTP API

Steps to resolve

From @michaelsproul, a possible solution is to refactor that so that the validator client just gets those values (or from the hardcoded genesis state in the network config)

@chong-he chong-he added val-client Relates to the validator client binary HTTP-API labels Dec 19, 2023
@michaelsproul
Copy link
Member

Related:

I don't think that PR caused a regression, but it didn't fully solve the issue (in the offline BN case)

@michaelsproul michaelsproul added the good first issue Good for newcomers label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers HTTP-API val-client Relates to the validator client binary
Projects
None yet
Development

No branches or pull requests

2 participants