lighthouse/testing/ef_tests
Eitan Seri-Levi e4d4e439cb
Add Capella & Deneb light client support (#4946)
* rebase and add comment

* conditional test

* test

* optimistic chould be working now

* finality should be working now

* try again

* try again

* clippy fix

* add lc bootstrap beacon api

* add lc optimistic/finality update to events

* fmt

* That error isn't occuring on my computer but I think this should fix it

* Merge branch 'unstable' into light_client_beacon_api_1

# Conflicts:
#	beacon_node/beacon_chain/src/events.rs
#	beacon_node/http_api/src/lib.rs
#	beacon_node/http_api/src/test_utils.rs
#	beacon_node/http_api/tests/main.rs
#	beacon_node/lighthouse_network/src/rpc/codec/ssz_snappy.rs
#	beacon_node/lighthouse_network/src/rpc/methods.rs
#	beacon_node/lighthouse_network/src/service/api_types.rs
#	beacon_node/network/src/beacon_processor/worker/rpc_methods.rs
#	beacon_node/tests/test.rs
#	common/eth2/src/types.rs
#	lighthouse/src/main.rs

* Add missing test file

* Update light client types to comply with Altair light client spec.

* Fix test compilation

* Merge branch 'unstable' into light_client_beacon_api_1

* Support deserializing light client structures for the Bellatrix fork

* Move `get_light_client_bootstrap` logic to `BeaconChain`. `LightClientBootstrap` API to return `ForkVersionedResponse`.

* Misc fixes.
- log cleanup
- move http_api config mutation to `config::get_config` for consistency
- fix light client API responses

* Add light client bootstrap API test and fix existing ones.

* Merge branch 'unstable' into light_client_beacon_api_1

* Fix test for `light-client-server` http api config.

* Appease clippy

* Add Altair light client SSZ tests

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into light_client_beacon_api_1

* updates to light client header

* light client header from signed beacon block

* using options

* implement helper functions

* placeholder conversion from vec hash256 to exec branch

* add deneb

* using fixed vector

* remove unwraps

* by epoch

* compute merkle proof

* merkle proof

* update comments

* resolve merge conflicts

* linting

* Merge branch 'unstable' into light-client-ssz-tests

# Conflicts:
#	beacon_node/beacon_chain/src/beacon_chain.rs
#	consensus/types/src/light_client_bootstrap.rs
#	consensus/types/src/light_client_header.rs

* superstruct attempt

* superstruct changes

* lint

* altair

* update

* update

* changes to light_client_optimistic_ and finality

* merge unstable

* refactor

* resolved merge conflicts

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into capella_deneb_light_client_types

* block_to_light_client_header fork aware

* fmt

* comment fix

* comment fix

* include merge fork, update deserialize_by_fork, refactor

* fmt

* pass by ref to prevent clone

* rename merkle proof fn

* add FIXME

* LightClientHeader TestRandom

* fix comments

* fork version deserialize

* merge unstable

* move fn arguments, fork name calc

* use task executor

* remove unneeded fns

* remove dead code

* add manual ssz decoding/encoding and add ssz_tests_by_fork macro

* merge deneb types with tests

* merge ssz tests, revert code deletion, cleanup

* move chainspec

* update ssz tests

* fmt

* light client ssz tests

* change to superstruct

* changes from feedback

* linting

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into capella_deneb_light_client_types

* test fix

* cleanup

* Remove unused `derive`.

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into capella_deneb_light_client_types

* beta compiler fix

* merge
2024-03-25 11:01:56 +00:00
..
src Add Capella & Deneb light client support (#4946) 2024-03-25 11:01:56 +00:00
tests Add Capella & Deneb light client support (#4946) 2024-03-25 11:01:56 +00:00
.gitignore Add a new bls test (#3235) 2022-10-12 23:40:42 +00:00
Cargo.toml Delete milagro library (#5298) 2024-03-06 23:17:42 +00:00
check_all_files_accessed.py Add Capella & Deneb light client support (#4946) 2024-03-25 11:01:56 +00:00
Makefile Update to consensus spec v1.4.0-beta.6 (#5094) 2024-02-08 18:08:21 +00:00
README.md Update spec tests to v1.1.0-beta.4 (#2548) 2021-09-25 05:58:35 +00:00

Consensus Specification Tests

This crate parses and executes the test vectors at ethereum/consensus-spec-tests.

Functionality is achieved only via the $ cargo test --features ef_tests command.

Running the Tests

Because the test vectors are very large, we do not download or run them by default. To download them, run (in this directory):

$ make

Note: this may download hundreds of MB of compressed archives from the ethereum/consensus-spec-tests, which may expand into several GB of files.

If successful, you should now have the extracted tests in ./consensus-spec-tests.

Run them with:

$ cargo test --features ef_tests

The tests won't run without the ef_tests feature enabled (this is to ensure that a top-level cargo test --all won't fail on missing files).

Saving Space

When you download the tests, the downloaded archives will be kept in addition to the extracted files. You have several options for saving space:

  1. Delete the archives (make clean-archives), and keep the extracted files. Suitable for everyday use, just don't re-run make or it will redownload the archives.
  2. Delete the extracted files (make clean-test-files), and keep the archives. Suitable for CI, or temporarily saving space. If you re-run make it will extract the archives rather than redownloading them.
  3. Delete everything (make clean). Good for updating to a new version, or if you no longer wish to run the EF tests.