Remove deprecated eth2.0-tests submodule, fix #1

This commit is contained in:
Mamy André-Ratsimbazafy 2019-06-21 10:28:34 +02:00
parent 9f7cde5783
commit 470513eddf
No known key found for this signature in database
GPG Key ID: 7B88AD1FE79492E1
5 changed files with 14 additions and 25 deletions

3
.gitmodules vendored
View File

@ -1,6 +1,3 @@
[submodule "eth2.0-tests"]
path = eth2.0-tests
url = https://github.com/ethereum/eth2.0-tests
[submodule "eth2.0-spec-tests"]
path = eth2.0-spec-tests
url = https://github.com/ethereum/eth2.0-spec-tests

View File

@ -59,23 +59,18 @@ but that is not a valid compressed BLS signature, the zero signature should be:
### Commands
Example commands to generate the tests and apply the proper workarounds on UNIX systems.
To be used from this repo root directory.
Please double-check the commands.
You can compile and run the `batch_convert.nim` file to convert the supported tests.
It needs to be run from the root of this project directory.
```sh
# Out of place replace
sed 's/18446744073709551615/"18446744073709551615"/g' eth2.0-tests/state/sanity-check_default-config_100-vals.yaml > json_tests/state/sanity-check_default-config_100-vals.yaml
# Create Nim build directory if it doesn't exist
mkdir -p build
# Compile conversion utility
nim c -r -o:build/yamlToJson fixtures_utils.nim # Will convert "json_tests/state/sanity-check_default-config_100-vals-first_test.yaml" by default
# In-place replaces
sed -i 's/"18446744073709551615"/18446744073709551615/g' json_tests/state/sanity-check_default-config_100-vals.json
sed -i 's/"randao_reveal":"0x00000000/"randao_reveal":"0xc0000000/g' json_tests/state/sanity-check_default-config_100-vals.json
sed -i 's/"signature":"0x00000000/"signature":"0xc0000000/g' json_tests/state/sanity-check_default-config_100-vals.json
sed -i 's/"proof_of_possession":"0x00000000/"proof_of_possession":"0xc0000000/g' json_tests/state/sanity-check_default-config_100-vals.json
sed -i 's/"aggregate_signature":"0x00000000/"aggregate_signature":"0xc0000000/g' json_tests/state/sanity-check_default-config_100-vals.json
# Interactive delete
rm -i json_tests/state/sanity-check_default-config_100-vals.yaml
```
You can also convert individual files directly from the `fixture_utils.nim` file with the following format:
```
fixture_utils path/to/input.yam path/to/output.json
```
Due to limitation in NimYAML library you might need to stringify `2^64 - 1` as NimYAML interprets
all numbers as `int` (`int64` on 64-bit platforms) while we need `uint64`.
You can use the following comment in an UNIX environment
```
sed 's/18446744073709551615/"18446744073709551615"/g' path/to/original.yaml > path/to/stringified.yaml
```

@ -1 +0,0 @@
Subproject commit 33e762c76e0a9458d9d89fa4f9c696e769fb2e2f

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,6 @@
| | Spec version |
|-------------|--------------|
| State tests | v0.5.1 |
| BLS | v0.7.1 |
| Shuffling | v0.7.1 |
| SSZ Generic | v0.7.1 |