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

[wip] replay at 17M but deleting storage slots + accounts #475

Draft
wants to merge 1 commit into
base: replay-17m
Choose a base branch
from

Conversation

gballet
Copy link
Owner

@gballet gballet commented Aug 23, 2024

note: This is mostly for me to remember the current state on monday since I have to move on to something else and want to jot down notes before I do.

This approach deletes values from the verkle tree, and also from the merkle tree. It's only intended to work with block replay. Most of the difficulty comes from being pre-cancun, as accounts have to be deleted also.

@@ -193,10 +193,14 @@ func ImportChain(chain *core.BlockChain, fn string) error {
}
i := 0
for ; i < importBatchSize; i++ {
if i == 1907 {
break
Copy link
Owner Author

Choose a reason for hiding this comment

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

this is because the test file I have is truncated

@@ -289,7 +289,7 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo
}
// Create a new context to be used in the EVM environment
blockContext := NewEVMBlockContext(header, bc, author)
istarget := blockContext.BlockNumber.Uint64() == 17366216
istarget := blockContext.BlockNumber.Uint64() == 17165311
Copy link
Owner Author

Choose a reason for hiding this comment

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

error at this location. It doesn't seem like the problem of the nyota costs, even though it's at the same block.

Comment on lines +213 to +217
for i := 0; i < 256; i++ {
key[31] = byte(i)
if root, err := t.root.(*verkle.InternalNode).Delete(key, t.FlatdbNodeResolver); root || err != nil {
return fmt.Errorf("error deleting key %x: %w", err)
}
Copy link
Owner Author

Choose a reason for hiding this comment

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

need to rebase to get DeleteAtStem

@gballet
Copy link
Owner Author

gballet commented Aug 23, 2024

Fails at this tx: 0x900a68afa7a2837bf2387b62c661cdec8f062e18957b7e0f9cb20b77d31cafc0

@gballet
Copy link
Owner Author

gballet commented Aug 23, 2024

Ignacio correctly points out: on top of the conversion, deleting values isn't supported by the proof system since we can't mark something as deleted.

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.

1 participant