Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Debugger crashes when used with Geth versions 1.10.9 and up #4565

Closed
haltman-at opened this issue Dec 22, 2021 · 2 comments
Closed

Debugger crashes when used with Geth versions 1.10.9 and up #4565

haltman-at opened this issue Dec 22, 2021 · 2 comments

Comments

@haltman-at
Copy link
Contributor

haltman-at commented Dec 22, 2021

Issue

When the debugger is used with Geth, on versions 1.10.9 and up, it crashes. This is due to this Geth issue; there's no memory in the traces and this causes a crash.

It'll be easy enough to fix the crash, but the question then becomes, what do we actually do without memory? One possibility would be to compute the memory ourselves, but I don't think that's really reasonable.

Another possibility is to act as if memory is just always empty (so memory variables will always display as 0, or empty string, or empty array, etc). I think this is a reasonable interim workaround, but it'll be confusing to users. I think that if we do this, we should also print a warning on debugger startup. (This will mean that the necessary information, that memory is missing, will have to somehow make its way from the web3 saga to the debugger CLI... presumably it'd get stored in the state somewhere.)

Steps to Reproduce

Download Geth (version 1.10.9 or later). Run geth --dev --http --http.api eth,net,debug. (If you're using my repo of solidity test cases, you may want to instead run geth --dev --http --http.api eth,net,debug --http.port 7545). Run a transaction against it, then attempt to debug it.

Environment

  • Ethereum client: Geth, versions 1.10.9 and up (most recent at time of submission: 1.10.13)
  • Truffle version (truffle version): 5.4.25
@kasvtv
Copy link

kasvtv commented Dec 22, 2021

Can confirm this as well for Remix. After many hours yesterday, I found that the Remix debugger does not work when connected through the Web3 Provider to a local geth instance ever since version 1.10.9, including the latest 1.10.13.

To any beginner trying to solve the issue, if you have Golang installed, you can rebuild geth 1.10.8 from source using:

go get github.com/ethereum/go-ethereum@v1.10.8
cd $GOPATH/pkg/mod/github.com/ethereum/go-ethereum@v1.10.8/cmd/geth
go build -o $GOPATH/bin .

Replace $GOPATH with %GOPATH% if using Windows command line.

Make sure the old installation of geth is removed. Then verify the version by running geth version.

@haltman-at
Copy link
Contributor Author

Fix for the immediate problem with memory is now released; however there's still a potential problem with storage that I'll have to write up an issue for later.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants