8. Centralized vs. Decentralized Apps
Centralized (Client-Server) Decentralized (Dapps)
Logic Cluster of servers contain the entire
logic.
All logic is contained in the contract. Once
the contract is mined, all nodes have the
exact same logic, saved on their copy of
the blockchain.
Data Integrity Maintained by strict set of rules
enforced by the infrastructure, tools,
and services.
Taken care via redundancy of the nodes in
the network.
23. How is Ethereum different from Bitcoin
blockchain?
Bitcoin Ethereum
Bitcoin uses a simple scripting system for
transactions. Bitcoin script is simple,
stack-based, and is intentionally not
Turing-complete, with no loops.
Ethereum platform is built with a Turing-
complete language.
Send bitcoin from Alice to Bob Send ether from Alice to Bob if…
• Bob’s balance is less than 2 eth
• Date > 2019/01/01
26. Ecosystem, tools, terms, products…
ETH Ethereum networks’ native crypto-currency
EVM Ethereum Virtual Machine providing decentralized computation service
Swarm Provides P2P file sharing and storage services
Whisper Protocol used by nodes to communicate with each other
Solidity, Serpent, LLL Smart contract programming languages
eth, geth, pyethapp Main ethereum software written in C++, Go, Python respectively.
27. Serverless Stack
Whisper Encrypted messaging protocol that allows nodes to send
messages directly to each other in a secure way; hides sender
and receiver identity from snoopers
Swarm P2P file sharing, similar to BitTorrent, but rewarded with
micropayments of ETH (Storage Layer)
Ethereum Virtual
Machine (EVM)
Runs the contract logic
29. Test Networks
Ropsten • Resembles the main network
• Uses Proof of Work consensus algorithm
• Supported by Geth and Parity
• https://ropsten.etherscan.io/
Rinkeby • Uses Proof of Authority; you need to prove your existence (social media) to
retrieve ethers
• All ethers are already mined and only distributed on demand
• Supported by Geth
• https://rinkeby.etherscan.io/
Kovan • Uses Proof of Authority; requires Github account
• Supported by Parity
• https://kovan.etherscan.io/
30. Tools we need
Node Packet Manager
(npm)
NPM is a package manager for Node.js packages and modules
Ganache • Ethereum client for testing and development
• Runs locally and simulates a full Ethereum client
• Fast
• Well supported ecosystem of tools
Truffle • Dev environment, testing framework, and asset pipeline for
Ethereum
• Helps deploy contracts to the blockchain
• Help connect front-end to your deployed contracts
MetaMask • Ethereum light client
• Allows you to interact with Dapps via Chrome
40. workflow
truffle compile This command compiles the contracts in your contracts folder and will
create artifacts (JSON files) that contain the bytecode that can be
executed on the network.
truffle migrate Deploy the contract on your test network. Migrations are scripts that follow a
series of steps that are needed to deploy your contracts and setup the projects
like you need them to setup.
truffle console To inspect the contract
41.
42. workflow
truffle compile This command compliles the contracts in your contracts folder and will create
artifacts (JSON files) that contain the bytecode that can be executed on the
network.
truffle migrate Deploy the contract on your test network. Migrations are scripts that
follow a series of steps that are needed to deploy your contracts and
setup the projects like you need them to setup.
truffle console To inspect the contract
45. workflow
truffle compile This command compliles the contracts in your contracts folder and will create
artifacts (JSON files) that contain the bytecode that can be executed on the
network.
truffle migrate Deploy the contract on your test network. Migrations are scripts that follow a
series of steps that are needed to deploy your contracts and setup the projects
like you need them to setup.
truffle console To inspect the contract