Placeholder Image

字幕列表 影片播放

由 AI 自動生成
  • What does it mean to *have* a Bitcoin?

    擁有*個比特幣是什麼意思?

  • Many people have heard of Bitcoin that

    很多人都聽說過比特幣

  • it's a fully digital currency with no government to issue it;

    它是一種完全數字化的貨幣,沒有政府來發行它。

  • and that no banks need to manage accounts and verify transactions;

    而銀行不需要管理賬戶和核實交易。

  • and also that no one really knows who invented it.

    也沒有人真正知道是誰發明的。

  • And yet, many people don't know the answer to this question, at least not in full.

    然而,很多人都不知道這個問題的答案,至少不知道完整的答案。

  • To get there,

    為了達到目的。

  • and to make sure that the technical details underlying the answer actually feel motivated,

    並確保回答的基礎技術細節實際感受到動力。

  • what we're going to do is walk through step by step

    我們要做的是通過一步步走過。

  • how you might have invented your own version of Bitcoin.

    你是如何發明你自己版本的比特幣的。

  • We'll start with you keeping track of payments with your friends using a communal ledger.

    我們將從您使用公共賬本與您的朋友一起跟蹤付款開始。

  • And then, as you start to trust your friends and the world around you less and less,

    然後,當你開始越來越不信任你的朋友和周圍的世界。

  • and if you're clever enough to bring in a few ideas from cryptography

    如果你足夠聰明,可以從密碼學中引入一些想法

  • to help circumvent the need for trust,

    以幫助規避信任需求。

  • what you end up with is what's called a "cryptocurrency".

    你最終得到的是所謂的 "加密貨幣"。

  • You see, Bitcoin is just the first implemented example of a cryptocurrency.

    你看,比特幣只是加密貨幣的第一個實施例。

  • And now, there are thousands more on exchanges with traditional currencies.

    而現在,在與傳統貨幣的交流中,還有成千上萬的人。

  • Walking the path of inventing your own can help to set the foundations

    走自己的發明之路,可以幫助打下基礎

  • for understanding some of the more recent players in the game

    用於瞭解一些最近在遊戲中的玩家。

  • and recognizing when and why there's room for different design choices.

    並認識到何時和為何有不同的設計選擇空間。

  • In fact, one of the reasons I chose this topic is that

    事實上,我選擇這個題目的原因之一是

  • in the last year, there's been a huge amount of attention and investment

    在過去的一年裡,有大量的關注和投資。

  • and, well, honestly hype directed at these currencies.

    以及,說實話,針對這些貨幣的炒作。

  • And I'm not going to comment or speculate on the current or future exchange rates,

    而我也不會去評論或猜測當前或未來的匯率。

  • but I think we'd all agree that

    但我想我們都會同意

  • anyone looking to buy a cryptocurrency should really know what it is.

    任何想買加密貨幣的人都應該真正知道它是什麼。

  • And I don't just mean in terms of analogies with vague connections to gold mining,

    我不僅僅是指與金礦開採有模糊聯繫的類比。

  • I mean an actual direct description of what the computers are doing

    我的意思是直接描述計算機正在做的事情。

  • when we send, receive and create cryptocurrencies.

    當我們發送、接收和創建加密貨幣時。

  • One thing worth stressing, by the way, is that

    順便說一句,有一點值得強調,那就是......。

  • even though you and I are going to dig into the details here,

    即使你我要在這裡挖掘細節。

  • and that takes meaningful time,

    而這需要有意義的時間。

  • you don't actually need to know those details if you just want to use the cryptocurrency,

    如果你只是想使用加密貨幣,你其實並不需要知道這些細節。

  • just like you don't need to know the details of what happens under the hood when you swipe a credit card.

    就像你不需要知道刷卡時的細節一樣。

  • Like any digital payment, there're lots of user-friendly applications that

    就像任何數字支付一樣,有很多用戶友好的應用程序,這

  • let you just send and receive the currencies without thinking about what's going on.

    讓您只需發送和接收貨幣,而無需考慮發生了什麼。

  • The difference is that the backbone underlying this

    所不同的是,這個基礎的骨幹。

  • is not a bank that verifies transactions.

    不是一家核實交易的銀行。

  • Instead, it's a clever system of decentralized trust-less verification

    相反,它是一個聰明的去中心化的無信任驗證系統。

  • based on some of the math born in cryptography.

    基於密碼學中誕生的一些數學。

  • But to start,

    但要開始。

  • I want you to actually set aside the thought of cryptocurrencies and all that just for a few minutes.

    我希望你能真正放下對加密貨幣和所有這些的想法,就幾分鐘。

  • We're going to begin the story with something more down-to-earth: ledgers and digital signatures.

    我們要從更平實的東西開始講起:賬本和數字簽名。

  • If you and your friends exchange money pretty frequently,

    如果你和你的朋友經常交換錢。

  • you know, paying your share of the dinner bill and such,

    你知道,支付你的晚餐賬單等份額。

  • it can be inconvenient to exchange cash all the time.

    一直兌換現金會很不方便。

  • So you might keep a communal ledger

    所以,你可以保留一個公共賬本

  • that records all of the payments that you intend to make some point in the future.

    它記錄了你在未來某個時間點上打算支付的所有款項。

  • You know, Alice pays Bob $20,

    你知道,愛麗絲付給鮑勃20美元。

  • Bob pays Charlie $40, things like that.

    鮑勃付給查理40美元,這樣的事情。

  • This ledger is going to be something public and accessible to everyone,

    這個賬本將是公開的東西,每個人都可以使用。

  • like a website, where anyone can go and just add newlines.

    就像一個網站,任何人都可以去那裡,只需添加新行。

  • And let's say that at the end of every month,

    就說每個月月底的時候。

  • you all go together, look at the list of transactions and settle up.

    你們一起去,看看交易清單,然後結算。

  • If you spent more than you received, you put that money in the pot;

    如果你花的錢比你收到的多,你就把這些錢放進鍋裡。

  • and if you received more than you spent, you take that money out.

    如果你收到的錢比你花的多,你就把這些錢拿出來。

  • So the protocol for being part of this very simple system might look like this:

    是以,成為這個非常簡單的系統的一部分的協議可能是這樣的。

  • anyone can add lines to the ledger;

    任何人都可以在賬本上加線。

  • and at the end of every month you all get together and settle up.

    每個月末,你們都會聚在一起解決。

  • Now, one problem with a public ledger like this is that anyone can add a line,

    現在,這樣的公共賬本有一個問題,就是任何人都可以增加一行。

  • so what's to prevent Bob from going in writing "Alice pays Bob $100" without Alice approving?

    所以,什麼是防止鮑勃去寫 "愛麗絲支付鮑勃100美元 "沒有愛麗絲準許?

  • How are we supposed to trust that all of these transactions

    我們怎麼能相信所有這些交易

  • are what the sender meant them to be?

    是發件人的意思嗎?

  • Well, this is where the first bit of cryptography comes in: digital signatures.

    好吧,這就是密碼學的第一點:數字簽名。

  • Like handwritten signatures,

    像手寫的簽名。

  • the idea here is that Alice should be able to add something next to that transaction

    這裡的想法是,Alice應該能夠在該事務旁邊添加一些東西。

  • that proves that she has seen it and that she's approved of it.

    這證明她已經看過了,而且她也認可了。

  • And it should be infeasible for anyone else to forge that signature.

    而其他人要偽造這個簽名應該是不可能的。

  • At first, it might seem like a digital signature shouldn't even be possible.

    乍一看,似乎數字簽名根本就不應該存在。

  • I mean, whatever data makes up that signature can just be read and copied by a computer,

    我的意思是,不管是什麼數據組成的簽名,都可以被電腦讀取和複製。

  • so how do you prevent forgeries?

    那麼如何防止偽造呢?

  • Well, the way this works is that everyone generates what's called a "public key - private key pair",

    好吧,工作方式是每個人都會生成一個所謂的 "公鑰-私鑰對"。

  • each of which looks like some string of bits.

    每一個看起來都像一些比特的字符串。

  • The "private key" is sometimes also called a "secret key",

    "私鑰 "有時也被稱為 "祕鑰"。

  • so that we can abbreviate it as "sk", while abbreviating the public key is "pk".

    這樣我們就可以將其縮寫為 "sk",而將公鑰縮寫為 "pk"。

  • Now as the name suggests, this secret key is something you want to keep to yourself.

    現在顧名思義,這把祕鑰是你想留給自己的東西。

  • In the real world, your handwritten signature looks the same no matter what document you're signing.

    在現實世界中,無論你簽署什麼文件,你的手寫簽名看起來都是一樣的。

  • But a digital signature is actually much stronger,

    但數字簽名其實要強得多。

  • because it changes for different messages.

    因為不同的資訊,它的變化。

  • It looks like some string of ones and zeros, commonly something like 256 bits;

    它看起來像一些1和0的字符串,通常是256位的東西。

  • and altering the message even slightly

    並稍加改變資訊

  • completely changes what the signature on that message should look like.

    完全改變了該消息上的簽名應該是什麼樣子。

  • Speaking a little more formally,

    說得更正式一點。

  • producing a signature involves a function that depends both on the message itself and on your private key.

    產生簽名涉及到一個函數,這個函數既取決於資訊本身,也取決於你的私鑰。

  • The private key ensures that only you can produce that signature,

    私鑰可以確保只有你能產生該簽名。

  • and the fact that it depends on the message

    以及它取決於資訊的事實

  • means that no one can just copy one of your signatures and then forge it on another message.

    意味著沒有人可以複製你的一個簽名,然後在另一條資訊上偽造。

  • Hand-in-hand with this is a second function used to verify that a signature is valid.

    與此相配合的是第二個用於驗證簽名是否有效的函數。

  • And this is where the public key comes into play.

    而這就是公鑰的作用。

  • All it does is output "true" or "false"

    它所做的就是輸出 "真 "或 "假"

  • to indicate if this was a signature produced by the private key

    來表明這是否是由私鑰產生的簽名

  • associated with the public key that you're using for verification.

    與你用於驗證的公鑰相關聯。

  • I won't go into the details of how exactly both these functions work,

    這兩個功能的具體工作原理我就不多說了。

  • but the idea is that it should be completely infeasible to find a valid signature

    但這個想法是,它應該是完全不可能找到一個有效的簽名。

  • if you don't know the secret key.

    如果你不知道祕鑰。

  • Specifically, there's no strategy better than just guessing and checking random signatures,

    具體來說,沒有什麼策略比只猜測和檢查隨機簽名更好。

  • which you can check using the public key that everyone knows.

    你可以用大家都知道的公鑰來檢查。

  • Now think about how many signatures there are with a length of 256 bits,

    現在想想有多少個長度為256位的簽名。

  • that's 2^256.

    那是2^256。

  • This is a stupidly large number.

    這是個愚蠢的數字。

  • To call it astronomically large would be giving way too much credit to astronomy.

    如果說它是天文上的大,那就是給天文學的功勞太大了。

  • In fact, I made a supplemental video devoted just to illustrating what a huge number this is.

    事實上,我專門做了一個補充視頻,就是為了說明這是一個多麼龐大的數字。

  • Right here, let's just say that

    在這裡,我們只想說

  • when you verified that a signature against a given message is valid,

    當您驗證了針對某條資訊的簽名是有效的。

  • you can feel extremely confident that the only way someone could have produced it

    你可以非常自信地認為,唯一的辦法就是有人能製作出來

  • is if they knew the secret key associated with the public key you used for verification.

    是如果他們知道與你用於驗證的公鑰相關的祕鑰。

  • Now making sure that people sign transactions on the ledger is pretty good,

    現在確保人們在臺賬上籤署交易是相當不錯的。

  • but there's one slight loophole:

    但有一個小小的漏洞。

  • if Alice signs a transaction, like "Alice pays Bob $100",

    如果愛麗絲簽署了一項交易,比如 "愛麗絲支付鮑勃100美元"。

  • even though Bob can't forge Alice's signature on a new message,

    即使鮑勃無法在新的資訊上偽造愛麗絲的簽名。

  • he could just copy that same line as many times as he wants.

    他可以複製同一行,只要他願意。

  • I mean, that message-signature combination remains valid.

    我的意思是,這個消息和簽名的組合仍然有效。

  • To get around this, what we do is make it so that when you sign a transaction,

    為了解決這個問題,我們要做的是讓你在簽署交易時,。

  • the message has to also include some sort of unique ID associated with that transaction.

    該消息還必須包含某種與該交易相關聯的唯一ID。

  • That way, if Alice pays Bob $100 multiple times,

    這樣一來,如果愛麗絲多次付給鮑勃100美元。

  • each one of those lines on the ledger requires a completely new signature.

    賬本上的每一行都需要一個全新的簽名。

  • All right, great!

    好吧,太好了!

  • Digital signatures remove a huge aspect of trust in this initial protocol,

    數字簽名消除了這個初始協議中信任的一個巨大方面。

  • but even still, if you were to really do this,

    但即使如此,如果你真的要這樣做。

  • you would be relying on an honor system of sorts.

    你會依靠榮譽系統的種類。

  • Namely, you're trusting that everyone will actually follow through

    也就是你相信大家會真正的貫徹執行。

  • and settle up in cash at the end of each month.

    並在每月月底以現金結算。

  • What if, for example, Charlie racks up thousands of dollars in debt

    比如說,查理欠了幾千塊錢的債,怎麼辦?

  • and just refuses to show up.

    而只是拒絕出現。

  • The only real reason to revert back to cash to settle up

    唯一真正的理由是恢復到現金來結算。

  • is if some people (I'm looking at you, Charlie) owe a lot of money.

    是如果有些人(我看著你,查理)欠了很多錢。

  • So maybe, you have the clever idea that you never actually have to settle up in cash,

    所以,也許,你有聰明的想法,你永遠不會真正的用現金結算。

  • as long as you have some way to prevent people from spending too much more than they take in.

    只要你有一些方法來防止人們花的錢比他們的收入多得多。

  • Maybe what you do is start by having everyone pay $100 into the pot,

    也許你要做的是先讓每個人都交100元錢到鍋裡。

  • and then have the first few lines of the ledger read

    然後讓賬簿的前幾行改為

  • "Alice gets $100", "Bob gets $100", "Charlie gets $100", etc.

    "愛麗絲得到100美元"、"鮑勃得到100美元"、"查理得到100美元 "等。

  • Now, just don't accept any transactions

    現在,只要不接受任何交易

  • where someone is spending more than they already have on that ledger.

    有人在該賬目上的花費超過了他們已經擁有的資金。

  • For example, if the first two transactions are

    例如,如果前兩個交易是

  • "Charlie pays Alice $50" and "Charlie pays Bob $50",

    "查理國愛麗絲50美元 "和 "查理國鮑勃50美元"。

  • if he were to try to add "Charlie pays you $20", that would be invalid,

    如果他想加上 "查理付給你20美元",那就無效了。

  • as invalid as if he had never signed it.

    就像他從未簽署過一樣無效。

  • Notice, this means that verifying a transaction

    注意,這意味著驗證一個交易

  • requires knowing the full history of transactions up to that point.

    需要知道截至該點的全部交易歷史。

  • And this is more or less also going to be true in cryptocurrencies,

    而這一點在加密貨幣中或多或少也會出現。

  • though there is a little room for optimization.

    雖然還有一點優化空間。

  • What's interesting here is that

    有趣的是

  • this step removes the connection between the ledger and actual physical US Dollars.

    這一步消除了分類賬和實際實物美元之間的聯繫。

  • In theory, if everyone in the world was using this ledger,

    理論上,如果世界上每個人都在使用這個賬本。

  • you could live your whole life just sending and receiving money on this ledger

    你可以用這個賬本收發錢財過一輩子

  • without ever having to convert to real US Dollars.

    無需兌換成真正的美元。

  • In fact, to emphasize this point,

    其實,為了強調這一點。

  • let's start referring to the quantities on the ledger as "ledger dollars", or "LD" for short.

    讓我們開始把分類賬上的數量稱為 "分類賬美元",簡稱 "LD"。

  • You are, of course, free to exchange ledger dollars for real US Dollars.

    當然,你可以自由地把賬本上的美元換成真正的美元。

  • For example, maybe Alice gives Bob a $10 bill in the real world

    例如,也許愛麗絲在現實世界中給了鮑勃一張10美元的鈔票。

  • in exchange for him adding and signing the transaction

    作為交換,他增加和簽署交易

  • "Bob pays Alice 10 LD" to this communal ledger.

    "鮑勃向愛麗絲支付了10 LD "到這個公共賬本。

  • But exchanges like that, they're not going to be guaranteed by the protocol.

    但像這樣的交流,是不會有協議保證的。

  • It's now more analogous to how you might exchange dollars for Euros,

    現在更類似於你用美元兌換歐元的方式。

  • or any other currency on the open market,

    或公開市場上的任何其他貨幣。

  • it's just its own independent thing.

    它只是它自己獨立的東西。

  • This is the first important thing to understand about Bitcoin or any other cryptocurrency:

    這是瞭解比特幣或其他加密貨幣的第一件重要事情。

  • what it is is a ledger, the history of transactions is the currency.

    它是什麼是一個賬本,交易的歷史是貨幣。

  • Of course, with Bitcoin,

    當然,隨著比特幣。

  • money doesn't enter the ledger with people buying in using cash.

    人們用現金買進的錢是不會進入賬本的。

  • I'll get to how new money enters the ledger in just a few minutes,

    我一會兒就會講到新的錢是如何進入賬本的。

  • but before that, there's actually an even more significant difference

    但在這之前,其實還有一個更顯著的區別就是

  • between our current system of ledger dollars and how cryptocurrencies work.

    我們目前的賬本美元系統和加密貨幣的工作方式之間。

  • So far, I've said that this ledger is in some public place,

    到目前為止,我已經說過,這個賬本是在某個公共場所。

  • like a website, where anyone can add newlines.

    就像一個網站,任何人都可以添加新行。

  • But that would require trusting a central location,

    但這就需要相信一箇中心位置。

  • namely "who hosts the website?",

    即 "誰來主持網站?"。

  • "who controls the rules of adding new lines?".

    "誰來控制增加新線路的規則?"。

  • To remove that bit of trust, we'll have everybody keep their own copy of the ledger.

    為了消除這一點信任,我們會讓每個人都保留自己的賬本。

  • Then when you want to make a transaction, like Alice pays Bob 100 LD,

    然後當你想進行交易時,比如愛麗絲支付給鮑勃100LD。

  • what you do is broadcast that out into the world

    你要做的是把它廣播到世界上

  • for people to hear and to record on their own private ledgers.

    讓人們聽到,並記錄在自己的私人賬本上。

  • But, unless you do something more, this system is absurdly bad.

    但是,除非你再做一些事情,否則這個制度是荒謬的壞事。

  • How could you get everyone to agree on what the right ledger is?

    你怎麼能讓大家都同意什麼是正確的賬本呢?

  • When Bob receives a transaction, like Alice pays Bob 10 LD,

    當鮑勃收到一筆交易時,比如愛麗絲支付給鮑勃10LD。

  • how can he be sure that everyone else received and believes that same transaction

    他怎麼能確定其他人都收到了同樣的交易,並且相信了同樣的交易

  • that he'll be able to later on go to Charlie and use those same 10 LD to make a transaction?

    他以後就可以去找查理,用那10個LD做交易?

  • Really, imagine yourself just listening to transactions being broadcast,

    真的,想象一下自己只是在聽交易的廣播。

  • how can you be sure that everyone else is recording the same transactions and in the same order?

    你怎麼能確定其他人都是以同樣的順序記錄同樣的交易呢?

  • This is really the heart of the issue.

    這確實是問題的核心。

  • This is an interesting puzzle.

    這是個有趣的謎題。

  • Can you come up with a protocol for how to accept or reject transactions

    你能不能想出一個接受或拒絕交易的協議?

  • and in what order so that you can feel confident that

    順序是怎樣的,這樣你就可以放心了。

  • anyone else in the world who's following that same protocol

    世上還有誰在遵循同樣的協議?

  • has a personal ledger that looks the same as yours?

    有一個個人賬本,看起來和你的一樣嗎?

  • This is the problem addressed in the original Bitcoin paper.

    這就是比特幣原論文中解決的問題。

  • At a high level, the solution that Bitcoin offers is

    在高層次上,比特幣提供的解決方案是

  • to trust whichever ledger has the most computational work put into it.

    相信哪一個賬本的計算量最大。

  • I'll take a moment to explain exactly what that means,

    我花點時間解釋一下這到底是什麼意思。

  • it involves this thing called a "cryptographic hash function".

    這涉及到一個叫做 "加密哈希函數 "的東西。

  • The general idea that we'll build to

    總的思路是,我們將建立到

  • is that if you use computational work as a basis for what to trust,

    是,如果你把計算工作作為信任的基礎。

  • you can make it so that fraudulent transactions and conflicting ledgers

    你可以使它,以便欺詐性交易和衝突的分類帳。

  • would require an infeasible amount of computation to bring about.

    這將需要不可估量的計算量才能實現。

  • Again, I'll remind you that this is getting well into the weeds

    我再次提醒你,這已經進入了雜草叢生的階段

  • beyond what anyone would need to know just to use a currency like this,

    超越了任何人需要知道的只是使用這樣的貨幣。

  • but it's a really cool idea!

    但這是一個非常酷的想法!

  • And if you understand it, you understand the heart of Bitcoin and all other cryptocurrencies.

    而如果你理解了它,你就理解了比特幣和所有其他加密貨幣的核心。

  • So first things first, what's a hash function?

    那麼,首先,哈希函數是什麼?

  • The inputs for one of these functions can be any kind of message or file,

    這些函數的輸入可以是任何類型的消息或文件。

  • it really doesn't matter.

    這真的不重要。

  • And the output is a string of bits with some kind of fixed length, like 256 bits.

    而輸出的是一串具有某種固定長度的比特,比如256位。

  • This output is called the "hash" or the "digest" of the message.

    這種輸出稱為消息的 "哈希 "或 "摘要"。

  • And the intent is that it looks random.

    而目的就是為了讓它看起來很隨意。

  • It's not random - it always gives the same output for a given input.

    它不是隨機的--對於給定的輸入,它總是給出相同的輸出。

  • But the idea is that

    但是,我們的想法是

  • if you slightly change the input, maybe editing just one of the characters,

    如果你稍微改變一下輸入,也許只編輯其中一個字元。

  • the resulting hash changes completely.

    由此產生的哈希值完全改變。

  • In fact, for the hash function that I'm showing here, called SHA256,

    其實,對於我這裡展示的哈希函數,叫做SHA256。

  • the way the output changes as you slightly change that input is entirely unpredictable.

    當你稍微改變該輸入時,輸出的變化方式是完全無法預測的。

  • You see, this is not just any hash function,

    你看,這不是普通的哈希函數。

  • it's a cryptographic hash function.

    這是一個加密的哈希函數。

  • That means it's infeasible to compute in the reverse direction.

    也就是說,逆向計算是不可行的。

  • If I show you some string of ones and zeros,

    如果我給你看一些1和0的字符串。

  • and ask you to find an input

    並要求您找到一個輸入

  • so that the SHA256 hash of that input gives this exact string of bits,

    這樣,該輸入的SHA256哈希值就會給出這串精確的比特。

  • you will have no better method than to just guess and check.

    你將沒有更好的方法,只能猜測和檢查。

  • And again, if you want to feel for how much computation would be needed to go through 2^256 guesses,

    再如,如果你想感受一下通過2^256次猜測需要多少計算量。

  • just take a look at the supplement video.

    看看補充視頻就知道了。

  • I actually had way too much fun writing that thing.

    其實我寫那個東西太好玩了。

  • You might think that if you just really dig into the details of how exactly this function works,

    你可能會認為,如果你只是真正挖掘這個功能到底是如何工作的細節。

  • you could reverse engineer the appropriate input without having to guess and check.

    你可以反向工程適當的輸入,而不必猜測和檢查。

  • But no one has ever figured out a way to do that.

    但是沒有人想出辦法來。

  • Interestingly, there's no cold hard rigorous proof that it's hard to compute in the reverse direction.

    有趣的是,並沒有冷冰冰的嚴格證明,逆向計算很難。

  • And yet, a huge amount of modern security

    然而,大量的現代安全

  • depends on cryptographic hash functions and the idea that they have this property.

    取決於密碼學哈希函數和它們具有這種特性的想法。

  • If you were to look at what algorithms underlie the secure connection

    如果你想看看安全連接的基礎算法是什麼?

  • that your browser is making with YouTube right now,

    你的瀏覽器正在與YouTube進行。

  • or that it makes with your bank,

    或它與你的銀行做。

  • you will likely see the name SHA256 show up in there.

    你可能會看到SHA256這個名字出現在那裡。

  • For right now, our focus will just be on

    現在,我們的重點將只放在以下方面

  • how such a function can prove that a particular list of transactions

    這樣的函數如何證明某一特定的交易清單?

  • is associated with a large amount of computational effort.

    是與大量的計算工作相關聯的。

  • Imagine someone shows you a list of transactions, and they say

    想象一下,有人給你看一份交易清單,他們說

  • "Hey! I found a special number

    "嘿,我找到了一個特別的號碼

  • so that when you put that number at the end of this list of transactions

    所以,當你把這個數字放在交易清單的最後

  • and apply SHA256 to the entire thing,

    並將SHA256應用到整個。

  • the first 30 bits of that output are all zeros!"

    該輸出的前30位都是0!"

  • How hard do you think it was for them to find that number?

    你覺得他們找到這個號碼有多難?

  • Well, for a random message,

    嗯,對於一個隨機的消息。

  • the probability that a hash happens to start with 30 successive zeros is 1 in 2^30,

    一個哈希恰好從30個連續的零開始的概率是2^30的1。

  • which is about one in a billion.

    這大約是十億分之一。

  • And because SHA256 is a cryptographic hash function,

    而且因為SHA256是一個加密哈希函數。

  • the only way to find a special number like that is just guessing and checking.

    要想找到這樣的特殊數字,只有靠猜測和檢查。

  • So this person almost certainly had to go through about a billion different numbers

    所以這個人幾乎可以肯定要經過大約十億個不同的數字。

  • before finding this special one.

    在找到這個特別的人之前。

  • And once you know that number,

    而一旦你知道這個數字。

  • it's really quick to verify - you just run the hash and see that there are 30 zeros.

    它的驗證速度非常快--你只需運行哈希值,就能看到有30個0。

  • So in other words, you can verify that they went through a large amount of work,

    所以換句話說,你可以驗證他們經歷了大量的工作。

  • but without having to go through that same effort yourself.

    但不用自己去做同樣的努力。

  • This is called a "proof of work".

    這就是所謂的 "工作證明"。

  • And importantly, all of this work is intrinsically tied to the list of transactions.

    而重要的是,所有這些工作都與交易清單有著內在的聯繫。

  • If you change one of those transactions, even slightly,

    如果你改變了其中的一個交易,哪怕是輕微的改變。

  • it would completely change the hash,

    它將完全改變哈希。

  • so you'd have to go through another billion guesses to find a new proof of work,

    所以你得再經過十億次的猜測才能找到新的工作證明。

  • a new number that makes it

    新號

  • so that the hash of the altered list together with this new number starts with 30 zeros.

    所以,改變後的列表和這個新數字的哈希值以30個零開始。

  • So now think back to our distributed ledger situation:

    所以現在回想一下我們分佈式賬本的情況。

  • everyone is there broadcasting transactions,

    每個人都在那裡廣播交易。

  • and we want a way for them to agree on what the correct ledger is.

    我們希望他們能就正確的賬目達成一致。

  • As I said, the core idea behind the original Bitcoin paper

    正如我所說,最初的比特幣論文背後的核心思想是

  • is to have everyone trust whichever ledger has the most work put into it.

    就是讓大家相信哪個賬本投入的工作量最大。

  • The way this works is to first organize a given ledger into blocks,

    這種工作方式是首先將給定的分類賬組織成塊。

  • where each block consists of a list of transactions together with a proof of work,

    其中,每個塊由交易清單和工作證明組成。

  • that is a special number so that the hash of the whole block starts with a bunch of zeros.

    這是一個特殊的數字,所以整個區塊的哈希值是由一堆零開始的。

  • For the moment, let's say that it has to start with... 60 zeros,

    目前,我們假設它必須從... ...60個0開始。

  • but later we'll return back to a more systematic way you might want to choose that number.

    但稍後我們會回到一個更系統的方式,你可能要選擇這個數字。

  • In the same way that a transaction is only considered valid when it's signed by the sender,

    同理,交易只有經過發件人簽字後才算有效。

  • a block is only considered valid if it has a proof of work.

    只有在有工作證明的情況下,一個區塊才被認為是有效的。

  • And also, to make sure that there's a standard order to these blocks,

    而且,還要確保這些區塊有一個標準的順序。

  • we'll make it so that a block has to contain the hash of the previous block at its header.

    我們將使一個塊的頭部必須包含前一個塊的哈希值。

  • That way, if you were to go back and change any one of the blocks

    這樣一來,如果你要回過頭來改變任何一個區塊的話

  • or to swap the order of two blocks,

    或調換兩個區塊的順序。

  • it would change the block that comes after it,

    它會改變後面的塊。

  • which changes that block's hash,

    其中改變了該塊的哈希值。

  • which changes the one that comes after it, and so on.

    這改變了後面的一個,以此類推。

  • That would require redoing all of the work,

    那就需要重做所有的工作。

  • finding a new special number for each of these blocks that makes their hashes start with 60 zeros.

    為這些區塊中的每一個區塊找到一個新的特殊數字,使它們的哈希值以60個零開始。

  • Because blocks are chained together like this,

    因為積木是這樣連鎖起來的。

  • instead of calling it a ledger, it's common to call it a "blockchain"

    與其說是賬本,不如說是 "區塊鏈"

  • As part of our updated protocol,

    作為我們更新協議的一部分。

  • we'll now allow anyone in the world to be a block creator.

    我們現在允許世界上任何人成為區塊的創造者。

  • What that means is that they're going to listen for transactions being broadcast,

    這意味著他們要監聽交易被廣播。

  • collect them into some block,

    把它們收集到某個區塊。

  • and then do a whole bunch of work

    然後做一大堆工作

  • to find a special number that makes the hash of that block start with 60 zeros.

    以找到一個特殊的數字,使該塊的哈希值以60個0開始。

  • And once they find it, they broadcast out the block they found.

    而一旦他們找到了,他們就會把找到的區塊廣播出去。

  • To reward a block creator for all this work,

    為了獎勵一個區塊創作者的這些工作。

  • when she puts together a block,

    當她把一個塊。

  • we'll allow her to include a very special transaction at the top of it,

    我們會允許她在上面加入一個非常特殊的交易。

  • in which she gets, say 10 LD, out of thin air.

    在其中,她得到,比如說10LD,憑空。

  • This is called the "block reward",

    這就是所謂的 "區塊獎勵"。

  • and it's an exception to our usual rules about whether or not to accept transactions.

    而這也是我們是否接受交易的慣常規則的例外。

  • It doesn't come from anyone, so it doesn't have to be signed.

    它不是來自任何人,所以它不需要簽名。

  • And it also means that the total number of ledger dollars in our economy increases with each new block.

    而這也意味著,我國經濟中的分類賬資金總量隨著每一個新的區塊而增加。

  • Creating blocks is often called "mining",

    創建區塊通常被稱為 "挖礦"。

  • since it requires doing a lot of work

    因為這需要做很多工作

  • and it introduces new bits of currency into the economy.

    而且它為經濟引入了新的貨幣位。

  • But when you hear or read about miners,

    但當你聽到或讀到關於礦工的消息。

  • keep in mind that what they're really doing is

    要知道,他們真正做的是......。

  • listening for transactions, creating blocks,

    監聽交易,創建區塊。

  • broadcasting those blocks, and getting rewarded with new money for doing so.

    廣播這些區塊,並是以獲得新的金錢獎勵。

  • From the miner's perspective, each block is kind of like a miniature lottery,

    從礦工的角度來看,每個區塊都有點像微型彩票。

  • where everyone is guessing numbers as fast as they can

    在那裡,每個人都在猜數字,因為他們可以快速地。

  • until one lucky individual finds a special number

    直到有一個幸運兒找到了一個特殊的號碼

  • that makes the hash of the block start with many zeros,

    使得該塊的哈希值以許多零開始。

  • and they get the reward.

    他們就會得到獎勵。

  • For anyone else who just wants to use the system to make payments,

    對於其他只想使用該系統進行支付的人來說。

  • instead of listening for transactions,

    而不是監聽交易。

  • they all start listening just for blocks being broadcast by miners,

    他們都開始聽只為礦工播報的塊。

  • and updating their own personal copies of the blockchain.

    並更新自己的區塊鏈個人副本。

  • Now the key addition to our protocol is that

    現在,我們協議的關鍵補充是

  • if you hear two distinct blockchains with conflicting transaction histories,

    如果你聽到兩個不同的區塊鏈的交易歷史衝突。

  • you defer to the longest one, the one with the most work put into it.

    你聽從最長的,投入最多工作的人。

  • If there's a tie, just wait until you hear an additional block that makes one of them longer.

    如果有平局,就等著聽一個額外的阻擋,讓其中一個變長。

  • So even though there's no central authority and everyone is maintaining their own copy of the blockchain,

    所以,即使沒有中心權威,每個人都在維護自己的區塊鏈副本。

  • if everyone agrees to give preference to whichever blockchain has the most work put into it,

    如果大家都同意優先考慮哪個區塊鏈投入的工作量最大。

  • we have a way to arrive at decentralized consensus.

    我們有辦法達成去中心化的共識。

  • To see why this makes for a trustworthy system,

    要知道為什麼這能成為一個值得信賴的系統。

  • and to understand at what point you should trust that a payment is legit,

    並瞭解在什麼時候你應該相信支付是合法的。

  • it's actually really helpful to walk through exactly what it would take to fool someone using this system.

    它其實真的很有幫助,走過究竟會採取什麼來愚弄別人使用這個系統。

  • Maybe Alice is trying to fool Bob with a fraudulent block,

    也許愛麗絲是想用欺詐性的阻止來欺騙鮑勃。

  • namely she tries to send him one that includes her paying him 100 LD

    也就是她想給他寄一份包括她付給他100LD的文件。

  • but without broadcasting that block to the rest of the network.

    但卻沒有將該塊廣播到網絡的其他地方。

  • That way, everyone else still thinks that she has those 100 LD.

    這樣一來,別人還以為她有那100個LD。

  • To do this, she would have to find a valid proof of work before all of the other miners,

    要做到這一點,她必須先於其他所有礦工找到有效的工作證明。

  • each working on their own block.

    每個人都在自己的街區工作。

  • And that could definitely happen!

    而且這絕對可能發生!

  • Maybe Alice just happens to win this miniature lottery before everyone else.

    也許愛麗絲只是碰巧在大家之前中了這個微型彩票。

  • But Bob is still going to be hearing the broadcasts made by other miners,

    但鮑勃還是會聽到其他礦工做的廣播。

  • so to keep him believing this fraudulent block,

    所以為了讓他相信這個詐騙塊。

  • Alice would have to do all of the work herself

    愛麗絲將不得不自己做所有的工作

  • to keep adding blocks on this special fork in Bob's blockchain.

    以便在鮑勃的區塊鏈的這個特殊分叉上不斷增加區塊。

  • It's different from what he's hearing from the rest of the miners.

    這和他從其他礦工那裡聽到的不一樣。

  • Remember, as per the protocol, Bob always trusts the longest chain that he knows about.

    記住,按照協議,鮑勃總是相信他所知道的最長的鏈條。

  • Alice might be able to keep this up for a few blocks

    愛麗絲也許能保持這個狀態幾個街區呢

  • if, just by chance, she happens to find blocks more quickly

    如果,只是偶然,她碰巧發現塊更快。

  • than the rest of the miners on the network all combined.

    比網絡上其他礦工的總和還要多。

  • But unless she has close to 50% of the computing resources among all of the miners,

    但除非她擁有所有礦工中接近50%的計算資源。

  • the probability becomes overwhelming

    大有可為

  • that the blockchain that all of the other miners are working on

    所有其他礦工都在研究的區塊鏈。

  • grows faster than the single fraudulent blockchain that Alice is feeding to Bob.

    增長速度比愛麗絲餵給鮑勃的單一欺詐性區塊鏈還要快。

  • So, after enough time, Bob's just going to reject what he's hearing from Alice

    所以,經過足夠的時間,鮑勃就會拒絕接受他從愛麗絲那裡聽到的東西。

  • in favor of the longer chain that everyone else is working on.

    以利於大家都在研究的長鏈。

  • Notice, that means that you shouldn't necessarily trust a new block that you hear immediately;

    注意,這意味著你不一定要相信一個新的塊,你聽到立即。

  • instead, you should wait for several new blocks to be added on top of it.

    而不是等幾個新的區塊加在上面。

  • If you still haven't heard of any longer block chains,

    如果你還沒有聽說過更長的區塊鏈。

  • you can trust that this block is part of the same chain that everyone else is using.

    你可以相信,這個區塊是大家都在使用的同一鏈條的一部分。

  • And with that, we've hit all the main ideas.

    就這樣,我們把所有的主旨都打出來了。

  • This distributed ledger system based on a proof of work

    這種基於工作證明的分佈式賬本系統。

  • is more or less how the Bitcoin protocol works and how many other cryptocurrencies work.

    是比特幣協議的工作原理和其他許多加密貨幣的工作原理,或多或少。

  • There's just a few details to clear up.

    只是有一些細節需要澄清。

  • Earlier, I said that the proof of work might be to find a special number

    前面我說過,工作的證明可能是找到一個特殊的數字。

  • so that the hash of the block starts with 60 zeros.

    使塊的哈希值以60個零開始。

  • Well, the way the actual Bitcoin protocol works is to periodically change that number of zeros

    好吧, 比特幣協議的工作方式是定期改變零的數量。

  • so that it should take on average 10 minutes to find a new block.

    是以,平均需要10分鐘才能找到一個新的區塊。

  • So as there are more and more miners added to the network,

    所以隨著越來越多的礦工加入網絡。

  • the challenge actually gets harder and harder,

    挑戰其實越來越難。

  • in such a way that this miniature lottery only has about one winner every 10 minutes.

    這樣的方式,這種微型彩票大約每10分鐘才有一個贏家。

  • Many newer cryptocurrencies actually have much shorter block times than that.

    許多較新的加密貨幣的區塊時間其實比這個短得多。

  • And all of the money in Bitcoin ultimately comes from some block reward.

    而比特幣中所有的錢最終都來自於一些區塊的獎勵。

  • In the beginning, these rewards were 50 Bitcoin per block.

    一開始,這些獎勵是每塊50個比特幣。

  • There's actually a great website you can go to called "Block Explorer"

    其實有一個很好的網站,你可以去叫 "Block Explorer"

  • that makes it easy to look through the Bitcoin blockchain.

    使得人們可以輕鬆地查看比特幣區塊鏈。

  • And if you look at the very first few blocks on the chain,

    而如果你看鏈上最開始的幾塊。

  • they contain no transactions other than that 50 Bitcoin reward to the miner.

    他們除了給礦工的50個比特幣獎勵外,不包含任何交易。

  • But every 210000 blocks, which is about every 4 years,

    但每21萬塊,也就是每4年左右。

  • that reward gets cut in half.

    獎勵被削減一半。

  • So right now, the reward is 12.5 Bitcoin per block.

    所以現在,每個區塊的獎勵是12.5比特幣。

  • And because this reward decreases geometrically over time,

    而且因為這種獎勵隨著時間的推移呈幾何級數遞減。

  • it means there will never be more than 21000000 Bitcoin in existence.

    這意味著永遠不會有超過21000000個比特幣存在。

  • However, this doesn't mean that miners will stop earning money.

    然而,這並不意味著礦工們會停止賺錢。

  • In addition to the block reward, miners can also pick up transaction fees.

    除了區塊獎勵外,礦工還可以領取交易費用。

  • The way this works is that whenever you make a payment,

    這種工作方式是,每當你支付。

  • you can purely optionally include a little transaction fee with it

    你可以純粹地選擇包括一點交易費用與它

  • that's going to go to the miner of whichever block includes that payment.

    那是要給哪個區塊的礦工,包括那筆錢。

  • The reason you might do that is to incentivize miners

    你這樣做的原因是為了激勵礦工。

  • to actually include the transaction that you broadcast into the next block.

    以實際包括你廣播到下一個塊的事務。

  • You see, in Bitcoin, each block is limited to about 2400 transactions,

    你看,在比特幣中,每個區塊的交易量限制在2400筆左右。

  • which many critics argue is unnecessarily restrictive.

    許多評論家認為,這具有不必要的限制性。

  • For comparison, VISA processes an average of about 1700 transactions per second,

    作為對比,VISA平均每秒處理約1700筆交易。

  • and they're capable of handling more than 24000 per second.

    而且它們的處理能力超過每秒24000次。

  • This comparatively slow processing on Bitcoin makes for higher transaction fees,

    比特幣這種相對緩慢的處理方式,使得交易費用較高。

  • since that's what determines which transactions miners choose to include in a new block.

    因為這就是決定礦工選擇將哪些交易納入新區塊的原因。

  • All of this is far from a comprehensive coverage of cryptocurrencies;

    所有這些遠不是對加密貨幣的全面報道。

  • there are still many nuances and alternate design choices that I haven't even touched.

    還有很多細微的差別和另類的設計選擇,我都沒有觸及。

  • But my hope is that this can provide a stable "wait but why" style tree-trunk of understanding

    但我的希望是,這能提供一個穩定的 "等而下之 "式的理解樹幹。

  • for anyone looking to add a few more branches with further reading.

    對於任何想進一步閱讀的人來說,都會增加一些分支。

  • Like I said at the start,

    就像我一開始說的那樣。

  • one of the motives behind this is that a lot of money has started flowing towards cryptocurrencies.

    這背後的動機之一是,大量資金開始流向加密貨幣。

  • And even though I don't want to make any claims about whether that's a good or bad investment,

    儘管我不想對這是好還是壞的投資做任何主張。

  • I really do think that it's healthy for people getting into the game

    我真的認為這對進入遊戲的人來說是健康的

  • to at least know the fundamentals of the technology.

    至少要知道技術的基本原理。

  • As always, my sincerest thanks to those of you making this channel possible on Patreon.

    一如既往,我最誠摯地感謝那些在Patreon上使這個頻道成為可能的人。

  • I understand that not everyone is in a position to contribute,

    我明白,不是每個人都有能力做出貢獻。

  • but if you're still interested in helping out,

    但如果你還有興趣幫忙,

  • one of the best ways to do that

    最好的方法之一

  • is simply to share videos that you think might be interesting or helpful to others.

    就是簡單地分享你認為可能有趣或對他人有幫助的視頻。

  • I know you know that, but it really does help.

    我知道你知道,但它真的有幫助。

  • I also want to thank Protocol Labs for their support of this video.

    我還要感謝協議實驗室對這個視頻的支持。

  • This is an organization that runs a number of different research and development projects.

    這是一個運行許多不同研究和開發項目的組織。

  • And if you follow some of the links I've left in the description

    如果你遵循我在描述中留下的一些鏈接

  • to read into the details of those projects,

    來解讀這些項目的細節。

  • you'll notice some strong parallels with the concepts covered in this video.

    你會注意到與本視頻中涉及的概念有一些強烈的相似之處。

  • The challenges and benefits of decentralization

    權力下放的挑戰和好處

  • are by no means limited to currency and to transaction histories.

    絕不限於貨幣和交易歷史。

  • And the usefulness of tools from cryptography, like hash functions and digital signatures,

    以及來自密碼學的工具的有用性,如哈希函數和數字簽名。

  • are likewise much more general.

    同樣也是更為普遍的。

  • For example, a couple of Protocol Labs projects, such as IPFS and Filecoin,

    例如,協議實驗室的幾個項目,如IPFS和Filecoin。

  • center on the idea of distributed file storage,

    中心是分佈式文件存儲的理念。

  • which opens up a whole field of interesting challenges and possibilities.

    這開啟了整個領域的有趣挑戰和可能性。

  • For any developers among you, Protocol Labs places a very high value on open source.

    對於各位開發者來說,協議實驗室非常重視開源。

  • So if you're interested, you can join what's already a very strong community of contributors.

    所以,如果你有興趣,你可以加入這個已經非常強大的貢獻者社區。

  • But they're also looking to hire full-time developers.

    但他們也在尋找全職開發人員。

  • So if you think you might be a good fit there, definitely apply.

    所以如果你覺得自己可能適合那裡,一定要申請。

What does it mean to *have* a Bitcoin?

擁有*個比特幣是什麼意思?

字幕與單字
由 AI 自動生成

單字即點即查 點擊單字可以查詢單字解釋