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

FILL_COST on top of Gary's new state reader #12

Open
wants to merge 10 commits into
base: state-reader-3
Choose a base branch
from

Conversation

gballet
Copy link

@gballet gballet commented Jul 30, 2024

This is a rebase of my FILL_COST PR on top of ethereum#30218.

It seems to cause a crash whose root cause must be in the way I try to read the node:

=== RUN   TestProcessVerkle
--- FAIL: TestProcessVerkle (0.33s)
panic: state write error: commit aborted due to earlier error: can't load code hash 0000000000000000000000000000000000000000000000000000000000000000: not found [recovered]
        panic: state write error: commit aborted due to earlier error: can't load code hash 0000000000000000000000000000000000000000000000000000000000000000: not found

goroutine 51 [running]:
testing.tRunner.func1.2({0xe70f80, 0xc007a6e510})
        /usr/local/go/src/testing/testing.go:1631 +0x24a
testing.tRunner.func1()
        /usr/local/go/src/testing/testing.go:1634 +0x377
panic({0xe70f80?, 0xc007a6e510?})
        /usr/local/go/src/runtime/panic.go:770 +0x132
github.com/ethereum/go-ethereum/core.GenerateVerkleChain.func1(0x1, 0xc00019d5f0, 0xc00d144620, 0xc00dda0000)
        /home/gballet/src/go-ethereum/core/chain_makers.go:464 +0x3e7
github.com/ethereum/go-ethereum/core.GenerateVerkleChain(0xc00d144620?, 0xc00da2a000, {0x1244630, 0xc00038abf0}, {0x1249ef0, 0xc00038ac00}, 0xc00d144620, 0x2, 0xc00034dec8)
        /home/gballet/src/go-ethereum/core/chain_makers.go:482 +0x28b
github.com/ethereum/go-ethereum/core.GenerateVerkleChainWithGenesis(0xc000116410, {0x1244630, 0xc00038abf0}, 0x2, 0xc00034dec8)
        /home/gballet/src/go-ethereum/core/chain_makers.go:524 +0x376
github.com/ethereum/go-ethereum/core.TestProcessVerkle(0xc0001ae4e0)
        /home/gballet/src/go-ethereum/core/state_processor_test.go:491 +0x8e5
testing.tRunner(0xc0001ae4e0, 0x1117858)
        /usr/local/go/src/testing/testing.go:1689 +0xfb
created by testing.(*T).Run in goroutine 1
        /usr/local/go/src/testing/testing.go:1742 +0x390
FAIL    github.com/ethereum/go-ethereum/core    0.428s
FAIL

Comment on lines +379 to +381
if sf.trie != nil {
sf.trie.GetStorage(sf.addr, task.key)
}
Copy link
Author

@gballet gballet Aug 22, 2024

Choose a reason for hiding this comment

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

this is because OpenStorageTrie returns its self parameter, which is nil in that case. So the prefetcher will try to prefetch some tree that is empty. You can't simply open the main tree, because that will be a different tree, and you want the main tree to be loaded with all the values needed.

So we need to make the main tree available to the prefetcher when opening the storage tree. In the meantime, this is disabled.

Copy link
Author

Choose a reason for hiding this comment

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

this is fixed in ethereum#30354

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.

2 participants