nimbus-eth2/tests/official
Mamy Ratsimbazafy ad133a0222
Official state tests - parsing and loading beacon state (#227)
* initial commit of official state tests

* sanity check fixture

* Parsing official state test is mostly working
(Except BLS signature)

* Successfully load state test

* Use json-serialization instead of json and display deserialized and from scratch beacon state hashes

* Add official state test as a smoke parsing test
2019-04-02 16:50:24 +02:00
..
eth2.0-tests@3ec28295b0 Official state tests - parsing and loading beacon state (#227) 2019-04-02 16:50:24 +02:00
README.md Official state tests - parsing and loading beacon state (#227) 2019-04-02 16:50:24 +02:00
fixtures_utils.nim Official state tests - parsing and loading beacon state (#227) 2019-04-02 16:50:24 +02:00
sanity-check_default-config_100-vals-first_test.json Official state tests - parsing and loading beacon state (#227) 2019-04-02 16:50:24 +02:00
sanity-check_default-config_100-vals-first_test.yaml Official state tests - parsing and loading beacon state (#227) 2019-04-02 16:50:24 +02:00
test_fixture_state.nim Official state tests - parsing and loading beacon state (#227) 2019-04-02 16:50:24 +02:00

README.md

Note on serialization hacks:

FAR_FUTURE_SLOT (18446744073709551615)

The FAR_FUTURE_SLOT (18446744073709551615) has been rewritten as a string in the YAML file as it's 2^64-1 and Nim by default try to parse it into a int64 (which can represents up to 2^63-1).

The YAML file is then converted to JSON for easy input to the json serialization/deserialization with beacon chain type support.

"18446744073709551615" is then replaced again by uint64 18446744073709551615.

Compressed signature

In latest_block_header field, the signatures and randao_reveals are "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" but that is not a valid compressed BLS signature, the zero signature should be: "0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"