Skip to content

Instantly share code, notes, and snippets.

@minosiants
Last active April 5, 2020 08:35
Show Gist options
  • Save minosiants/8221b95996b98786920f966593ef7654 to your computer and use it in GitHub Desktop.
Save minosiants/8221b95996b98786920f966593ef7654 to your computer and use it in GitHub Desktop.

id - 8221b95996b98786920f966593ef7654

Readings
Slides

1. Introduction

22 May - Pizza day
robinhood traiding app

2. Money, Ledgers & Bitcoin

Fiat money

  • Money is a social & economic consensus

  • Fiat money is but the curient lead is in a long evoilution of money

  • Fiat money has had chalanges and instability as well

  • Leagers are method for Recordind Economic Activity & Finantial Relationships

  • Central Banking and Finantial Sectors are built upon series of Ledgers

  • We now live in electronic Curriency Age

  • Many efforts have been made at Cryptographic Digital Curiencies

Why did earyly digital curencies failed

  • Merchant adoption
  • Centralization
  • Double spending
  • Consensus

Bitcoin: A Peer-to-Peer Electronic Cash System

3. Blockchain Basics & Cryptography

Design features

  • Cryptography

  • Append-only timestamped blocks

  • Distributed consensus algorithm

  • Networking

  • Cryptographic hash function

  • Asymetric cryptography

  • Digital sigantures

  • Double-spend problemm

Bitcoin technical features

  • Cryptographic hash function

  • Timestamp apend-only logs (Blocks)

  • Block header & Merkle trees

  • Asymetric Cryptography & Digital Signature

  • Addresses

  • Consensus through proof of work

  • Network of Nodes

  • Native curency

  • Transaction inputs & outputs

  • Unspent Transaction Output (UTXO)

Bitcoin hash functions

  • Headers & Merkle trees - SHA 256
  • Bitcoin Addresses - SHA 256 and RIPEMD160

Block Header

  • Version
  • Previous Block Hash
  • Merkle Root Hash
  • Timestamp
  • Difficulty Target
  • Nonce

Digital Signature Algorithms

  • Generate Kay Pair - Public Key (PK) & Private Key (sk) - from random number
  • Signature - Create Digital Signature (Sig) from message (m) and Private key (sk)
  • Verification - Verify if signature is valid for message and public key
  • Bitcoin digital sigature function - Elliptic Curve Digital Signature Algorithm (EDCSA)

4. Blockchain Basics & Consensus

Reading

  • 'Geneva Report' Chapter 1 (page 1-7) ; Casey, Crane ...
  • 'Blockchain technology review' NIST (pages 23-32, sections 3,4)
  • 'The Byzantin General Problem' Lamport, Shostak, & Pease (382-387)
  • 'A short guide to consenus protocol' CoinDesk

Decentralized Network Consensus

  • Proof of work
  • Native currency
  • Network

Network

  • Full Nodes - Store full blockchain & able to validate all transactions
  • Pruning Nodes - Prune transactions after validation and aging
  • Lightweight Nodes - Simplified paiment verification (SPV) nodes - store blockchain headers only
  • Miners - Perform proof of work and create new blocks - do not need to be full nodes
  • Mining pool operators
  • Wallets - Store, View, Send and Receive Transactions & Create key pairs
  • Mempool - Pool of unconfirmed (yet validated) Transactions

5. Blockchain Basics & Transactions, UTXO and Script Code

Readings

  • 'Bitcoins academic pedigree' Narayanan and Clark
  • 'Making sense of Cryptoeconomics' CoinDesck

Transaction reward for solving Proof of Work

  • Only input is coinbase block reward
  • Reward halves (1/2s) every 210 000 blocks
    • Originly 50 bitcons per block
  • Output can not be used as a Transaction input until another 100 blocks

Bitcoin Script

  • Stack based code with no loops
  • Provides a flexible set of instruction for Transaction validation and signature authentication
  • Most common sctipy types in UTXO
    • Transaction sent to hash of bitcoin address - 'Pay to PubkeyHash' - 81 %
    • Transaction sent to hash of Conditional script - 'Pay to ScriptHash' - 18 %
    • Transaction subject to Multiple Signatures - 'M to N Mulsting' - 0.7 %
    • Transaction sent to Bitcoin Addresses - 'Pay to Pubkey' - 0.1 % (sources: Perez-Sola , Delgado-Segura)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment