-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Cannot run migration with fresh init using Geth (v5) #1235
Comments
@kdelwat Agree this message is not good. . . could you see if it works if you specify an unlocked |
@kdelwat One more thing - we run migrations in CI against If you could identify any differences between your setup and ours that would be really helpful - would like to squash this if possible. |
@cgewecke Thanks for the help, I've done some digging and think it stems from something in the Geth genesis block. These are my geth options: geth
--port 38545 \
--mine \
--minerthreads=1 \
--rpc \
--rpcport 8545 \
--rpccorsdomain "*" \
--datadir ~/.testnet/data/ \
--port 30303 \
--nodiscover \
--rpcapi web3,eth,net,debug \
--networkid 99 \
--unlock 0x1ccb322887b44f43f2775965b3397c180d2b3275 \
console Using the following genesis block (from here) works perfectly: {
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"nonce": "0x0000000000000042",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x8000000",
"difficulty": "0x400",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
"alloc": {
"0x1ccb322887b44f43f2775965b3397c180d2b3275": {
"balance": "0x5337000000000000000000"
}
}
} However, the Geth node I was using was created with dapptools, which generated this genesis: {
"alloc": {
"0x1ccb322887b44f43f2775965b3397c180d2b3275": {
"balance": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
}
},
"config": {
"byzantiumBlock": 0,
"chainId": 99,
"clique": { "epoch": 3000, "period": 0 },
"eip155Block": 0,
"eip158Block": 0,
"homesteadBlock": 0
},
"difficulty": "0x1",
"extraData": "0x3132333400000000000000000000000000000000000000000000000000000000ca38c3972e3e6c0c09f9baceeeebefb92a00f7410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gaslimit": "0xffffffffffffffff"
} I've confirmed directly with Geth that the second genesis block ends in the issue described above, whereas the first doesn't. I can't pin down the issue unfortunately 😞 Since this appears to be an issue with Geth rather than Truffle, this issue can probably be closed. |
Ah super interesting. The only issue see at web3 triggering a similar failure is something about Quorum client timestamps where quorum is using Unix nano-second precision. That DappTools starting balance is pretty big - I wonder if that's a possible problem. They're solidity based so they don't have to worry about translating values out to JS. Thanks for opening, hopefully someone will find this and figure it out. |
Issue
After initialising a new Truffle project, migration fails when deploying to a local geth testnet, even though it works with Ganache.
I suspect this is due to not using HDWalletProvider, but a clearer error message could be a good idea.
Steps to Reproduce
truffle init
in an empty directorytruffle-config.js
to add a development network:truffle migrate
Expected Behavior
The migration should complete successfully.
Actual Results
The migration failed with the following error:
Environment
The text was updated successfully, but these errors were encountered: