Workshop archive · Unit 1 · 24 slides

BlockchainThe internet of value

An introduction to Bitcoin, beginning with money and moving into transactions, consensus, and mining.

An HTML edition of my original workshop slides. The wording and illustrations reflect the material at the time; this is a historical presentation. This unit covers the introduction, rather than the full workshop’s hands-on exercises.

Contents
Introduction01 / 24

Blockchain - The internet of value

Nikhil Krishna
Blockchain Interest Group · Blockchain Dialogues

Introduction02 / 24

Who ?

  • Nikhil Krishna
  • Core member of Blockchain Interest Group
  • Co Host @ Blockchain Dialogues Podcast
Introduction03 / 24

Prerequisites for this course

Student is expected to have a familiarity with -

  • Linux Operating System - Unix commands, bash terminal
  • Programming Languages - Javascript, CSS, HTML
  • Web development using - Nodejs, NPM, Expressjs
  • Version Control basics - Git
  • Programming Text Editor - Visual Studio Code or Sublime Text
Introduction04 / 24

What we will cover in this session

  • Why Bitcoin exists -
    • A brief history of money.
    • The various types of money and their issues
    • Bitcoin - a new approach
  • What are the characteristics of Bitcoin ?
  • Blockchain technology underlying Bitcoin
  • Mining what is it and why do we need it ?
  • What a blockchain is not
Speaker notes

Show what is covered in the course on XMind Map

The idea of money05 / 24

10,000 years ago

  • Humans started transforming from nomadic tribes to agrarian (farming) societies.
  • Small tribes started having coming together to form villages and the metal age created specialized jobs.
  • People began bartering goods
Cartoon of a shepherd calling his flock his bank balance, illustrating wealth held as goods.
Original workshop illustration · View full size
The idea of money06 / 24

From barter to beads, shells and stones

  • A standard medium of exchange
  • A store of value
  • Arguably the biggest invention ever
  • Not durable
  • Not scarce
Cowrie shells strung together as shell money, with a museum label.
Original workshop illustration · View full size
The idea of money07 / 24

Money 2.0

  • Metal Coins
    • Standard sizes and weights
    • Stamped with royal seal to give authority
    • Have an inherent value
    • Durable to usage
    • Heavy and hard to transport and use
Examples of stamped metal coins marked Four Cash.
Original workshop illustration · View full size
The idea of money08 / 24

Money 2.5

  • Paper Money
    • Invented in China
    • Light and can be made in varying denominations
    • Represents some value - little inherent value
    • Easy to forge, manipulate
An early Chinese paper banknote.
Original workshop illustration · View full size
The idea of money09 / 24

Characteristics of Money

  • It needs to be durable
  • Should ideally be globally portable
  • Uniform - it should be the same regardless of who has it or where it exists
  • It should be scarce - not easy/possible to flood the market
  • Divisible - money should be able to support small value
  • Acceptable by everyone or at least everyone you know :-)
The idea of money10 / 24

Fiat : Money because I say it is...

  • The word fiat derives from the Latin fiat ("let it be done")[
  • It can be variously defined as
    • Any money declared by a government to be legal tender.
    • State-issued money which is neither convertible by law to any other thing, nor fixed in value in terms of any objective standard.
    • Intrinsically valueless money used as money because of government decree.
  • The US Dollar was a (nominally) representative currency till 1971 when convertibility was unilaterally cancelled by President Nixon.
  • Today there are no representative monies anywhere.
The idea of money11 / 24

The problems with Fiat..

  • Trusted third party - you have to rely on the government
  • Ineffective or ignorant management can lead to economic slowdown like hyperinflation or cash crunch
  • Today’s international financial system -
    • Moves trillions of dollars daily.
    • Is built on debt
    • Politicization of money - money as a weapon - currency wars
    • Easily manipulable - largely opaque to general public
  • These problems were made very clear in the great financial crisis of 2008 and more recently when certain Rupee currency notes were demonetized.
Bitcoin & the blockchain12 / 24

Bitcoin: A new approach to money

On October 31 2008 an anonymous entity named Satoshi Nakamoto released a whitepaper entitled “Bitcoin: A Peer to Peer Electronic Cash System” in a cryptographic mailing list.

A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution.

Bitcoin software logs reporting block heights.
Original workshop illustration · View full size
Speaker notes

In January 2009 the Bitcoin client reference implementation was released as open source software.

Bitcoin & the blockchain13 / 24

Bitcoin Characteristics

  • Trustless
  • Digital
  • Cryptocurrency
  • Blockchain
  • Decentralized
  • Peer to peer

Only 21 million bitcoin will ever be minted; but 1 bitcoin can be divided into 100 million units called Satoshi

Matrix meme: Neo asks if he can trade bitcoin for millions; Morpheus replies that when he is ready, he will not have to.
Original workshop illustration · View full size
Speaker notes

Contrast this with Bit Torrent ECash , BitGold, etc

Bitcoin & the blockchain14 / 24

Blockchain : The technology behind Bitcoin

  • In the Bitcoin whitepaper was proposed a way to create decentralised global ledger amongst peers.
  • A block chain is a data structure that makes it possible to maintain a secure, immutable, decentralised, transaction system.
Four blocks linked by references to the previous block, each containing transactions; older blocks are labelled more secure.
Original workshop illustration · View full size
Speaker notes

Eventually, Blockchain (the technology) evolved to refer to decentralized networks that involve multiple entities using consensus algorithms to maintain a distributed data store

A blockchain is - Tamper evident Decentralised Uncensorable Self healing

Bitcoin & the blockchain15 / 24

It starts with a transaction

Cryptographically Signed but not encrypted

Digital Signatures

Public / Private Key Pair

UTXO - Unspent Transaction Output

Bitcoin Address - single use token where funds are received.

Speaker notes

A transaction is a transfer of Bitcoin value that is broadcast to the network and collected into blocks. A transaction typically references previous transaction outputs as new transaction inputs and dedicates all input Bitcoin values to new outputs.

A Bitcoin address, or simply address, is an identifier of 26-35 alphanumeric characters.

Most Bitcoin addresses are 34 characters. They consist of random digits and uppercase and lowercase letters, with the exception that the uppercase letter "O", uppercase letter "I", lowercase letter "l", and the number "0" are never used to prevent visual ambiguity.

It is important to note that these signatures only prove one receives with an address. Since Bitcoin transactions do not have a "from" address, you cannot prove you are the sender of funds.

Addresses are not wallets nor accounts, and do not carry balances. They only receive funds, and you do not send "from" an address at any time.

Bitcoin & the blockchain16 / 24

Aggregated into blocks

Record of some or all transactions that arrived after the last block.

Hash reference to the previous block.

Hash answer to the current cryptographic puzzle

Block Reward

Historical block explorer screenshot for Bitcoin block 560142, dated 26 January 2019: 2,143 transactions, a 12.5 BTC block reward, and the block hashes and Merkle root.
Original workshop illustration · View full size
Speaker notes

https://www.blockchain.com

Consensus & mining17 / 24

That are chained together by consensus

  • Byzantine Fault Tolerance - A fundamental problem in distributed computing and multi-agent systems is to achieve overall system reliability in the presence of a number of faulty processes.
  • The Byzantine Generals Problem -
    • How can m general’s co-ordinate a decision to attack or retreat by exchanging messages given that some of these generals may be traitors.
    • To win all loyal generals must attack at the same time.
    • Proof postulates at least 3m + 1 generals are needed to deal with m traitors.
    • Examples: PBFT, PoW, PoS, Tendermint
A group of people giving thumbs-up signs around a heart, illustrating consensus.
Original workshop illustration · View full size
Speaker notes

Byzantine General Problem - A generalization of the 2 general problem Proof of Work - A probabilistic solution to the Byzantine General Problem that relies on the use of hash power by “miners” to solve cryptographic puzzles (like Hashcash) to determine who creates the next block. Proof of Stake - In this class of algorithm, creator of the block is determined by combinations of random selection, activity and presence and the amount of stake. POET, Tendermint, PBFT

Imagine you have two armies 1 and 2 planning to attack a hostile city. If both armies and all their loyal soldiers attack at the same time, they’re guaranteed victory. If not, they will fail. Therefore, they have to reach consensus on just one simple decision: attack, or retreat. Here’s the catch though: these two armies are separated by the very city they’re planning on taking over, and to communicate with each other, they have to send messengers through the hostile city. The messenger could easily be intercepted.

Consensus & mining18 / 24

The Byzantine Generals Problem

Comparison of the Two Generals Problem, with endlessly repeated message acknowledgements, and Byzantine generals exchanging messages when one participant may be disloyal.
Original workshop illustration · View full size
Consensus & mining19 / 24

Mining : Proof of Work Consensus

  • A game is played to determine who gets to add a block to the chain.
  • The process of playing this game is called mining.
  • The game can be thought of as a lottery.
  • The more you play the greater the chance of winning.
  • You can play more by using more computing power.
  • The difficulty level is adjusted so that someone wins the game every ~10 mins
Comic-book POW lettering, a visual pun on proof of work.
Original workshop illustration · View full size
Speaker notes

The first modern application, submitted in 1996 by Adam back under the name of “Hashcash”, used a mechanism of “proof of work” based on the algorithm SHA256 (such as the one used by the protocol Bitcoin), as an anti-spam by associating the reception of an email to a mechanism of proof-of work.

Consensus & mining20 / 24

Block addition and broadcasting

  • When a miner wins the lottery, it broadcasts the block to the network
  • Other nodes add it to blockchain after verifying and the transactions in that block get approved
  • Block reward is given as incentive
  • Block reward is a set of newly minted Bitcoins that the miner can assign to any address that they choose. The block rewards halves every 4 years
Cartoon miner extracting bitcoin, illustrating the mining reward.
Original workshop illustration · View full size
Perspective & resources21 / 24

What a blockchain is not

It is not a database (relational or otherwise)!

The consensus model for a blockchain is important!

Blockchains are slow!

Blockchains are expensive!

Perspective & resources22 / 24

Blockchains the internet of value

The OSI model is a set of protocol layers that enables communication of data between nodes(servers) in a network.

Blockchains are a set of protocol layers that enables trustless transfer of value between nodes in a network.

Welcome to the internet of value

Two servers exchange messages through a blockchain overlay above their OSI network stacks.
Original workshop illustration · View full size
Perspective & resources23 / 24

Resources for learning

Perspective & resources24 / 24

Thank You