SIGN IN SIGN UP
unionlabs / union UNCLAIMED

The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.

0 0 174 Rust

feat: use new hash types across the workspace (#2984)

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>`
B
ben committed
c19e6af97ee364999a48057d20da7f904affff0d
Committed by GitHub <noreply@github.com> on 9/23/2024, 4:18:10 PM