Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop LEAF's operand #19

Open
s1na opened this issue Sep 6, 2019 · 0 comments
Open

Drop LEAF's operand #19

s1na opened this issue Sep 6, 2019 · 0 comments
Assignees

Comments

@s1na
Copy link
Collaborator

s1na commented Sep 6, 2019

Leaves are sent in the multiproof slightly different than how they are actually stored in the trie. The difference lies in the key. In the multiproof the first part of a leaf is the full path from root to leaf, instead of the partial path from previous node to leaf. The LEAF opcode has an operand digit which specifies how to get this partial path by cutting a prefix of the full path.

This incurs some overhead on the verifier. If the leaf was sent "normally" verifier could simply hash it without any modifications. But now, they have to decode the leaf, decode hex prefix of key, split it, encode via hex prefix, encode RLP and then hash.

My question is what's the trade-off here? what will we lose if we send leaves "normally" and not send the full path as their keys?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant