ethereum / research

MIT License
1.82k stars 591 forks source link

verkle_trie: Take the field element value for r and t #119

Closed gballet closed 3 years ago

gballet commented 3 years ago

From reading the spec, I understand r and t to be field elements and not arbitrary-length integers. The python reference, however, will directly hash as an integer, even if it is greater than MODULUS.

I believe that r and t should be taken as field elements, since it consumes less memory to discard the full hash as soon as a field element has been generated from it, instead of having to keep two copies around. Also, I believe this approach would simplify the semantics.