You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a state dump, the produced output isn't as read-compatible as it could be.
For the attached dump.json, the following geth code fails as described:
var dump state.Dump
err = json.Unmarshal(unzipped, &dump)
if err != nil {
panic(err)
}
// panic: json: cannot unmarshal hex string of odd length into Go struct field
// DumpAccount.accounts.storage of type common.Hash
Inspecting the json shows the following. (comments inserted)
...
"0x068e44eb31e111028c41598e4535be7468674d0a": { // line 32, a contract address
...
"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x68e44eb31e111028c41598e4535be7468674d0a", // line 172, a reference to that contract
"0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x9e2803ad9ecc0a848c8a045329524d295f6ee44f",
"0xd30e835d3f35624761057ff5b27d558f97bd5be034621e62240e5c0b784abe68": "0x9965507d1a55bcc2695c58ba16fb37d819b0a4dc"
It seems that the leading zero of the address was truncated, leading to the deserialize failure.
Component
Anvil
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (c2e5297 2024-06-14T00:18:12.274395967Z)
What command(s) is the bug in?
anvil_dumpState
Operating System
Linux
Describe the bug
When running a state dump, the produced output isn't as read-compatible as it could be.
For the attached dump.json, the following geth code fails as described:
Inspecting the json shows the following. (comments inserted)
It seems that the leading zero of the address was truncated, leading to the deserialize failure.
dump.json
The text was updated successfully, but these errors were encountered: