Skip to content

Commit 11f9ae0

Browse files
authored
Beacon node startup cleanups (#7665)
* Beacon node startup cleanups * KZG can now be loaded lazily - at the same time, normalise command line parameter for using a different setup to use `--debug` prefix like all other hidden options, allowing the option can be shared between eth1/eth2 * move init logic around so that "main thread" / process-related initialization has its own home that is not shared with libraries * make init fail gracefully (instead of quitting) * remove error handling made redundant by `async` raises * test fixes * more tests * eh
1 parent bb9b53a commit 11f9ae0

File tree

8 files changed

+228
-259
lines changed

8 files changed

+228
-259
lines changed

beacon_chain/conf.nim

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import
2222
eth/enr/enr,
2323
json_serialization, json_serialization/std/net as jsnet, web3/confutils_defs,
2424
chronos/transports/common,
25-
kzg4844/kzg,
2625
./spec/[engine_authentication, keystore, network, crypto],
2726
./spec/datatypes/base,
2827
./networking/network_metadata,
@@ -680,13 +679,12 @@ type
680679
defaultValue: HistoryMode.Prune
681680
name: "history".}: HistoryMode
682681

683-
# https://notes.ethereum.org/@bbusa/dencun-devnet-6
684-
# "Please ensure that there is a way for us to specify the file through a
685-
# runtime flag such as --trusted-setup-file (or similar)."
686682
trustedSetupFile* {.
687683
hidden
688-
desc: "Experimental, debug option; could disappear at any time without warning"
689-
name: "temporary-debug-trusted-setup-file" .}: Option[string]
684+
desc: "Alternative EIP-4844 trusted setup file"
685+
defaultValue: none(string)
686+
defaultValueDesc: "Baked in trusted setup"
687+
name: "debug-trusted-setup-file" .}: Option[string]
690688

691689
bandwidthEstimate* {.
692690
hidden
@@ -760,11 +758,6 @@ type
760758
desc: "Output wallet file"
761759
name: "new-wallet-file" .}: Option[OutFile]
762760

763-
#[
764-
of DepositsCmd.status:
765-
discard
766-
]#
767-
768761
of DepositsCmd.`import`:
769762
importedDepositsDir* {.
770763
argument
@@ -1530,16 +1523,6 @@ proc engineApiUrls*(config: auto): seq[EngineApiUrl] =
15301523
(elUrls & config.web3Urls).toFinalEngineApiUrls(
15311524
config.jwtSecret.configJwtSecretOpt)
15321525

1533-
proc loadKzgTrustedSetup*(): Result[void, string] =
1534-
static: doAssert const_preset in ["mainnet", "gnosis", "minimal"]
1535-
loadTrustedSetupFromString(kzg.trustedSetup, 0)
1536-
1537-
proc loadKzgTrustedSetup*(trustedSetupPath: string): Result[void, string] =
1538-
try:
1539-
loadTrustedSetupFromString(readFile(trustedSetupPath), 0)
1540-
except IOError as err:
1541-
err(err.msg)
1542-
15431526
proc formatIt*(v: Option[IpAddress]): string =
15441527
if v.isSome():
15451528
$v.get()

0 commit comments

Comments
 (0)