Voiceover: Bitcoin is a
new virtual currency system that's been gathering a
lot of attention recently, and I thought I would
do a series of videos where I really dive into
the innards of bitcoin and explain how it works in detail, and my plan for this
first video in this series is to describe some of those mechanics at a high level. And then what I'll do in subsequent videos is dive a bit deeper into
all of the underlying aspects that I have touched upon
within this first video. And my hope is that by the
end of this video series, you'll know not only what a bitcoin is, but you'll also understand the mechanics of how transactions are initiated. You'll see how verification occurs for those transactions, and you'll also learn
what it means for someone to really engage in a process known as "bitcoin mining", and that may be a term that you've heard if you've had any interest
in bitcoin recently. I do want to point out, also, that the bitcoin scheme
is fairly involved. It requires some time to really cover all of the relevant details, and to me the best way
to really wrap your head around a scheme like bitcoin is to really suspend belief for a bit and get exposed to all of
these relevant details. Now, undoubtedly, you'll
have a lot of questions along the way, but my hope is that by the
end of this video series, all of the relevant stones
will have been overturned and your questions will have been appropriately answered, but it might take some time to get there, and in part, that's because
I'll try to describe things in a way that's sensible and that might involve
leaving some details out until I can explain enough
pieces of the scheme and then add in those
details in as I go along so that you're not inundated with too many minor points and nuances along the way, but you get a feel for the overall system as I go through things. With that, let me go ahead
and just dive right in. First of all, I do want to point out that bitcoin has been described, really, as a decentralized currency because there's no real
central bank or entity that's involved in generating
or transacting bitcoins, and, in fact, what happens
in the content of a bitcoin is all the transactions really require what's known as a peer-to-peer network, a network of just individual
hosts that essentially collectively agree on different aspects of how the protocol is
implemented and used. Bitcoin itself is also
referred to sometimes as a cryptocurrency, and by a cryptocurrency, I mean that we use a lot
of cryptographic techniques in order to facilitate or to really enable bitcoin transactions to take place, and I'll do separate videos on some of these techniques, but just take it at face value right now, that it's decentralized and is a type of cryptocurrency. I also want to point out that
the term "bitcoin" itself can in fact be a bit confusing, and in many ways, bitcoin transactions don't really resemble
traditional coin transactions so much as they represent really entries in some type of a global ledger, and by that, I mean let's say you have a transaction taking place, and let's say the
transaction is taking place within, or among two parties, and we'll call them Alice and Bob, which are traditional names that are used in many cryptographic protocols to describe the parties involved, and imagine that Alice wants to transfer, or really wants to assign, a certain number of
bitcoins that she possesses over to Bob, and you can think of
this transaction, really, as an entry in a ledger of some sort, and I also want to point
out before proceeding that even though I've used terms like Alice and Bob, what I really mean in
the context of bitcoin is not the actual identities
in the physical sense, but really that Alice
and Bob are identities in the bitcoin system, and these identities are just, in actual implementation, are just collections of numbers that do not have to be tied with Alice and Bob's
real-world identities. In that capacity, you can
think of bitcoin at any, it really is effectively being, of being pseudonyms, rather than real names, and the idea is that
bitcoin really becomes more of a pseudonymous protocol, where people are addressed
by their pseudonyms, and that provides some level of privacy to users that want to transact using the bitcoin system. Now, in a transaction
between Alice and Bob, what Alice will basically do is specify a few different numbers. She has to specify how many bitcoins she wants to allocate to Bob. Let's say Alice started off
with 50 bitcoins of her own. She might decide that she wants to give, let's say, 30 of these
bitcoins over to Bob, and let's say she wants to have some number of bitcoins
returned back to her, so you have to specify, or Alice has to specify, rather, how much change she's going to get, so in this case, let's say
her change is going to be 18 bitcoins for herself, and then the remaining 2
bitcoins are going to be a transaction fee, and we'll talk about what
a transaction fee means a little later, and I think I'll also dive
into it in future videos, but it's basically an
incentive for other nodes in the bitcoin network to help Alice in essentially validating
some of the details of this transaction for Bob. Now, Alice will take
these transaction details and apply what's known
as a digital signature to these transaction details, and a digital signature is basically the mathematical analog of
a traditional signature. It really binds Alice's
identity to the details of this transaction. And by Alice's identity, again, I mean her identity
within the bitcoin system, and this binding is really done in a cryptographically strong way. Now, the details of this transaction once it takes place, are going to be broadcast out, so Alice is going to take
these transaction details and effectively just broadcast them out to all the nodes in the
peer-to-peer network that represent bitcoin nodes. Now, Bob, when he receives information about this transaction, he receives it over the
peer-to-peer network. He'll probably sandy check some part of the transaction. For example, he might
check that the numbers work out correctly, that Alice, let's say,
started off with 50 bitcoins and is not trying to transfer more than 50 bitcoins to
him, and so on and so forth. He's going to have some
mathematical assurance because of some of the
cryptography involved that some of these claims are accurate, that Alice, let's say, has the bitcoins that she's claimed to possess, and that she's expressed an interest to assign those bitcoins to him, but what he won't know yet is whether Alice has really tried to
transfer those same bitcoins to anyone else over the course of time or maybe just prior to that point. the way that we handle that situation, and by the way, I should point out that this concept of Alice
trying to, let's say, spend coins twice, in the context of digital cash and electronic currency systems, this concept is known as double spending, and it's something you have to worry about when you have virtual currencies because it's very easy
for someone to just copy the numbers that
represent this transaction and try to use them elsewhere. The way we basically handle and reduce the risk of double spending is through a specific set of nodes in this peer-to-peer network who are known as bitcoin miners. You might have heard
this term bitcoin miners, and the bitcoin miners are basically specific individuals, specific nodes within
this peer-to-peer network, and what they basically do is they take all of the transactions that they see, and remember, they're listening to all
of these transactions, and not just Alice and Bob's, but other transactions
that are taking place, and they'll take those transactions, and ultimately, they will
take those transactions and will compile them into what's known as a transaction block. So it's basically a recording of all the previously
unrecorded transactions. If you think of a single transaction let's say, as a ledger item, you could think of a transaction block as representing, let's say, an entire page in a ledger book. These bitcoin miners will
also include in this block, in addition to all these
unrecorded transactions, they will also include in this block a special transaction that's
meant just for themselves to basically reward
themselves for the effort of doing this mining. Now, a transaction block will also contain an encoding of the
previous transaction block, so there's going to be
some level of continuity, and then bitcoin miners will also include a specially-crafted sequence of numbers associated with these transactions, and this sequence of numbers is known as a proof of work, and it's called a proof of work because it's sometihng that's
really hard to generate, something that requires
a lot of effort to do, and that kind of makes
it hard for just anybody to get involved with
bitcoin mining willy-nilly, but it requires that they
really exhibit or exert some computational effort, basically in exchange for
getting this extra reward of a payment, and also in exchange for getting this transaction fee that
they're going to be promised by Alice to engage in this sort of work. I'll talk about what
proof-of-work protocols are in a separate video in more detail. Now, because each transaction block contains information about
previous transactions, really what you end up having is not just a single block. You ultimately have what
you can think of as a chain of transactions, and you can call this a
transaction block chain. The idea is as soon as a bitcoin miner is able to construct a
transaction block chain containing all these
unrecorded transactions, and this proof of work, it'll broadcast the
details of that chain out to all of the nodes, all of the peers on that peer-to-peer network for bitcoin. And then once the newly-broadcast chain gets kind of verified and
meets the right properties, the nodes on the network are just going to go
ahead and start using it, and they're going to start appending new transaction blocks to that chain. They're going to take anything that hasn't yet been processed and start incorporating it
into the transaction chain that was broadcast out by the node who came up with the
proof of work correctly. Now, this transaction block chain, really what we're going to be doing in the context of bitcoin is the nodes are only going to consider the transaction block chain that reflects the greatest amount of work
to generate its contents, and again, there's this proof
of work that I mentioned that is used to kind of determine or identify what the,
what work was involved in coming up with the
transaction block chain. The one that's the longest
is going to be considered sacrosanct within the bitcoin system. Future miners are supposed to only work off the chain that has
the most work put into it. Now, what's remarkable here is that the whole
process is decentralized. There is no bank or no
centrally-trusted entity that was actually involved
in the transaction. Hopefully this first video gave you a bit of description,
a flavor, if you will, for the high-level mechanics
of the bitcoin system. There are a lot of stones
I have left unturned, and what I'll do in subsequent videos is start covering those details, and I'm sure you have a lot of questions, and hopefully the future videos will help answer some of
those questions for you.