lighthouse/testing/ef_tests/src
Giulio rebuffo 9d6209725f Added Merkle Proof Generation for Beacon State (#3674)
## Issue Addressed

This PR addresses partially #3651

## Proposed Changes

This PR adds the following methods:

* a new method to trait `TreeHash`, `hash_tree_leaves` which returns all the Merkle leaves of the ssz object.
* a new method to `BeaconState`: `compute_merkle_proof` which generates a specific merkle proof for given depth and index by using the `hash_tree_leaves` as leaves function.

## Additional Info

Now here is some rationale on why I decided to go down this route: adding a new function to commonly used trait is a pain but was necessary to make sure we have all merkle leaves for every object, that is why I just added  `hash_tree_leaves`  in the trait and not  `compute_merkle_proof` as well. although it would make sense it gives us code duplication/harder review time and we just need it from one specific object in one specific usecase so not worth the effort YET. In my humble opinion.

Co-authored-by: Michael Sproul <micsproul@gmail.com>
2022-11-08 01:58:18 +00:00
..
cases Added Merkle Proof Generation for Beacon State (#3674) 2022-11-08 01:58:18 +00:00
bls_setting.rs Bump the MSRV to 1.62 and using #[derive(Default)] on enums (#3304) 2022-07-15 07:31:19 +00:00
case_result.rs Rust 1.54.0 lints (#2483) 2021-07-30 01:11:47 +00:00
cases.rs Added Merkle Proof Generation for Beacon State (#3674) 2022-11-08 01:58:18 +00:00
decode.rs Replace OpenOptions::new with File::options to be readable (#3059) 2022-03-07 06:30:18 +00:00
error.rs Add fork choice EF tests (#2737) 2021-11-08 07:29:04 +00:00
handler.rs Added Merkle Proof Generation for Beacon State (#3674) 2022-11-08 01:58:18 +00:00
lib.rs Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
results.rs Rust 1.54.0 lints (#2483) 2021-07-30 01:11:47 +00:00
type_name.rs Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00