I am using Parity to create a custom app and so I am using it locally on --dev. "$ truffle migrate" fails, I think because there is no balance in the account. It says:

Error: Insufficient funds. The account you tried to send transaction from does not
have enough funds. Required 471238800000000000 and got: 0.

But using --dev, this shouldn't be a problem, right? The transactions should work without being mined first? Or something like that?

I tried running genoil but (a) I don't think I need to on --dev and (b) it won't run on a VPS with no GPU anyway.

I tried attaching to Parity with geth attach and it connects (because eth.coinbase returns the correct address) but that user has 0 balance. Also, miner.start() says:

ReferenceError: 'miner' is not defined
    at :1:1

I am invoking parity with:

$ /path/to/parity --geth --chain dev --dapps-hosts="all" --dapps-apis-all --jsonrpc-hosts="all" --unlock 0x... --password DevUserPass.txt --author ...

I have tried the "--author" flag with 0x as well, with the same result.

So I have a few related questions:

1 - What is your understanding of how the --chain dev option means you do NOT have to mine with parity? The docs aren't really clear.

2 - If I do need to mine (like I use another testnet), how can I do that on a VPS?

3 - Is it possible that truffle needs to be told to use the --chain dev mining technique? Like, it behaves different from a normal balance so has to be stated somewhere?

1 Answer 1


You can't mine a dev chain on Parity because it does not run a Proof-of-Work engine. Instead, it runs InstantSeal which basically just creates a new block every 2 seconds if there are transactions available.

The dev chain is preloaded with an insane amount of development Ether. Just open your wallet, go to Accounts, click the Add Account button and then Recovery and then without entering anything, click OK.

You can also run with --jsonrpc-api parity_accounts and issue the following call in another terminal:

curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"parity_newAccountFromPhrase","params":["","password"],"id": 1}' localhost:8545

The trick is the account which can be recovered using an empty recovery phrase holds all the available tokens. This should be enough to get you started.

Read more on the configuration here: Private-development-chain; Read more on the engine here: Consensus-Engines

  • Yes, this was what I needed. The error is gone (and now I have a new error, but that is for a different thread.) Thank you. I hope you don't mind but I want to share two things for other people who need this answer: 1) the flag is -jsonrpc-apis 2) The other procedure is: - open the UI (port 8180) - Choose "Accounts" - Choose "+ Account" - Choose the Recovery Seed option - Do NOT enter a seed. Just hit "next" or whatever it is - Finally click "Done" and you will have an account with lots of money.
    – stone.212
    Mar 16, 2017 at 1:16
  • I just got told that the dev chain accepts any block you find, so mining would work in theory, too.
    – q9f
    Mar 16, 2017 at 8:04
  • Thank you. But the issue here is that genoil won't work on a headless system (ie - no GPU) but otherwise I think you're 100% correct.
    – stone.212
    Mar 17, 2017 at 0:40

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.