0

I get this when trying to deploy to parity -

Writing artifacts to ./build/contracts

Invalid JSON RPC response: "Provided Host header is not whitelisted.\n"

I am new to using truffle with parity here is my truffle.js file -

module.exports = {
  networks: {
    development: {
      host: "0.0.0.0",
      port: 8540,
      network_id: "*", // Match any network id
      gas: 4712388
    }
  }
};

What could be the cause?

Here is my parity node -

nohup parity --config node0.toml --tracing=on --fat-db=on --pruning=archive  &

[parity]
chain = "demo-spec.json"
base_path = "/home/satoshimaca/blockchain/parity0"
[network]
port = 30300
[rpc]
port = 8540
apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"]
[ui]
port = 8180
[websockets]
port = 8450
[account]
password = ["node.pwds"]
[mining]
engine_signer = "0x00bd138abd70e2f00903268f3db08f2d25677c9e"
reseal_on_txs = "none"
  • by default, rpc host address would be 127.0.0.1, which you can change with --rpcaddr 0.0.0.0, OR you can change truffle.js file and put host: "127.0.0.1" – kherwa May 30 '18 at 12:13
  • I changed that already but then it just was hanging, that sounds like a mining issue but I am using PoA so I would not expect any mining. – Trevor Oakley May 30 '18 at 12:19
0

Parity runs on localhost, change the host in your truffle configuration file to localhost instead of 0.0.0.0 and try again.

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.