How My Limitations Guided Me To Fulfillment

Logistically speaking, we can all do everything. Rarely is something solely dependent or restricted to talent or capability alone. And even when it is, there is nothing preventing you from taking a…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Setup your local private ethereum chain

A. hardware requirement: normal laptop can run my one is DELL Latitude E5630 with 90G free disk and 8 G memory and lower configuration is ok as long as your have enough free hard disk and memory to run the laptop.

B. OS: Windows 7 professional with 64bit (this guide is based on windows while ethereum can build on all popular OS (Mac, Linux)

C. software requirement: Java, GO as common software and GETH as ethereum specific that provide GLI environment.

note: there is other equivalent ethereum software while in this guide, i just use GETH

D. steps to create your local eth chain

below is my sample genesis file and pls note the alloc section can only update after your create address so you can pre-allocate some eth for test purpose.

{
“config”: {
“chainId”: 3,
“homesteadBlock”:0,
“eip150Block”:0,
“eip155Block”:10,
“eip158Block”:10,
“eip160Block”:10
},
“nonce”: “0x0000000000000042”,
“alloc”: {
“0x719e1f4b5c9c459571374e18c0331d79d6a3d821”: { “balance”: “20000000000000000000”},
“0x5940ac93043e0c7bc906b10b32f0e1adb79a389a”: { “balance”: “30000000000000000000”}
},
“timestamp”: “0x00”,
“parentHash”: “0x0000000000000000000000000000000000000000000000000000000000000000”,
“extraData”: “0x3535353535353535353535353535353535353535353535353535353535353535”,
“gasLimit”: “0x1000000”,
“difficulty”: “0x100000”,
“mixhash”: “0x0000000000000000000000000000000000000000000000000000000000000000”,
“coinbase”: “0x0000000000000000000000000000000000000000”
}

chainId: arbitrary number to define your private local chain ID to differ from main chain that ID is 1

alloc section show the current account and balance in eth

nonce and mixhash: POW that need to be done on genesis block

difficult: the value determine how hard to find a new block

gasLimit: the cap of gas limit that allow to spend for each for each transaction

coinbase: miner reward address

2. create your own ethereum data directory and store your genesis file in this data directory

3. initialize genesis block

in cmd, under your data directory to run below command (this is my parameters value, you need to change to your own)

note: ethereum set its own default data dir in windows under below directory, so you need to link it to your own data directory by mklink command

c:\personal user folder\AppData\Roaming\Ethereum

4. start your local chain, again, value belos is my one and you need to set your own value for the parameters

geth — datadir “C:\myEther” — identity “Lilyware” — networkid 111 — rpc — rpcport 8545— port “30303” — ipcpath “geth.ipc” — rpcapi “db,eth,net,web3”

5. create address — after run the command, the address will show in geth CLI and update it to genesis file with any amount of ETH. just follow the alloc section in my genesis file above.

geth account new

6. repeat step 3 and 4

7. check the balance-the amount of ETH you set in alloc part should return after run below command.

>web3.fromWei(eth.getBalance(“your address”), “ether”)

8. start mining

miner.start(1)

Congratulation! you start your local private chain now and start mining.

Add a comment

Related posts:

How to Deploy or Host a React.js Project To Firebase Console Using CLI

First you need to use your google account to create a Firebase Console account at https://console.firebase.google.com Then create a project, using your react project name, (example AppName), do not…

Network Marketing History

In 1934 California Vitamin Company made a concept of multi level marketing ,first things first they started selling the products to people who’s will use the product for the personal use and if they…

What Is the Business Value of UX Design

Even at the gut level, we understand that customer experience is at the core of every successful business. It’s a very simple principle — when you take care of your customers, they are willing to…