Here : http://solidity.readthedocs.io/en/v0.4.21/units-and-global-variables.html , It states
It might be that you run into Out-of-Gas for sha256, ripemd160 or ecrecover on a private blockchain. The reason for this is that those are implemented as so-called precompiled contracts and these contracts only really exist after they received the first message (although their contract code is hardcoded). Messages to non-existing contracts are more expensive and thus the execution runs into an Out-of-Gas error. A workaround for this problem is to first send e.g. 1 Wei to each of the contracts before you use them in your actual contracts. This is not an issue on the official or test net.
It is getting out of gas on Ropsten as well, I am calling a function which involves ecrecover
in it and it is not being executed.
Although, the same function worked fine in truffle testing. Running the same function on Remix, get
Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Error: gas required exceeds allowance or always failing transaction
Etherscan Tx : https://ropsten.etherscan.io/tx/0x229a4e16f4464809181a24a16e1db2acb82b11ac160c26a1aa5e692495fb4d4a
How can i get this function run using Ropsten?