ethereum / go-verkle

A go implementation of Verkle trees
The Unlicense
210 stars 64 forks source link

No right padding for values #409

Open rjl493456442 opened 1 year ago

rjl493456442 commented 1 year ago

The Verkle Trie implementation requires that the values in Verkle leaf nodes be right-padded to 32 bytes when serialized. However, this approach may not be optimal for all use cases, especially when storing small entries such as (1) account nonces, (2) account versions, or (3) storage slots. In particular, storage slots often contain data that is smaller than 32 bytes, and right-padding can result in a significant waste of storage space.

Do we even consider to change to serialization spec a bit, by introducing the prefix length marker or something else?