-
Notifications
You must be signed in to change notification settings - Fork 2.2k
EXTCODECOPY should not create an account in testeth #4281
Comments
The reason for the unexpected account appearing in the I have confirmed that with Parity - on a custom chain without EIP-161 specified, EXTCODECOPY from a non-existent address does not create a new account. Yet Parity passes the VMTests, because its test VM also mimics this strange behaviour of EXTCODECOPY. I have not checked whether EXTCODESIZE is prone to this problem. As for the fix, looking at |
Your both points are interesting.
|
post
section contains an unexpected new account
In a what way testeth should compare the accounts in the final state? |
Compare the state root hash before the block reward distribution and the state root hash after the GeneralStateTest. |
block reward only applies in blockchain tests. not in GeneralStateTests |
@winsvega I know. That's why the state root hash needs to be taken before the block reward distribution. |
You mean we should check the state hash of general state tests and the hash of a corresponding blockchain test (befor the reward) to confirm that the test convertation was successfull ? we already have expect section check. this will be like additional level of protection |
Expect section check is not powerful when the expect section is empty, or the difference occurs somewhere not interesting. |
@pirapira |
@winsvega I can |
If you do this. that it will trigger post state mismatch when running a test |
@winsvega really? Are you sure post state mismatch is detected during VMTests? Why was ethereum/tests#235 not detected by |
that is vm test. you know better as you work with vm tests. in blockchain tests it is checked state tests has hashes of the final state to compare with the client's |
@winsvega I edited the description. |
VMTests contain a field of created accountsas well as the pre-state. Whenpost
field contains an account not mentioned in any of these two fields,testeth
should fail because at least one of these fields is wrong.When
post
field contains an account not existent in the final state calculated,testeth
should fail even when it's running a VM Test. Also,testeth
should not create an account forEXTCODECOPY
.This should have detected ethereum/tests#235.
The text was updated successfully, but these errors were encountered: