4

I established a private network with 10 computers(nodes). I created a sample smart contract. Now I need to deploy these contract in my private blockchain. As we know that we need ethers to deploy a contract. But How we get the ethers in our own private network

1

You'll get ether by mining just like a real network

  • in our case there is no mining – Lahari Areti Mar 12 '18 at 8:35
0

While setting up private blockchain network you will need genisis.json. So you can allocate some funds to it as below.

{
    "config": {
        "chainId": 88888,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    },
    "coinbase" : "0x0000000000000000000000000000000000000000",
    "difficulty" : "0x1",
    "extraData" : "0x00",
    "gasLimit" : "0x47e7c5",
    "nonce" : "0x0000000000000042",
    "mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
    "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
    "timestamp" : "0x00",
    "alloc" : {
        "c2d7cf95645d33006175b78989035c7c9061d3f9": {"balance": "888888888888888888888888"}
    }
}
0

You can do the mining at each node and it helps you to get some test "Ether" balance for that node. 1. run geth console. 2. at geth console, do mining. e.g > miner.start() It will start the mining process and your node will get Ether. But, the minimum RAM for doing mining is 3 GB.

0

In a private chain, It's recommended to use a POA consensus engine and then you won't need to pay any ether for transactions

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.