Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Blockchain Ethereum: Part 1

DZone's Guide to

Blockchain Ethereum: Part 1

In this post, we give an introduction to the main concepts behind the open source blockchain, Ethereum, and how it can keep your transactions secure.

· Security Zone
Free Resource

Discover an in-depth knowledge about the different kinds of iOS hacking tools and techniques with the free iOS Hacking Guide from Security Innovation.

If you are new to the Blockchain, you can learn the basics here.

What Is Ethereum?

Ethereum is an open source Blockchain platform. It can build and run decentralized applications. Ethereum is a ‘Singleton’ planetary scaled computer, and you can understand it as a single computer that everybody can use. This is the first almost zero infrastructure platform.

Anybody who has joined the Ethereum network can upload programs to Eethereum and can request to execute the uploaded program.

Ethereum Virtual Machine (EVM)

EVM is at the heart of Ethereum. It’s a programmable Blockchain. You can use it to create your own operations of any complexity. The EVM focuses on providing security, hence it prevents a very common cyberattack known as Denial-of-Service (DoS). It can be used for more than crypto-currency use-cases; for example, in Land Registry, Bank Transactions, etc. It supports a peer-to-peer network, hence it ensures that communication can be established without any interference.

In short, you can understand it as a runtime environment (same as the Java Virtual Machine in Java) for smart contracts.

Ethereum Clients

Client Language Developers
go-ethereum Go Ethereum Foundation
cpp-ethereum C++ Ethereum Foundation
pyethapp Python Ethereum Foundation
Ethereum(J) Java <ether.camp>
Ruby-ethereum Ruby Jan Xie
Parity Rust Ethcore
ethereumH Haskell

BlockApps


What Are Miners?

It offers you computational processing power. Once you join the network, you will have a node in the Ethereum network. After joining the network, a node can receive a transaction, propagate, verify the transaction, and execute the transaction; it can receive the small cryptocurrency called 'Ether,' which is a transaction fee for validating the network.

A few important items to know about miners are:

  • Ether: It’s a cryptocurrency for your computational contribution to the network. This could be exchanged for Bitcoins and Dollars.

  • Proof of Work: Solving a complex mathematical problem in order to successfully ‘mine’ a block is known as ‘Proof of Work.’

How Does Ethereum Work?

Everything in Ethereum is account-based. There are two types of accounts in Ethereum state and both have an Ether balance.

  • Externally Owned Accounts (EOA) - These are user controlled accounts. They can do the transactions (transfer or trigger a contract code). This is usually controlled by a Private Key. It doesn’t carry any associated code. For example, a wallet address would look something like this: 0x2easdf8745dfgszxcvkhsdf543sfg5shhhkjha (Public version of a Private Key). 

  • Contracts - This is a system or internal code. It maintains a data store so that it can call other contracts. It manages an ongoing contract or relationship between multiple users. For example, the wallet address of contract would look like this:  0x9812dfgfdskjhgfgszxcvkhsdf543swg5shskkmh   

Every action within Ethereum happens via transactions fired from an EOA. An EOA can trigger a transaction with another EOA or Contract. The contract code gets executed by each node’s EVM, which is participating in the Ethereum network. A contract can perform a transaction/call to other contracts.

The accounts interaction could be understood as below:

Image titleSmart Contracts

A smart contract is a code (using a Contracts account) that performs hassle-free, transparent transactions. This could be understood by the below pictorial example.

Image title

Ethereum Key Pairs

Private Key: This is a 64 character string. Any 64 character string other than ‘0’ 64 times is a valid key.

Public Key or Wallet Address: The last 40 characters of a hashed private key. There is a ‘0x’ in the front to represent that it is in a hex format.

Let us look at the below diagram for Key conversion (Private-to-Public):

Image title

Now let us look at some Ethereum tools, which could be useful for understading Ethereum.

etherscan.io

This is a block explorer. Some important points have been pointed out with arrows.

Image title

ethstats.net

This is a dashboard for Ethereum, which shows the statistics for Ethereum.

Image title

Hope this will give you a better understanding of Ethereum.

Happy learning!

Learn about the importance of a strong culture of cybersecurity, and examine key activities for building – or improving – that culture within your organization.

Topics:
blockchain ,ethereum ,security ,denial of service ,cryptocurrency

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}