scroll-tech / go-ethereum

Scroll's fork of the official Go implementation of the Ethereum protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing trace for caller in "CREATE" op

noel2004 opened this issue · comments

commented

Currently the extraData field for CRAETE op contains only states for the account of created contract. However, the caller's nonce is also increased and the balance may be updated.

We can capture these updating from the To field if the contract called by user has executed an creation. But we would definitely lost some states for the deeper creation (user call contract A, A called B, then B create C). We must capture the caller's state in extraData field.

I advise this fixing should be made together with issue #144 because they are updates before CaptureStart. Also, we must notice there are in fact two diferent kinds of updating: the increase on caller's nonce is not snapshot (i.e. it would not reverted even the op has failed) while the updating on balance is revertable.

commented

Should be fixed in PR #146