0% found this document useful (1 vote)
50 views

Deploy Node With Ethereum Blockchain

The document provides steps to deploy an Ethereum node on Linux. It involves creating a directory for the node, initializing a genesis block file, launching the geth client with specified parameters, creating accounts within the node console, starting mining to generate ether for the accounts, and performing a test transaction between the accounts. The tutorial contains 11 steps to set up the private Ethereum blockchain network and nodes.

Uploaded by

Maxime Blaszka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
50 views

Deploy Node With Ethereum Blockchain

The document provides steps to deploy an Ethereum node on Linux. It involves creating a directory for the node, initializing a genesis block file, launching the geth client with specified parameters, creating accounts within the node console, starting mining to generate ether for the accounts, and performing a test transaction between the accounts. The tutorial contains 11 steps to set up the private Ethereum blockchain network and nodes.

Uploaded by

Maxime Blaszka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Tutorial deploy node with Ethereum blockchain

Maxime Blaszka – 22/08/2018

OS : linux (ubuntu)

Before that, install ethereum client : https://www.ethereum.org/cli

1) Create directory for your node

$> mkdir ethnetwork

2) Create genesis.json file in ethnetwork

$> touch genesis.json

3) Paste the following code in genesis.json file


{
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"nonce": "0x0000000000000033",
"timestamp": "0x0",
"parentHash":
"0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x8000000",
"difficulty": "0x100",
"mixhash":
"0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
"alloc":{}
}

4) Init genesis.json file

$> geth --datadir=. init genesis.json


5) Back to parent-folder and launch your node

$> geth --rpc --rpcport {your_port} -rpcaddr {your_ip} --rpccorsdomain "*"


--datadir "ethnetwork/" --identity "Private" --networkid 15 --nodiscover --
maxpeers 0 console

6) Create two accounts inside your node console


$> personal.newAccount("password")
$> personal.newAccount("password")

7) Start mining

$> miner.start(2)

8) Open new terminal, go to ethnetwork folder, open another console

$> geth attach geth.ipc

9) Unlock your accounts

$> web3.personal.unlockAccount(web3.personal.listAccounts[0], "password",


15000);

$> web3.personal.unlockAccount(web3.personal.listAccounts[1], "password",


15000);

10) Send ether to your accounts

$> miner.setEtherbase(personal.listAccounts[0])

$> miner.setEtherbase(personal.listAccounts[1])

11) Test transfer of ethers


$> var sender = eth.accounts[0];
$> var receiver = eth.accounts[1];
$> var amount = web3.toWei(0.001, "ether");
$> eth.sendTransaction({from:receiver, to:sender, value: amount});

You might also like