I have been having issues deploing any smart contract to my private network.

I'm using geth 1.9.15.

Here ALL the steps that I made to get the error:

  "config": {
    "chainId": 48,
    "homesteadBlock": 0
  "difficulty": "0x40",
  "gasLimit": "0x80000000",
  "alloc": {}

I have started two nodes:

geth --identity "node1" --datadir ./node1 init ./CustomGenesis.json
geth --identity "node2" --datadir ./node2  init ./CustomGenesis.json

nohup geth --identity "node1" --datadir ./node1 --networkid 48 &
nohup geth --identity "node2" --datadir ./node2 --networkid 48 --port 30305 --http &

Attached the peers:

# geth attach ./node1/geth.ipc
Welcome to the Geth JavaScript console!

> admin.addPeer("enode://[...]:30305")

Created the account:

> personal.newAccount()
Repeat passphrase:

Started the miner on the second node:

# geth attach ./node2/geth.ipc
Welcome to the Geth JavaScript console!

> miner.setEtherbase("0xdc[...]b5")
> miner.start()

On the first node:

> personal.unlockAccount("0xdc[...]b5","Password")
> var contract = eth.contract([{...ABI DATA...}])
> var bin = "0x...BIN DATA..."
> var x = {from:eth.coinbase, data:bin, gas: 2000000}
> var instance = contract.new(x)
Error: invalid transaction v, r, s values
        at web3.js:6347:37(47)
        at web3.js:5081:62(37)
        at web3.js:3021:48(134)
        at <eval>:1:28(6)

I don't think the issues are related but I also tried with truffle without success.

Configuration file:

module.exports = {
  rpc: {
  networks: {
    development: {
      host: "",
      port: 8545,
      network_id: "48",
      from: "0xdc[...]b5",
      gasPrice: 100000000000,
      gas: 47123880

Deploy file:

var contract = artifacts.require("contract");

module.exports = function(deployer) {

But when it runs:

# truffle migrate --reset
Starting migrations...
> Network name:    'development'
> Network id:      48
> Block gas limit: 1715282554 (0x663d227a)


   Deploying 'Migrations'

Error:  *** Deployment Failed ***

"Migrations" -- Returned error: unknown account.

What did I did wrong?
I haven't found any useful information elsewere as seems that all the related question are from 2016.

  • Can you try with a small chainId? – Ismael Jun 17 at 15:24
  • @Ismael I have tried replacing the chain id with 9867 but the error is still the same. Is 9867 small enough? – Giacomo Garabello Jun 17 at 16:25
  • Try something in the range 1 to 50. – Ismael Jun 18 at 2:52
  • @Ismael i have tried with 48 with geth and truffle but again, no luck. I've updated the question to reflect the new chainID – Giacomo Garabello Jun 18 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.