-
Notifications
You must be signed in to change notification settings - Fork 826
Closed
Description
Description
The testing team recently added collision tests, testing the (unlikely but possible case) that a CREATE
call is trying to create a contract on an existing address (hence: (address) collision).
These tests are still failing in the vm, failing tests cases:
CreateCollisionToEmpty
(test | filler)TransactionCollisionToEmptyButCode
TransactionCollisionToEmptyButNonce
Work Status
What I've got so far:
There has to be some additional check for account existence in runCall.js
in the loadToAccount
function in the form of:
stateManager.exists(toAddress, function (err, exists) {
if (exists) {
// This is new, stop/revert the execution
} else {
stateManager.getAccount(createdAddress, function (err, account) {
// Go on with the normal stuff...
})
}
})
I'm just not sure, what the semantics are here. Should the CREATE
call just return and do nothing? Or throwing an OOG error? Some (detailed) hint on that would be helpful.
Reproduce
The following command produces a stack trace for a failing CreateCollisionToEmpty
test:
node tests/tester -s --customStateTest='./CreateCollisionToEmpty.json' --data=2 --gas=0 --value=0 --jsontrace
Here is a gist with the succeeding stack trace from pyethereum.