Wednesday 14 October 2020

Cryptocurrency & Blockchain

In the below article, we are going to introduce Cryptocurrency & Blockchain Technology. The article is structured like a conversation between three friends who are meeting during the Lockdown.

Sowbharnika : Hi Preetha ✋, How is it going?

Preetha           : Yes, it is going good and How are you? By the way, who is she?

Sowbharnika : I’m good. She is my cousin Sandhiya. She came to spend this lockdown here with me.


Preetha           : Ho! Hi Sandhiya. I'm Preetha, Sowbharnika’s friend.


Sandhiya        : Hi Preetha ✋, Sowbharnika told me about you…It is good to meet you.


Preetha           : Wow, nice. Thank you...How do you spend this lockdown time with her?


Sandhiya      : Yes, We spend this time in an interesting and informative way by learning about Cryptocurrency.


Preetha          : Cryptocurrency???.. What is that? I have never heard of it.


Sowbharnika : Hey Preetha, First of all, do you know what is Currency and who controls it?


Preetha         : Yes, I know what Currency is, the paper money we use to buy products / services. It is a physical money in an economy. The value and the unit varies from country to country. In India, we use Indian Rupees (₹ - INR) whereas in USA they use United States Dollar ($ - USD). But, I am not aware who actually controls them?! 😐 


Sowbharnika : Good, it is normally controlled by Central Bank of the country. In India, the Central Bank is called the Reserve Bank of India (RBI) which controls the flow of money. Let Sandhiya explain about Cryptocurrency. 




Sandhiya       : Cryptocurrency is a digital virtual money used as a medium of exchange where creation, transfer, ownership are recorded in a distributed ledger using strong cryptographic algorithm.


Preetha             : 😕😕😕


Sandhiya          : Wait, let me put it in simple terms. Cryptocurrency is nothing but a currency in digital and virtual form. It is an amalgamation of Cryptography and Currency.


Sowbharnika  : It is based on Distributed Ledger Technology like Blockchain. It is designed to solve the most crucial problem in digital transaction called Double Spending.




Sandhiya        : Double Spending is a potential flaw in  digital cash transaction system where the same digital money can be spent more than once. 


Preetha           : Thanks Sowbharnika and Sandhiya for introducing me a new topic of interest. I would like to know more about Blockchain technology?




Sandhiya      : Blockchain is a system to record transactions in a distributed ledger. The transactions are recorded in the form of blocks where each block is connected through Cryptographic Hash. Blockchain is highly secure, immutable, and transparent ledger. 


Sowbharnika  : Until recent times, people Trusted 3rd-parties to store and process their assets of value. These third parties used centralized system to maintain and perform computational tasks. 

Blockchain is a decentralized computation and distributed ledger to immutably store transactions in a verifiable manner efficiently, through a rational decision making process  among multiple parties in an open and public system. 



 

Preetha         : Ok, Blockchain is an important innovation on the internet. It is good for a safe and secure transaction then, can you say how it works in a real scenario?


Sandhiya       : Yes, let's take a Car rental company as an example. Every time person rents a car it creates a transaction and the car rental company acts as an intermediary (trusted 3rd-party) who maintains the database of transactions. 


Incase, of a Car rental company with decentralized system which maintains the public ledger of the people rented and owner. If a user wish to rent any car, they can get the information about the car without contacting the company (intermediary). For every transaction, ledger in all the nodes are updated. This new car rental model is operated by the people involved in the transaction without the involvement of intermediaries.  This is how the Blockchain works.


Preetha          : 😎. It is very interesting to hear about this Disruptive Technology. I am too interested to know more about this.


Sowbharnika : A Cryptocurrency is normally created, transacted, and maintained in a Blockchain.  Bitcoin was the first cryptocurrency developed in 2009, by an anonymous developer, who goes by the pseudonym, Satoshi Nakamoto.



Preetha      : Yaay, I heard about Bitcoin, but I assumed it is a form of digital currency. Now I understand it is Cryptocurrency, as it is created by Cryptographic means. 


Sowbharnika : Yes you are absolutely right Preetha👍. But not only Bitcoin, but other popular cryptocurrencies are also created on top of some blockchain. Let me suggest you something, either you spend time researching about each cryptocurrency or learn it from an expert. 


Preetha          : Sure. Apart from Bitcoin, can you share more information on other cryptocurrencies? 


Sandhiya    : As Bitcoin grew in popularity and gained more acceptance, many individuals and organizations started creating their own cryptocurrency based on bitcoin. As a result, alternative cryptocurrencies (often referred to as altcoins) were launched. The cryptocurrencies created based on Bitcoin are LiteCoin and Namecoin.


Litecoin (LTC) is developed by Charlie Lee, which became one of the top 5 cryptocurrencies in 2017.

Namecoin (NMC) was developed by Vinced, which acts as a decentralized DNS.

 



Preetha       Are all those altcoins active even today?


Sowbharnika : No Preetha, some cryptocurrencies due to its failures became inactive and paved the way for the introduction of new cryptocurrencies. Some inactive cryptocurrencies are Coinye, Onecoin, Petro.


Preetha       : Can you share about other popular cryptocurrencies that are active?


Sandhiya   :  Peercoin, Dogecoin, Primecoin, Ripple, and many others.


Peercoin (PPC) is a cryptocurrency where new coins are generated based on holdings of individuals.

Preetha          : Wait Sandhiya, DogeCoin (DOGE) is something related to dogs?

Sandhiya      : Yes you are right Preetha, DOGE known as Joke Currency was developed as featuring Shiba Inu dog from the "Doge” Internet meme as its logo. This coin is used in the Internet Tipping system.


Preetha           : Likewise, is Primecoin related with Prime numbers?


Sowbharnika Yes, your guess is absolutely correct, Preetha !!! 👏


PrimeCoin (XPM), searches for a chain of prime numbers, which were developed by the Peercoin developer.


Sandhiya       : Yes, your guess wins because their name implies their features. Let me tell you about the next one which is Ripple. 


Ripple (XRP) is not based on bitcoin, is a Real-Time Gross Settlement (RTGS) System.

 

Ether (ETH) is the cryptocurrency based on Ethereum Blockchain, featuring smart contract functionality. Ethereum is the second-largest cryptocurrency platform after Bitcoin, which was developed in the year 2015.

Preetha           : Oh, nice to know !!!

Sowbharnika: Post introduction of Ethereum, TetherZcashBitcoinCash came into existence. 

Preetha           So is there any country which started using or issuing cryptocurrency?

Sandhiya        :  Aurorocoin which was launched in 2014, as an alternative to Iceland's króna. 

Preetha         : Happy to have known so much information about Cryptocurrency. But I would also like to know is there any disadvantages in this new form of currency?


Sowbharnika : Very important question. Like two sides of the same coin, inspite of having multitude advantages, cryptocurrency also faces numerous challenges. Some of them are scalability, security issues, privacy, anonymous illegal transaction and data breaches.


It's our responsibility to keep an eye on the development in this area. Participate based on our own Analysis. 


Preetha        Thank you 🙏 both. I had a nice time learning from both. I will also share about this new technology with my friends. 


Sandhiya    : Yes, that is very important 👍. Kindly share and create awareness about this technology that is going to impact everyone in near future, also to your parents. See you then ! 😊


Sowbharnika : Bye !!! 😊

 

                                                                    ---    ***    ---


Authored by: Sowbharnika K

Reviewed by: Ramaguru Radhakrishnan

Definition & Images from : நம்Chain Terminologies Series

Friday 9 October 2020

HyperLedger Besu - Node Setup

                                        


This article is part of Hyperledger Besu Series. 

In this part of the series, we are going to see how to setup a permissioned network within our local computer. 

Step 1: Move the besu folder from Downloads/ or your default download directory to your Main Working directory with enough storage space.  

Step 2: Install Curl in your system.

Step 3: Create a folder for the Permissioned Network within the besu-1.5.0 folder.

 

View of Besu directory after Permissioned-Network folder creation


Step 4: Create three folder Node-1, Node-2, Node-3 each representing a Node in the Permissioned Network.

 

 
View of Permissioned-Network folder with three Nodes


Step 5: Within each Node folder, create a data folder for storing the blockchain data. The Node key is also saved within this directory when node starts Besu.


View of Node Folder showing the sub-directory 'data'


Step 6: Genesis Block is the first Block in the Blockchain. We need to create a Genesis config file in json format and place it in the Permissioned-Network directory. Clique is the consensus algorithm here, so we need to include atleast signature of one node in the genesis file.  



Step 7:  Copy the file from the link and paste in Permissioned-Network Directory

Step 8: Get the Node-1 Address from the file in /Node-1/data/nodeAddress1 and replace that instead of text <Node-1 Address>  for the parameter  "extraData" in the cliqueGenesis.json file.

 Step 9: Copy the permissions config from the link and paste in data directory all Nodes (/Node-1/data, /Node-2/data, /Node-3/data)

 


 

Thursday 23 July 2020

HyperLedger Besu - Installation Help



HyperLedger Besu is an Ethereum client designed to be enterprise-friendly for both public and private permissioned use cases. It can run on the existing Ethereum public network or private permissioned networks, as well as test networks such as Ropsten, Rinkeby, Kovan and Görli. Besu supports different consensus algorithms like PoW (for mining), Proof of Authority (PoA) and Byzantine Fault Tolerance (IBFT). 

 We are going to see how to install HyperLedger Besu Binaries in Windows.

Prerequisites :

-        4GB of RAM

-        Java JDK 11+ installed ( To download, Click here )

-        GitBash ( To download, Click here )

Two ways of installing Besu:

  •      Installing the binary distribution
  •      Building from source

Here we are going to install the binary distribution.

Steps:

  1. Download the Binaries from this website. (We have downloaded besu-1.5.0.tar.gz)
  2. Open Git Bash, Move to the folder where you saved the downloaded binaries.
  3. Unpack the compressed file using the command: $ tar -xzf <besu file name>
  4. Move to the uncompressed binaries, and to confirm that the binaries aren't corrupted and check the version, type the command: $ bin/besu --version. The output should return the Besu Binary and JDK version.


Besu Installation Terminal Response

 


Monday 2 March 2020

Libra - Short Overview


The techno-world is running behind the Blockchain. Blockchain is a peer-to-peer distributed immutable ledger that provides tamper proof protection for the data stored. Industry and Academic world consider the Blockchain to be the next Web 3.0/Industry 4.0. 

From big Multinational companies to small start-ups migrate their products and solutions to blockchain or creating their own blockchain &amp; cryptocurrencies (many without a vision and clarity). Social media giant Facebook finally decided to jump into Blockchain well. 

A new Blockchain and Cryptocurrency named "Libra (LBR)" was announced early this year. "Libra" refers to a unit of weight in ancient Rome. Libra Blockchain and Currency will be maintained by Libra Association (non-profit independent). 

Below I am sharing my observations and comments after some reading and experimentation.

Mission of Libra as stated in their Whitepaper - Enable a Simple Global Currency. 

What is different (and new) in Libra?

  • Libra is a asset backed cryptocurrency - For every Libra created (bought) --&gt;  bank deposits and short-term government securities will be held by Libra Reserve (maintained by Libra Association) 
  • Libra Blockchain designed and uses the new Move programming Language --&gt; for Transaction logic and Smart Contracts.
  • Libra Blockchain designed and uses BFT based Consensus protocol called LibraBFT (Hotstuff Protocol)
  • Libra blockchain is a single data-structure that records the history of transactions and states over time.(This is different to the view of existing blockchain where we see it as a collection of blocks of transaction)
  • The transactions are maintained in Merkle Accumulators (instead of Tree)
Libra Blockchain will be initially released as a permissioned blockchain, this is considering the scalability, stability and security issues to support a larger user-base. But the organisation aims to make it permissionless within 5 years from the launch.

"Financial Inclusion" a much heard word during the demonetization and Pradhan Mantri Jan Dhan Yojana (Government of India, Financial Inclusion Scheme).
One main mission the whitepaper states is to provide financial inclusion such that transferring money is easy and secure like sending a text SMS.

Viewing from technical aspect Libra Blockchain states 3 requirements

1. Scale blockchain to billions of accounts with 
  • High Transaction Throughput
  • Low Latency
  • Efficient and High Capacity Storage System
2. Highly Secure
3. Flexible

Very good and clear goals, defined road maps. What is that we have as of now? 

A Testnet for developers to try and understand Libra :) 

https://developers.libra.org/ explains the step by step instructions for downloading, building and starting Libra Testnet node in your system (only MacOS and Linux). This installs Libra Core in your system. Libra Core is the open source implementation of Libra Protocol. [Info: Libra Core is implemented in Rust language]. This is a CLI based wallet.

Like other blockchains, Libra also provides a Explorer where you can view the transactions and other information &amp; stats. https://librabrowser.io/ (This is only one of the multiple explorers) 

Based on the instructions in the developers site, I have downloaded, build and started my Libra Node on a MacOS. 
We are running a normal node when we complete executing the scripts as mentioned in the link. A node has the following components Mempool, Consensus and virtual machine. 

There are special nodes called validators that receives the transaction from clients, runs the consensus and stores the state. I did a transfer of 10 LBR from Account index #0 to Account index #1. On checking the transaction status, I could see some familiar terms and new terms.



Gas Used, Gas Price and Max Gas could be a familiar term for Ethereum blockchain users, only difference being Gas price is measured in Libra currency. Instead of Block Height, there refer the block as Version. To prevent replay attacks, Libra uses sequence number which means number of transactions sent from that account.

Libra Testnet allows us to mint LBR (Libra Coins/Currency) [I know coins and currency is different.] to your account. As far as I understood minting here is just a transfer of LBR from a predefined account to your account. 


https://librabrowser.io/account/000000000000000000000000000000000000000000000000000000000a550c18 is the account from which the money is transferred when we mint LBR. Something that I couldn't understand is that "Balance remains the same even after so many transfer - 3181055902667.0967 Libra"

Account/Wallet Address Generation is similar to other blockchains. https://librapaperwallet.com/ use this to generate a Libra Address and understand.

Looking from crypto perspective. Libra uses SHA-3 as their hashing algorithm. For signatures they use ED25519 and X25519 for key exchanges. SLIP-0010 is used for the universal hierarchical key derivation.

Now if you look at the System Architecture you might understand something 

+---------------------+---------------------+ | Consensus | Mempool | +---------------------+---------------------+ | Validator Network | +---------------------+---------------------+ | NetworkProvider | +------------------------------------------------+-----------------+ | Discovery, health, etc | RPC | DirectSend | +--------------+---------------------------------------------------------+ | Peer Manager | +------------------------------------------------------------------+-----+


This article was originally posted in "Know IT! Share IT! Explore IT!" on Aug 22, 2019

Total Pageviews