6

I am trying to migrate the basic truffle example (the one created via truffle init) to rospten using Parity but I get the following error even thought the contract is correctly deployed on Rospten:

Using network 'development'.

Running migration: 1_initial_migration.js Deploying Migrations...
... 0x3f8cd1b1e98935feb4616e810f4ce0d6ebfbd7355ea8a8e9695a490173d8446e

Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: The contract code couldn't be stored, please check your gas amount. at Object.callback (/usr/lib/node_modules/truffle/buil/cli.bundled.js:218485:46)

at /usr/lib/node_modules/truffle/build/cli.bundled.js:34886:25
at /usr/lib/node_modules/truffle/build/cli.bundled.js:220423:9
at /usr/lib/node_modules/truffle/build/cli.bundled.js:72910:11
at /usr/lib/node_modules/truffle/build/cli.bundled.js:204149:9
at XMLHttpRequest.request.onreadystatechange (/usr/lib/node_modules/truffle/build/cli.bundled.js:205574:13)
at XMLHttpRequestEventTarget.dispatchEvent (/usr/lib/node_modules/truffle/build/cli.bundled.js:73069:18)
at XMLHttpRequest._setReadyState (/usr/lib/node_modules/truffle/build/cli.bundled.js:73359:12)
at XMLHttpRequest._onHttpResponseEnd (/usr/lib/node_modules/truffle/build/cli.bundled.js:73514:12)
at IncomingMessage.<anonymous> (/usr/lib/node_modules/truffle/build/cli.bundled.js:73474:24)

As you can see from here the contract is correctly deployed: https://ropsten.etherscan.io/tx/0x3f8cd1b1e98935feb4616e810f4ce0d6ebfbd7355ea8a8e9695a490173d8446e

This is the code for 1_initial_migrations.js:

var Migrations = artifacts.require("./Migrations.sol");

module.exports = function(deployer) {
  deployer.deploy(Migrations, {from: "0x004995b1caD48E77e7A53e535Bb82c8189B80632", gas:2000000});
};
4

I have just found the answer to my own question.

It all comes down to the following bug in parity resulting in a race condition between getCode and getTransactionReceipt: https://github.com/paritytech/parity/issues/5538

If parity is executed in geth compatibility mode via the --geth flag, then truffle migration works as expected.

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.