DEV Community

Orion
Orion

Posted on

Ethereum Notes

Ethereum

Ethereum: a decentralized platform that runs the smart contracts exactly how coded without any downtime, fraud and 3rd party interference. Uses a crypto currency called Ether.

Made of three components

  • Currency Issuance
  • DAO
  • Smart Contracts

Features:

  • Secured
  • Community Support
  • Corporate Friendly
  • Asset Issuance
  • Fast transactions
  • Uncensored

What is gas?

  • fundamental crypto fuel for Ethereum. Considered a transaction fee when doing transactions on Ethereum.

Ether - element needed for operating the Eth platform. it is essential to write error free code so you won't use much ether / gas. The crypto fuel for the Ethereum platform. Hash algorithm is used. Used to making dApps. Its token creation for facilitating smart contracts, transaction speed is measured in seconds.

wallets- a place to store eth.
hardware, mobile, desktop, wallets.

Ethereum Virtual Machine (EVM) is an engine which executes translation code. possesses its own programming language called EVM bytecode. Opcodes are instructions that execute specific tasks on the EVM.

Ethereum Languages: Contacts are compiled into EVM bytecode and deployed.

  • Solidity
  • LLL (low level list)
  • Vyper
  • Serpent
  • Mutan
  • Julia

Types of Eth Accounts:

EOA: followed private key that has ability to send Ethers and messages from the account.

Smart Contract - code running on top of the Blockchain. It contains a set of rules that the nodes agree upon so they can interact with each other.

  • Simple form of decentralization
  • security
  • no third party
  • automatic agreement

Characteristics of Smart Contracts

  • Self verifying
  • Self executing
  • Cost Saving
  • Tamper Resistant

Process of Smart Contracts

  • contract made through a public ledger
  • a trigger event for details
  • Regulators can use the blockchain to understand the use.

EOA vs Smart Contract

  • Externally Owned Account (Nonce, Balance, CodeHash, Storage Root)
  • Smart Contract (Nonce, Balance, CodeHash, Storage Root)

Ethereum Mining
Algorithm used is Ethash. Ethereum makes use of the POW mechanism to ensure security.
State Storage- The states are assembled into a state tree that is linked to the account and the block. Ethereum includes these that store the root hash of the hash tree which reps the system state when the block is created.

Ethereum Tools

  • Geth: cli that runs an eth node implemented by Go -Ganache: local blockchain emulator allows to make calls to the blockchain without a eth node
  • Parity: fastest lightest secure ethereum client that provides the core infrastructure for quick and reliable services. Written in Rust lang.
  • MetaMask: turns chrome into a browser that allows users to send and recv transactions. fetch data as well from the blockchain.
  • Mist Wallet: End user interface for EThereum that is developed for browsing using Dapps. (not used anymore)
    • Swarm: decentralized storage and communication system including messaging, media streaming, dApp Database services, and scalable channel infrastructure.
    • IPFS: (Interplanetary file system)- P2P hypermedia protocol for storing and sharing data in a distributed file system. Stores data by using a dHash Table.
  • Whisper: a messaging system with low level API use. P2P communication between nodes of Whisper network.
  • Status.im: is an application that allows private messaging, secure crypto wallet and eth browser in one.

Ethereum Frameworks

  • Web3.js : set of libraries which permit one to interact with a remote or local node. It is a key connection between Ethereum network and Dapp that allows the compiler to compile, deploy and interact with smart contracts.
  • Eth.js : lightweight utility on based on web.js

Dev Environment for Ethereum

  1. Remix IDE: browser based compiler that helps build Ethereum contracts with solidity language.
  2. Truffle:
  3. Embark: env that allows you to develop and deploy dApps.

Ethereum Networks: The basis of decentralized consensus is the p2p network of participating nodes which maintain and secure the blockchain. A node is a device or a program that can communicate to the network known also as clients.
Types of Networks: testnet, mainnet

DAO: Decentralized Autonomous Organization: designed to hold assets and use the voting system to distribute them. Rules are agreed upon by the members of the DAO. Peer decision making.

Discussion (0)