MCPcopy Create free account
hub / github.com/base/base / start

Method start

etc/systems/src/l1/stack.rs:40–60  ·  view source on GitHub ↗

Starts Reth and writes the JWT secret if needed.

(config: L1StackConfig)

Source from the content-addressed store, hash-verified

38impl L1Execution {
39 /// Starts Reth and writes the JWT secret if needed.
40 pub async fn start(config: L1StackConfig) -> Result<Self> {
41 let jwt_path = config.testnet_dir.parent().unwrap_or(&config.testnet_dir).join("jwt.hex");
42
43 if !jwt_path.exists() {
44 std::fs::write(&jwt_path, &config.jwt_secret_hex)
45 .wrap_err("Failed to write JWT secret")?;
46 }
47
48 let reth_config = config.container_config.clone();
49 let reth =
50 RethContainer::start(&config.el_genesis_json, &config.jwt_secret_hex, reth_config)
51 .await
52 .wrap_err("Failed to start Reth container")?;
53
54 Ok(Self {
55 reth,
56 jwt_path,
57 testnet_dir: config.testnet_dir,
58 container_config: config.container_config,
59 })
60 }
61
62 /// Returns a reference to the Reth container.
63 pub const fn reth(&self) -> &RethContainer {

Callers

nothing calls this directly

Calls 4

start_consensusMethod · 0.80
parentMethod · 0.45
existsMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected