mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 05:14:35 +00:00
Optimistic sync spec tests (v1.2.0) (#3564)
## Issue Addressed Implements new optimistic sync test format from https://github.com/ethereum/consensus-specs/pull/2982. ## Proposed Changes - Add parsing and runner support for the new test format. - Extend the mock EL with a set of canned responses keyed by block hash. Although this doubles up on some of the existing functionality I think it's really nice to use compared to the `preloaded_responses` or static responses. I think we could write novel new opt sync tests using these primtives much more easily than the previous ones. Forks are natively supported, and different responses to `forkchoiceUpdated` and `newPayload` are also straight-forward. ## Additional Info Blocked on merge of the spec PR and release of new test vectors.
This commit is contained in:
@@ -117,6 +117,11 @@ impl<E: EthSpec> Operation<E> for Deposit {
|
||||
ssz_decode_file(path)
|
||||
}
|
||||
|
||||
fn is_enabled_for_fork(_: ForkName) -> bool {
|
||||
// Some deposit tests require signature verification but are not marked as such.
|
||||
cfg!(not(feature = "fake_crypto"))
|
||||
}
|
||||
|
||||
fn apply_to(
|
||||
&self,
|
||||
state: &mut BeaconState<E>,
|
||||
|
||||
Reference in New Issue
Block a user