You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Embedded nodes are MPT nodes that are inlined inside another MPT node if their RLP encoded payload's len < 32
We want to properly handle them in our trie diff library.
In all the places in the codebase we have control flow that depends of the existence of embedded nodes, we wrongfully assume the embedded nodes are RLP encoded. We need to replace the rlp.decode call on the embedded nodes' sequence of bytes to a deserialization call.
How
In mpt>utils, refactor decode_node to externalise the logic to serialize RLP bytes into a InternalNode class.
Why
Embedded nodes are MPT nodes that are inlined inside another MPT node if their RLP encoded payload's len < 32
We want to properly handle them in our trie diff library.
This wrong behaviour has not yet caused an issue since embedded nodes seem to be rare.
See: https://github.com/kkrt-labs/keth/pull/1079/files#diff-4050cfe1abd84327a9e0b978797778a485c186572bacba9f45dea39fe3e5961aR11
What
In all the places in the codebase we have control flow that depends of the existence of embedded nodes, we wrongfully assume the embedded nodes are RLP encoded. We need to replace the rlp.decode call on the embedded nodes' sequence of bytes to a deserialization call.
How
In mpt>utils, refactor decode_node to externalise the logic to serialize RLP bytes into a InternalNode class.
In
resolve
function in trie_diff replace the call to rlp.decode by a call to deserialize:In _resolve in Cairo, if any remove the RLP decode logic for embedded nodes.
The text was updated successfully, but these errors were encountered: