I'm trying to create a private chain using parity (PoA) and truffle but when I do truffle migrate it hangs forever with the following output:
> [
> {
> "jsonrpc": "2.0",
> "id": 24,
> "method": "eth_getFilterChanges",
> "params": [
> "0x0"
> ]
> }
> ]
< [
< {
< "jsonrpc": "2.0",
< "result": [],
< "id": 24
< }
< ]
Create a chain with the following custom_chain.json:
{
"name": "DemoPoA",
"engine": {
"authorityRound": {
"params": {
"stepDuration": "5",
"validators" : {
"list": [
]
}
}
}
},
"params": {
"gasLimitBoundDivisor": "0x400",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x2323"
},
"genesis": {
"seal": {
"authorityRound": {
"step": "0x0",
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x20000",
"gasLimit": "0x5B8D80"
},
"accounts": {
"0x0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
"0x0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
"0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }
}
}
.. config file note0.toml:
[parity]
chain = "custom_chain.json"
base_path = "./"
[network]
port = 30300
[rpc]
port = 8540
apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"]
[ui]
port = 8180
[websockets]
port = 8450
.. and command:
parity --config node0.toml
Then create two users:
curl --data '{"jsonrpc":"2.0","method":"parity_newAccountFromPhrase","params":["node0", "node0"],"id":0}' -H "Content-Typ e: application/json" -X POST localhost:8540
curl --data '{"jsonrpc":"2.0","method":"parity_newAccountFromPhrase","params":["user", "user"],"id":0}' -H "Content-Typ e: application/json" -X POST localhost:8540
.. and restart node with the following custom_chain.json:
{
"name": "DemoPoA",
"engine": {
"authorityRound": {
"params": {
"stepDuration": "5",
"validators" : {
"list": [
"0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e"
]
}
}
}
},
"params": {
"gasLimitBoundDivisor": "0x400",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x2323"
},
"genesis": {
"seal": {
"authorityRound": {
"step": "0x0",
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x20000",
"gasLimit": "0x5B8D80"
},
"accounts": {
"0x0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
"0x0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
"0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0x004ec07d2329997267Ec62b4166639513386F32E": { "balance": "10000000000000000000000" }
}
}
.. node0.toml:
[parity]
chain = "custom_chain.json"
base_path = "./"
[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"
.. node.pwds:
node0
.. and command:
parity --config node0.toml
Then unlock user account:
curl --data '{"method":"personal_unlockAccount","params":["0x004ec07d2329997267Ec62b4166639513386F32E","user",null],"id": 1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8540
And try to connect with truffle compile && truffle migrate with the following truffle.js file:
module.exports = {
networks: {
development: {
host: "localhost",
port: 8540,
network_id: "0x2323",
from: "0x004ec07d2329997267Ec62b4166639513386F32E"
}
}
};
truffle does the initial migration
Hangs forever.
truffle version): 4.3.1node --version): 8.1.3npm --version): 4.1.1P.S. I had similar problem with geth but there I attached to IPC socket and called miner.start() - it helped. Here there is no miner object as there is no PoW (I'm trying to use and need PoA for my dapp).
@dmitrysenkovich Does anything in this thread at Parity seem helpful? Towards the end they suggest there is a flag setting for the client that might unstick things:
--reseal-min-period 0
(Also thanks for such a complete description of your setup - really useful for anyone reproducing this.)
@cgewecke thanks for the suggestion but it doesn't help:c
@dmitrysenkovich
[mining]
engine_signer = "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e"
reseal_on_txs = "none"
force_sealing = true
Add the third line to node0.toml. I think it could help.
@dmitrysenkovich Did @peara's config suggestion fix this?
@peara, @cgewecke no, that doesn't work too:c now it stucks on {
"jsonrpc": "2.0",
"id": 4,
"method": "eth_sendTransaction",
"params": [
{
"from": "0x004ec07d2329997267Ec62b4166639513386F32E",
"gas": "0x6691b7",
"gasPrice": "0x174876e800",
I'm trying Hyperledger Fabric now, their tutorials seem to be working
Ok fair enough @dmitrysenkovich :)
I'm going to close this because it seems like it's specific to parity POA configuration rather than something Truffle related.
As a side note, there's a nice model of parity/truffle integration at colonyNetwork for anyone finding this issue in the course of setting up their project.
I was having the same issue with Parity on a dev chain, after going through a lot of different party configuration, setting the gas and gasPrice explicitly in the truffle.js to a high gas and low gasPrice worked for me.
I'd like to bump this - to this day, we're not able to use Truffle with Parity in POA mode - it hangs forever at the migration step. (/cc @cgewecke)
@hickscorp Is there any way that we can deploy the contract to Parity in POA mode?
I don't know, we dropped Parity completely and we are using Geth on our
private network.
On Fri, 16 Aug 2019, 07:20 shiba, notifications@github.com wrote:
@hickscorp https://github.com/hickscorp Is there any way that we can
deploy the contract to Parity in POA mode?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/trufflesuite/truffle/issues/853?email_source=notifications&email_token=AAGI5FM75GYWD65DLCIN7PLQEZBMXA5CNFSM4EV3EQSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4NY23I#issuecomment-521899373,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAGI5FN4Z27LPO36MW4M7H3QEZBMXANCNFSM4EV3EQSA
.
@hickscorp Thanks. I will also try Truffle with Geth in POA mode to set up a private network for my dapp.
@hickscorp Sorry to bother you again. May I ask you what version of geth, web3 and truffle when you use your Geth in POA mode? Because I ran into an issue: "Uncaught (in promise) Error: Returned values aren't valid, did it run Out of Gas?" After I reviewed the stack overflow, they said it might be the web3.js issue... thanks.
Most helpful comment
I'd like to bump this - to this day, we're not able to use Truffle with Parity in POA mode - it hangs forever at the migration step. (/cc @cgewecke)