Closed maciejka closed 2 months ago
Hello, can I try to do it ?
Hey @Jeanmichel7! Thanks for showing interest. We've created an application for you to contribute to Raito - Bitcoin ZK Client. Go check it out on OnlyDust!
@maciejka
hey can i take this issue
Hey @PavitraAgarwal21! Thanks for showing interest. We've created an application for you to contribute to Raito - Bitcoin ZK Client. Go check it out on OnlyDust!
@maciejka it seems that TAdev0 is already assigned to another issue, is it possible to assign it to me?
Hey, sorry for the confusion. We discussed assigning him on the project tg group. Maybe you can work together? @TAdev0?
pt., 9 sie 2024, 18:21 użytkownik Jean-Michel @.***> napisał:
@maciejka https://github.com/maciejka it seems that TAdev0 is already assigned to another issue, is it possible to assign it to me?
— Reply to this email directly, view it on GitHub https://github.com/keep-starknet-strange/raito/issues/50#issuecomment-2278307799, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABOTB6ETYNTLO5CFJKF2JTZQTT7LAVCNFSM6AAAAABMISMASGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZYGMYDONZZHE . You are receiving this because you were mentioned.Message ID: @.***>
Please go ahead @Jeanmichel7 if you d like
Ah ok I should also join the Telegram group, it's up to you
ok well, lets both work on it, and we can review together once one or other has pushed a PR? what do you think?
ok let's do that, I'll be available tomorrow for the review and push my draft optimizations.
hi @Jeanmichel7 , just pushed a PR which is ready for review. You can check it out and see what you can improve. There is no doubt there is room for improvements in my impl, i'll give it a second look tomorrow as well
hi @TAdev0 , you've already made the changes I was thinking of making, so I continued from your code to try to improve performance by rewriting compute_sha256_u32_array to be more specific to our use case, but that only improved performance a little. On the big test I'm at 55468570 instead of 58159320gas. I don't know if it's a good idea, I'm pushing a draft and I'd like your opinion.
Current
merkle_root
calculation usesu256
to represent internal hashes in the tree. While this seems very natural, it is not how things work internally. Under the hoodcompute_sha256_u32_array
which acceptsArray<u32>
and returns[u32; 8]
, so some work is wasted doing conversions. Try to optimise the process. Don't go too far thoughmerkle_root
function should still returnu256
but can acceptArray<Array<u32>>
.Provide speedup measurements.