This content visually explains the fundamental concepts of blockchain technology, focusing on how hashing, blocks, and chaining create a secure and immutable ledger for transactions.
Mind Map
คลิกเพื่อขยาย
คลิกเพื่อสำรวจ Mind Map แบบอินเตอร์แอคทีฟฉบับเต็ม
this is a blockchain demo
we're gonna do this in a very visual way though
we're gonna make it very easy to understand
by stepping through the key pieces of
what a blockchain is in a visual way but
before we get started we need to take a
look at this thing that we call a sha
256 hash
ok and a hash this is this is one of
them right here
hash looks like a bunch of random
numbers and essentially what it is it's
a fingerprint of some digital data and
it just so happens it's a fingerprint of
whatever i type in this box
so if I type my name "anders" into
this box you see that the hash has
changed matter of fact it changed every
time I typed a letter right so I'm going
to go back to so it says anders okay so
this is a the hash of the name anders
all lower case it starts with 19ea
right
ok so if i delete that and I go again
type anders again you can see it starts
with 19ea the same exact hash in that
sense it's a digital fingerprint of this
data whatever data is here every time
you type exactly the same data you get
exactly the same hash and i can type
anything i want so I can you can have
nothing like this you know e3b0
that's that's the hash of nothing or you
could type tons and tons of stuff a
matter of fact you could put like the
library of congress in here and you
would get a hash and the interesting
thing about it is regardless of their if
there's a tiny amount of information no
information or the entire library of
congress you're always going to get a
hash that is this long this many
characters are you not going to be able
to pre guess what this is you kind of
have to put the library of congress in
here to figure out what the hash is but
you you'll always get exactly the same
hash regardless of how many times you
put exactly the same information in so
what I'm going to do is extend this idea
of a hash
into something that we're going to
call a block
alright so let's take a look at a block
so this is a block and it's exactly like
the hash it's just that data section
I've broken out now into three sections
one called block this is just some kind
of a number this block number 1 a nonce
which is just yet another number will go
into what that is in a second and then
just some more data just very similarly
to the way that we had it before
however the hash of this which includes
all of this information up here is down
here and it begins with four zeros you see that
it's a relatively unusual hash you know
most of them are not really going to
start with four zeros like that but this one
happens to and because it does totally
arbitrarily i'm going to say that this
block is signed
ok so what would happen if i were to
change any one piece of this information
let's say if i were to type something here
right the hash is going to change and
what's the chance of that if i type
letters this hash is going to start with
four zeros pretty low it's probably not
right so let's see what happens when i
do that i'm just going to say hi
look at that right this hash does not
start with four zeros and so the big
background here has turned red
so now you know that this this block
with this information in it is not a
valid or a signed block ok and that's
where this nonce comes in this
nonce is just a number that you can set
to try to find a number that fits so
that this hash starts with four zeros again
alright so how do we do that well let's
start with one that start with now it's
32 so that's not one let's try two FF
now
3 4 5 6 so you get the idea like i
could sit here all there's one that
starts with 0 I can sit here all day
typing these numbers and trying to
figure out one that actually is going to
hash out to something that starts with
four zeros that wold take a long time so
here i have my little
mine button i'm sure you've been wondering
what happens if i press that so what's
going to happen when i press this mine
button is it's gonna run through all the
numbers from 1 all the way up to try to
find one where the hash starts with four
zeros and this process is called mining
let's do it right now
now it's checking all of the numbers
from 1 all the way up with their now
it's stopped at 59,396 and that one
just happens to hash out to something
that starts with four zeros and it
satisfies my little definition of what
assigned block is ok so that's that's a
block now can you tell me what a
blockchain is it's probably just a chain
of these blocks well how do you how do
you put them together let's let's do
that
alright so here's my blockchain I've
blocked number one has some kind of
a nonce just like before there's some
data area too but then it has this
previous here is a bunch of zeros let's
let's roll forward so this is block
two and block 3 and 4 this block chain
has five blocks on it right the previous
here starts with 0000ae8 right is
this number
ae8 and then this previous you know b90 is this one