EPF C4 - Tomás Arjovsky - Week 16

These are the updates for the week of 2023/10/30. This is the last regular update.

Spec tests performance

While this feature was finished on week 15, I had to fix some CI issues to merge the PR.

Diff functions for beacon state

Many contributors were having troubles debugging failing spec tests. The main reason was that sometimes BeaconStates can be very big, and when elixir prints the expected state compared with the obtained post state, the console was overflown with output.

I designed and implemented a simple utility that compared any two elixir maps/structures/lists and printed the exact difference and nothing else. This helped many builders to quickly identify their issues and fixed their code. As an example, one of them was debugging an epoch procesing state transition function for days, and was able to locate the error an hour after my PR was merged.

BitVector Library

Most contributors working with SSZ bit-vectors were having common issues:

  • The little-endian bit indexing.
  • Getting values of individual bits.
  • Shifting bits in the right directions.
  • Asserting if a range of bits is set.
  • Setting or clearing a single bit.

These are all normal operations, so I designed a library to implement all of these behaviors over bitvectors, independent of the internal representation (be it bitstrings, integers, etc).

The library was merged in this PR.

Select a repo