Fireship · @fireship

Bitcoin ₿ in 100 Seconds // Build your Own Blockchain

Uploaded March 1, 2021 · Length 13:29

Bitcoin ₿ in 100 Seconds // Build your Own Blockchain

Summary

This video explains how bitcoin works, including its blockchain technology, and shows how to build a simple blockchain from scratch using Node.js and TypeScript.

  • bitcoin
  • blockchain
  • nodejs
  • typescript
  • cryptography
  • cryptocurrency

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    bitcoin a peer-to-peer electronic cash

  2. 0:03

    system

  3. 0:03

    first described in a 2008 white paper

  4. 0:06

    authored by the mysterious satoshi

  5. 0:08

    nakamoto the modern financial system

  6. 0:10

    relies on our trust of big centralized

  7. 0:12

    banks to hold our fiat currencies

  8. 0:14

    and execute transactions but trust is a

  9. 0:16

    weakness that eventually requires

  10. 0:18

    intervention by lawyers and government

  11. 0:20

    bitcoin allows two parties to make

  12. 0:22

    reliable transactions

  13. 0:23

    based on cryptographic proof eliminating

  14. 0:26

    the need for a trustee middleman

  15. 0:27

    the optimists call it digital gold the

  16. 0:29

    pessimists call it fool's gold

  17. 0:31

    but in reality it's just software and

  18. 0:33

    like all software its purpose is to

  19. 0:35

    arrange ones and zeros in a meaningful

  20. 0:37

    way

  21. 0:37

    the protocol that makes it meaningful is

  22. 0:39

    blockchain which allows two parties to

  23. 0:41

    engage in transactions denominated in

  24. 0:43

    bitcoins

  25. 0:44

    or satoshi's and just like dollars and

  26. 0:46

    cents they have value

  27. 0:47

    because we believe they do from a

  28. 0:49

    financial perspective the blockchain

  29. 0:51

    is like a shared public ledger that

  30. 0:53

    contains all transactions from all

  31. 0:55

    bitcoin users

  32. 0:56

    and is distributed and synchronized

  33. 0:58

    around the world which eliminates the

  34. 0:59

    need for a central authority to maintain

  35. 1:01

    and validate it

  36. 1:02

    from a technical perspective think of

  37. 1:04

    the blockchain as a database

  38. 1:06

    structured as a linked list where each

  39. 1:08

    record or block

  40. 1:09

    represents a group of transactions that

  41. 1:11

    have been permanently committed to the

  42. 1:13

    database

  43. 1:13

    it works kind of like a git repo that

  44. 1:15

    can never be rebased the important thing

  45. 1:17

    is that each new block is

  46. 1:19

    linked to the previous one in the

  47. 1:20

    blockchain and its creation goes through

  48. 1:22

    a very strict set of cryptographic rules

  49. 1:24

    each user or wallet has a unique public

  50. 1:27

    key for receiving money

  51. 1:28

    kind of like a username and a unique

  52. 1:30

    private key for spending money

  53. 1:32

    kind of like a password but before you

  54. 1:34

    can spend money you'll need to prove

  55. 1:36

    that you're the owner of a public key

  56. 1:38

    that money has been sent to in the past

  57. 1:40

    each transaction contains a hash or

  58. 1:42

    encrypted representation

  59. 1:43

    of the previous transaction and the new

  60. 1:45

    owner's public key

  61. 1:46

    the hash is then signed with the

  62. 1:48

    previous owner's private key

  63. 1:50

    this makes it possible to validate the

  64. 1:51

    chain of ownership without the need to

  65. 1:53

    expose

  66. 1:54

    the private key and the signature makes

  67. 1:55

    it virtually impossible to

  68. 1:57

    alter the transaction after it's been

  69. 1:58

    issued but what if somebody tries to pay