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

Add system for debugger to track storage not accessed in transaction #2894

Open
haltman-at opened this issue Mar 17, 2020 · 6 comments
Open

Comments

@haltman-at
Copy link
Contributor

Issue

Currently, the debugger can only see the contents of storage slots that have been accessed so far during the transaction being debugged; similarly it can only see mapping keys that have been accessed during the transaction being debugged. This problem came up recently in for instance #2889.

The idea is to allow one to load a transaction in "reconstruct mode", in which all relevant storage will be reconstructed beforehand, so that storage variables will have accurate values even if they haven't been accessed so far during the transaction.

Also, reconstruct mode should allow manual watching of mapping keys. However, note that in order for this to work, one would necessarily have to restart the transaction for watching a mapping key to take effect.

@haltman-at
Copy link
Contributor Author

Also, in addition to storage, this mode would track nonces. And, of course, bytecode.

Later versions would probably also add balance tracking, but storage, bytecode, and nonce should suffice for an initial version; balance can come later.

@haltman-at
Copy link
Contributor Author

Oh, and the self-destruct list. That would need to go in the initial version too (as part of tracking bytecode).

@haltman-at
Copy link
Contributor Author

The idea here has now changed -- instead of a separate mode, this will be the debugger's default operation, and it will be based on debug_storageRangeAt and debug_accountAt. (@gnidan this seems worth re-prioritizing right?)

@haltman-at
Copy link
Contributor Author

Btw, also note that, doing things this new way, one would no longer have to restart the transaction for manual watches to take effect!

@haltman-at
Copy link
Contributor Author

Be aware though: The behavior of nonces changed back in Spurious Dragon! Before Spurious Dragon, contracts started at 0; now they start at 1.

@cliffoo
Copy link
Contributor

cliffoo commented Jul 15, 2022

pull#5286 is merged and made it to the latest release v5.5.22. Not closing since feature is added to library, but not yet the CLI.

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