eth2.0-specs/test_generators/shuffling
protolambda d7b7640221
overhaul shuffling tests, focus on swap-or-not shuffle
2019-04-11 18:33:46 +10:00
..
README.md overhaul shuffling tests, focus on swap-or-not shuffle 2019-04-11 18:33:46 +10:00
main.py overhaul shuffling tests, focus on swap-or-not shuffle 2019-04-11 18:33:46 +10:00
requirements.txt update shuffling 2019-04-11 01:52:51 +10:00

README.md

Shuffling Tests

Tests for the swap-or-not shuffling in ETH 2.0.

For implementers, possible test runners implementing testing can include:

  1. just test permute-index, run it for each index i in range(count), and check against expected output[i] (default spec implementation)
  2. test un-permute-index (the reverse lookup. Implemented by running the shuffling rounds in reverse: from round_count-1 to 0)
  3. test the optimized complete shuffle, where all indices are shuffled at once, test output in one go.
  4. test complete shuffle in reverse (reverse rounds, same as 2)

Tips for initial shuffling write: