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

Read consensus spec from a file instead from the CL #201

Closed
barnabasbusa opened this issue Oct 1, 2024 · 5 comments
Closed

Read consensus spec from a file instead from the CL #201

barnabasbusa opened this issue Oct 1, 2024 · 5 comments

Comments

@barnabasbusa
Copy link
Contributor

It would be great if there would be no CL dependency of the rbuilder. While the CL endpoint could be provided, it should be optional, and the chain spec config values should be able to be read from a file.

@ferranbt
Copy link
Contributor

ferranbt commented Oct 1, 2024

Note that even if we load chain spec config values from a file you still need a CL to listen for the beacon node events to trigger block building.

@barnabasbusa
Copy link
Contributor Author

Thats alright. The idea is rbuilder shouldn't fail to start up just because the CL endpoint is not online yet.

@ryanschneider
Copy link
Contributor

For context, the issue is a circular dependency:

  • Typically its cleaner to start the EL first, since the CL will attempt to talk to the engine API on startup and thus will log errors until the EL is active (or worse case fail to start, though I'm not aware of any CLs that behave this way).
  • And since we are trying to run reth and rbuilder in the same container (see WIP feat(Dockerfile): Add reth to container image so we can run both in same container for kurtosis. #200) we'd like to start the rbuilder/reth container before the CL container.
  • But then rbuilder fails to start with this error (reproduced on builder-playground by changing the config to point to the wrong CL port):
2024-10-01T15:00:43.426908Z  INFO Server::run{addr=0.0.0.0:6061}: warp::server: listening on http://0.0.0.0:6061
2024-10-01T15:00:43.426916Z  INFO Server::run{addr=0.0.0.0:6060}: warp::server: listening on http://0.0.0.0:6060
Error: could not send request: error sending request for url (http://localhost:3501/eth/v1/config/spec): error trying to connect: tcp connect error: Connection refused (os error 61)

Caused by:
   0: error sending request for url (http://localhost:3501/eth/v1/config/spec): error trying to connect: tcp connect error: Connection refused (os error 61)
   1: error trying to connect: tcp connect error: Connection refused (os error 61)
   2: tcp connect error: Connection refused (os error 61)
   3: Connection refused (os error 61)

Location:
    crates/rbuilder/src/live_builder/config.rs:506:24

If rbuilder had support for getting the spec from a file, then the events stream could be best effort.

@bertmiller
Copy link
Member

Can we "fake" the CL trigger by just sending data to the builder that emulates it? If not, I think we could we implement an API that lets us do that so we could avoid needing a CL altogether (I'm imagining running a Python script that "drives" building).

@ferranbt
Copy link
Contributor

ferranbt commented Oct 2, 2024

Would this work? #203

I would prefer not to load the whole CL spec since we only use one parameter.

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

No branches or pull requests

4 participants