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

Build out verkle trie processing #3430

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

Conversation

acolytec3
Copy link
Contributor

WIP

Copy link
Contributor

@gabrocheleau gabrocheleau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a little bit of time and quickly glanced through, nice work! left some comments on some of your questions/todos

electra.yaml Outdated
- el_type: ethereumjs
el_image: ethereumjs:local
cl_type: grandine
cl_image: ethpandaops/grandine:feature-electra
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like that should belong to this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't. Accidentally included and will remove.

// Index of the child pointed by the next byte in the key
const childIndex = stem[this.depth]

const child = this.children[childIndex]

if (child instanceof LeafNode) {
// TODO: Understand the intent of what cowChild is suppoded to do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cow stands for "copy-on-write". As far as I recall cowChild is used as a record to mark the children that have been modified, in order to stack the commitment updates at the end since that is way more efficient.


// TODO - Why is the leaf node set at depth + 2 instead of + 1)?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this is because the leaf is inserted in the position of the suffix level commitment. So we have:

depth n : internal node:
depth n+1: the extension level commitment
depth n+2: the suffix level commitment

See this picture for how that corresponds to the structure:
image

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

Successfully merging this pull request may close these issues.

None yet

2 participants