# Blockchain and Bitcoin Fundementals ### blockchain is: - a ledger - constantly growing - permanent record of all transactions - very secure because there any many copies - chronological - immutable; it cannot be changed ### Bitcoin is: - a digtal currency - peer-to-peer; can be used without a third party - Bitcoin netwlork or Blockchain can be thought of as an intermediary - Uses blockchain to prevent double spending ### Bitcoin Miners are: - people who solve cryptography math problems - rewarded in Bitcoin - proces and monitor transactions - build the ledger that shows all transactions - builds the "blocks" in blockchain https://demoblockchain.org/ ## Elements of a Block - block# - nonce - data - prov - hash #### Data --> Block --> Blockchain --> Multiple Copies of Blockchains (blockchain network) ## Components of Bitcoin - Software (Bitcoin Client) - Cryptography (SHA-256 hash) - Hardware (Miners) - Gaming Theory (Finding nonce) 1. Bitcoin Software 2. New cryptography challenge (every 10 min) 3. Global Bitcoin miner community race to solve the challenge 4. Miner solves the challenge 5. Other miners verifies the validity of the new block 6. New block (transaction) is added to the Bitcoin blockchain 7. Winning miner earns a reward for solving the challenge first ## Bitcoin Transfer of Value - Disintermediated - Not like E-Transfer - Peer-to-Peer - Distributed - Work is shared through miners - Decentralized - No overarching institution - Trustless - "Distributed Trustless Consensus" - All of the nodes agree that a transaction took place ## Applications of Blockchain - Bitcoin/Cryptocurrency - Smart Contracts - Controls the transfer of values and assets between parties under certain conditions - DAO (Decentralized Autonomous Organization) - Collection of smart contracts - Distributed networks on a blockchains - Internet of Things (IoT) - Does not have to be a human; it can be a computer - Artuficial Intelligence - Uber with self driving cars without human element - Supply Chain Management - Walmart tracking port products across China - Reduced the time it takes to track food from days to minutes - 1% reduction in food borne disease in USA - Real Estate - Reduced risk, error, and fraud - Increased transparency - Maersk (Insurance) - Partnership with Microsoft - Successful 20 week proof of concept - Certificates of Authenticity - Instant verification of Certificatios of Authenticity - Reduce fraud - Humanitarian Aid - UN World Food Programme - Uses Ethereum to help refugees - Increased transparency - Lowered intermediary costs ## Limitations of Blockchain - It is immutable - No reversals or modifications - Key management - Scalablity ## Bitcoin Forks A fork takes place when a blockchain splits into two different paths forward. It happens to Bitcoin on a regular basis. For example, when two miners solve a block at the same time - for a while there are extra chains. Eventually, one of the chains wins over the others, and the other block becomes an orphan block. All of the other transactions on the orphan block are pushed to the mempool. ### Hard Fork: Bitcoin Cash Hark Fork introduces a change that forces everyone to upgrade - New cryptocurrency developed from a "Hard Fork" inthe Bitcoin Blockchain - Increased block size to 8MB from the 1MB limit prior to the fork - BitcoinCash.org - User Activated Hard Fork (UAHF) - August 1, 2017 (block #478558) ### Soft Fork: SegWit Soft Fork introduces a change that is backwards compatible; an upgrade is not required - User Activated Soft Fork (UASF) - Did not cause a split in the chain - Replaces block size limit with block weight limit - Any miner that did not upgrade can still participate with normal transactions - Improves scalibility without increasing block size - Addresses transaction malleability #### Contents of a Bitcoin transaction - Input - Amount - Output - Digital Signature (private key) In a SegWit transaction, the signature data is segregated onto an extended block freeing up more space ### Important Dates in Bitcoin History - October 31, 2008: Bitcoin Whitepaper - January 3, 2009: Genesis Block - May 22, 2010: First Retail Purchase - 2 Pizzas for 10,000 bitcoin - November 28, 2013: 1 BTC > $1000 USD ###### tags: `Information` `Learning`