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

Move BitList and BitVector to ethereum_ssz #25

Merged
merged 7 commits into from
Sep 3, 2024

Conversation

macladson
Copy link
Member

@macladson macladson commented Jul 26, 2024

In preparation of EIP-7495, it will be very useful to have a fully functional BitVector implementation in this crate, so we don't need to depend on ssz_types, avoiding a circular dependency.

This moves the two types previously defined in https://github.com/sigp/ssz_types to ethereum_ssz/ssz. This will allow us to utilize it within ssz_derive.

This PR should be paired with an equivalent PR in ssz_types which removes the types and instead re-exports them from ethereum_ssz. It should also be paired with a PR in tree_hash which implements TreeHash for BitVector and BitList.

Related PRs:

Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 71.68142% with 64 lines in your changes missing coverage. Please review.

Project coverage is 77.48%. Comparing base (c28ae8c) to head (91b5130).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ssz/src/bitfield.rs 71.68% 64 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
- Coverage   80.16%   77.48%   -2.69%     
==========================================
  Files          11       12       +1     
  Lines         489      715     +226     
==========================================
+ Hits          392      554     +162     
- Misses         97      161      +64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

mod decode;
mod encode;
pub mod legacy;
mod union_selector;

#[doc(hidden)]
Copy link
Member Author

Choose a reason for hiding this comment

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

I've hidden these types in the docs which I believe means the current documentation should remain unchanged.

Since we are re-exporting the Bitfield types in ssz_types the documentation for them will still exist in that crate. Like it does now.

There might be an argument for moving the documentation across (or duplicating it), but I'm loosely in favour of this approach for now.

Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

LGTM. The diff from ssz_types is minimal now that resize has been added.

@michaelsproul michaelsproul merged commit 2814512 into sigp:main Sep 3, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants