mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-25 02:15:30 +00:00
Add --trusted-setup-file command line option
This commit is contained in:
parent
b7365085ae
commit
e3041347fd
@ -521,6 +521,12 @@ type
|
||||
defaultValue: ""
|
||||
name: "stateless-data-source-url" .}: string
|
||||
|
||||
trustedSetupFile* {.
|
||||
desc: "Load EIP-4844 trusted setup file"
|
||||
defaultValue: none(string)
|
||||
defaultValueDesc: "Baked in trusted setup"
|
||||
name: "trusted-setup-file" .}: Option[string]
|
||||
|
||||
of `import`:
|
||||
|
||||
blocksFile* {.
|
||||
|
@ -21,6 +21,8 @@ import
|
||||
metrics/[chronos_httpserver, chronicles_support],
|
||||
stew/shims/net as stewNet,
|
||||
websock/websock as ws,
|
||||
kzg4844/kzg_ex as kzg,
|
||||
./core/eip4844,
|
||||
"."/[config, constants, version, rpc, common],
|
||||
./db/[core_db/persistent, select_backend],
|
||||
./graphql/ethapi,
|
||||
@ -426,6 +428,18 @@ proc start(nimbus: NimbusNode, conf: NimbusConf) =
|
||||
|
||||
let protocols = conf.getProtocolFlags()
|
||||
|
||||
if conf.trustedSetupFile.isSome:
|
||||
let fileName = conf.trustedSetupFile.get()
|
||||
let res = Kzg.loadTrustedSetup(fileName)
|
||||
if res.isErr:
|
||||
fatal "Cannot load Kzg trusted setup from file", msg=res.error
|
||||
quit(QuitFailure)
|
||||
else:
|
||||
let res = loadKzgTrustedSetup()
|
||||
if res.isErr:
|
||||
fatal "Cannot load baked in Kzg trusted setup", msg=res.error
|
||||
quit(QuitFailure)
|
||||
|
||||
case conf.cmd
|
||||
of NimbusCmd.`import`:
|
||||
importBlocks(conf, com)
|
||||
|
Loading…
x
Reference in New Issue
Block a user