Similarly to the morden Internet, Ethereum has many different components in order for it to work properly. Some of the components of Ethereum are as follows:
- Validators (or so-called “miners”)
- Blockchain ledger
- Ethereum Virtual Machine (EVM)
- Browser (for DApps)
- Full nodes
- Etc etc.
Feeling overwhelmed? Not to worry! You are in safe hands!
Ethereum Technology Stack
Ethereum aims to act as the bridge for the Internet to transition into Web 3.0. The explanation for Web 3.0 will have to be left for another post. Please keep the above picture of the technology stack in mind. We will re-visit this picture once the various components are explained.
Scripting Language of Ethereum
A scripting or script language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator.
In comparison to Bitcoin, Ethereum has a really, really advanced scripting language (with pros and cons!). Ethereum’s scripting language is considered as Turing Complete. A Turing Complete system means that the system can be used to solve any computational problem. Do you feel like playing chess on the Ethereum blockchain? You can!
However, the top-tier ability of Ethereum’s scripting language meant that the attack-surface of Ethereum is huge. Unknown bugs and/or exploits in the code can cause the whole Ethereum network to collapse in an instant or screw up all the transactions in the Ethereum network. (More details on this will be covered in the Challenges Faced By Ethereum)
Ether – Lifeblood of Ethereum
Ether is the name of the currency used within Ethereum. It is used to pay for computation within the Ethereum Virtual Machine (EVM).
Ethereum has a metric system of denominations used as units of ether. Each denomination has its own unique name (some bear the family name of seminal figures playing a role in evolution of computer science and cryptoeconomics). The smallest denomination aka base unit of ether is called Wei. Below is a list of the named denominations and their value in Wei. Following a common pattern, ether also designates a unit (of 1e18 or one quintillion Wei) of the currency.
|Kwei (babbage)||1e3 wei||1,000|
|Mwei (lovelace)||1e6 wei||1,000,000|
|Gwei (shannon)||1e9 wei||1,000,000,000|
|microether (szabo)||1e12 wei||1,000,000,000,000|
|milliether (finney)||1e15 wei||1,000,000,000,000,000|
The amount of Ether tokens issued, inflation rate and other economic matters will be covered later.
Accounts have a very important role in Ethereum. Currently, there are two types of accounts on the Ethereum blockchain:
- Externally owned accounts (EOAs)
- Contract accounts
Note that the distinction between EOAs and contract accounts might be eliminated in the future.
Externally owned accounts (EOAs)
- has an ether balance,
- can send transactions (ether transfer or trigger contract code),
- is controlled by private keys,
- has no associated code.
- has an ether balance,
- has associated code,
- code execution is triggered by transactions or messages (calls) received from other contracts.
- when executed – perform operations of arbitrary complexity (Turing completeness) – manipulate its own persistent storage, i.e., can have its own permanent state – can call other contracts
The state of all accounts is the state of the Ethereum network, which is updated with every block and which the network really needs to reach a consensus about. Accounts are essential for users to interact with the Ethereum blockchain via transactions. Accounts use public key cryptography to sign transaction so that the EVM can securely validate the identity of a transaction sender.
Each account is identified by a 42 characters string, which is derived from the account’s corresponding private key (after a “few” mathematical hoops).
Every account is defined by a pair of keys, a private key and public key. Accounts are indexed by their address which is derived from the public key by taking the last 20 bytes. Every private key/address pair is encoded in a keyfile. Keyfiles are JSON text files which you can open and view in any text editor. The critical component of the keyfile, your account’s private key, is always encrypted, and it is encrypted with the password you enter when you create the account.
Creating a key is tantamount to creating an account.
- You don’t need to tell anybody else you’re doing it
- You don’t need to synchronize with the blockchain
- You don’t need to run a client
- You don’t even need to be connected to the internet
- Of course your new account will not contain any Ether. But it’ll be yours and you can be certain that without your key and your password, nobody else can ever access it.
The term “transaction” is used in Ethereum to refer to the signed data package that contains a message to be sent from an externally owned account to another account on the blockchain.
Transactions contain the following data:
- the recipient of the message,
- a signature identifying the sender and proving their intention to send the message via the blockchain to the recipient,
- VALUE field – The amount of wei to transfer from the sender to the recipient,
- an optional data field, which can contain the message sent to a contract,
- a STARTGAS value, representing the maximum number of computational steps the transaction execution is allowed to take,
- a GASPRICE value, representing the fee the sender is willing to pay for gas. One unit of gas corresponds to the execution of one atomic instruction, i.e., a computational step.
All action on the Ethereum block chain is set in motion by transactions fired from externally owned accounts. Every time a contract account receives a transaction, its code is executed as instructed by the input parameters sent as part of the transaction. The contract code is executed by the Ethereum Virtual Machine on each node participating in the network as part of their verification of new blocks.