So let's start by first explaining what is a blockchain.
Well, a blockchain is just a data structure
that basically provides the capabilities of a ledger.
So the properties of a,
of a blockchain are essentially threefold.
The first one is it provides this mechanism called Consensus,
which means that all the participants in
the system agree on what data lives on the block chain.
Unfortunately, there's a bit of a caveat to that and the caveat is that, in fact,
they agree on everything that's on the blockchain,
except perhaps the last most recent few entries that were added to the chain.
The second property is what we call
consent at- what we call Persistence and Persistence basically means,
that once data has been added to the blockchain,
it can never be removed.
Yeah and this is kind of an extremely important property of a blockchain.
Once data has been added,
there is no way to take it off.
Um, now, again, there's a caveat to that as well.
So this is the star-star property that basically says that, uh,
in fact, persistence will only hold as long
as we make certain assumptions about the adversary.
For example, maybe the adversary only has limited computing power.
The third property that a blockchain provides is what we call Liveness,
which means that in fact anyone can add data to
the blockchain so it's not possible to prevent you, uh,
from adding your own transactions to the blockchain or it's not possible for
the blockchain to get stuck so that no one can add new transactions to it.
Okay. So I want you to remember these three properties, Consensus, Persistence,
and Liveness because those are going to be kind of
fundamental properties that the blockchain as a data structure provides to us,
and we're gonna be building applications on top of that.
I should mention by the way, if you want to see
a more formal definition of what a blockchain is,
there's this nice paper from 2016 that you can take a look at.
And there's a much deeper analysis of what a blockchain is and how do
we argue that Consensus protocols actually provide these- these capabilities.
Okay. So now that we understand what a blockchain is, uh,
let's look at kind of the first application for a blockchain, which is the currency.
Yeah. So how does the,
how does a blockchain, uh, provide a currency?
Well, essentially, as I said,
the fact that we have Consensus means,
that everybody agrees on the set of transactions that were already executed,
which means, that everybody agrees on how much money everybody has.
Yeah. So all of the participants in the system sort of
agree on the current state of the world in particular,
how much every participant actually owns.
Persistence in the contents of a currency
means that once a transaction has been executed,
there's no way to revert that transaction.
Yeah. So in some sense,
that's something that you often want of the currency system in once,
in the sense, that once I pay you,
there's no way for me to take the money back.
Yeah. Maybe you can give me the money back, but uh,
as a chain to the system,
there is no way for me to kind of undo a transaction that was already made.
And Liveness is kind of the,
the third property which basically means,
the system cannot get stuck and all of a sudden not accept any more transactions.
And moreover, if a user,
uh, wants to, um,
submit a transaction to the system,
he will always have the ability to do it.
So no one can prevent you from spending the money that you already know- own.
Okay. So you can see how these properties of Consensus, Persistence, and Liveness,
um, immediately translates to
providing a currency and we'll talk more about that later on.
But, uh, you already see why these kind of
properties are kind of interesting on their own rights.
Okay. So now, the question is how do we achieve Persistence?
Um, persistence is- is
kind of a difficult property to achieve in
a computer system because a computer system can always
be snapshotted and then after
some modifications have been made to the state of the system,
you can always revert back,
back to the original snapshot position.
Yeah and that would kind of undo everything that was done after the,
uh, snapshot was taken.
So the question is how do we achieve Persistence in a computing, computing environment?
And the answer is basically, um,
Persistence is achieved by replication across many, many different parties.
So in fact, the blockchain as a whole is replicated across many players.
So for example, miners are the ones who write new data to the blockchain but in addition,
they also store the entire history of the blockchain locally.
Okay. So the entire blockchain is replicated to all the miners in the system.
The people who write data to the blockchain.
End-users will monitor the blockchain,
the blockchain for data that affects themselves.
So for example, if uh,
we're implementing a currency,
um, an end-user might want to know how much money do I currently have in his currency.
And to do that, they will monitor to the blockchain by replicating it,
and, um, looking at how much money they actually have.
So again, there are ways to make this more efficient, uh,
but overall, end-user- there are end-users who actually replicate the blockchain,
um, and there are particular software applications
often called wallets that actually can be used to say how much,
how much money each user has.
Again, there are wallets that don't need to
replicate the entire blockchain but at the same time,
uh, there are definitely users who do replicate the,
uh, the entirety of it.
And then there are service providers who do analysis of the blockchain, like,
just understanding the rate of transactions, um,
understanding different aspects of the blockchain, and again,
they replicate the block chain in order to process it.
Okay. So the fact that this data is replicated across so many participants,
makes it very difficult to revert to an old state because essentially,
you would have to rever- revert all the participants who have,
uh, replicated the data on their own.
So yeah, so the fact is,
uh, the fact that everything is replicated means,
everyone can validate that
all transactions in fact were done correctly on the block chain.
And in fact, if ever I,
if ever we find that transaction that's invalid,
the block that contains that transaction is simply going to be dropped.
Yeah. So there's no incentive to creating um,
an invalid transaction because anyone who validates it will just ignore it.
And it's not going to propagate throughout the system.
And again, we'll see more of that in just a little bit.
Yeah. And the point is that,
Consensus means essentially everybody is looking at
the same data and because they've all validated it,
we know that it's the same validator.
So everybody agrees on the state of the blockchain,
uh, and all and presumably,
all the transactions that are on the blockchain are all
valid under the rules of the blockchain protocol.