1

What are the correct steps to make connection and communication within one Node by creating Private Network in windows? Installation of Geth is done in windows successfully, puppeth is also running. But whenever I try to start mining it is not working properly. There are 3 different accounts created by me. But mining is not working properly & displaying no epoch count.

startnode.cmd

geth --networkid 4224 --mine --minerthreads 2 --datadir "." --nodiscover --rpc --rpcport "8543" --port "30303" --rpccorsdomain "*" --nat "any" --rpcapi eth,web3,personal,net --unlock 0 --password ./password.sec
2
  • If you're asking for a different configuration than yours, then you should first tell us what's yours, don't you think? Commented Dec 10, 2018 at 10:28
  • I've just configured geth in PowerShell (Windows 10), then created directory in which I've stored .json file, .cmd file and genesis details, i have also created genesis block and then 3 accounts. Now whenever I execute the file startnode.cmd it will start processing but when I open second powershell to attach to geth and start mining, the first shell reflects by only a particular line that one block is mining
    – Rudrika
    Commented Dec 10, 2018 at 10:33

1 Answer 1

1

This is what I do:

File NodeInit.bat (run once, or whenever you want to delete the DB and start from zero):

rd /s /q data\geth
call "C:\Program Files\Geth\geth.exe" --datadir=.\data init .\genesis.json

File NodeOpen.bat (run whenever you want to start the network):

cmd /c "title geth & "C:\Program Files\Geth\geth.exe""  ^
    --networkid=100                                     ^
    --rpc                                               ^
    --rpcport=8545                                      ^
    --lightkdf                                          ^
    --mine                                              ^
    --etherbase=Address of account 1 (starting with 0x) ^
    --datadir=./data                                    ^
    --verbosity=2                                       

File genesis.json:

{
   "config": {
      "chainId": 100,
      "homesteadBlock": 0,
      "eip155Block": 0,
      "eip158Block": 0,
      "byzantiumBlock": 0
   },
   "difficulty": "0",
   "gasLimit": "0x1fffffffffffff",
   "alloc": {
        "Address of account 1 (without 0x)": {"balance": "100000000000000000000000"},
        "Address of account 2 (without 0x)": {"balance": "100000000000000000000000"},
        "Address of account 3 (without 0x)": {"balance": "100000000000000000000000"}
    }
}
10
  • geth --networkid 4224 --mine --minerthreads 2 --datadir "." --nodiscover --rpc --rpcport "8543" --port "30303" --rpccorsdomain "*" --nat "any" --rpcapi eth,web3,personal,net --unlock 0 --password ./password.sec
    – Rudrika
    Commented Dec 10, 2018 at 10:45
  • this is what i used for startnode.cmd
    – Rudrika
    Commented Dec 10, 2018 at 10:45
  • @Rudrika: You should put that in your question, not here. Commented Dec 10, 2018 at 11:03
  • Yess I've. putted that code in my question.
    – Rudrika
    Commented Dec 10, 2018 at 11:11
  • @Rudrika: Have you tried what I suggested above? Commented Dec 10, 2018 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.