3

What should one do to resolve the issue "Data can't be executed, so it will use all provided gas." to execute transactions ?

Or how to reset the installation of Mist Wallet as I am using testnet for testing purposes.

  • 1
    Are your calling a contract? If you have multiple accounts, it might just be that you're trying to run a contract with an unrecognised account. – o0ragman0o May 28 '16 at 10:55
  • @o0ragman0o I have created three accounts, transferred balances into each of the account. Then after I used the token example from ethereum.org to create token, then used the crowdsale example with the token I created earlier. Now when I am trying to send some ethers to Contract account, this is the place where I am currently getting issues, earlier I was getting issues with the checkGoalReached method of the Crowdsale contract. – Ajay Bhojak May 28 '16 at 19:37
1

The Mist tries do detect if contract method you are calling will be successfully executed. "Data can't be executed, so it will use all provided gas." error can mean that method you are calling will not be successfull. Possible you was calling checkGoalReached() method before deadline:

modifier afterDeadline() { if (now >= deadline) _ }

/* checks if the goal or time limit has been reached and ends the campaign */
function checkGoalReached() afterDeadline {
    ...

And possible that when you trying to send Ether to the contract, crowdsale was already closed.

/* The function without name is the default function that is called whenever anyone sends funds to a contract */
function () {
    if (crowdsaleClosed) throw;
    ...
  • I am facing this issue even when I am trying to send ethers to the contract account from any of the accounts I have created. So this means that there cannot be any funders listed for the Crowdsale contract. :) So I guess this is not going to help. – Ajay Bhojak May 30 '16 at 16:19
1

The Data can't be executed, so it will use all provided gas. message is shown by the the Wallet DApp when it can't estimate the gas cost of the transaction you are going to send, it's not related to a transaction that is already sent and actually failed because out of gas.

UI warning: The Data can't be executed, so it will use all provided gas.

The interface is not really clear about that, but you can click the gas field (gas == 0 in blue color, highlighted in the image above) and write the value of gas you want to send with the transaction. Having a gas field <= 0 will throw "Intrinsic gas too low" UI exception.

About Mist reset, if you really want for some reason a fresh Mist installation, just delete Mist data folder (in Windows %appdata%/Mist). But you usually don't need to do that. You can simply remove account and contract references and continue to test all over again with the same network.

If you want a fresh Ethereum installation, just delete the Ethereum default data folder (in Windows %appdata%/Ethereum). Remember to backup your keystore folder if you used the Wallet with the real network also.

About really resetting the test net, if you are talking of Morden (networkid==2), the default public test net used by Mist, you can't reset it because it's actually public.

You can however start your own test network using a different networkId, and let Mist connect to that network instead. This is my preferred method because it's really much faster, I'm the solo miner and I can reset the blockchain simply removing the data folder. Just lunch geth before Mist with something like this:

geth --networkid 999 --datadir [choose your data folder] --nodiscover --maxpeers "0" --mine --minerthreads "1" --etherbase "[your preferred account]" --extradata "Am I more of mine?" console

Then launch Mist: it will find an already running geth node and it will use that to work. It will show you are using a private net, like this:

Private net with Mist

Side note: technically you can also use a personal Morden testnet using the same networkid==2 and another genesis block, but this means all other nodes on the net will try to communicate with you thinking you are running the same blockchain. At the end the two chains will not actually interfer with each other, but this kind of configuration is really confusing and a useless waste of resources.

  • No I did not mean to reset the Testnet or the public network with Network id = 2, I already did the deletion of %appdata% folder, but that too did not solve the problem. Will try changing the value of gas if it does work, you will get the bounty. :) – Ajay Bhojak May 30 '16 at 16:23
  • tried changing the gas limit, but that too did not work, the transaction failed. Anything else you can find out would be quite useful, and still thanks for the new info , I wasn't aware of. – Ajay Bhojak May 30 '16 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.