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: use new hash types across the workspace #2984

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

benluelo
Copy link
Contributor

@benluelo benluelo commented Sep 19, 2024

fully migrates all of our hash types to the new Hash<BYTES, E> type.

most of the diff is adding ::new and <>. the changes in ssz/ can be largely ignored, as this is generated code.

this will also allow us to deprecate/ remove a lot of logic we have in serde-utils.

some notes:

  • Hash::get returns &[u8; BYTES]; if we deem this to be too unergonomic we can change it to returning a copy instead.
  • due to issues with how defaults affect type inference, we need to provide the type as <TYPE> instead of just TYPE in some places. if you're curious about why dm me, its too dark to explain here

future work:

  • pull this type into it's own crate
  • add a similar type for Vec<u8>

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
site ⬜️ Ignored (Inspect) Sep 19, 2024 6:33pm

@benluelo benluelo marked this pull request as draft September 20, 2024 11:52
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