Introduction to Blockchains

All Aboard the Hype Chain

http://slides.lucywyman.me/introduction-to-blockchain.html

Roadmap

$ whoami

static/family-picture.jpg

Lucy Wyman | @lucyCwyman

Software Engineer - Bolt

Puppet

What is a Blockchain?

A Hash Function

A Hash Function

2.4.4 :001 > require 'digest'
=> true
2.4.4 :002 > Digest::SHA256.hexdigest("Hello SCaLE!")
=> "0bb4b1b2992676414a822941f3160c7669404acb8bb8da18278e4f6aabf83b92"
2.4.4 :003 > Digest::SHA256.hexdigest("Longer input, same length output")
=> "380e12f12589eda081e21c794e6379053c75a54c3394ddad0d84026c1a6947ab"

Public Key Encryption

A Block

  • Each block stores owner's public-key (think RSA)

For Example

From https://github.com/lucywyman/blockchain-example

class Block
  def initialize(index, previous_hash, timestamp, data)
    @index = index
    @previous_hash = previous_hash
    @timestamp = timestamp
    @data = data
    @hash = self.hash_block
  end
end

Other examples

Another Link in the Chain

For Example

class Blockchain < Array
attr_reader :chain

def initialize
  @chain = [self.first_block]
end

def first_block
  return Block.new(0, "0", Time.now, "Hello blockchain!")
end

def add_block(name)
  index = @chain[-1].index + 1
  previous_hash = @chain[-1].hash
  timestamp = Time.now
  data = "#{name} voted for Hermione Granger"
  block = Block.new(index, previous_hash, timestamp, data)
  @chain.push(block)
end

How do Blockchains Work?

Adding a Block

Consensus

Consensus

Proof of Work

Security

Decentralization

Public?

"An issue in this ongoing debate is whether a private system with verifiers tasked and authorized (permissioned) by a central authority should be considered a blockchain.[51][52][53][54][55]" Wikipedia

When Should I Use Blockchains?

Blockchain Beyond the Hype

Characteristics

Potentials

When Shouldn't I Use Blockchains?

"Blockchain was built to solve a social problem, not a technical problem"

The Blockies

Most Charitable

World Food Programme Building Blocks

Most Democratic

Follow My Vote

Most Up-and-Coming

Supply Chain Tracking

Cutest

CryptoKitties

Honorable Mentions

Why Aren't Blockchains Widely Adopted Yet?

Resources

Questions

static/kelly-kapoor-questions.gif

Thank you!