ethereum-optimism / op-geth

GNU Lesser General Public License v3.0
290 stars 757 forks source link

debug rpc request historical data always returns an error #107

Open rayn316 opened 1 year ago

rayn316 commented 1 year ago

System information

Geth version: op-geth version 0.1.0-unstable-39d121af-20230615 OS & Version: Linux

Actual behaviour

I'm having trouble running Legacy Geth, there's been a problem executing the debug_traceBlockByNumber, debug_traceBlockByNumber methods.

run cmd:

USING_OVM=true ETH1_SYNC_SERVICE_ENABLE=false /node/archive/optimism-classic/bin/op-geth --datadir=/node/archive/optimism-classic/geth --gcmode=archive --syncmode=full --snapshot=false --rpc.gascap=600000000 --rpc.evmtimeout=10s --txlookuplimit=0 --maxpeers=0 --nodiscover --http --http.addr=0.0.0.0 --http.api 'eth,net,web3,debug,txpool' --http.vhosts=* --http.corsdomain=* --port=21364 --http.port=21365 --authrpc.port 21369

error: tracing failed: insufficient funds for gas * price + value

Jul 24 04:16:34 op-geth[793605]: WARN [07-24|04:16:34.861] Served debug_traceBlockByNumber          conn=127.0.0.1:58356 reqid=2 duration=11.830971ms err="tracing failed: insufficient funds for gas * price + value: address 0x57fe8051B897a14b4cbF84c22e7EEEA0b30bA903 have 0 want 500000000000"

Backtrace

[backtrace]

When submitting logs: please submit them as text and not screenshots.

sbvegan commented 1 year ago

Hey @sundafa, it looks like you're running an old version of op-geth. Can you try the latest version: https://github.com/ethereum-optimism/op-geth/releases ?

rayn316 commented 1 year ago

Both new versions, still doesn't work, The request result still returns an error

./op-geth version
Geth
Version: 0.1.0-unstable
Git Commit: b5fecf58ec77909c70bd15b96b32b593af0b38ff
Upstream Version: 1.11.6-stable
Architecture: amd64
Go Version: go1.19.11
Operating System: linux
GOPATH=/root/go
GOROOT=

/op-geth_bak version
Geth
Version: 0.1.0-unstable
Git Commit: 39d121af21bc4cb45c46edf2dc1bf33daa28c54d
Git Commit Date: 20230615
Upstream Version: 1.11.6-stable
Architecture: amd64
Go Version: go1.19.9
Operating System: linux
GOPATH=/root/go
GOROOT=
sbvegan commented 1 year ago

Are you running Legacy Geth (l2geth) as well? This is a requirement to perform debug_trace for pre-Bedrock. Here's some relevant documentation: https://community.optimism.io/docs/developers/bedrock/node-operator-guide/#legacy-geth

rayn316 commented 1 year ago

This problem is aimed at the Legacy Geth node. After running, there is a problem when querying old data. Neither the previous geth nor the upgraded geth software can return data normally. Data is the downloaded snapshot boot, https://datadirs.optimism.io/mainnet-legacy-archival.tar.zst Run command environment variables and requirements are met.