Want to explain to a toddler how Blockchain protocol works or your father asked you recently about blockchain or cryptocurrency stuff?
Here, I’ve tried to explain it in 6 simple steps for different persons in your life.
For your toddler –
- ‘A’ wants to send money to ‘B’
- A block is created representing a transaction
- Block is broadcast to every node(miners) in the network
- Node verifies the block and create a consensus
- Block is added to the existing chain
- Money moves from ‘A’ to ‘B’
For your manager –
- Your cousin Seema in the USA wants to send money to you in India and she doesn’t want to put his hard earned money in the hands of some middleman like banks and wiring service providers for which they take a ‘brokerage’.
- Seema sends you some bitcoins which get recorded in form of a ‘transaction’ over the bitcoin cryptocurrency network.
- The ‘transaction’ that ‘Seema sent some bitcoins to you’ is shared with everyone in the network in a secure way.
- Every node in the network reads this ‘transaction’ and actually verifies that Seema has actually sent some bitcoins to you.
- When all the nodes or miners have created a consensus that this transaction is legal, it gets added to the public distributed ledger.
- You get your money without any middleman in secured, fast and anonymous way.
Let’s get our hand dirty on creating a private ethereum blockchain network.
Go to https://geth.ethereum.org/downloads/
Download the installer, follow the wizard.
Create a genesis.json file
Create a genesis.json file which will look like below –
"difficulty" : "0x20000",
"gasLimit" : "0x8000000",
Open a console and create a folder
Open a create a folder chaindata, this folder will have all of our blockchain related data in file based storage
Create a file genesis.json as stated above. Now mychain folder will have a folder chaindata and a file genesis.json
Init and bring up your blockchain
Initialise your blockhain
C:\mychain>geth --datadir=./chaindata init ./genesis.json
You should see something like this output:
[INFO] Successfully wrote genesis state
You now have to start geth with that chaindata directory:
C:\mychain>geth --datadir=./chaindata --nodiscover
Congratulations, your first private blockchain is up. Feel free to comment your thoughts.
The blockchain ecosystem has exploded with multiple open source projects and that’s good for the blockchain’s future because multiple blockchain platforms communities will urge themselves towards more innovation in the same field.
- R3s Corda
If I’ve missed any other platform, please let me know in comments, I’ll add it to the list.