Severity
- not posing forking threat on the mainnet
- causing failures in some conformance tests
Problem
The state-clearing EIPs 158 and 161 do not explicitly specify what happens to the "touched" accounts when OOG happens.
As a result, different implementations do different things. Although they can all follow the mainnet, some tests fail (for example, BlockchainTests/GeneralStateTests/stCreateTest/TransactionCollisionToEmpty_d0g1v0.json reveals a difference between geth and cpp-ethereum).
It is not desirable to keep the unspecified corner in the specification.
Possible solutions
Since no more empty accounts exist on the mainnet, the question here is how to specify what happened on the mainnet.
There are many ways to specify what happened on the mainnet.
a. address 3 is special, although otherwise touched accounts become untouched after OOGs
b. precompiled contracts are special, although otherwise touched accounts become untouched after OOGs
c. a certain transaction in a certain block is spceial, although otherwise touched accounts become untouched after OOGs
d. OOG in inner calls should keep touched accounts; OOG in the outermost call in a transaction untouches accounts.
e. OOG in the touching call and inner calls should keep touched accounts; OOG in a parent call context untouches accounts.
Proposal
The proposal here is to pick d. or e. because they do not involve magic numbers. Perhaps e. is cleaner because it does not talk about the magic "outermost call".
After seeing options, a. looks the simplest.
Steps to be taken
Severity
Problem
The state-clearing EIPs 158 and 161 do not explicitly specify what happens to the "touched" accounts when OOG happens.
As a result, different implementations do different things. Although they can all follow the mainnet, some tests fail (for example,
BlockchainTests/GeneralStateTests/stCreateTest/TransactionCollisionToEmpty_d0g1v0.jsonreveals a difference betweengethandcpp-ethereum).It is not desirable to keep the unspecified corner in the specification.
Possible solutions
Since no more empty accounts exist on the mainnet, the question here is how to specify what happened on the mainnet.
There are many ways to specify what happened on the mainnet.
a. address 3 is special, although otherwise touched accounts become untouched after OOGs
b. precompiled contracts are special, although otherwise touched accounts become untouched after OOGs
c. a certain transaction in a certain block is spceial, although otherwise touched accounts become untouched after OOGs
d. OOG in inner calls should keep touched accounts; OOG in the outermost call in a transaction untouches accounts.
e. OOG in the touching call and inner calls should keep touched accounts; OOG in a parent call context untouches accounts.
Proposal
The proposal here is to pick d. or e. because they do not involve magic numbers. Perhapse.is cleaner because it does not talk about the magic "outermost call".After seeing options,
a.looks the simplest.Steps to be taken
a.on cpp-ethereum is created will be tested on the mainet.