Go-ethereum: eth_calls in Geth 1.8 made to methods which create a new contract through delegation fail

Created on 5 Dec 2017  路  4Comments  路  Source: ethereum/go-ethereum

System information

Geth version: Version: 1.8.0-unstable
OS & Version: Alpine Linux v3.7
Commit hash : 43dd8e62fcc854d1ad51f3a49b118d40397b7fd8

Expected behaviour

An eth_call to the method completes successfully and returns true.

Actual behavior

The return value is 0x indicating failure.

Steps to reproduce the behavior

The following contract demonstrates the error:

pragma solidity ^0.4.17;


contract Basic {}

contract Caller {
    Basic private basic;

    function createNew() public returns (bool) {
        basic = new Basic();
        return true;
    }

    function createNewDelegated() public returns (bool) {
        require(this.delegatecall(bytes4(keccak256("createNew()"))));
        return true;
    }
}

Making an eth_call to the createNew() method succeeds as expected and returns true.

Making an eth_call to the createNewDelegated method however fails and returns 0x.

I have not been able to reproduce this behavior against any geth version but 1.8.

All 4 comments

Pinging this issue again as to me it seems like a relatively serious bug and would interfere with many existing workflows and systems.

Just wanted to add that this breaks quite a few Augur function calls; geth 1.8 is unusable for us at the moment (we're still running 1.7.3).

I completely missed this issue. Will take a look.

Hey all, looked into this, but apparently it's a duplicate of a bug we fixed in the last release two weeks ago. Doing eth_call against contracts didn't forward the gas so internal calls failed (for eth_call only). Should work in the latest release(s). Sorry for not closing sooner, I though this would be a different issue.

Was this page helpful?
0 / 5 - 0 ratings