Skip to content

core/state: introduce the TransitionState object (verkle transition part 1) #31634

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

gballet
Copy link
Member

@gballet gballet commented Apr 14, 2025

This is the first part of #31532

It maintains a series of conversion maker which are to be updated by the conversion code (in a follow-up PR, this is a breakdown of a larger PR to make things easier to review). They can be used in two modes:

  • At genesis, by forcing the setting of a conversion marker as "ended". It replaces EnableVerkleAtGenesis.
  • During the conversion, by storing the conversion markers when the block has been processed. This is meant to be written in a function that isn't currently present, hence this TODO.

Part of #31583

@gballet gballet marked this pull request as ready for review April 14, 2025 10:49
@gballet gballet added the verkle label Apr 14, 2025
// SaveTransitionState saves the tree transition progress markers to the database.
SaveTransitionState(common.Hash, *TransitionState)

// LoadTransitionState loads the tree transition progress markers from the database.
Copy link
Member Author

Choose a reason for hiding this comment

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

Gary: move this to the cachingdb

@@ -141,6 +151,50 @@ type Trie interface {
IsVerkle() bool
}

// TransitionState is a structure that holds the progress markers of the
// translation process.
type TransitionState struct {
Copy link
Member Author

Choose a reason for hiding this comment

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

move to its own package

@gballet gballet force-pushed the rebase-master-add-transition-state branch from bb038c6 to 7352993 Compare May 5, 2025 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant