Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

call_OOG_additionalGasCosts1 test failing #278

Open
lrettig opened this issue May 30, 2018 · 0 comments
Open

call_OOG_additionalGasCosts1 test failing #278

lrettig opened this issue May 30, 2018 · 0 comments

Comments

@lrettig
Copy link
Member

lrettig commented May 30, 2018

I spent quite some time on this the past couple of days, along with @jwasinger @hugo-dc @cdetrio @jakelang. The expected behavior of this test (https://github.com/ethereum/tests/blob/develop/src/GeneralStateTestsFiller/stCallCodes/call_OOG_additionalGasCosts1Filler.json#L47) changed with EIP158, from:

                "network" : ["Frontier","Homestead", "EIP150"],
                "result" : {
	    		"1000000000000000000000000000000000000001" : {
               		    "shouldnotexist" : "1"
            		 },
           		 "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
               		    "balance" : "30000"
            		 },
            		 "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
            		    "balance" : "999999999999970000"
            		 }
                }

to

                "indexes" : { "data" : -1, "gas" : -1, "value" : -1 },
                "network" : [">=EIP158"],
                "result" : {
	    		"1000000000000000000000000000000000000001" : {
               		    "shouldnotexist" : "1"
            		 },
           		 "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
               		    "balance" : "21727"
            		 },
            		 "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
            		    "balance" : "999999999999978273"
            		 }

For some reason Hera is still exhibiting the old, pre-158 behavior and its results match. We thought Hera was already updated for EIP-158. Hera is running out of gas on this line (https://github.com/ewasm/hera/blob/501406933c64cd8ffe3c5bd2560b84b677d1228b/src/eei.cpp#L732) when it tries to charge the 25,000 extra gas for a tx to a nonexistent account.

My Hera trace of the error: https://gist.github.com/lrettig/88008d82e6d78eff1e2bf0d437f5870d

Hugo's cpp-ethereum reference trace: https://gist.github.com/hugo-dc/a079761e20d1bdb6f29224be1a6a30cb. Note that ethereumjs trace matches cpp-ethereum's.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant