New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always fail when the contract call external contract #16931
Comments
I'm seeing the same thing. I tested the following code on Ropsten and it works as expected.
Code reproduced from https://ethereum.stackexchange.com/questions/48833/calling-external-contract-leads-to-infinite-gas-need
|
a bit more follow-up... looks like the issue might be related to the compiler version as well as go-ehtereum version. The following code runs for Tester:
Metadata
Geth
However, it fails with new versions the solidity, ^0.4.22. That being said, on Robsten, the following contract ran successfully, but failed when running on the same version of Geth above.
new Tester(): https://ropsten.etherscan.io/tx/0x731e6abb14cf5fd0d1d5a2f73196d4cab696406b1b1652214aed15a682077fd6 Metadata
|
My guess would be that this is due to the EVM version not being set to Byzantium on the private chain. |
@chriseth So, you mean when I change my EVM version , then problem will be solve? |
@jeichel-miovision So, what can i do to solve this problem , in geth 1.8.7? |
How did you initialize your private chain? The genesis file contains a |
@karalabe would it be possible to default more easily to byzantium somehow? |
Thanks @chriseth the EVM change solved the problem for me. @dksuper to get my example up and running, I was able it to do it one of two ways.
I substituted an arbitrary choinbase address and arbitrary chainId above. The key is the addition of byzantiumBlock.
|
@karalabe 1.If i enabled byzantium in my private chain , then i can use the new versoin compiler to compile my solidity? 2.How to fork in my current private chain? if my current block numbers is 666666 , should i just put 666666 in the byzantiumBlockin field , which is in config field that contains in genesis file, then init it or just run geth? |
@jeichel-miovision |
Appreciate if someone could point out link to wiki page which describes forking private network. |
Ugghggh, this has been a nightmare to track down issues, that appear to be related to this. Here's an issue around this: ethereum/go-ethereum#16931
I've solve this issue in my own private chain by including
|
related: #19554 |
Once we are done with the dump config that supports all forks enabled, this is not an issue anymore. |
I have configured the byzantiumBlock in my private chain then also it is not working. I am using solidity v5.0.0. |
System information
Geth version:
1.8.7
OS & Version: Linux
Expected behaviour
Always fail when the contract call external contract
Actual behaviour
I don't know why , but it always cost all gas!
it work fine on geth 1.6.x
The text was updated successfully, but these errors were encountered: