Closed
Description
This is a list of issues/modifications in the prestate tracer:
- When an account exists in the state and a contract is created during a tx at the same address, it won't be included in the prestate. You can find an example here eth/tracers: add diffMode to prestateTracer #25422 (comment). -> Fixed in eth/tracers: fix the issue prestate missing existing contract state #25996
- The diff mode sometimes emits unnecessary storage slots in
pre
. This can be mistaken for those slots being deleted because they don't show up inpost
. E.g. in , thepre
for contract0x19363890e559d365e943604286e448a19ffead9c
is:
storage: {
0x0000000000000000000000000000000000000000000000000000000000000000: "0x000100004c004c0023fdeaa100000000000000000047105de7ebbbb1187f70a0",
0x0000000000000000000000000000000000000000000000000000000000000001: "0x000000000000000000000000000001b8ecc8d1cd98436308e11abd17dd2cdd06",
0x0000000000000000000000000000000000000000000000000000000000000002: "0x00000000000000000000000000000000011ee06ed189bbf02b5d4cea5573e5c1",
0x0000000000000000000000000000000000000000000000000000000000000004: "0x0000000000000000000000000000000000000000000000f6164b80d3cb5f8c7e",
0x000000000000000000000000000000000000000000000000000000000000002b: "0x01000035820000000000006da220b7bb63b76377b7fffd9853b4ad75633d97ff",
0x000000000000000000000000000000000000000000000000000000000000002c: "0x01000035820000000000006cd9f603a693fda6cd0bfffd9bc33786d9633beed7",
0x7523e4cdba46ff05a9cda7a6fc38d74c48f4f45c08317f7f9eb3da0a7f54efa8: "0x0000000000000099c875948725a87ac90000000000000099c875948725a87ac9",
0x7523e4cdba46ff05a9cda7a6fc38d74c48f4f45c08317f7f9eb3da0a7f54efa9: "0x000000000000000000000000000001a6d4272002c7c168dc9464437a196ba924",
0x7523e4cdba46ff05a9cda7a6fc38d74c48f4f45c08317f7f9eb3da0a7f54efaa: "0x00000000000000000000000000000000011d56aee547e55f4ee068a7b2e19a50",
0x7523e4cdba46ff05a9cda7a6fc38d74c48f4f45c08317f7f9eb3da0a7f54efab: "0x016329f12f000035820000000000006820e841b68633c6f1affffdc10a446875",
0xc0d1c00078410fd0164580b0bad93d8a579580d06cf45fc2696a823498097b8a: "0xa4b8218049081ac800220040800106183a000028042020000080000000000000"
}
Where as only the following slots have been modified (see etherscan):
0x0000000000000000000000000000000000000000000000000000000000000000
0x0000000000000000000000000000000000000000000000000000000000000001
0x0000000000000000000000000000000000000000000000000000000000000004
0x000000000000000000000000000000000000000000000000000000000000002c
0x7523e4cdba46ff05a9cda7a6fc38d74c48f4f45c08317f7f9eb3da0a7f54efa9
0x7523e4cdba46ff05a9cda7a6fc38d74c48f4f45c08317f7f9eb3da0a7f54efaa
0x7523e4cdba46ff05a9cda7a6fc38d74c48f4f45c08317f7f9eb3da0a7f54efab
- We should consider renaming the tracer to
stateTracer
since now it's not only for getting the prestate. - Update docs to reflect new diff mode.
Metadata
Metadata
Assignees
Labels
No labels