Bump NimYAML + bump related changes (#6431)

This commit is contained in:
Kim De Mey 2024-07-17 21:50:29 +02:00 committed by GitHub
parent 8aab04404e
commit cd008ba7ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 16 additions and 16 deletions

View File

@ -19,7 +19,7 @@ import
../../beacon_chain/consensus_object_pools/[
blockchain_dag, block_clearance, block_quarantine, spec_cache],
# Third-party
yaml,
yaml/tojson,
# Test
../testutil, ../testdbutil,
./fixtures_utils, ./os_ops
@ -102,7 +102,7 @@ proc loadOps(
IOError, KeyError, UnconsumedInput, ValueError,
YamlConstructionError, YamlParserError].} =
let stepsYAML = os_ops.readFile(path/"steps.yaml")
let steps = yaml.loadToJson(stepsYAML)
let steps = loadToJson(stepsYAML)
result = @[]
for step in steps[0]:

View File

@ -10,7 +10,7 @@
import
std/json,
yaml,
yaml/tojson,
kzg4844/kzg_ex,
stew/byteutils,
../testutil,
@ -39,7 +39,7 @@ proc runBlobToKzgCommitmentTest(suiteName, suitePath, path: string) =
let relativePathComponent = path.relativeTestPathComponent(suitePath)
test "KZG - Blob to KZG commitment - " & relativePathComponent:
let
data = yaml.loadToJson(os_ops.readFile(path/"data.yaml"))[0]
data = loadToJson(os_ops.readFile(path/"data.yaml"))[0]
output = data["output"]
blob = fromHex[131072](data["input"]["blob"].getStr)
@ -61,7 +61,7 @@ proc runVerifyKzgProofTest(suiteName, suitePath, path: string) =
let relativePathComponent = path.relativeTestPathComponent(suitePath)
test "KZG - Verify KZG proof - " & relativePathComponent:
let
data = yaml.loadToJson(os_ops.readFile(path/"data.yaml"))[0]
data = loadToJson(os_ops.readFile(path/"data.yaml"))[0]
output = data["output"]
commitment = fromHex[48](data["input"]["commitment"].getStr)
z = fromHex[32](data["input"]["z"].getStr)
@ -89,7 +89,7 @@ proc runVerifyBlobKzgProofTest(suiteName, suitePath, path: string) =
let relativePathComponent = path.relativeTestPathComponent(suitePath)
test "KZG - Verify blob KZG proof - " & relativePathComponent:
let
data = yaml.loadToJson(os_ops.readFile(path/"data.yaml"))[0]
data = loadToJson(os_ops.readFile(path/"data.yaml"))[0]
output = data["output"]
blob = fromHex[131072](data["input"]["blob"].getStr)
commitment = fromHex[48](data["input"]["commitment"].getStr)
@ -117,7 +117,7 @@ proc runVerifyBlobKzgProofBatchTest(suiteName, suitePath, path: string) =
let relativePathComponent = path.relativeTestPathComponent(suitePath)
test "KZG - Verify blob KZG proof batch - " & relativePathComponent:
let
data = yaml.loadToJson(os_ops.readFile(path/"data.yaml"))[0]
data = loadToJson(os_ops.readFile(path/"data.yaml"))[0]
output = data["output"]
blobs = data["input"]["blobs"].mapIt(fromHex[131072](it.getStr))
commitments = data["input"]["commitments"].mapIt(fromHex[48](it.getStr))
@ -146,7 +146,7 @@ proc runComputeKzgProofTest(suiteName, suitePath, path: string) =
let relativePathComponent = path.relativeTestPathComponent(suitePath)
test "KZG - Compute KZG proof - " & relativePathComponent:
let
data = yaml.loadToJson(os_ops.readFile(path/"data.yaml"))[0]
data = loadToJson(os_ops.readFile(path/"data.yaml"))[0]
output = data["output"]
blob = fromHex[131072](data["input"]["blob"].getStr)
z = fromHex[32](data["input"]["z"].getStr)
@ -174,7 +174,7 @@ proc runComputeBlobKzgProofTest(suiteName, suitePath, path: string) =
let relativePathComponent = path.relativeTestPathComponent(suitePath)
test "KZG - Compute blob KZG proof - " & relativePathComponent:
let
data = yaml.loadToJson(os_ops.readFile(path/"data.yaml"))[0]
data = loadToJson(os_ops.readFile(path/"data.yaml"))[0]
output = data["output"]
blob = fromHex[131072](data["input"]["blob"].getStr)
commitment = fromHex[48](data["input"]["commitment"].getStr)

View File

@ -16,7 +16,7 @@ import
chronicles,
taskpools,
# Third-party
yaml,
yaml/tojson,
# Beacon chain internals
../../beacon_chain/beacon_chain_db,
../../beacon_chain/consensus_object_pools/[block_clearance, block_quarantine],
@ -88,7 +88,7 @@ proc loadSteps(
loadForked(t, s, path, fork_digests)
let stepsYAML = os_ops.readFile(path/"steps.yaml")
let steps = yaml.loadToJson(stepsYAML)
let steps = loadToJson(stepsYAML)
result = @[]
for step in steps[0]:

View File

@ -14,7 +14,7 @@ import
# Status libraries
stew/byteutils,
# Third-party
yaml,
yaml, yaml/tojson,
# Beacon chain internals
../../beacon_chain/spec/[forks, light_client_sync],
# Test utilities
@ -59,7 +59,7 @@ proc loadSteps(
): seq[TestStep] {.raises: [
KeyError, ValueError, YamlConstructionError, YamlParserError].} =
let stepsYAML = os_ops.readFile(path/"steps.yaml")
let steps = yaml.loadToJson(stepsYAML)
let steps = loadToJson(stepsYAML)
result = @[]
for step in steps[0]:

View File

@ -12,7 +12,7 @@ import
std/[json, os, random, sequtils, strutils, times],
chronos,
stew/base10, chronicles, unittest2,
yaml,
yaml/tojson,
../beacon_chain/beacon_chain_db,
../beacon_chain/spec/deposit_snapshots,
./consensus_spec/os_ops
@ -208,7 +208,7 @@ suite "EIP-4881":
path: string
): seq[DepositTestCase] {.raises: [
IOError, KeyError, ValueError, YamlConstructionError, YamlParserError].} =
yaml.loadToJson(os_ops.readFile(path))[0].mapIt:
loadToJson(os_ops.readFile(path))[0].mapIt:
DepositTestCase(
deposit_data: DepositData(
pubkey: ValidatorPubKey.fromHex(

2
vendor/NimYAML vendored

@ -1 +1 @@
Subproject commit ab3ff9fad45fa7e20d749d0a03a7567225f5dd4a
Subproject commit 7721c955b522f4893265bb36a6de4f8edef8b54b