Setting up a private local Ethereum block chain on multiple nodes on the same private lan

I have 5 pc's on a private LAN, I can run Geth etc but would like some help connecting them as individual nodes within the local network. If someone is willing and able to walk me through this I would be very grateful.

I think I'm going wrong adding peers.......but hey, I'm no expert.....yet.

My first step is to be sure i am using a correct genesis block and initializing each node correctly. Any help is much appreciated. If there is a similar thread that I haven't found please point me in the right direction.

Cryptka.




Comments

  • greybeardgreybeard Member Posts: 20
    Greetings

    I did this to initialize genesis block for test ethereum net;

    ./geth --datadir /home/rig/eths/.ethereum init /home/rig/eths/CustomGenesis.json

    where CustomGenesis.json looked like this;

    {
    "config": {
    "chainId": 99, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0
    },

    "nonce": "0x0000111122223333", "timestamp": "0x0",
    "parentHash": "0x0000000000000000000000000000000012345678901234567890123456789012",
    "extraData": "0x3C2A5F2A3E", "gasLimit": "0x80000000", "difficulty": "0x400",
    "mixhash": "0x0000000000000000000000000000000012345678901234567890123456789012",
    "coinbase": "0xc8a1549f5e772d46628783c92e4dbb52b12f6fd0", "alloc": { }
    }

    Note that 'difficulty' is set artificially low for this test network config, a mining client will mine eths at super fast rate..

    But after the above, i could preseed the DAG, which is needed in fake test-only network;

    ./geth makedag 1 /home/rig/eths/.ethereum

    Then I could mine on test network;

    ./geth --rpc --rpcport "8080" --rpccorsdomain "*" --datadir /home/rig/eths/.ethereum --port "30000" --nodiscover --rpcapi "db,eth,net,web3" --networkid 1792 --nat none --maxpeers 0 --mine --minerthreads=2 --etherbase="0xd446b115b9339df8009ab3bdbeaf908b536ffcf5" console

    Note that maxpeers and nodiscover would not be used in case of multinode test network..

    I *think* that once genesis block is made, all other nodes in test network will see it and use it. Assuming rpc is working, ports open, etc.. Not certain, still new to this..

    Sorry I cannot find exact url to reference material, but I think it was on Gemini exchange API docs. Hope it helps.
Sign In or Register to comment.