ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.57k stars 3.21k forks source link

v1.9.1 WARN path & hash #12171

Open AdamRabbit opened 5 days ago

AdamRabbit commented 5 days ago

I encountered the following error when running Optimism version 1.9.1:

Fatal: Failed to register the Ethereum service: incompatible state scheme, stored: path, provided: hash

The error was resolved by removing the --gcmode=archive option. After synchronizing the data, transactions are functioning correctly, but there are continuous warning logs like the following:

WARN [09-27|06:47:49.691] Served eth_getBalance conn=172.31.18.226:50638 reqid=25 duration="7.009µs" err="missing trie node 18d5c42044ee35a292df57229fe87e6389771360e805d66bb16a26e719297d2f (path ) state 0x18d5c42044ee35a292df57229fe87e6389771360e805d66bb16a26e719297d2f is not available"
WARN [09-27|06:47:49.691] Served eth_getBalance conn=172.31.18.226:50638 reqid=34 duration="7.784µs" err="missing trie node 1ddccc4cca915e168572e83606db18c3ac515c8f95fb85b65981ff377524ce02 (path ) state 0x1ddccc4cca915e168572e83606db18c3ac515c8f95fb85b65981ff377524ce02 is not available"

These warnings appear frequently, generating over 100GB of logs per hour. I want to understand what the issue might be and how to resolve it.

dome commented 5 days ago

for custom chain use --state.scheme=hash when init geth init --state.scheme=hash --datadir=/root/datadir /root/config/genesis.json

tynes commented 4 days ago

The database format for go-ethereum changed which is causing this error. If syncing OP Mainnet, you can resync your node with the new format if you would like a smaller database overall or just pass in the legacy flay --state.scheme=path