Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add bitlists and bitvectors natively in SSZ nif library #785

Merged
merged 29 commits into from
Feb 20, 2024

Conversation

Arkenan
Copy link
Collaborator

@Arkenan Arkenan commented Feb 20, 2024

Changes

  • Remove the length from the bitlist internal representation.
  • Add encode/decode functions to attestation and pending attestation containers, so that the old library can handle bitlists.
  • Add encode/decode functions to beacon state and sync aggregate so the old library can handle bitvectors.
  • In all points integrating with bitlists and bitvectors (mostly operations and epoch processing), remove the creation and serialization of bitlists and bitvectors, as they are now part of the encoding and decoding process.

Closes #784

Arkenan and others added 22 commits February 8, 2024 19:00
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
@Arkenan Arkenan changed the title Add bitlists and bitvectors natively in SSZ nif library feat: add bitlists and bitvectors natively in SSZ nif library Feb 20, 2024
@Arkenan Arkenan marked this pull request as ready for review February 20, 2024 14:09
@Arkenan Arkenan requested a review from a team as a code owner February 20, 2024 14:09
@Arkenan Arkenan requested review from f3r10 and MegaRedHand February 20, 2024 14:09
Copy link
Collaborator

@MegaRedHand MegaRedHand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

test/unit/ssz_ex_test.exs Outdated Show resolved Hide resolved
@Arkenan Arkenan enabled auto-merge (squash) February 20, 2024 14:41
@Arkenan Arkenan merged commit d4f5633 into main Feb 20, 2024
11 checks passed
@Arkenan Arkenan deleted the 784-ssz-nif-bitlist-and-bitvector-in-library branch February 20, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Add bitlists and bitvectors to the ssz nif library
2 participants