Ethereum 2.0 Scenarios for Nimbus
Go to file
Zahary Karadjov de468c07c2
Update gitignore
2019-07-31 15:37:34 +03:00
eth2.0-spec-tests@aaa1673f50 Bump the official suite to v0.8.1 2019-07-19 20:00:21 +03:00
json_tests Test vectors for spec v0.8.1 2019-07-23 22:31:53 +03: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 updated README 2019-07-23 19:27:35 +03:00
batch_convert.nim Automated away the YAML-to-JSON conversion hacks 2019-07-21 16:26:12 +03:00
fixtures_utils.nim Automated away the YAML-to-JSON conversion hacks 2019-07-21 16:26:12 +03:00
run_batch_convert.nims Automated away the YAML-to-JSON conversion hacks 2019-07-21 16:26:12 +03: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

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.nims script. After executing it, you'll find all converted test vectors in the json_tests folder.