Skip to content

State identifying during verkle transition #31583

@rjl493456442

Description

@rjl493456442

To switch to the Verkle trie, a state transition period is required. During this transition,
a fresh state is created to store mutations from recent blocks. Meanwhile, the referenced
Merkle state serves as the base state. If the state entry is not found in the new Verkle state,
it falls back to the Merkle state for access.

The issue arises around how to uniquely identify the state during the transition period.
In the current proposal, the verkle state root is used as the identifier; however, this is
unfortunately insufficient.

For example, if the fork block is at height N, there may be two valid merkle states, M1
and M2, at block N. Due to a mini-reorg, both states could be eligible as the base
merkle state.

M1 contains accounts: A1
M2 contains accounts: A2

In the first verkle block N+1, the account A3 is created. If M1 is chosen as the
base state, the merged state will be A1 and A3; otherwise, the merged state will
be A2 and A3, while the verkle state root is same.

The single verkle state root is not sufficient to identifying which base state should be
selected.


To address this issue, the mapping from block-hash to base-state-root should be
explicitly tracked until the Verkle transition is fully completed. Note, the mapping
is essential regardless of the state migration is started or not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions