load Ethereum mainnet KZG setup on Gnosis networks (#5756)

Gnosis networks re-use the trusted setup from Ethereum mainnet.
Load it to support Deneb.
This commit is contained in:
Etan Kissling 2024-01-16 01:58:07 +01:00 committed by GitHub
parent 2608cd6477
commit 7443a4ac08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -1483,10 +1483,8 @@ proc loadKzgTrustedSetup*(): Result[void, string] =
trustedSetup = staticRead(
vendorDir & "/nim-kzg4844/kzg4844/csources/src/trusted_setup.txt")
if const_preset == "mainnet" or const_preset == "minimal":
static: doAssert const_preset in ["mainnet", "gnosis", "minimal"]
Kzg.loadTrustedSetupFromString(trustedSetup)
else:
ok()
proc loadKzgTrustedSetup*(trustedSetupPath: string): Result[void, string] =
try:

View File

@ -559,7 +559,7 @@ elif const_preset == "minimal":
)
else:
{.error: "Only mainnet and minimal presets supported".}
{.error: "Only mainnet, gnosis, and minimal presets supported".}
# macro createConstantsFromPreset*(path: static string): untyped =
# result = newStmtList()