The Ethereum Blockchain: How it works

Ethereum has very similar properties to Bitcoin. When you create a digital ledger on the Blockchain or node. You are creating a record of all of the past transactions that have ever occurred. This means that one single entity doesn’t control the record. This allows for each ledger to check when someone is purchasing Ethereum or making a transaction.

What makes Ethereum different from Bitcoin is that it goes beyond just storing and transacting money. It does this by allowing people to create more complex contracts on the Blockchain. These are called smart contracts.

Smart contracts can be used for many purposes. An example of this is an online document service like Google Docs.

Google Docs required third-party companies to control the storage and management of your documents. What Ethereum is planning to do is keep these documents in the hands of the owner and the creative rights to their author.  

The plan here is to make certain that one company or entity has control over your data. This would make banning an app or taking your information offline impossible. Only the owner of the information can make a change, no one else.

This would combine the control that people used to have over their own documents while also giving easy access to information. Each time you make a change, edit or delete something, this is recorded on every node on the network.

In order to make this a reality, Ethereum used a large percentage of the protocols from Bitcoin. This isn’t a bad thing, incremental improvement is how technologies develop over time.

Ethereum’s goal is to move away from this, building on the designs present in order to create applications and agreements that have multiple steps. Not just the one to one contract that allows Bitcoin to be bought or sold. This means that Ethereum can create new rules of ownership. Like multi-signature contracts with rules of release such as dates. This could also be used to create alternative transaction formats or different ways to transfer state.

The plan for Ethereum’s ‘Turing-complete’ programming language is to make it simple for developers to create these programs on the Blockchain. The Ethereum Blockchain can govern and automate the outcomes of these Decentralised Applications. (Dapps)

This is the potentially the most exciting thing about Ethereum.

Ethereum’s Blockchain

The Ethereum Blockchain works in a very similar manner. It stores a shared record of the entire transaction history. Each node in the entire network stores a copy of each purchase or transaction of Ethereum.

The primary difference between Ethereum and Bitcoin is that the nodes store the most up to date version of its applications on the network. This is a gross oversimplification.

In order to make this a reality, Ethereum needs to keep track of the state of these applications. This includes the current state of information on all of these applications. Which would, of course, include their account balances, the smart contract code and where it’s all stored.

Bitcoin uses the unspent transaction outputs to track how much Bitcoin everyone has.

While this sounds complicated, it’s a simple premise. When a Bitcoin transaction is made, for example when someone buys Bitcoin. The network ‘break’s the total amount. This is done similarly to paper money. It issues back Bitcoins as coins or change. Taking the entire chain and snipping off the new owners’ coins and applying it to them.

To create a future transaction, such as someone buying Bitcoin, the entire Bitcoin network must add up all of your pieces of Bitcoin and class if they are spent or unspent. Essentially you send your entire balance and it sends back what you haven’t spent.

Ethereum works a little differently. It uses accounts like a bank account. Each token is kept in your wallet and can be ported or sent to another account. Funds always exist, yet they don’t have to have that continuous relationship like Bitcoin requires.

The Ethereum virtual machine. (EVM)

On the Ethereum network when a program is used, thousands of computers process it. This has been coined as a ‘global computer’ by Vitalik Bbuterin. (See what we did there)

Contracts written in this programming language are compiled into ‘bytecode’ which compresses it. The Ethereum virtual machine can then process it, reading and executing the application or contract. Every node on the network executes it using their EVMs.  

Every node in the Ethereum network holds a copy of each transaction. The smart contracts history is also stored. It keeps track of the current ‘state’ of the application each time someone interacts with it. Each node or digital ledger needs to come into agreement that this change is correct.

The idea is for the miners and node holders to hold responsibility for transferring the shift from state to state. This is opposed to a centralised authority like PayPal or a bank.  Bitcoin miners validate the change of ownership from person to person or more precisely, wallet to wallet. The EVM executed its contracts with the rules that their developers create. An interesting facet of this is that the more succinct the code is, the less gas is paid in miner fees.

The computations are done in binary, ones and zeros that a machine can read. Developers on the other hands can write smart contracts on languages like Solidity and Serpent that are easier for developers to read and write.

The network of miners and nodes effectively police the network, making certain that no one is spending their money twice and rejecting contracts that haven’t been fulfilled.

At the moment there are a few thousand nodes on the Eethereum network. Each node is a replica, making the same transactions and keeping a record of them.  

The real question is, is this more efficient, the simple answer is no, what it is though, is more secure, by order of magnitudes. It does, of course, mean that it can only be used in certain cases.

The lofty goal is for anything that can be done on a mobile phone, to also be done on an EVM.

Mr M