Skip to main content

Ethereum

Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third-party interference.

Uses Solidity as a programming language.

Ethereum's mechanism to choose the most valid chain is called the "GHOST protocol". GHOST stands for "Greedy Heaviest Observed Subtree". Essentially, it picks the path that has had the most computation done on it. The protocol uses the block number of the most recent block, this represents the total number of blocks in the current path. The higher the block number, the longer the path and as such the larger the mining effort that had to have gone into arriving at the most recent block. This allows the network to agree on the correct version of the current state.

  • Mining Algorithm - Ethhash
  • Ethereum (2015): full-blown, Turing-complete smart contracts
  • Built-in currency caller Ether
  • Operations in smart contracts have a gas cost that gets paid to the miners
  • Blockchains will be to finance what the Internet was to music and video
  • Follow the longest chain or heaviest chain
  • Problems
    • Loss of data
    • Confidentiality
  • Ethereum is the blockchain of blockchains

ETHEREUM 2.0 - A GAME CHANGER? Proof Of Stake, The Beacon Chain, Sharding, Docking Explained

  • Solidity
  • Ether = Token (is the fuel to run this Dapps)
  • Ethereum - Platform to develop our own Dapps
  • Gas fees
  • Smart contracts
  • DeFi - Decentralized Finance
  • Proof of work -> Proof of stake
  • Sharding will increasing 1000 TPS
  • EIP 1559

image

Points

  • Blockchains all start with a genesis state.
  • Each transaction in the Ethereum network is grouped into what are called blocks. A single block contains a set of transactions and each block points to the next block. This makes a chain of blocks aka blockchain.
  • Mining is when a specific group of nodes (miners) uses their computing power to create a block of valid transactions.
  • The processes of validating each block by having a miner provide a mathematical proof are called the 'proof of work' algorithm.
  • Miners who validate new blocks get rewarded with an intrinsic digital token called 'Ether'. Every single time a miner proves a block as valid, the network generates new Ethers and awards the miner.
  • In scenarios where multiple paths are generated by miners, a 'fork' happens. Forks are to be avoided since they are disruptive to the system and force nodes to choose which chain they believe to be the most valid.
  • Ethereum's mechanism to choose the most valid chain is called the "GHOST protocol". GHOST stands for "Greedy Heaviest Observed Subtree". Essentially, it picks the path that has had the most computation done on it. The protocol uses the block number of the most recent block, this represents the total number of blocks in the current path. The higher the block number, the longer the path and as such the larger the mining effort that had to have gone into arriving at the most recent block. This allows the network to agree on the correct version of the current state.

Components

Accounts

  • Externally Owned Account
    • Ether Balance
  • Smart Contract Account
    • Ether Balance
    • Contract Code
  • Every account has a state
    • nonce
      • represents number of transactions sent from the address of the account
    • balance
      • amount of Ether owned by the address
    • storageRoot
      • root node of its Merkle tree
    • codeHash
      • hash of the Ethereum Virtual Machine code
  • Merkle Tree

Fees

  • Every single computation/transaction on the Ethereum blockchain requires a fee. That fee is paid in whats called 'gas'. Gas is the unit Ethereum uses to measure computation fees. Gas price is an amount of Ether a node is willing to spend on every gas unit, measured in 'gwei' (since 'wei' is the smallest unit of Ether).
  • For each transaction, a sender sets a gas limit and a gas price. The gas limit represents the maximum gas the sender is willing to pay. If the sender doesn't provide the necessary gas to execute a transaction, the transaction is considered invalid. And since the Ethereum network had to expend computational effort to run the calculations before running out of gas, none of the gas gets refunded to the sender. The money spent on gas by the sender is sent to some miners address since miners are expanding the computational effort to validate transactions. The gas fee acts as a reward for the miners. Importantly, gas is used to pay for storage usage as well.
  • Fees help prevent users from overtaxing the Ethereum network. Its very computationally expensive to run computational steps on the Ethereum Virtual Machine, so smart contracts should be used for simple tasks like verifying ownership instead of more complex tasks like machine learning or file storage. Fees also help protect the network from malicious attacks. Ethereum has its own Turing complete programming language called Solidity for creating smart contracts. Turing complete means it can simulate any computer algorithm. It allows for-loops, so a bad actor could disrupt the network by executing an infinite loop within a transaction, but thanks to fees this becomes infeasible.
  • There are two types of transactions in Ethereum, the message call and the contract creation (creates new smart contracts). Both are initiated by externally owned accounts and submitted to the blockchain. They are what bridge the external world to the internal state of Ethereum. Contracts can talk to other contracts via messages. Messages are like internal transactions. These messages are generated by contracts, and when one contract sends a message to another, the code that exists on the recipient contract account is executed.

Ethereum Virtual Machine

image

The EVM is a complete virtual machine, and its only limitation is that its bound by gas. Meaning the total amount of computation it can do is limited by the amount of gas provided. Its a stack-based architecture (last-in, first-out). It has temporary memory and long-term storage. It even has its own language! (called EVM bytecode). When we write smart contracts, it's in a higher level language like Solidity, but this compiles down to EVM bytecode.

  • Ethereum Virtual Machine is a decentralized virtual machine that can run crypto economically secured bits of code called smart contract.
  • The smart contracts language Solidity is tailored to the ethereum blockchain since it compiles down to bytecode specific for Ethereum's stack machine.
  • Solidity is Turing-complete meaning it can theoretically any kind of computation.

Geth

Geth (go-ethereum) is a Go implementation of Ethereum - a gateway into the decentralized web.

Geth has been a core part of Ethereum since the very beginning. Geth was one of the original Ethereum implementations making it the most battle-hardened and tested client.

Geth is an Ethereum execution client meaning it handles transactions, deployment and execution of smart contracts and contains an embedded computer known as the Ethereum Virtual Machine.

Running Geth alongside a consensus client turns a computer into an Ethereum node.

Codebase - GitHub - ethereum/go-ethereum: Official Go implementation of the Ethereum protocol

Home | go-ethereum

The Ethereum source code explained in 2 mins

Ethereum Push Notification Service (EPNS)

Protocol for blockchain based notifications that are chain agnostic, platform independent and incentivized!

https://epns.io

Crypto-enabled financial trickery

Self-soverign identities (SSI)

  • Self-sovereign identity (SSI) is an approach to digital identity that gives individuals control of their digital identities
  • No single standard, specification, or shared understanding what that may be

MEV (Maximal Extractable Value)

Maximal extractable value (MEV) refers to the maximum value that can be extracted from block production in excess of the standard block reward and gas fees by including, excluding, and changing the order of transactions in a block.

Miner extractable value

Maximal extractable value was first applied in the context of proof-of-work, and initially referred to as "miner extractable value". This is because in proof-of-work, miners control transaction inclusion, exclusion, and ordering. However, since the transition to proof-of-stake via The Merge validators have been responsible for these roles, and mining is no longer part of the Ethereum protocol. The value extraction methods still exist, though, so the term "Maximal extractable value" is now used instead.

Others

  • PBS - Proposer-Builder Separation
  • ePBS - enshrined Proposer-Builder Separation
  • PTC - Payload-Timeliness Committee
  • ToB - Top-of-Block

Relays in a post-ePBS world - Proof-of-Stake - Ethereum Research

GitHub - skip-mev/pob: Skip's protocol-owned MEV builder implementation

Testing

What are Testnets?

What is a testnet Ethereum faucet

An Ethereum faucet is a developer tool to get testnet Ether (ETH) in order to test and troubleshoot your decentralized application or protocol before going live on Ethereum mainnet, where one must use real Ether. Most faucets require social authentication (e.g. Twitter post or login confirming you are a real human) or place you in a queue to wait for a testnet token through the faucet. The Alchemy Goerli faucet is free, fast, and does not require authentication, though you can optionally login to Alchemy to get an increased drip.

https://goerlifaucet.com/

What is a testnet token?

Testnet tokens are a test currency that allows you to test your Ethereum application before going live on mainnet. Testnet tokens can be used in place of mainnet Ether tokens on testnets like Goerli.

Others

Can ETH Become DEFLATIONARY? EIP 1559 Explained - YouTube

How does Ethereum work, anyway?

Ethereum (ETH) Blockchain Explorer

Blockscan Chat - Wallet to Wallet Messaging for Web3

  • A messaging platform for users to simply and instantly message each other wallet-to-wallet, powered by Log-in With Ethereum

GitHub - graphprotocol/graph-node: Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL

Remix - Ethereum IDE

Ethereum By Henning Diedrich

How Do Ethereum Withdrawals Work? All You Need To Know - YouTube

How does Ethereum work, anyway