Ethereum 2.0 Scenarios for Nimbus
Go to file
Mamy Ratsimbazafy f4fb3ab555
Update v0.8.3 (#3)
* Move v0.8.1 tests to a legacy folder

* Convert BLS and Shuffling tests to new format
2019-08-29 22:34:43 +02:00
eth2.0-spec-tests@ae6dd9011d Update submodule to 0.8.3 test suite (including tests stored as SSZ). 2019-08-28 23:55:36 +02:00
json_tests_v0.8.1 Update v0.8.3 (#3) 2019-08-29 22:34:43 +02:00
json_tests_v0.8.3 Update v0.8.3 (#3) 2019-08-29 22:34:43 +02:00
patches Automated away the YAML-to-JSON conversion hacks 2019-07-21 16:26:12 +03:00
.gitattributes Test vectors for spec v0.8.1 2019-07-23 22:31:53 +03:00
.gitignore Update gitignore 2019-07-31 15:37:34 +03:00
.gitmodules Remove deprecated eth2.0-tests submodule, fix #1 2019-06-21 10:28:34 +02:00
README.md Update v0.8.3 (#3) 2019-08-29 22:34:43 +02:00
batch_convert_v0_8_1.nim Update v0.8.3 (#3) 2019-08-29 22:34:43 +02:00
batch_convert_v0_8_3.nim Update v0.8.3 (#3) 2019-08-29 22:34:43 +02:00
fixtures_utils.nim Automated away the YAML-to-JSON conversion hacks 2019-07-21 16:26:12 +03:00
run_batch_convert_v0_8_1.nims Update v0.8.3 (#3) 2019-08-29 22:34:43 +02:00

README.md

nim-eth2-official-tests

This repo reformats the official Ethereum 2 tests to a format suitable for Nimbus/nim-beacon-chain.

Cloning the repo

Due to upstream usage of Git LFS to store the large test vectors, there is an extra step after cloning the repo:

git clone https://github.com/status-im/nim-eth2-official-tests
cd nim-eth2-official-tests
git lfs install
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 where it appears as a submodule in nimbus/vendor/nim-beacon-chain/tests/official/fixtures.

This repository contains patches to Nim and NimYAML created to work around a number of outstanding issues:

  • no YAML support in nim-serialization library which allows well-tested serialization and deserialization into and from Ethereum types.
  • NimYAML uses int by default for numerals and cannot deserialize 18446744073709551615 (2^64-1), the FAR_FUTURE_SLOT constant.
  • Furthermore as of 0.7.1, the yaml test files includes thousands of random epochs in the [2^63-1 .. 2^64-1] range for the source_epoch and target_epoch field.
  • 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_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.