1

I created a private Parity chain using the official tutorial (https://wiki.parity.io/Demo-PoA-tutorial). Then I set it in my Truffle config:

module.exports = {
  networks: {
    private: {
      host: "127.0.0.1",
      port: 8540,
      network_id: "*" // Match any network id
    }
  }
};

I can connect to it using Truffle console, but when I try to deploy, it hangs forever:

truffle(private)> migrate --reset

Using network 'private'.

Running migration: 1_initial_migration.js

Deploying Migrations...

Here's what I see in the node's output:

7decca6e11722f25d1b633502f41ff986492b22638c27c8df5eac7e282541738880608081d5cb2d8
91cf0b9e9dc0a42867bfe68da161877ee4eb6e014@127.0.0.1:30300
2018-07-01 19:30:20   TRACE rpc  Request: {"jsonrpc":"2.0","id":25,"method":"eth
_accounts","params":[]}.
2018-07-01 19:30:20   DEBUG rpc  Response: {"jsonrpc":"2.0","result":["0x00bd138
abd70e2f00903268f3db08f2d25677c9e"],"id":25}.
2018-07-01 19:30:20   TRACE rpc  Request: {"jsonrpc":"2.0","id":26,"method":"net
_version","params":[]}.
2018-07-01 19:30:20   DEBUG rpc  Response: {"jsonrpc":"2.0","result":"8995","id"
:26}.
2018-07-01 19:30:20   TRACE rpc  Request: {"jsonrpc":"2.0","id":27,"method":"net
_version","params":[]}.
2018-07-01 19:30:20   DEBUG rpc  Response: {"jsonrpc":"2.0","result":"8995","id"
:27}.
2018-07-01 19:30:20   TRACE rpc  Request: {"jsonrpc":"2.0","id":28,"method":"eth
_sendTransaction","params":[{"from":"0x00bd138abd70e2f00903268f3db08f2d25677c9e"
,"gas":"0x6691b7","gasPrice":"0x174876e800","data":"0x60806040523480156100105760
0080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916
908373ffffffffffffffffffffffffffffffffffffffff1602179055506102f88061006060003960
00f300608060405260043610610062576000357c0100000000000000000000000000000000000000
000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100aa5780
638da5cb5b146100d5578063fdacd5761461012c575b600080fd5b34801561007357600080fd5b50
6100a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001
90929190505050610159565b005b3480156100b657600080fd5b506100bf610241565b6040518082
815260200191505060405180910390f35b3480156100e157600080fd5b506100ea610247565b6040
51808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffff
ffffffffffff16815260200191505060405180910390f35b34801561013857600080fd5b50610157
6004803603810190808035906020019092919050505061026c565b005b6000806000905490610100
0a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffff
ffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023d5781905080
73ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff16
7c010000000000000000000000000000000000000000000000000000000002815260040180828152
602001915050600060405180830381600087803b15801561022457600080fd5b505af11580156102
38573d6000803e3d6000fd5b505050505b5050565b60015481565b6000809054906101000a900473
ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffff
ffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16
3373ffffffffffffffffffffffffffffffffffffffff1614156102c957806001819055505b505600
a165627a7a72305820f447dde0ef1d4d3a1752d10ae91ef75165287db6411fe180a975e1e0543517
ca0029"}]}.
2018-07-01 19:30:25  Verifier #6 INFO import  Imported #37 5c74:10ce (0 txs, 0.0
0 Mgas, 0.87 ms, 0.56 KiB)
2018-07-01 19:30:27  IO Worker #3 INFO import     1/25 peers     14 KiB chain
20 KiB db  0 bytes queue   10 KiB sync  RPC:  0 conn,  0 req/s,  51 чs
2018-07-01 19:30:57  IO Worker #3 INFO import     1/25 peers     14 KiB chain
20 KiB db  0 bytes queue   10 KiB sync  RPC:  0 conn,  0 req/s,  51 чs

So, as you see, the Request is never getting a Response.

UPDATE: the same result happens whenever I just send a simple transaction: it's stuck forever.

2

Figured it. I needed to unlock my account, the one from which I was deploying. For some reason, Parity didn't tell me about it, so I spent 2 hours guessing.

I unlocked my account using the --unlock commandline option.

0

It's hard to say like that. Here is things I'd try:

Verify if it is a firewall issue. - Ping the port you are running

Verify it is not a Parity issue. - Try geth

Verify it is not Truffle issue. Try etherlime to deploy your contracts. Here is a quick snippet:

const etherlime = require('etherlime');

const ICOTokenContract = require('./build/contracts/ICOToken.json');

const defaultConfigs = {
    gasPrice: 20000000000,
    gasLimit: 4700000
}

const deployer = new etherlime.InfuraPrivateKeyDeployer('Your Private KEY', 'ropsten', 'Your infura API key', defaultConfigs);
const contractWrapper = await deployer.deploy(ICOTokenContract); // Make sure you call this method in an async function or use it as a promise without await

You can find more examples here

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.