Closed PavitraAgarwal21 closed 4 days ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
raito | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 11, 2024 5:39am |
Hey @maciejka , could you take a look at the changes in the encode traits? I’d like to confirm if the core logic seems solid to you. If it looks good, I'll start updating the tests and addressing any minor errors. Thanks for your help!
@maciejka I think this would not work because of compact size encoding and pubkey script (and also segwit flags).
Maybe we can instead use a more efficient ByteArray
alternative?
struct WordArray {
buffer: Array<u32>,
pending_word_len: usize
}
In case the pending word is partially filled we apply inefficient algorithm involving mult/div, if we are lucky and pending word len is 0 and our item happened to be of u32 - then we just append.
Will need to benchmark this to make sure we are actually gaining something.
Isn't ByteArray doing the same but with 8 bits of granularity? What we save here is that we don't need to deserialize from array of felts to an array of u32 before hashing.
Hey! @m-kus @maciejka , what idea should we move forward with?
Isn't ByteArray doing the same but with 8 bits of granularity? What we save here is that we don't need to deserialize from array of felts to an array of u32 before hashing.
Yes, ByteArray packs data into 31-byte chunks which we later convert to Array
Isn't ByteArray doing the same but with 8 bits of granularity? What we save here is that we don't need to deserialize from array of felts to an array of u32 before hashing.
@PavitraAgarwal21we are busy at devcon. Sorry for the delay. I will have a look today.