Update v0.8.3 (#3)
* Move v0.8.1 tests to a legacy folder * Convert BLS and Shuffling tests to new format
This commit is contained in:
parent
df1d4cb9de
commit
f4fb3ab555
13
README.md
13
README.md
|
@ -16,6 +16,8 @@ git submodule update --init --recursive
|
|||
|
||||
## Usage in nim-beacon-chain
|
||||
|
||||
### For v0.7.1 to v0.8.1
|
||||
|
||||
This repository is meant to be used in the devel branch of the [Nimbus build environment](https://github.com/status-im/nimbus)
|
||||
where it appears as a submodule in `nimbus/vendor/nim-beacon-chain/tests/official/fixtures`.
|
||||
|
||||
|
@ -29,6 +31,13 @@ This repository contains patches to Nim and NimYAML created to work around a num
|
|||
- All those workarounds requires an intermediate reformatted JSON file, but the tests are huge (100k+ lines)
|
||||
and will cause review issues in the main repo.
|
||||
|
||||
The required patch application is automated in the `run_batch_convert.nims` script. After executing it, you'll find all
|
||||
converted test vectors in the `json_tests` folder.
|
||||
The required patch application is automated in the `run_batch_convert_v0.8.1.nims` script. After executing it, you'll find all
|
||||
converted test vectors in the `json_tests_v0.8.1` folder.
|
||||
|
||||
### For v0.8.3
|
||||
|
||||
The huge tests now have a Simple-Serialize (SSZ) version that should be preferred
|
||||
as it's more compact and do not use Git LFS on the EF side (and risk hitting Github LFS quota ceiling)
|
||||
|
||||
Small tests like BLS and shuffling are YAML only and do not have conversion issue
|
||||
as they do not use high uint64 numbers.
|
||||
|
|
|
@ -8,7 +8,7 @@ import
|
|||
# see README.md
|
||||
|
||||
const yamlPath = "eth2.0-spec-tests"/"tests"
|
||||
const jsonPath = "json_tests"
|
||||
const jsonPath = "json_tests_v0.8.1"
|
||||
|
||||
const InOut = [
|
||||
# Format:
|
|
@ -0,0 +1,39 @@
|
|||
import
|
||||
# Standard library
|
||||
ospaths, json, os,
|
||||
# Utilities
|
||||
./fixtures_utils
|
||||
|
||||
# This requires Nim 0.20.x for walkDirRec
|
||||
# and `nimble install yaml@#devel` for 0.20.x compat
|
||||
|
||||
const yamlPath = "eth2.0-spec-tests"/"tests"
|
||||
const jsonPath = "json_tests_v0.8.3"
|
||||
|
||||
const InOut = [
|
||||
# Format:
|
||||
# - Path to a folder.
|
||||
# yaml files inside will be recursively converted
|
||||
# preserving the directory structure
|
||||
"general"/"phase0"/"bls",
|
||||
"mainnet"/"phase0"/"shuffling"
|
||||
]
|
||||
|
||||
proc main() =
|
||||
for path in InOut:
|
||||
for file in walkDirRec(yamlPath/path, relative = true):
|
||||
echo "Processing: ", file
|
||||
let (subpath, filename, ext) = splitFile(file)
|
||||
doAssert ext == ".yaml", "This expects small pure YAML tests"
|
||||
let inFile = yamlPath/path/subpath/filename & ".yaml"
|
||||
let outFile = jsonPath/path/subpath/filename & ".json"
|
||||
|
||||
let jsonString = pretty(yamlToJson(inFile)[0])
|
||||
|
||||
createDir(jsonPath/path/subpath)
|
||||
writeFile(outFile, jsonString)
|
||||
|
||||
echo "Finished"
|
||||
|
||||
when isMainModule:
|
||||
main()
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e48224b6316bd9255e0884aac0a5ea8d07347a77c0ffcf462d04936f336ea640
|
||||
size 451
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3be12252c21224bc8add3a05e2d9ee72fd979f5fd5747929b520d21b946924b4
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:75241cedc6f95ecab9d32718403bcba919d5aa38efad01ea1e98d000845a5733
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2ad0c22151be429841b69b618fa086c394db4f7854c11d09b315a2f99cddbf11
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:881e42d57f9bcc2550355519a075902bb622865cfcd79506ac76cac461f457dd
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f2e8e49353f0f443d38abfc4eb98cbf520f0c002c6a1ef812a7785f54cafcc8f
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bf13f44418c1201cff89b143344ff9361726232400c16288b8edfff863024d8b
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5734ba5cc1b23f2d1e638087e706e976505cc2d45a1e9998280d16ce14e21470
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8f6f676eff697d4c4e06e52f8ca4411d7b89e8ca47a8f634bfe5289f1277cc08
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3286c010d12695369f46948b83e22c259fc11faa3dc7e31e7cb6713656c8a197
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ed922c11d2a455e6270596da22917880fa52a1d90d20e2640c1e495b21e74213
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:67611836b76a396c0df5144ec1f32745561c846459664d22534d92b069a2346e
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c9095aa8bf9abd99cb2c2bd880c3895e8cbf1b642c0bcc08c1024d64f0c96461
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:aa23fed8a63ade37a334bb8f2661e6ac0f2bea00d1dedf9f19ef724663f36ac7
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5945bfce902b74cc2edd748c0e84b1143ae686f0b03f1ccb93d11dfd6e1d9b09
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6a59db58ca6c10f0b4c215252f96b6fdc92269caa199a99a24192e4a08ac5495
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9be9128ae94b3046e801cf9e78a777354c467f0db6dc3e547e7f56bf73aa3ceb
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:08f32c0864c6ffa38a0060f6794af4c9a3041f63548c881597c4a253e072c577
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ba6a6b2d203db399bb43081e3fb6d7693ff109453e6aa5a612660544e082f0f5
|
||||
size 835
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8143244d073c88a3e64bb91753f0bb13704fd49150057e752daa095ad27f8fea
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:346754159e75af2c0a6ebf92ca134a28d16460751dd21308180101c3ff933be0
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b5ea397a3b31c27a5b78bb6dbbb8d07b1ae7f9b158f4a9af2a2d667a84adf5ea
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ee8fadf908ed27bb382e738d6db0c178100b356c02449fbae63886fb1a157260
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b8910536bd3f9200c3ddc63e7bfd9b98608e8db3252d23bee2293950b0529b9c
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a4505ae34d287a3b543709ea6ecb83b010d89efff795a037165b0bc5204ad3ce
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ffa6491cbfd24dde587c9152900da95a4541e33df721650f983d2f3d32fd1801
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:96ea8ea52b4666c3c7777377427fff7f4401c21105a49b06a5f3328dc78e9a95
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d64590a8636c661a45eacf0b1c61e5639028dab1def790780e231301fc981ca3
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c5d8d81e7b755dc703ed026a03aa346572597e2f5561201fc9f2d750faf8e906
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:51b9ea46750ce26a320865cf57c4eabce644ae71d67cfb2f6dc35bab7c7e953c
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:aae0dddbdbdb092de522d3c4da88bb4a01479bfc814c146b59f415bed6d9ce71
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ca46dbe8e0364d58a0cab0760730ebe91b6a747d76cab341247840709719f7a5
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:822cdbf911b0198d3dbc5a375194676cc2e6bebcf420ae35885751de459242d8
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:64e33fe045cf742cca713f64d8caa7c6f8279e05b220202d94e996233cf7d490
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:668236689f70f650f6ea1833dc06a84c6b48ce4667a5c8ada25663ae8fbcd684
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:850ca2a68309a4afc57ee7fdd7ae8bb634de42a0f70b20ff780d9a45fd691d73
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1d121ef8651d20108b2f66af5dffee4a0ff925f6720ea87b5d95b9cd765487f1
|
||||
size 370
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:74b15fa5725ded7fc8079f20af40afaf52f6d3d3bb3147ae29daae186e12b38f
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0628256a2e7a898ce1aefade7b741472413eceb8d02dc8789e9606132a0360be
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3e4d2d4b39a79b68366f1162305afabb9f3ee45fd87a1623fba1d4d0c36c131d
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:547b765f4d6b72ab70c745d6ae9ac53008519be34fc13ef06550db1ac6dbb727
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:98720c5873992c2b3be42fccc1c27c45d6332bd6a531acfeccbe15fd0ed7b591
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:60b6fbfa5e5ed3146e6b6b7d480d1f546b1af52361caa18253b32f1778d36aeb
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f33945fed33b9322098977398474c1ce10a9d11967e9bfbe0b0bc18005ac741e
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:978b1ed53cb91e00d2f47c8b24aae1c48c248db47b3d05a70366099a0783af11
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:390cceb102030101c66913271f613f641d1fc47a12c960cf160258d3b924b169
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9921ddf98b31cd4f65e3e17484ad06c965479cf22add4eaf2584b015d02e0c31
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bf98864f90942a40d91936f62f87cd56b51b660ac35f875b2f392f9a3e22afd7
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:77a7b8e0fb3fc1b4941b21252433550b69696c856f4789a58a558980b20ecbfc
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fefb68bac5d3740bb315c958941afd2cee4e5602d199f67f8f3ccf193f82cda0
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:58176c827555edd6dd783b09bee01759a9c1fffd7ddd12caf3be617d0122b1f6
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b7e95a8ad9193d9f5aa335d3321220e0d0fb6ac8626ece221cb303cee16b14e4
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c71c6ec4668419778452b55949f4ab3fffbf9f257ee95baec2c9e4b4dbef9700
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0bc56609b2c4246c69365187ff1f4bad1b5b0e92aafe1ee5f714582598a56604
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d1593f2f17d84b65da7e6ce59373d03ead278c0890acd13cec229f0b66a4e906
|
||||
size 842
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cc612e87411dd7ea76401836125ae781d055b923cb2d4d60932b23fe810cb792
|
||||
size 197
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1c633e9e12ee56ebf39244b3e39aa39f2eaa7424b4804765fc9db839e98fdc31
|
||||
size 197
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:12ee22f15318332aa0dc9db425b32347ad80186cd24f7c924d607573d2fc28a2
|
||||
size 197
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d382b2f90e352df8800187fc808b973b13c0ac8b3f82c1f68f348eb01bd464c2
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:91553e445cf25e3060ea263527271c153367264188fae6f1928979d13971de64
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:db889e2dbb670be85f9b8c8aa695244ee104a19a6912dd1ddb5ba6b97bb7db8e
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:49c060c73585406291b4d03ad41828e2a98f1cab9c22564e7f8c9f4554236dc2
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ca08282e4222834aab180b060cbf67191b96dfc2abe71f2a7d2086c217560958
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3778a6c4f6d5a76f0907270629b638b6f028d300aef05815f19f08b284ced24e
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:330e1c112191ccc039ade671e2d571df1dfb3dfbedc7248e16ce79ab92766443
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:844f72afb832cd58e81761de02952ee7797440789346a3a31109fab7a52657ae
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:becaeeeb09ead51a859e47a1b4b3dcb2acafb1b47d20a6650547816289463166
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ea107e59d1d57448f4ab8f0f3966bb2681ecddc21511508ee5bdf136909927f7
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6d53693c2580163eaa522fa01c836da3f676b7c252da11cce0694be94f13c499
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6a6f8b3c46d069a79c7e2bb5188c4f93ebb76c63641e5afea2ae0783c01c2f0d
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8ffe362d53a4ef882429e01ba53249aabc8181c62af20ecfd559fb0ea1638fba
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b473a15244d10d94b4b96f7ff6e97e8e2c8dad58eb288fdc917f32c5ecbd0cbb
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:179520daee88ed4112deb850978decc9fa28d0c4ac9eff72afd5dc26be41a28a
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f9e8f1ba12e7099ad90067f8e0839f22f693860a387edb97cddcad99c70844d1
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b37c5ca1ecba34c88aaf4b8420bf529ae28041d899c67c57d1532ef7542ce864
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4e3489e5c9ff697ba1a766db2277f619fd1cd1a20b4b26215f558850defcf38a
|
||||
size 435
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:43f88d51c177e3aa6715be83f2314b2b4df8a9e4bd6ab3d19a142241e3f6ebd8
|
||||
size 435
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue