Skip to content

Question about leaf marker #440

@acolytec3

Description

@acolytec3

I was talking with @kevaundray recently regarding the leaf marker and how it's implemented around here in go-verkle (and I believe similarly in rust-verkle). If I understand this code + @kevaundray 's explanation correctly, both libraries always include the leaf marker (i.e. a 1 on the 129th bit of the v^lower value that's used when updating the c1 or c2 commitment corresponding to the half of a leaf node's values array) once a value has been written to (regardless of what that value is, as long as it's "touched"). The EIP seems to say that this leaf marker should only be set when a leaf value contains 0 to demonstrate that it's a leaf value that's been touched since theoretically a leaf value that hasn't been touched also contains a value of 0. Am I understanding the go-verkle code correctly here? Just wanted to clarify since it seems different that it's different than the EIP and my JS implementation only uses the leaf marker when the written value is 0 so we would produce different commitments than go-verkle when the value is non-zero.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions