ferranbt / fastssz

Fast Ethereum2.0 SSZ encoder/decoder
MIT License
73 stars 44 forks source link

fix(hasher): Fix chunk count in `merkleizeImpl` #147

Closed po-bera closed 5 months ago

po-bera commented 5 months ago

Per ssz spec, when packing values, the values is right-padded to a multiple of 32 bytes and the number of chunks is calculated after the values are packed. The current implementation does not handle the case when the length of values is not a multiple of 32 bytes.