-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add tree hash implementation for fixed bytes #27
Add tree hash implementation for fixed bytes #27
Conversation
I think we can probably make a generic impl that covers |
It's weird that we have |
The implementation logics between
The |
They are different, yes. But I'm not convinced that they should be. I think that might be an oversight |
Do you think we can just implement the tree_hash implementation logic for |
Yes, see: I need one of my colleagues to review, but I think we should be Ok with a generic impl. |
I ended up adding the generic implementations in that PR, so I could see all the changes in one place. I can add you as a co-author if you would like? |
Thank you for your help. Can we release the v0.9.1 with this change? I need the And I'd be happy to be a co-author with you. |
Yes I think we can do a backwards-compatible v0.9.1 release, as soon as my PR is reviewed. I've added a commit with you as co-author so you'll get some credit. I'll close this PR now in favour of: |
Thank you for your help with this task. |
v0.9.1 is out now 🎉 |
This is great. I'll create another PR on ssz_types repo with new tree_hash crate version. |
I created a PR towards the |
Relevant to #22, I'm adding the new
impl_for_fixed_bytes
macro which can be used to implement theTreeHash
trait toFixedBytes<N>
struct.It's not available for us to implement it like
impl<const N: usize> for FixedBytes<N>
because there's already aTreeHash
implementation forB256
which is represented asFixedBytes<32>
.tree_hash/tree_hash/src/impls.rs
Lines 166 to 182 in e9708cd