Files
lighthouse/testing/state_transition_vectors
Michael Sproul 2b84597525 Split common crates out into their own repos (#3890)
Squashed commit of the following:

commit 1ba4f80cc0
Author: Michael Sproul <michael@sigmaprime.io>
Date:   Tue Jan 17 11:43:18 2023 +1100

    Bye 1.0.0 beta, hello 0.5.x

commit a862b234b2
Author: Michael Sproul <michael@sigmaprime.io>
Date:   Tue Jan 17 10:54:46 2023 +1100

    Cargo fmt

commit e29f358a9e
Author: Michael Sproul <michael@sigmaprime.io>
Date:   Mon Jan 16 18:21:42 2023 +1100

    It compiles :O

commit 1ee4514b7d
Author: Michael Sproul <michael@sigmaprime.io>
Date:   Mon Jan 16 17:27:10 2023 +1100

    Ethereum hashing

commit 69bdd1d61f
Author: Michael Sproul <michael@sigmaprime.io>
Date:   Mon Jan 16 17:24:58 2023 +1100

    Tree hash et al

commit 7cae5d99d7
Author: Michael Sproul <michael@sigmaprime.io>
Date:   Mon Jan 16 17:21:03 2023 +1100

    Delete crates!

commit dd9ee38084
Author: Michael Sproul <michael@sigmaprime.io>
Date:   Mon Jan 16 17:19:19 2023 +1100

    Delete overrides

commit 0d54534eb4
Author: Michael Sproul <michael@sigmaprime.io>
Date:   Mon Jan 16 17:19:04 2023 +1100

    Crate renames
2023-01-17 13:41:34 +11:00
..
2020-05-18 21:24:23 +10:00
2020-05-18 21:24:23 +10:00
2020-05-18 21:24:23 +10:00

state_transition_vectors

This crate contains test vectors for Lighthouse state transition functions.

This crate serves two purposes:

  • Outputting the test vectors to disk via make.
  • Running the vectors against our code via make test.

Outputting vectors to disk

Whilst we don't actually need to write the vectors to disk to test them, we provide this functionality so we can generate corpra for the fuzzer and also so they can be of use to other clients.

To create the files in ./vectors (directory relative to this crate), run:

make

This will produce a directory structure that looks roughly like this:

vectors
└── exit
    ├── invalid_bad_signature
    │   ├── block.ssz
    │   ├── error.txt
    │   └── pre.ssz
    ├── invalid_duplicate
    │   ├── block.ssz
    │   ├── error.txt
    │   └── pre.ssz
    ├── invalid_exit_already_initiated
    │   ├── block.ssz
    │   ├── error.txt
    │   └── pre.ssz
    ├── invalid_future_exit_epoch
    │   ├── block.ssz
    │   ├── error.txt
    │   └── pre.ssz
    ├── invalid_not_active_after_exit_epoch
    │   ├── block.ssz
    │   ├── error.txt
    │   └── pre.ssz
    ├── invalid_not_active_before_activation_epoch
    │   ├── block.ssz
    │   ├── error.txt
    │   └── pre.ssz
    ├── invalid_too_young_by_a_lot
    │   ├── block.ssz
    │   ├── error.txt
    │   └── pre.ssz
    ├── invalid_too_young_by_one_epoch
    │   ├── block.ssz
    │   ├── error.txt
    │   └── pre.ssz
    ├── invalid_validator_unknown
    │   ├── block.ssz
    │   ├── error.txt
    │   └── pre.ssz
    ├── valid_genesis_epoch
    │   ├── block.ssz
    │   ├── post.ssz
    │   └── pre.ssz
    └── valid_previous_epoch
        ├── block.ssz
        ├── post.ssz
        └── pre.ssz