-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
Dealing with journal version upgrades #31131
Comments
This behavior is not expected in Geth. The discarded journal corresponds to the layers in memory. Geth can recover from losing all memory states, which is equivalent to an unclean shutdown. Maybe it's something specific with op-Geth? |
Thanks for reply! Interesting, we'll investigate if it has something to do with our diff then. It doesn't always happen, just sometimes. |
It could also be a bug of course! |
I investigated the logs of our node during the restart that removed the journal, and the pre-restart logs, and found: https://gist.github.com/protolambda/7e2002a0de7cf868fbc1617fffa656cd I believe the journal became too large due to a large write-buffer during shutdown, and once the node removed the journal due to the version change, the gap was so large that the state was unavailable. I opened a potential fix in op-geth to limit the number of difflayers in the write-buffer: ethereum-optimism/op-geth#497 |
reopening, as we have only (hopefully) fixed it in our fork |
Whenever the journal version is upgraded, a new geth release will discard the outdated journal at startup with a message like
This may then lead to the node being in a broken state, especially if it's a full node, e.g. complaining about missing trie nodes like
The node then has to be manually recovered.
The list of journal version upgrades includes:
1
: core/state, trie/triedb/pathdb: remove storage incomplete flag #289402
: triedb/pathdb: track flat state changes in pathdb (snapshot integration pt 2) #306433
: all: implement state history v2 #30107When geth went from
0
to1
, we introduced a journal version upgrade path in op-geth (ethereum-optimism/op-geth#368). But it doesn't seem like a scalable approach to always add upgrade paths, now going from 1 to 2 and 3.What is the recommended way how to deal with journal version upgrades? I couldn't find any recommendations in the geth release notes.
The text was updated successfully, but these errors were encountered: