Skip to content

Latest commit

 

History

History
205 lines (146 loc) · 5.69 KB

slides-03-workshop.md

File metadata and controls

205 lines (146 loc) · 5.69 KB

Puzzle ITC Logo

Workshop: The Lightning Network

Oliver Gugger

@gugol,
github.com/guggero

Part of the Lightning Network team at
Puzzle ITC, contributor to lnd

Workshop: The Lightning Network

Notes at: https://beta.etherpad.org/p/lightning-workshop

The current state of Bitcoin (2018-05-10)

  • SegWit is enabled SegWit transactions percentage from: segwit.party/charts/

The current state of Bitcoin (2018-05-24)

  • Mempool is emptying Mempool transaction count from: blockchain.info/charts/mempool-count

The current state of Bitcoin (2018-05-24)

  • Fees dropped massively Mempool transaction count from: dedi.jochen-hoenicke.de/queue

Problem?

  • When demand is high, the fees fluctuate even more than price
    SegWit transactions percentage from: dedi.jochen-hoenicke.de/queue

Problem?

  • Even with SegWit the block size is limited (1'000 vkB, 4'000 kWU)
  • Average transactions per block went up as far as 2'723 (~4.5 tx/s)
  • How do we get to Visa which can process up to 24'000 tx/s at peak?

Solution?

Bigger blocks!

Sure, because downloading 5.3 GB every 10 minutes is no problem!

Better solution

  • Scale off-chain
  • Add a layer 2
  • For example: The Lightning Network

The Lightning Network

  • Smart Contracts create Payment Channels
  • Funding transaction is in blockchain
  • Payment Channel updates happen at "speed of light"

The Lightning Network

  • Payments can be routed through multiple hops/channels, creating a network
  • Protected by onion routing/multi layer encryption
  • No trust required, cheating made impossible by cryptography

The Lightning Network

  • Layer 2 on top of Bitcoin
  • Routing payments like TCP/IP

network

Workshop: Task 1

  • Install any Lightning Network wallet for Bitcoin testnet as described on https://gugger.guru/lightning-workshop/
  • Send yourself some testnet Bitcoin
  • Wait for the balance to be confirmed (usually 3 confirmations)

How it works

Technologies used:

  • Multisignatures
  • Timelocks
    • CheckLockTimeVerify (absolute)
    • CheckSequenceVerify (relative)
  • Hashlocks

How it works

Funding Transaction from: https://www.youtube.com/watch?v=7tHD9Gj9UNg

How it works

Bi-Directional Channels from: https://www.youtube.com/watch?v=7tHD9Gj9UNg

How it works

Second update from: https://www.youtube.com/watch?v=7tHD9Gj9UNg

How it works

Closing a channel from: https://www.youtube.com/watch?v=7tHD9Gj9UNg

How it works

Multi hop

Multi hop tx

Multi hop tx

from: https://www.youtube.com/watch?v=k-bXIZOMNyA

Workshop: Task 2

When will it be ready?

mainnet on 2018-01-30 from: https://lnmainnet.gaben.win/

How will we use it?

single-funded channel

How will we use it?

dual-funded channel

Workshop: Task 3

Discussion:
assume Puzzle ITC has a Lightning Network Hub and channels with merchants:

  • What considerations would you make when choosing a Hub?
  • How big of a channel would you want to open?
  • How big would the channels to the merchants need to be?