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

Debugger errors when doing p sto or v within certain failed contract creations on Geth 1.10.5 and up #4583

Closed
haltman-at opened this issue Jan 3, 2022 · 1 comment

Comments

@haltman-at
Copy link
Contributor

Issue

Suppose you are debugging a transaction, and that transaction creates a contract with the CREATE opcode (as opposed to CREATE2, or the whole transaction being a contract creation), and that contract creation reverts.

Step into that contract creation, and type p sto, or v. If you are using Geth 1.10.5 or later, the debugger will error.

This is because, as of 1.10.5, Geth no longer includes storage in its traces. The debugger mostly doesn't use storage anymore... but when inside a reverted contract creation that was initiated with CREATE, it still does. When it doesn't find it there, it crashes.

This is follow-on work to #4565, which dealt with Geth no longer supplying memory. The good news is that unlike with memory, we only use storage in this particular case, so the error isn't very widespread. The bad news is I can't find any way to turn storage back on.

The good news is that there is a way we can eliminate our reliance on this remaining use of storage; I guess that's just what we'll have to do!

Steps to Reproduce

See above. If you want a specific example, you can use NestedException.run() from the creation-failure from the solidity-test-cases repo.

Expected Behavior

Debugger should correctly report storage (for p sto) and variables (for v).

Actual Results

Debugger errors.

Environment

  • Ethereum client: Geth 1.10.5 (or later)
  • Truffle version (truffle version): 5.4.26
@leeftk
Copy link
Contributor

leeftk commented Jan 6, 2022

This has been fixed in v5.4.27 release!

@leeftk leeftk closed this as completed Jan 6, 2022
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

3 participants