You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
The gas estimation for a method using the call function might be wrong.
Take these contract as example:
contract B {
uint public n;
function callSetN(address _contract, uint _n) {
_contract.call(bytes4(sha3("setN(uint256)")), _n); // E's storage is set, D is not modified
}
}
contract A {
uint public n;
function setN(uint _n) {
n = _n;
}
}
Just realized that it might be related to changes in recent hard fork. Now call provides up to 63/64 gas instead of everything - this would explain why it works with high gas, and then after using exactly the value provided it fails.
Probably we could track calls and increase the gas accordingly.
This issue is labelled with bug: The client fails to follow expected behavior; and is inactive for several months. It's neither assigned nor linked to a milestone.
Please, decide on a deadline and assign this ticket to a developer within 7 days or close it if fixed otherwise.
The gas estimation for a method using the
call
function might be wrong.Take these contract as example:
A call to the
callSetN
method is estimated with 52,976 gas, but when looking at the trace, the transaction runs out of gas : https://testnet.etherscan.io/vmtrace?txhash=0xc2a1a4bb3760e730f7567e7f290c60279356cfa717516da45aff48edec3221bd&type=parityThe text was updated successfully, but these errors were encountered: