keep-starknet-strange / raito

Bitcoin ZK client written in Cairo.
https://raito.wtf
MIT License
40 stars 35 forks source link

[feat] Optimize the way we serialize transactions #298

Open maciejka opened 1 day ago

maciejka commented 1 day ago

Currently we use Encode trait to serialize data before hashing. There is a performance problem in this approach as ByteArray, which is a type of the buffer we serialize to, is not the type sha256 works with. So ByteArray needs to be converted to Array<u32> before hashing. It would be more optimal to use Array<u32> as a buffer type in the codec module.

ShantelPeters commented 1 day ago

Hi @maciejka
Please can I work on this?

mubarak23 commented 1 day ago

Hi @maciejka Please can I work on this?

HMMMM

mubarak23 commented 1 day ago

@maciejka let work and optimize this part of the code,

here is how i will approach,

PavitraAgarwal21 commented 1 day ago

Hey @maciejka Can I take this up, as I have worked with encode trait before

Jeanmichel7 commented 1 day ago

Interested too. Exercise I've already done and am familiar with Encode