Closed LindaGuiga closed 11 months ago
Looks good to me! Can you just explain why we need to constrain the trie data length and root pointers?
I can remove the length and pointers for the extra_block_data
and replace that with a memory store in the Kernel, if that' s what you mean? (I still need to have a memory read since GlobalMetadata
cannot yet be preinitialized given the constraints).
Kudos, SonarCloud Quality Gate passed!
This PR preinitializes the
TrieData
segment with the initial tries. The tries are still checked by asserting the equality of hashes, but we also need to constrain the length of the segment. This is done by computing the expected length inmpt_hash
and asserting its equality with theGlobalMetadata
value.For add11_yml, it removes 474 CPU cycles and 9057 memory rows. The gains would be much higher for bigger initial tries.
Please let me know what you think!