Ethereum
If Bitcoin is a blockchain of transaction data (Transaction Blockchain)
Then Ethereum is a blockchain of application data (Application Blockchain)
By embedding a programs code in a publicly accessible blockchain means the program can be completely trusted to execute as written.
Background
Founded by V. Buterin in 2013
Ethereum is designed to be the general-purpose chain.
The purpose is that a user could easily create their own system on the blockchain with only a few lines of code.
Technology
Can be thought of as a repurpose of a Bitcoin ledger remodeled around a virtual computer1
i.e. Machine Instructions instead of just Transaction Data
Described as a State-machine with 2 core components
State:
Formally made up of Account Object Classes;
Account Objects contain:
State Transitions:
A State is the sum of the database relationships in the state-database
Each State is Represented as a Block
A State transition is a change of the global state of the database relationships
Hash Functions:
Hashing Algorithm: Keccak-256
Unique Mechanics
Turing Complete:
A Turing-Complete Program is a program that can re-execute its code indefinitely.
(i.e. you can write functions that “Loop”)
Accounts:
There are Two Kinds of Accounts
Conditionals:
Transactions
A Transaction is referred to as a Signed Data Package that contains a Message Object
Contents:
Signed Data Packets Contain:
Message Objects Contain:
Message Objects are produced independently by Smart Contracts
Once executed they lead to the recipients account.
Sending:
This is what’s known as a State Transition Function [STF]
You can transition the state to modify data, account balances or even smart contracts.
A good way to think about it, is that you are sending a modification request:
i.e. we can modify the state by telling the blockchain to take some money from my account and assign it (send it) to my friends account
Receiving
Involves a listening function to make an application look for the contract on the Blockchain
You Verify the Transaction and wait for enough confirmations on the blockchain
The Fee(s)
These always vary so you never know exactly how much things cost until they are successfully executed and included on the blockchain. You can estimate by taking:
Transactions _> (Total Steps * Cost of Gas per Step) + 5 Gas per byte of transaction data
Computation _>
Bandwidth _>
Storage _>
Data Storage
Storage is extremely expensive
Ideally you won’t be storing anything
State-Database Backend:
Merkle Patricia Tree
The state-database maps bytes to bytes
The Blocks
Ethereum Blocks are formed every 17secs
Contains:
Block Header (16 Elements) _> Contains everything but the Transaction List
Block Footer (1 Element) _> Contains the Transaction Series
Structure:
Is a mapping of
Contracts _> Contains a set of Functions and Application Data that reside at an address.
Introduction to Ethereum: Assignments Pt. 4
Basic Computer Programming Functions (conditionals, variables)
Basic Computer Science (common data structures), then review some of the mechanics covered in the Introduction to Bitcoin Lessons and think about features that seem limiting, and if those limits are by design.
Quick Note on Smart Contracts:
Ethereum’s first stable release is version 2, “Homestead”. Version 3, “Byzantium”, is a refinement.