Ethereum and Blockchain - 2


In the previous blog, I had described the origin of bitcoin and the various components of the Bitcoin network. Although conceptually Ethereum is very similar to Bitcoin, there are few differences.

Unlike Bitcoin protocol, Ethereum was designed to be adaptable and flexible. The nodes in Bitcoin network are simple software programs that validate a transaction and store a transaction, however, the nodes in the Ethereum network are fully functional Ethereum Virtual Machines which are capable of executing scripts of different algorithmic complexities.

Developers can develop programs which execute on EVM. These programs are written in a new javascript programming language called Solidity. Programs written in Solidity are compiled to EVM bytecode. The EVM acts as the runtime environment for these programs. These programs are completely sandboxed, and completely isolated. They don't have access to the file system, network or any other processes running on the same machine!

Like in Bitcoin, the Ethereum nodes also include the peer-to-peer protocol. The Ethereum blockchain database is maintained and updated by many nodes connected to the network. Each and every node of the network runs the EVM and executes the same instructions. The programs (written in Solidity) that you add to your node are propagated to all nodes within the Ethereum network and will be executed when the criteria for their execution are met. The programs written in Solidity are known as Smart Contracts. These programs are executed when certain criteria are met.

External programs can interact with the EVM client using the web3 interface. Web3 libraries expose various JSON RPC based methods which one can use to interact with the Ethereum clients.

Ethereum clients are differentiated as the main client and light client. Presently the EVM main client is available for all major desktop operating systems. While there are plans to develop light clients for smaller devices such as phones, IoT (Android-based light client) etc.

Ethereum Virtual Machine

The most popular Ethereum client is geth. The client has been developed in the Go programming language and implements the full functionalities of the EVM. The next most popular EVM client is cpp-ethereum/eth. This client has been developed in C++. You can follow the instructions of their installation from their Github links.

The full client will always maintain a local copy of the Ethereum blockchain database. So in case, your infrastructure isn't capable enough to hold that huge data, you can opt for a light client such as MetaMask. MetaMask is basically a Google Chrome add-on, which will interact with the Ethereum blockchain over the internet and fetch the data requested.

Mining: Like in Bitcoin network, transactions are validated using "proof of work" principle. However, the consensus algorithm used in this case is different from that of Bitcoin. Ethereum uses a hashing algorithm called Ethash. There are plans to replace this algorithm with a new one called Casper. More details on the consensus algorithm of Ethereum and the need for Casper/Proof-of-stake is explained in this video.

Ethereum supports different types of block chains namely: 
  • Public blockchain: is a blockchain that anyone can read, anyone can send transactions to and expect to see them included if they are valid, and anyone can participate in the consensus process – the process for determining what blocks get added to the chain and what the current state is.
  • Consortium blockchain: a consortium blockchain is a blockchain where the consensus process is controlled by a pre-selected set of nodes. A consortium might be a set of banks or financial institutions.
  • Private blockchain: a private blockchain is a blockchain where write permissions are kept centralized to one organization. Read permissions may be public or restricted to an arbitrary extent. 
And Ethereum client can be configured to connect to any of these block chains. However, at any point in time, one client can be connected to only one type of blockchain network.

Transaction cost: There is a cost involved in every transaction that's executed on the blockchain. This cost is expressed as gas units. The standard unit of currency in Ethereum network is ether, while the lowest denomination is wei.  

The total ether cost of a transaction is based on 2 factors:
gasUsed is the total gas that is consumed by the transaction
gasPrice price (in ether) of one unit of gas specified in the transaction
Total cost = gasUsed * gasPrice

Applications that interact with the Ethereum network are called as DApps - (Distributed Apps). These are basically programs like simple HTML/Javascript web applications that interact with the Ethereum blockchain. In the next blog, I shall document a real-world example of a DApp that I am going to build in Javascript. Then shall try recreating the same in Java as well.

PREV                                                                                                                                              NEXT

Comments

  1. Invest in Ethereum on eToro the World's Best Social Trading Network.

    Join millions who have already discovered easier methods for investing in Ethereum...

    Learn from profitable eToro traders or copy their positions automatically!

    ReplyDelete
  2. thanks for sharing blog, i think blockchain is vast concept but you write this blog in such easy way so everyone can understand the concept. In past i came across similar kind of blog so you can refer that for your future work https://bit.ly/2xRPvci

    ReplyDelete
  3. You probably saw how Bitcoin increased over 900% over the course of last year.
    It was wild but not totally unprecedented if you’d been watching crypto currency over the last several years.
    And here’s the crazy thing:
    There are many other coins that still have tons of room to grow.
    You may have heard of Ethereum, Litecoin, Ripple, and others but there are more coins and many more opportunities -
    Follow the link below to get the full story.
    https://cryptocrusher.net?46df4gsd4f

    ReplyDelete
  4. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here
    Thank you. Your blog was very helpful and efficient For Me,Thanks for Sharing the information RegardsBlockchain Online Course Hyderabad

    ReplyDelete
  5. You’ve probably seen a lot lately about Bitcoin including speculation that it may drop in the future.
    There are thousands of new crypto-millionaires
    But will people continue to get rich investing in cryptocurrency?
    Follow the link below to read the full report and find out what the future has in store
    AND how you can profit in the months and years to come.
    https://cryptocrusher.net?fsda1a8491vas

    ReplyDelete

  6. Bitcoin is popular cryptocurrency in the world, Now you can exchange it with most trusted platform Exkash.com easily, Withdraw Bitcoin to Bank Account Really amazing and fantastic

    thanks for visiting

    ReplyDelete
  7. Exchange ethereum to paypal instantly

    ethereumpro.net best website to exchange your ethereum to paypal and other currencies.there are many websites are working but this is the
    best website.highly trusted site and have thousands of satisfied customers

    https://www.ethereumpro.net/

    ReplyDelete
  8. Thanks for contribute a valuable Information regarding Blockchain and It's forecasting. Your predictions really matters a lot and increase a trust in every person. We do offer an Advance level of Blockchain online training Blockchain Training Online

    ReplyDelete
  9. This is great post - so clear and easy to follow. And very usefull information In this blog We offer Blockchain training with job assistance. Blockchain training

    ReplyDelete

Post a Comment

Popular posts from this blog

Setting up Private Ethereum TestNet

An use-case for block chain implementation