Blockchain Full Course | Full Blockchian Tutorial | Code Eater - Blockchain | English
FULL TRANSCRIPT
hi welcome to co-readers blockchain
channel my name is srivastav and I will
be your instructor for this blockchain
course in this blockchain course we are
going to talk about a lot of different
things I have divided this full course
this full blockchain course into three
modules that is module a which will be
all about blockchain how blockchain work
why do we need to study blockchain each
and everything we are going to cover in
module a then we will have module B
which will be all about cryptocurrencies
what are cryptocurrencies what is the
difference between a token and a coin
and a protocol all those things if these
things are sounds unfamiliar to you so
don't worry we are going to follow each
and everything in depth and then we are
going to talk about smart contracts what
is a smart contract where we where do we
deploy our smart contract each and
everything about smart contract we are
going to talk about in modern you see is
there any prerequisite to take this
course there is no prerequisite to take
this course anyone having no knowledge
of blockchain having no knowledge of any
technical Co-op topic can take this
course okay and now let us talk about
what are the contents that we are going
to see in each module because we are
definitely I have divided this course
into three modules but what are the
contents that we are going to see in
different modules let's see that so in
module a we are going to talk about what
is blockchain
then what is a hashing algorithm because
this is one of the important concept
that you must know when you are starting
with blockchain then what is immutable
Ledger then distributed P2P Network
because our whole blockchain network is
actually working on distributed P2P
Network so we will see that then we will
talk about what is mining and then
consensus protocol okay then in module B
we will start with Bitcoin what is
bitcoin Bitcoin monetary policy Mining
nons and let me tell you we are going in
depth of money because I know mining is
one of the most uh I will say most
demanding topic or people wants to know
about what is mining so we will look in
mining a great detail and nonce is
related to mining so we will talk about
that we will see the different
technologies that we use in order to do
mining like CPUs gpus A6 and all those
things then we will talk about mempool
very important thing if you do not
understand what is memory and all those
things don't worry you will understand
at the end of this course
then we will talk about the different
transaction different type of
transactions and all those things then
wallets and how wallets Works what are
utxos each and everything
and at the end of this module we are
going to see what is a public key what
is a private key what are digitals in
Natures what are the what is the
importance of cryptography in blockchain
we are going to see that
then in module C we are going to talk
about what is ethereum then smart
contracts because smart contracts are
programs that are written on ethereum so
we will see that then we are going to
talk about decentralized applications
evm and gas now this is something might
might be a new term for you but don't
worry you will understand at the end of
this module then what are Dows these
centralized autonomous organizations we
will see that
what is hard for what is a soft Fork we
will see that
what is Dao attack there was an attack
on Dao on ethereum we will study about
that so that we do not end up in the
same place
and then we are going to talk about icos
that is just like IPOs we have IPOs in
you know in our traditional World in
blockchain world we have initial coin
offering so we will talk about icos
and at the end we will talk about
alternate coins or all coins means coins
other than Bitcoin so you can clearly
see that all these modules if you will
see it is a pretty big course we are
going to see each and everything in this
course
so it will be a lot of fun you will
learn a lot that I can guarantee so I
hope I will meet you soon in the next
video I hope you are excited for the
next video
and I think this is one of the most
fundamental question that everyone must
ask whenever he or she is starting with
a new course right so let's start with
why study blockchain what is the reason
for studying blockchain let's see that
and we will understand this with the
help of story of Internet okay let's see
how internet came into existence and
where internet is actually lacking and
what Gap can be fulfilled by blockchain
so if we talk about our communication uh
if we talk about early times so this is
how we used to communicate using pigeons
if you have watched I will say Harry
Potter in that case you might have seen
that owls were being used in order to
communicate in order to send messages
right in order to send a message from
one place to another so these were the
times when we have this mode of
communication where pigeons were used as
a transporter transported transporter
for our letters right then we have post
office right mailboxes that we started
with writing letters and to our friends
who are relatives
but it was also a time taking process
right it took around months or sometimes
even more than a month uh when we have
to do uh when we have to use these post
offices right
and today if we talk about in the era of
Internet
everything is so easy right
communication has become so smooth now
we can talk to so many people at once we
can talk to to our relatives or to our
friends who may be in a different part
of the world and still we may be able to
communicate with them just with the help
of emails right and then we have another
great invention that is Facebook or I
will say social media through which we
can communicate with thousands of people
in just a click right
now currently I am able to communicate
with you definitely it is a one-way
communication but still I'm able to
communicate with so many people at once
and this is all because of Internet so
one this one thing is for sure here that
internet has bring a revolution when it
comes to communication right internet
has made our communication part so easy
that we cannot even like live without
internet right today if we have to live
without internet it will be a disastrous
day right for us
but there is something where internet is
lacking definitely communication part
has so easy now but there is one point
where communication where actually our
internet is lacking and that point is
Trust
we cannot trust the internet and let me
explain you this with the help of an
exam now let us understand this with the
help of an exam let's say this is an NGO
where you want to donate some money okay
and for denoting our money for donating
money what you did you did a internet
transaction okay so now
you have donated some money to this NGO
via internet transaction
but the problem is you do not know
whether this NGO is going to use this
money that you have transferred to this
NGO via internet whether this NGO is
going to use this money for a good cause
or not whether this NGO is going to use
this money for women education child
education or some good welfare work or
this NGO is going to do some money
laundering or let's say you know funding
some terrorist attacks so you do not
know right and this is one of the reason
that many of the times we do not donate
to different organizations because we
have a fear in mind that what uh what
happened if they are using our money for
some you know bad practices so that's
why we do not donate so the thing is in
this whole picture you can clearly see
that we cannot trust this NGO and why we
cannot trust this NGO because we cannot
trust our internet because we do not
know the internet transaction that we
are doing where this money is actually
going so one thing is for sure internet
cannot provide trust to us so the only
technology that can provide trust to us
is blockchain with the help of
blockchain we can bring Trust on the
table and how this how this like
blockchain works you will understand
because I'm not going into depth of
blockchain currently but one thing is
for sure you can trust this blockchain
technology and trust is the thing that
internet cannot provide you once we will
move on to blockchain application you
will understand how blockchain is
actually bringing trust to the table
okay so if we talk about blockchain
blockchain is a disruptive technology
just like internet internet made our
communication part very easy one of the
most important human element right human
thing that we need to talk to people we
need to communicate to people
if we talk about blockchain blockchain
is bringing trust to the uh to this
communication now we are not just
communicating we are doing communication
when like while trusting someone and how
this is so we will talk about it but
this is the reason why blockchain is
getting so much popular and this is the
reason if you will see in these two
pictures blockchain is just acting like
internet acting in the sense like
internet brought a revolution to the
communication part blockchain is
bringing Revolution to this trust part
and that's why blockchain is getting
famous day by day and it will be famous
just like internet or more famous just
like internet so there will be huge
opportunities when it comes to
blockchain in the near future currently
there are also lot of opportunities but
in the near future you will see
exponential exponential growth
opportunities in the blockchain domain
and that's why we need to study
blockchain now in this video we are
going to talk about what is blockchain
this presentation will be a very I will
say interesting presentation you will
enjoy a lot let's start this
presentation so before talking about
blockchain it is very necessary that we
should know who are actually inventors
of blockchain now if I will ask you what
do you think who is inventor of
longshare and who are inventors or
blockchain please let me know in the
comment below I want to see what is your
answer
I hope you have commented your answer
but I know most of you like what have
actually commented there most of you
might have thought that inventors of
blockchain or inventor or blockchain is
Satoshi Nakamoto but let me correct you
here Satoshi Nakamoto is inventor of
Bitcoin but not blockchain inventors of
blockchain are Stuart Herbert
and W squats tornado so these are the
two people who are actually inventors of
blockchain they have written a paper on
it I think it was the paper was of
around related to digital signatures or
something I will share the link in the
description so that you can also read it
uh it was around 1990 they have
published this paper
so remember inventors of blockchain are
Stuart Harbor and W score store Neta and
not sadoshi Nakamoto okay many of the
times you will see this false
information on the internet but I want
to correct you here only so that you do
not get you know uh get this that
correct incorrect information now let's
talk about what is blockchain so as you
can see on your screen that we have this
blocks right connected with each other
and hence we have something like a
blockchain right means chain of blocks
but definitely you cannot Define
blockchain like this right so let us see
our definition of blockchain let me tell
you there is no fixed definition of
blockchain but this is one of the
definition which I think uh you know
identify the blockchain the most good
way so that's why we will take this
definition
so blockchain is a distributed immutable
Ledger which is completely transparent
okay let me repeat it for you blockchain
is a distributed imitable Ledger which
is completely transparent now let us
understand the meaning of this
definition let us understand the meaning
of each keywords that I am using in this
in this definition that is ledger
immutable distributed transparent
everything okay so I will start from
Ledger then we will go to immutable then
distribute it and then we will talk
about transparent okay so let's talk
about what is a ledger so a ledger looks
something like this so Ledger is
actually a place where you write all
your debit as well as credit entry so
let's say you might have seen that
whenever you go to a shop let's say or
if you have let's say you went to
McDonald's or something so what they are
doing is they are actually writing each
and every transaction like if you talk
about a normal shop keyboard okay so in
that case what they're doing is they are
writing each and every transaction in
their notebook that what amount they owe
you or what amount you owe to them each
and every transaction is actually being
written in this Ledger book okay so this
is the traditional approach which people
use before computer sometimes you might
see this but now in most of the error
like in at this point of time what you
will see that people are using computer
in order to write down all the
transactions so you might have seen that
whenever you go to McDonald's and you
buy something they are writing each and
everything in their calculator type of
thing right and that's why that's how
they are providing you receipt and
everything so what they are doing is
actually they are recording the
transactions like how much you are
paying how much the change they have
given you each and every transaction is
being recorded in that ledger okay so
Ledger is a place where transactions are
recorded
now this is how real world operates okay
this is the real world Ledger if we talk
about blockchain in blockchain the
blocks of the blockchain act as Ledger
so we have seen right that our
blockchain is formed by various block
connected with each other via chain
and this block in the blockchain
works as a ledger for the blockchain
where each and every transaction are
being recorded so let's say you are
paying some Bitcoin to your friend let's
say ace and five Bitcoin to B now this
transaction will be recorded on this
block of the blockchain and then like
this only if C is sending some
transaction to D some Bitcoin to D in
that case that transaction will be
recorded on this block of the blockchain
so this is the meaning of our first
keyword second keyword is immutable now
the problem with this Ledger is that
this Ledger is mutable or if we talk
about databases right the centralized
databases all those type of ledgers are
actually mutable mutable means you can
erase the data you can manipulate with
the data like for example I can just
remove this one of the pages from this
notebook right I can completely erase
one of the written handwritings over
this notebook if you talk about a
database so the person who is in charge
of that database can completely erase
one of the transactions from the
database so the thing with these Ledger
is that they are mutable you can mute
them means you can change them but when
it comes to this block of the blockchain
these are totally immutable means once a
transaction is recorded on this block of
the blockchain you cannot change that
transaction nobody can change the
transaction that transaction is like
permanent on this blockchain
and how this is done we will talk about
it so don't worry about it but now I
just want to tell you like how what is
the meaning of these keywords and why
blockchain is so special okay so now we
have understood the meaning of two
keywords Ledger as well as immutable now
let's look at the third keyword
so if we talk about a blockchain network
this is how a blockchain network looks
like okay so we have different computers
here these computers are connected via
P2P Network which we will talk in our
upcoming videos for now just imagine
that these computers are connected with
each other okay and each of these
computers as you can see the that they
are actually holding blockchain so a is
holding a blockchain and exactly like
whatever a is holding like the exact
copy is hold by B Means A and B are
carrying the same blockchain c e and f
are also carrying the same blockchain
means all of these people are having the
exact copy of the blockchain okay so all
of these people are having the exact
copy of the blockchain
let's say a new block is created now how
this is created we will talk in our
upcoming videos just for now let's say
that a creates a new block okay now he
will add this block to his blockchain
now what will happen a will start
communicating this information to b c e
and f okay saying that okay now I have
created a block please see this blog
please verify and validate this block
whether this block is right or not so
what bcef will do they will start
verifying and validating this block
whether this block is a malicious block
or not or whether this block is a
suspicious block or not if this block is
a correct block what they will do is
they will simply add this block to their
blockchain if you will see right all of
these people have added this block
created by a to their blockchain and
this is how blockchain is distributed in
nature you can clearly see the block is
getting distributed all across the
network
and that's why we called blockchain uh
distributed immutable Ledger
so this is like a is holding a ledger a
notebook and a is Distributing this
notebook to all the people who are
connected with him okay
now what is transparent here so The
Ledger as you can see that ledger is
totally available with everyone right
whosoever is the part of this blockchain
network so The Ledger the transaction
that these Ledger will contain is
totally transparent to the public anyone
can see that transaction but there is a
catch here these transactions are in
encoded format so definitely people can
see the transaction that okay some one
has done some payment to someone but
nobody will know who that someone is
each and every data is included on the
blockchain so that nobody can read it
okay but the data is transparent in
nature everything is totally public
everyone can see everything but nobody
will able to decode everything okay and
that's why we call blockchain as a
distributed immutable Ledger which is
completely transparent hi now in this
video we are going to talk about the
different applications of blockchain
let's start so there are a lot of
applications of blockchain first
application of blockchain is product
tracking another application of
blockchain is smart contracts third
application of blockchain is Healthcare
System system fourth application of
blockchain is international wire
transfer and we are going to have a
closed lookup at all these applications
like how blockchain is actually being
used in all these different domains so
let's start with product tracking so
let's say you want to buy a coffee okay
so you went to the shop and you buy
bought this coffee
now according to this copy like
according to the packaging of this
coffee it claims that this coffee is uh
let's say hinted person pure coffee and
let's say this coffee is let's say for
example brought from Brazil okay just an
example
and you trusted this coffee package but
after some time you realize that okay no
this is not that coffee uh it is not the
Brazilian coffee like this coffee that I
have in my hand is a fake coffee means
this is completely you know false
advertising I will say
now how we can prevent from these type
of situation where we are buying
something
and how to know whether the product that
we are buying is actually a legitimate
legitimate product or not so for that
what we can do is we can use blockchain
now with the help of blockchain what we
can do is we can simply
track this product so this product let's
say this product has been tracked using
blockchain so this product will have a
barcode so you might have seen right
barcode in various shops now once you
will scan this product this product will
tell you each and every
thing this barcode actually tells you
each and everything about this copy copy
where it started like like you can
clearly see if you can see some of the
details are mentioned here like what is
the name of this coffee from which
country it is originated like what are
the different mode of transportation
like was done in order to bring this
coffee let's say from Brazil to India or
Brazil to USA so each and everything
will be mentioned in this
you know in this application now you
must be thinking like how it is
different from Amazon like Amazon also
does the same thing when we buy
something we have all the details but if
you will see Amazon so Amazon does not
provide you the details of a particular
product Amazon only provides you the
tracking ID like where your product is
where your product will be and all those
things right so your product is already
ready in the shelf and from that shelf
each and every movement of that product
is being tracked but what we are talking
here is we are talking about Complete
product tracking and how it is different
when it comes with blockchain because as
we talked about blockchain right
blockchain is a distributed immutable
ledger so once a transaction is recorded
on the blockchain no one can erase that
transaction so in the case of product
tracking once we have noted that okay
this project
was at this location on the blockchain
no one can erase that data from the
blockchain now this is the beauty of
blockchain and that's how it is used in
product tracking and you can also see
here that each and every information
about the product is being mentioned in
this application
now let's talk about another application
of blockchain and that is smart
contracts now this is one of the most
beautiful I will say applications of
blockchain so please be aware just be
alert here I will say so how smart
contracts are being used in blockchain
so first of all let me tell you one
thing that smart contracts are simply
programs that you write on blockchain so
like you have written program in C C
plus plus Java python or if you have
written in that case so just like these
programs right we have Smart contracts a
program written on blockchain simple as
that okay and if you still do not
understand what a smartphone net just
don't worry we you will understand it
after this example so let's say uh let's
take an example let's say there is a
person a he has a he has this food
delivery truck
and he delivers fruits okay so he's a
fruit supplier we can think of it AF
food supplier
and he does this food delivery to this
shopkeeper B okay so this is our
shopkeeper B who has a shop XYZ and once
he received these fruits from a b sell
these fruits to his customers now once
the delivery is done B pays some money
to a right this is how a business
transaction is done
but after some time B realizes that the
Apple sent by a are actually rotten so
now B is in loss he cannot use those
apple to sell his customer right because
if he will sell these apples to his
customers then their customers will be
highly disappointed in B because now the
fruits are rotten right
now what B can do in this type of
situation
now in this type of business transaction
for example what we can do is we can
install a smart contract okay we can
install a smart contract
and we are assuming that the temperature
to keep the fruits fresh is less than 30
degree celsius so this delivery truck
you can think of this delivery truck as
a refrigerated truck okay this track
this uh this container that you are
seeing right where delivery is written
it is actually a fridge okay we are just
assuming that this is a refrigerated
truck and the temperature in order to
keep these apples fruits apples fruits
apple fresh actually is less than 30
degrees Celsius okay so this is our
assumption
now let's write some logic to our smart
contract with our smart contracts are
nothing but programs right so we will
draw a flow chart here that if iot
directed a temperature greater than 30
degree celsius now what is this iot iot
is for now you can think of as
temperature detecting device so they
detect the temperature so we are
assuming that this iot is installed to
that container of the truck and if iot
is detecting a temperature of
degree less greater than 30 degree
celsius and this is not good for our
Foods right now if this happens in that
case we will definitely cancel the
delivery and we will not pay to a right
B will not pay to a in this scenario and
this is good if this is false if this
condition is false in that case
delivery will be done and B will be have
to pay to a means we cannot then deny
that I can I will not pay it away
because now I have received the fruits
and I do not want to pay today this is
not how this will be done when it will
come to Smart contracts
so this is how the logic of our smart
contracts will work and I think this is
a very good logic also now some of you
Ma some of you might be thinking that
how it is different from any other
program because you know we write
programs in C C plus plus Java how it is
different from any other program what is
so special about smart contracts
the special thing about smart contracts
is that smart contracts are actually
immutable in nature just like blockchain
you cannot erase the data from
blockchain right so this is smart
contract will be deployed to the
blockchain and you cannot change
anything from the smart contract once it
is deployed to the blockchain now this
is one of the beauty of smart contracts
means once this logic is written no one
can erase this logic first thing second
thing with the smart contract is that
you do not require any human
intervention means when I am saying that
if the temperature is greater is greater
than 30 degree celsius the if this
condition is let's say false then we are
transferring money to a right so in this
case money will be actually
cryptocurrency so these cryptocurrencies
will be transferred from Smart contract
balance to A's account now this is
something very I think a little bit
complicated to explain currently because
currently we are just progressing
towards our blockchain course for now
just assume that smart contract as
acting as a bank where some
cryptocurrency is deposited if this
condition will be false in that case
cryptocurrencies from a smart contract
account will be deducted and will be
transferred to a and who has transferred
this cryptocurrencies to Smart contract
account and that that is actually being
done by D okay and we will see this in
more detail in our smart contract module
but for now I think this makes sense to
you also right
so this is also one of the applications
of blockchain now let's see the third
application of blockchain that is in
international wire transfer so let's say
you want to send some money to one of
your friend okay so you went to your
bank sender bank and you want to
transfer some money to your friend
but in order to transfer this money to
your friend which let's say lives in USA
let's say you are living in India and
you want to transfer this money to USA
this transfer of money cannot be
directly done to USA means if this is a
Bank of India you cannot transfer this
money directly to USA so let's say if
this is our bank in USA this is our
receiver bank because your friend is in
USA you cannot transfer this money
directly to this Bank there will be so
many banks in the middle of this change
between the sender bank and between the
receiver Bank
now the problem with this approach is
you have to pay a huge amount of
commission to these banks in order to do
a international transaction so let's say
and this International transaction uh
fees can be around 10 to 25 percent just
it can be 10 to 25 percent so let's say
if you are sending one thousand dollars
to your friend for example one thousand
dollar to your friend in that case if
the uh percentage is let's say 10
percent then hundred dollars will be
deducted and your friend will only
receive nine hundred dollars and the
reason is because there are so many
banks involved here so they charge some
commission now this is a very heavy
commission right now if you are going to
use blockchain in this case yeah and one
more thing yes one more thing that this
process can be a slow process it can
take two or three days definitely it can
be less than that but it can take up to
seven days also seven to ten days also
because let's say there are banks that
are involved Within These two blanks
they are slow they are working very
slowly in that case definitely your
transaction will take a huge amount of
time and then your friend let's say
might receive the money after 10 days of
the transactions
you know this is a very slow process
right so what you can do is instead of
this instead of going like this what you
can do is you can do transaction on
blockchain now transactions on
blockchain are very fast it took around
let's say you are doing some
International transaction it will take
around some minutes and your
transactions will be done and top of
that that transaction fees will be very
less so that's also one of the beauty of
blockchain so we have cryptocurrencies
which we will discuss in much more
detail in our cryptocurrency module so
cryptocurrencies these cryptocurrencies
you can transfer from one place to
another in so much time like in less
time and in so much less amount of
transaction fees now let us look at
fourth application of blockchain that is
in healthcare system
so normally uh let's say if there are
two hospitals in City a and CTB okay and
let's say uh you are born in City a so
all of your medical history is actually
stored in the database of City a right
so since you are born in City a so all
your medical history documents each and
everything is actually stored in the
database of your CTA Hospital right it
can happen
now the problem in this approach is that
let's say you went to City B for some
work okay and you met with an accident
now in that case what will happen in
that case City B does not have your
medical history now in order to fetch
your medical history they need to call
your parents or let's say they have to
talk to different hospitals because they
do not know you might definitely they
will not call to hospitals until they
will call to your family right so your
family will then go to the hospital of
City a and then they will fetch your
records medical history and then they
will provide to City B right because you
can have different type of diseases
let's say you might have some sugar or
some diabetes or let's say you have some
like you know life-threatening type of
disease now in that case City B needs to
check your medical history before before
doing any type of procedure or it might
be too late for you to survive from that
accident right
so this is a problematic thing right
so with the help of blockchain what we
can do is we can share this data
definitely do not think that blockchain
is a centralized database here this is
just for representation
what you can do is you can share your
information your medical history on the
blockchain and you can provide access to
anyone who wants to have a look on that
data so let's say you have a key and you
have locked that key on the blockchain
and the beauty of blockchain is that
once your data is there it is there so
it will not be erased or manipulated it
will always be there and let's say in
the case of prices you can transfer your
keys to uh let's say in this case City B
and CTB then can go and unlock your
medical history documents and can see
your data and can provide you a good I
will say good treatment right so that
you can recover fast
so this is also one of the applications
of blockchain and this is also getting
so much I will say popular and I think
in near future we are going to see this
a lot okay so we discussed four
applications of blockchain right in the
international wire system
Health Care System smart contracts and
product tracking right
but definitely there are various other
applications of blockchain and now this
is your homework okay you have to
comment below and you have to tell me
what are other applications of
blockchain okay you have to tell me like
what other places blockchain can be used
and let's other also know that what are
the other applications of blocks in and
I will be waiting for your homework so
please do not forget to do that okay now
let's talk about hashing algorithm
because this is the term you are going
to see a lot you will hear a lot when it
comes to blockchain so let's talk about
this
what is a hashing algorithm
so if I will show you a block of the
blockchain this is how a block of the
blockchain of a blockchain looks like so
we can see that these are the different
blocks connected with each other and
this single block looks something like
this definitely there are various other
fields also but for demo purposes I am
considering four fields for now that is
block number like at which number this
block is present so if you will see that
in this case this is block number one
block number two block number three then
we have data data means transaction so
let's say if a is doing some transaction
to B that transaction will be noted here
if C is doing some transaction to D that
transaction will be rotate here so each
and every data is present in this data
field then we have this previous hash
which we will talk in our upcoming
slides and then we have this hash okay
now this is very important what is this
hash all about uh right zero zero zero
some alpha numeric characters you can
see on your screen but what is the
meaning of this alphanumeric characters
so this hash that you are seeing here is
actually
a unique identifier
to this block of the blockchain okay so
this is a unique identifier to this
block of the blockchain what do I mean
by that so every human being has a
fingerprint right and this fingerprint
is a unique fingerprint so no two human
beings can have a same type of
fingerprint okay I know this is
according to science okay so just don't
believe if you do not believe me just
search on it and you will see a lot of
scientific researches on this that no
human being can have identical uh thumb
Impressions or you know impressions of
your of your fingers and all
and the same thing happens in case of a
block of the blockchain so this hash act
as a unique identifier to this block of
the block shape so let's say
it is like giving a name to a block okay
so this is like a name given to this
block and with the help of this name I
can identify this block now why do we
need this identifier you will understand
it just uh in just up in our upcoming
slides and upcoming videos so just don't
worry about it
so this hash is acting as a fingerprint
to this block okay so this hash is
acting as a fingerprint to this block
and how this hash is actually being
generated like how do we how do we get
this hash so for hashing what we use is
a hashing algorithm so this sha-256 is a
hashing algorithm we have other hashing
algorithms also like we have kcat 256 we
have sha 512 nd5 there are various
hashing algorithms but in case of
blockchain most of the time we use
sha-256 algorithm okay now when we give
some input to this sha 256 algorithm
that input can be in document Audio
Video in any form this chart roof this
is algorithm convert this document audio
video Etc anything in a 64 digit
hexadecimal characters okay so if you
will calculate there are 64 characters
here okay and you have to trust me on
this or you can read this also it's up
to you
and why it is called sha 256 because
there are 64 hexadecimal characters one
hexadecimal character is of 4 bits and
that's how we have this 256 bits okay so
one character one hexadecimal character
is of four bits and each character is of
since there are 64 characters so 64 into
4 we have 256 bits okay what are
hexadecimal characters just searched on
Google you will easily find hexadecimal
characters just like an angular system
like that like we have a decimal number
system from 0 to 9 in the same way we
have hexadecimal number from 0 to F okay
that's why you are seeing these letters
coming up here okay
now in case of a blockchain what are the
inputs because as we have seen right
these These are the inputs to this chart
of D6 algorithm and that's how this is
actually being you know
generated now in case of blockchain what
are the inputs so in case of blockchain
these different fields that you are
seeing on the screen act as a input and
these inputs are giving to this chart
with Basics algorithm and this chart of
this x algorithm then produces this hash
and remember one thing this is a very
important point chart of physics
algorithm always and always produce a
unique identifier unique hash okay there
will be never a time where for two
different input you will have a same
hash okay remember this thing now let me
demonstrate you this chart with this
algorithm because I know many of you
might still be confused let me
demonstrate this in real life so here we
are on this side
just uh just type shot 256 generator and
you will be on this side and in this
side you can clearly see that we have an
input and this is our output let's say I
have written something let's say I have
written H so as you can see that as I
have written this H you can see that we
have a hash of 64 hexadecimal characters
and one important point that you should
notice here is a small change in the
hash not in this hash actually in a
small change in the input will
completely create like completely change
this hash there will be a totally random
hash which has nothing to do with this
Edge like let me show you let if I let's
say I have written a here now you can
see that this hash generated in the
previous case these two hashes are
completely different from each other now
this is one of the beauty of sharp
dresses algorithm because this is very
important characteristics of a good
hashing algorithm like for each and
every input we should have a entirely
different hash okay so let's say if I
have written anything I am writing
anything here you can see that never
ever never ever it is producing more
than 64 hexadecimal characters
whatsoever I'm putting here okay so this
is how short of this x algorithm works
and in case of blockchain as I said we
have the different input fields and we
use these input reports as an input to
this chart with physics helicopter
now definitely you might be thinking
like why I'm using the like why I'm
using nine characters here this is just
for demonstration purpose because I if I
am going to write the 64 hexadecimal
character it will be a large digit right
so for demonstration purpose I'm going
to use nine characters only but in
actuality remember sha256 produces 64
hexadecimal characters
now let's talk about some
characteristics of this hashing
algorithm because I know this is also
one of the important questions like not
question doubts like uh how like what
are you know what how what make this
chart of physics algorithm a good
algorithm why we are using chart of
disease algorithm why we are not using
any other algorithm so let's talk about
some of the good characteristics of us
hashing algorithm
so the final requirements that every
hashing algorithm must fulfill first is
that it should always be one way means
let's say you are giving a data to this
start to Basics algorithm and this data
is now converted into a encrypted data
because the hash that you are seeing on
your screen is actually working as an
encrypt editor right I'm writing H A or
something here and it is producing some
encrypted data of that
now the good hashing algorithm will
never
give back the data means you can produce
you can go from this data point to
encrypted data point means you can go
from this to this but you cannot go back
from encrypted to this means you can
generate let's say a hash from a given
input but from a given hash you cannot
generate the same input back so this is
one of the key requirement of a hashing
algorithm another thing is it is
deterministic deterministic means that
it always for every single input it is
going to give you the exact hashing hash
means let's say for one two three it is
producing producing some hash def so it
will always and always produce this def
whatsoever be the case if the inputs are
fixed means for
uh for you you will never see a
situation that for a single input you
are having two different hashes okay you
will always have the same hash when you
are giving when you are going to give
the same input so this is also one of
the beauty of this hashing algorithms so
ABC so let's say yeah I have given
example also ABC produces the hash of
845 so always and always ABC will
produce the same hash it will never
produce 849 or 948 okay third thing is
it should be fast definitely it should
be fast otherwise it will take if it is
taking a lot of time just for producing
these hashes then it will be a time
taking process right
now what do I mean by with the sand
Collision means uh it should be very
difficult it should be very difficult I
think I will say exponentially difficult
to have the same in to have the same
hash for the two input means it should
never happen the probability of
happening that we have two inputs two
different input and these two inputs are
producing the same hash it should be
very very very less it should never
happen that two inputs are actually
producing the same hash okay so it
should withstand collisions and last
that there should be a Avalanche effect
if launch effect what do I mean by that
as we have seen in our uh chart 236
generator right calculator you you might
have seen that even I am changing a
small alphabet there there is a complete
new hash for H we were having a
different hash for H A we were having a
complete new hash right now that is what
we call Avalanche effect so that each
and every time you are even if you are
making a single change in the input you
will get a complete pretty different
hash okay hi now in this video we are
going to see how actually blockchain is
formed using hashing algorithm so in the
previous video we talked about hashing
algorithm right sha-256 hashing
algorithm where we discuss that for each
block we have a unique hash right now
let us understand how a chain is formed
between two block of the blockchain so
let's say we have two blocks here
this block in green and this block in
blue so this is block number one and
this is block number two right and this
block has this hash of this like zero
zero zero d8c42 and this block is having
a hash of zero zero zero three four five
uh three a four five nine right so this
is the identity of this block and this
is the identity of this block
now how these two blocks will be linked
together so that they can form a
blockchain right because as we discussed
in our blockchain video that blockchain
is nothing but it is a chain of blocks
so now we have two blocks let's see how
they are connected with each other so
now let us see how these two blocks are
linked together
so here you can also see that we have
one more field that is a previous hash
in block number one as well as in block
number two for block number one previous
hash is zero zero okay why because this
is for the Genesis block since this is
the first block of our blockchain so we
call this block as a Genesis block and
in this previous hashes nothing okay but
in this case in block number two this
block number two also have this previous
hash feed now this previous hash of this
block number two will consist of the
hash of this block number one so if you
will see it is zero zero zero zero d8c42
and this is also zero zero zero d8c42 so
with the help of this hash of block
number one this block number two is able
to identify block number one by having
the hash of block number one in its
previous hash okay and I think this
makes sense because this is a unique
attitude to this block so this is like
this block number two is calling this
block and that's that's why we have this
link now let's see if a block number
three is created in that case this block
number three will have a previous hash
equal to the hash of block number two
and with the help of which block number
three will be able to identify block
number two and there will be a link
between these two blocks and this is how
a blockchain is formed in in a
blockchain system I will say and this is
our Genesis block as I said
hi now in this video we are going to
talk about why blockchain is immutable
definitely when we discussed about the
definition of blockchain we discussed
that blockchain is a distributed
immutable Ledger right now let us see
why blockchain is immutable with the
help of an example so let's say this is
you okay who wants to buy a house okay
now in order to buy this house
definitely you require money as well as
you need to sign a contract with the
party with the with whom you are buying
this house right so let's say this is
this house is belonging to party B and
now you want to buy this house from this
party B so you need to sign a contract
right and now you will take this sales
deed contract and present it to the
government so you will go to the
government officials saying that okay
this is a contract that I have signed
with party B and now this house this
house title belongs to me title means
for now you can think of it as the name
of this house for now just take uh just
assume that title is the name of the
house and you are saying that okay now
this house belongs to me since I have
given party B this money and now I have
all the documentations and everything so
now this house belongs to me so you will
present this these facts to the uh these
contract on facts actually you will
present this contract to the government
institution now after receiving this
information institution the government
institution will record all the
important information over a file over a
register or they can also use a
centralized database means they can also
use computer in order to so in order to
store all the information related to
your uh related to your contract related
to your title of the house
now the problem with this approach is
that anyone can change record of this
register right because this resistor is
nothing but uh government institution
has just written some uh data on a paper
so now anybody can change the record in
this register if we talk about
centralized database definitely in
centralized database since database is
centralized in nature anybody any hacker
can also make changes to this
centralized database or
the government of
or if the government is corrupted in
that case they can also make changes to
this centralized database and once this
is done you will be in trouble right
because this file this file is actually
stating that this house belongs to you
but if someone is changing the fact
someone is changing the information in
this file in that case this house will
not belong to you and there are so many
cases that has happened before and and
still these type of things occur where
the person who has bought this house has
no authority over the house just because
there was some mistakes given or there
was some changes in the government
documentation so you do not want to lead
up in such type of trouble right because
if you will if you will be in such type
of situation then your situation will be
like this right because you have
invested so much money in your house
so in order to prevent from this
situation what we can do is we can use
blockchain which is an immutable Ledger
so let's say uh this transaction this
data that you are buying this house is
stored on blockchain so this data is
stored on let's say Block C okay
and now someone hacked this Block C
because we are assuming that okay
blockchain can also we have someone is
trying to manipulate the data means
manipulate the data that this house
belongs to you in this Block C so this
hacker is trying to manipulate this
Block C since this Block C is containing
the data that the house belongs to you
now if the hacker will try to hack this
block trying to change this block data
the blocks that are after C will also
get affected why it's very simple if you
have watched my previous video where
where I discussed that the new block
consists of
the hash of the previous block right so
this D will consist of the hash of Block
C in its previous hash field similarly
for E and F right so once this block
will get corrupted the data in D E F
will also get corrupted right and if you
do not remember let me show you the
presentation from our previous slide so
here you can see that that this is our
block number let's let's assume that
this is our block number D this is not
this is a block number c someone is
trying to change the data in block
number c and if let's say someone is
trying to change the data in block
number c then the hash of this block
will change why because these different
fields are being used in order to get
this hash right and this also we have
discussed in the short V6 algorithm
video so this hash will get changed and
since this hash will get changed the
this this block number two that is our d
block is also having the hash of this
block right so if this will change then
this will change and since this will
change the hash of this will change and
since the hash here will change then
definitely again you can see the uh
domino effect here right now the
previous hash of this will change and
the hash will change so in this way the
all the blocks that are coming after C
will get changed and by this the network
the distributed network of blockchain
will know that there is some issue with
the blockchain as we discussed also this
right that our blockchain is our
distributed immutable ledger so if we
are assuming that this is our blockchain
okay this is our P2P network of
blockchain we will discuss about PTP
Network in our upcoming video but for
now this is our P2P Network right
and here you can see that this block is
getting affected now once this block
will get affected the people this this
block will also get affected and the
people who has the correct copy of the
blockchain will get to know that there
are some issue with the blockchain of a
and what they will do is they will
correct these changes because they have
the correct copy of the blockchain okay
and this is why blockchain is immutable
in nature right so this is why
blockchain is immutable in nature
because if you are going to change any
block this change in one block will
affect the rest of the blocks now some
of you might be thinking that what will
happen if someone tries to change the
first block right and we will talk about
this case also in our upcoming videos so
don't worry about it and yeah this first
and last block calls right so don't
worry about it we are going to talk
about this in our upcoming video because
this is a concept which is not not which
is not the part of this video but now
for now you have must have understood if
someone tries to change the data of
middle of the block or the blocks that
are coming in between some blocks in
that case how immutability will take
place in blockchain hi now in this video
we are going to talk about P2P Network
now this is a term that I am using a lot
so let us understand P2P Network and in
order to understand P2P Network let us
first understand what is a centralized
Network and how it works okay so in a
centralized Network we have two parties
one is server and another one are
clients so as the name suggests by the
server server is a one who serves the
client okay and this server is actually
holding all the data so you can
understand this with the help of an
example uh that YouTube is a company
that has its own server which on This
Server all the videos are stored okay
and when someone wants that video when
someone wants that data they request
from YouTube server and then YouTube
server provide them with that data now
in the case of this like if you will see
this diagram this picture that is
appearing on your screen now in case of
this you as you can see that this server
is holding some data right and let's say
this client wants this data from the
server okay so what this client will do
they this client will actually request
from this server that okay I need this
data that you are having and then server
will responds to this client with that
data now this is how a centralized
network works okay let's say if this
client wants some data it will request
from the server and then the server will
respond with the data that the client
has requested and in the same way other
clients also can do that now the problem
with this approach is that if someone
hacks the server
then this data
will get manipulated right because the
someone is hacking the server and let's
say uh the hacker made some changes to
the data now in this case if a client
requests data from the server in that
case the client will have this
manipulated data right so the data will
not be a right data so the client will
be getting some manipulated data so this
type of situation we do not want right
some of the let's say it's some it is
something very important to us it is a
very important file and now we are
getting some corrupted data just because
a hacker has a hacked this particular
server so what we can do is we can use a
P2P Network now what is a P2P Network so
in a P2P Network we have peers okay PE
stands for peers so this is a p
peer-to-peer Network now in a
peer-to-peer Network there is no server
there is no client okay everyone is at
equal position so anyone in this whole
network can share data and anyone from
this Network can request for a data okay
so each and every one is at same level
there is no server there is no client
each of them are or you can think like
this also that each of them are server
and each of them are clients also okay
so let's say and now a wants that data
from B so a can request that data from p
and in let's say another case that e
wants the data from a so e can also
request the data from a right so in this
way P2P network works right it's a very
simple process anyone from this uh P2P
Network can request data anyone anyone
from this network can produce data so
there is no client server there is
nothing like that okay each and everyone
are e at equal level okay so this is
what P2P Network looks like and this is
how blockchain network is formed where
each and everyone is having the exact
copy of the blockchain and each of these
people can talk to each other via P2P
Network now let us also see that how P2P
Network distributed P2P network works in
blockchain also okay so this is our P2P
Network in our blockchain and let's say
a block is added at is end okay so a has
created a block how it is created we
will talk about in our upcoming videos
but let's say a has created this block
okay now once a has created this block a
will send this information to its
peers okay which are b e and f in this
case so a will transfer this information
to b e and f saying that okay I have
created this block
now once this is done b e and f will add
this block after verifying and
validating whether the block is correct
or not if the block is correct then they
will add this block to their blockchain
now after this b e and f will transfer
the same information to C saying that
okay we have a block that is created by
a can you check whether it is right or
not so c will take this block he will
also verify and validate this block and
if this block is correct then C will
also add this block to its blockchain
and this is how P2P network works in a
blockchain right because each and every
one can talk to each other each and
every one are at equal level so each
people can talk to each other in our P2P
Network
now you must be thinking why do we India
why do we need a distributed P2P Network
in blockchain so as we have discussed in
our immutable Ledger video right if
someone tries to manipulate a data so
all the data will get corrupted right
all the blogs that are coming after that
particular block will get corrupted so
we have discussed about this right and
to convey this information what we need
is a P2P Network okay I have this text
here right so I have removed that so now
let's say if a block is get corrupted in
one of the blockchain okay so let's say
a hacker has hacked a system and now he
has manipulated the this block of the
blockchain now this information will be
transferred via P2P Network only okay
and you can also see that once this
block is get corrupted all the remaining
blocks or the blocks that are coming
after this block also get corrupted
because of the hashing thing right
now this information will be transferred
to b e and f d e and f will check okay
now the block that is the block that a
is having and the blocks that we are
having are different blocks so what they
will do is instead of adding this block
to their blockchain they will correct
the block of a saying that a you are
having a wrong block let me correct this
block okay so this is how P2P network is
very essential in order to maintain this
immutability in our blockchain Network
okay so I hope now in this video we are
going to talk about a very interesting
topic that is blockchain mining
now this is one of the most interesting
topic of mine also let us see this and
in this video we are going to just see
an overview in our upcoming videos we
are going to see a detailed uh video
about blockchain mining like how
actually it is done but for now let us
see an overview and trust me you will
love it okay so let's say uh someone is
doing or let's say you are doing some
Bitcoin transaction okay so you are
doing some Bitcoin transaction
now this Bitcoin transaction will go to
a pool of miners okay we have pool of
miners here pool when I'm saying pool
means there are so many miners uh
present in our blockchain Network okay
so once they will see the okay the
transaction is done they will take this
transaction
and they will try to add this
transaction
on a block of the blockchain okay and
the block can have multiple transactions
or thousands of transaction or depends
upon the depends upon blockchain to
blockchain but let's say for Simplicity
that in this blockchain a block can have
only one transaction but a block of a
blockchain can have multiple in for the
Simplicity of this uh video I'm going to
say that uh block can consist of only
one transaction so once the miner will
see that okay a transaction is done so
they will see this transaction and they
will start solving a mathematical
problem why they will solve this
mathematical problem they will solve
they will start solving this
mathematical problem so that they can
add this transaction on the blockchain
okay so that's why they will start
solving the mathematical problem
now The Miner who will solve this
mathematical problem first okay because
there are so many minors and let's say
one of these minor let's say this minor
has solved this mathematical problem
first
now once he will solve this mathematical
problem first he will be able to create
a block having this transaction okay and
after this process means after this
block is created
this block will be verified and
validated by other set of miners mean
others that means that the my this Miner
will not be a part of this verification
and validation but all the other miners
will start verifying and validating this
block whether the block created by this
Miner is a correct block or not okay
whether this blog is not this block is
not a many is this block is a malicious
block or not okay
if this block is a malicious block then
they will reject this block and they
will not add this block to their
blockchain and hence again the process
of mathematical problem will start means
again the miners will start solving the
mathematical problem so that they can
add this transaction but if this block
is correct if this block has no issues
in that case what they will do they will
add this block to the blockchain to
their blockchain we have seen this also
in our distributed video right where we
talked about blockchain they will add
this block to their blockchain and the
miner who has solved this mathematical
problem first will be rewarded with some
cryptocurrencies okay and this block
will be added to the blockchain and this
is how the whole mining process works
now you must be having questions right
like who can be the miner anybody can be
the miner okay you just need to solve
you just need to install a software
let's see if we talk about blockchain
Bitcoin client once you will install
this software you you will have an
option in order to like you will have an
option to be a minor thing okay and uh
let me tell you one thing more that
verification and validation is not just
done by the miners verification and
validation is also done by all the nodes
okay there are other systems also apart
from Miner who are just doing
transactions who are just part of that
blockchain Network they will also they
can also verify and validate your
transactions so only miners are not
verifying and validating other nodes set
up that are connected to this blockchain
network also verify and validate this
transaction okay
this blog what do I mean by that okay so
this is how blockchain network is this
is how actually blockchain mining is
that not blockchain network but this is
how blockchain mining is done now what
is this mathematical problem you this
can also be one of your question and
don't worry we are going to talk about
this in our upcoming videos where we are
I'm going to talk about nonce which is a
very important topic uh which is a topic
that you will face a lot in your
interviews also so we will discuss about
that in our nonce video but for now I
hope this is very much Clear what is
blockchain mining and how it is done hi
now let us talk about a very important
problem in our distributed Network that
is byzantines General problem
now in a Byzantine journalist problem
let us understand this with the help of
a story okay this is very important
problem you must understand this problem
so this is our Byzantine Kingdom okay
our beautiful Byzantine Kingdom
and there are four Army generals of some
different Kingdom okay and these are
like these four Army generals belong to
the same Kingdom and they want to attack
on this Byzantine okay they want to
attack on this Byzantine they want to
take over this Kingdom
now in order to attack on this Byzantine
and in order to win this Kingdom because
Byzantine definitely will also have its
Army right so in order to win from
Byzantine
they need to be attacking at the same
time means majority of these generals
need to attack at the same time in order
to win over Byzantine okay
and we are we are assuming that we are
assuming that all these Army generals
are at different locations so let's say
this Army journal with its Army is at
North this is at South West and East
okay so all these Army generals with
their army are at different location
now definitely since they have to attack
at the same time they need to
communicate with each other right then
only they can attack at the same time
when they have the information that okay
this Army General is going to attack now
we can also planning let's plan to
attack right so they need to communicate
with each other but the problem is that
they are at different places
so what they will do so they will send
their messenger saying that whether to
attack at this point of time and or
whether not to attack at this point of
time so let's say this Army General okay
send this information to the other rest
of the army General that okay this is
the best time to attack on Byzantine I
think this is the best time let us
attack on Byzantine now the same thing
will be done by the rest of the army
generals they will also send their
Messengers they allow this Army General
has sent this information okay this is
the best time let us track on Byzantine
uh present time uh Byzantine Kingdom
okay other kingdoms will also like other
kingdoms not other Kingdom other Army
journals will also send this information
and this Army General will also send
this information via their messenger
that okay let us attack on Byzantine and
this is an ideal situation and if this
will happen then definitely they will
win Byzantine Kingdom because now they
are attacking at the same time majority
of them are attacking at the same time
so definitely they are going to win in
Byzantine Kingdom right
but what will happen if one of these if
one of these Army generals is a traitor
right this can also happen that this is
a traitor now this will be a problematic
situation why because the stateral
trader will give wrong information right
so let's say that all these Army
generals are saying that to attack is
the best like this is the best time to
attack on Byzantine because they will
win over byzant time if they will attack
at the same time at this particular time
but this since this Army General is a
traitor he is sending false information
to the rest of the generals that okay no
this is not the best time to attack
let's not attack at this point of time
because he's a traitor even though this
is the best time to attack he will say
that do not lets do not attack or at
this point of time
so what will happen in this case now in
this case
these Army generals will go for the
majority of the votes okay so this Army
General will see that okay what is in
majority to attack or not to attack and
he will see that okay this Army General
is saying to attack this Army General is
same to attack so and this is the only
Army General who's saying that this is
not the best time to attack so
definitely he will go with these two
Army Generals in the same way he will
also see that okay this is saying to
attack this is saying to attack but this
is saying not to attack so let's go with
these two people since these two people
are in majority in the same way he will
see that these two people are a majority
and they will attack and they will win
over Byzantine once again now why I am
telling you this story because this
story is if you will relate it to our
distributed Network where distributed
Network are present at different
location and they need to verify a
particular set of information now in
order to verify a particular set of
information these distributed system
depends on the material Authority
and same goes for our blockchain network
blockchain network is also a distributed
P2P Network right we have also seen in
our we have seen in our previous video
right so in a distributed P2P Network
definitely there can be some Traders
there can be some hackers who will send
you some wrong information so in that
case our distributed P2P Network totally
depends upon the maturity
if the majority of the people are seeing
something we are going to assume that
that is correct if majority are saying
something that that like majority are
saying that okay this is not a correct
information we are going to assume that
this is the correct means we are going
to assume that the majority is correct
in this regard also so this is how
distributed P2P network works but now
definitely there is one problem now you
must be having this question in your
mind what if if majority of the people
are hackers what will happen in that
case like in this case definitely if you
will see
three-fourth of the people that is 75
percent of the people are correct right
50 75 percent of the people are the
right people
but only one-fourth means this traitor
is the person who was sending some wrong
information so India's in this case this
is correct but what will happen if 50
are seeing something and 50 are seeing
something what will happen in that case
in that case your distributed system
will fail yes this is the truth your
distributed system will fail but the
probability of happening that is very
low the probability of happening that is
very low because just uh just use your
common sense right here that how there
can be 50 hackers right how let's say if
there are lacks of people connected in a
blockchain network how there can be 50
000 hackers this is not a possibility
right only I think 10 000 of the people
will be hackers or let's say one
thousand people will be hackers right we
cannot see we cannot say that 50 000
people can be hackers because the
probability of having is low definitely
they it can happen in future but the
probabilities of happening is is very
low right so now I hope you understand
what is Byzantine General's problem
right and correspondence to our
distributed computing where distributed
computers distributed computers are all
over the network so in order to verify
and evaluate a particular information
they need to depend upon the majority
okay and this is the only solution to
our Byzantine General's problem now in
this video we are going to talk about
consensus protocol so let's start before
talking about consensus protocol let us
understand the concepts that we have
learned so far so we have talked about
hashing algorithm and its importance in
order to create a blockchain immutable
Ledger which protects our blockchain
from hackers miners who actually verify
validate create R blocks in the
blockchain and then distributed PTP
network with the help of which we
distribute our block all over the
network right
now what is the importance of consensus
protocol let us understand this
consensus protocol helps us in two ways
first in order to prevent attacks like
if some some hacker is trying to attack
our blockchain in that case it helps us
and then in competing chain problem
which we will see in the next video in
this video we are going to talk about
how it prevents attacks
so there are various type of consensus
protocol you might have heard these name
proof of work proof of stake and there
are others also like proof of concept
proof of history there are so many other
consensus protocol but in this video we
are going to mainly talk about our proof
of work consensus protocol okay
so let us understand this
so as we have discussed in our immutable
Ledger video If a hacker tries to
manipulate any Central block or any
middle block of a blockchain then all
the blocks after that block will get
affected right and by this these other
nodes that are part of this blockchain
network will be able to identify that
there is some mistake with this is
blockchain and they will correct it but
what will happen if
a is a hacker who is trying to add a
malicious block at the end of our
blockchain now in this case what will
happen because now there are no other
blocks right after this there are no
other blocks with the help of which we
can say that okay this block is not a
right one or is this block is not a
correct one because b c e and f you can
clearly see that they have only four
blocks while a has added this corrupted
block but bcef do not know whether this
block is a correct correct block or not
now how we can prevent from this type of
situation now in order to prevent from
this type of situation what we have is a
consensus protocol so before adding this
block this malicious block to their
blockchain like bcef in their blockchain
a consensus protocol is run this
consensus protocol makes sure that the
block that is being created by a is
correct or not so there is an algorithm
so you can see that this is this is some
part of the algorithm there are
definitely it is a three to four
documents long algorithm but I'm just
showing you some part of it so this is a
consensus protocol that runs whenever a
new block is added to the blockchain in
this consensual protocol the person who
is adding a block he has to present a
proof he has to present a proof that the
block that I am adding is a correct log
and that's why this algorithm is also
known as proof of all calcium in case of
Bitcoin because the person who is adding
this block he has to present a proof by
stating that okay I have worked on this
uh this block I have involved on this
blog in order to add it and to what is
what is that proof like let me tell you
that proof is uh like the amount of
energy this a is consuming in order to
create this block because in a proof of
work algorithm a lot of energy is
required a lot of power is required and
why this is so we will see in our
upcoming videos but a lot of energy is
required in order to create this block
so a will present a proof that okay I
have consumed this amount of energy I
have consumed this amount of you know
power in order to create this flow and
definitely there are other checks also
which will also run in order to verify
that the block that is being created by
a is a credit block or not now once this
is done then and then only this block
will be added to other nodes of the
blockchain
and then only a will be rewarded with a
cryptocurrency if this consensus
protocol this proof of work protocol
finds out that this block added by a is
not a current Block in that case it will
not be rewarded with any cryptocurrency
and a will be at loss because a has to
consume huge amount of energy let's say
he has a consumed use amount of energy
in order to create this malicious block
then he has to pay a huge amount of
electricity bill so a will be at loss so
this is how our consensus protocol Works
in order to have correct non-malicious
block okay so if a block is added at the
end of the blockchain also then also we
have mechanism to prevent from a block
which is malicious in nature now there
can be a question that verification and
validation like since this adding of
blockchain this is adding off a block in
a blockchain takes a lot of time okay it
takes around an average of 10 minutes
but does verification and validation
also take that amount of time because e
b c e f will also verify and validate
this blog right definitely consensual
protocol will run but also BCF will also
take measures in order to verify and
validate this block so is this
verification and validation is is this a
time taking process so no this is not a
Time tracking process creation of a
block is a time taking process but
verification and validation is a very
easy process it's like you are giving a
ux who like you have like I have given
you a problem you have to solve this
Rubik's Cube and anyone right anyone
from the network can identify that
whether this Rubik's Cube has been
solved in a correct way or not right you
can just look at this Rubik's Cube you
can turn around and you can see that
okay this Rubik's Cube is has been
solved in a correct way but to solve
this Rubik's Cube is our actually time
taking process and solving this Rubik's
Cube is like creating a block and to
identify whether this Rubik's Cube is a
correct one or not whether the Rubik's
Cube has been solved or not is
verification and validation which is a
very easy process as solving a Rubik's
Cube hi welcome to the second video of
consensus protocol in this consensus
protocol video we are going to talk
about the other use of consensus
protocol so in the previous video we
talked about prevent attacks how can
this is a protocol help us in preventing
attacks from the hackers now we are
going to talk about competing chain
problem let us understand this with the
help of an example so this is our
blockchain Network right and let us say
a
as well as C created a block at the same
time this type of thing can happen a can
pick a transaction okay so to become a
transaction there is a place called
mempool which we are going to talk about
in our upcoming videos but for now
mempool is an area from where a has
picked a transaction C has also picked
the transactions from the from this
mempool and they started solving a
mathematical problem and now they have
solved this mathematical problem at the
same time this type of thing can happen
because all these people are at
different part of the world and they are
competing with each other right so it
may happen that a has solved a
mathematical problem at the same time
when C has solved the mathematical
problem so now a is having a different
block and C is also having a different
block right now what will happen after
this after this evil and c will transfer
this information to its nearest nodes
right we can we we say the system at
nodes in blockchain terminology we call
these systems as nodes or you can say
system also but we call them as nodes in
a blockchain network so c will transfer
this information to B that okay I have
created a block a will transfer this
information to F and E that okay I have
created this orange block okay now like
why I am assuming that c is transferring
this information to B and not to E and F
we are assuming here we are assuming
here that uh for c b is the close B is
the closest node and for a f and E are
the closest node okay so that's why a is
able to transfer this information first
to F and E and C is able to transfer
this information first to B since C is
close to B okay so this is a assumption
we are taking here
now once this transfer of information
will be done then what will happen F and
E will create a block at their own end
means they will verify and will date
this block and they will see that okay
this block is good so they will add this
block to their blockchain in the same
way B will also verify and validate the
block of c and it will say okay it is
good so he will also add this block to
its blockchain okay so this is how our
blockchain network will look like
now the problem will arise is when b and
c will transfer this information that
they have a block purple color block and
a e and f should add this block to their
blockchain and AEF will also do the same
they will also this transfer this
information that they have created a
block they have added this Block Orange
block and they will want that B and C
should add this block to their
blockchain so information will it will
look something like this where B is
transferring this information to A and C
is transferring this information to E
and F where E and F are transferring the
same information to C B and all this is
how the transfer of information will
take place and this is not good because
now there is a conflict right so now
which blockchain block should be added
whether B will add the block of a e and
f that is orange block or whether a e
and f will add this purple block now the
question arises right now according to
our consensus protocol which so ever
network will have the longest blockchain
remember which so ever network will have
the longest blockchain that blockchain
will be adopted and the blockchain that
is having the short blockchain that
blockchain block will be discarded and
you will understand this with the help
of an example so just don't worry in
this case if you will see a enf are part
of a network right since they are close
to each other and they have the same
block so let's say that a e and f are
the part of our Network and B and C are
part of a different network
and we are assuming that each of these
systems that are present in our
blockchain Network have the same power
to solve the mathematical problem right
as we discussed in our mining video
right that all these people solve a
mathematical problem since they are
minors so we are assuming that each of
these systems that that is present here
that are present here are having the
same same power to solve the
mathematical problem okay
now since a e and f are a network and
they are in majority so they will have a
computational power of solving a
mathematical problem of three right
because one of this one of we are
assuming that uh this having a problem
this has the capability of you know
solving the mathematical problem of one
this is also having the mathematical
solving the mathematical problem
capability of one this is also having
one this is also having one this is also
having one so the whole network have the
capability like a e and f have the
capability to solve the mathematical
problem of three right in the same way b
and c will have uh the computational
problem to solve that mathematical
problem of two okay so definitely a e
and f are more powerful in in this case
right
so what AEF will do they will add
another block to their blockchain so in
this case we are assuming that e has
added e has created a block and E has
added this block to its blockchain now e
will transfer this information to a and
F and they will also add this block to
their blockchain now in this case if you
will see in this case if you will see
which of these which of these Network
have the longest chain so you can
clearly see that a e and f have the
longest chain right they have one two
three four five six blockchains means
six blocks in the blockchain while B and
C has have only five blocks in the
blockchain right
so as we discussed according to our
consensus protocol we will only respect
we will only consider the longest
blockchain and we will discard the
blocks of our small blockchain now in
this case since AEF has have the longest
blockchain so B and C blocks will be
discarded so the purple block that B and
C has created will be discarded so the
transaction that were present in BNC
blocks right in the purple blocks they
will be again transferred back to the
mempool okay mempool is an area where
all the transactions are kept so this
these transactions that are like these
blocks the transactions that are
discarded for now these blocks that are
discarded for now all the transactions
of these discarded block will be again
added back to the mempool so that again
mining can be done on them so that again
those transaction can be you know can be
processed in a block okay
so these blocks that you are seeing on
your screen these blocks are actually
called orphan block these are called
orphan block or you can say them as
discarded block now once these blocks
will be discarded BC will add the blocks
these orange blocks that are being at
that that are a part of this a e and f
Network so b and c will add these blocks
to their blockchain so that a
consistency among all the people of
these blockchain network of this
blockchain network can be maintained and
these blocks again as I said these
blocks will be called as orphan block
and these blocks will be discarded all
the transactions that were present in
these discarded block will be again
added to the mempool so that again those
transaction can be processed by the
miners in the next mining process okay
and this is how our
blockchain network will look like so
just remember always and always the
longest chain will win always the
longest chain will and the shortest
chain the block that the blockchain that
is having the short chain right in that
case the blocks will be discarded like
as we have seen in this case okay if you
are finding it a little bit complicated
just rewind back this video you will
understand it I guarantee you okay
so this is how our network will look
like a beautiful blockchain Network now
let us see some of the important points
related to our consensus protocol so the
consensus protocol of blockchain is much
better alternative to our Byzantine
fault tolerance what is a Byzantine
fault tolerance as we discussed in our
Byzantine a generous problem right in
our Byzantine General problem for that
General problem our solution was
proposed and that solution was this
Byzantine fault tolerance and for our
Byzantine fault tolerance the majority
of votes that we require is of 66
percent okay while in case of our
consensus protocol we only need majority
of 51 percent so our consensus protocol
is a much better alternative to our
Byzantine fault tolerance because fault
tolerance requires a majority of 66
percent vote while our consensus
protocol only requires 51 percent second
all the transaction in the open block
will be dropped as we have seen also
these transactions will again go back to
the member pool so that the miners can
again solve for it and the miner that
had mined the block right uh if you will
remember that c has created that purple
block right so that purple block was
discarded from the blockchain network so
for that she will not be getting any
type of reward because that block got
discarded from the blockchain network by
the consensus protocol so remember this
point also and third point is
for this type of situation if you might
have heard this thing that for for
whenever you do a Bitcoin transaction
you must wait for six block confirmation
and the reason for this is this only
that there can be conflicts in the
blockchain network so you do not want to
be the part of that conflict right let's
say a has transferred you some Bitcoin
okay now you are thinking that a has
done this transaction and now you will
be receiving the Bitcoin but after some
time the block that was having that
transaction got discarded from the
blockchain network because that block
was the orphan block right that block
was not a part of the longest thing so
it was discarded from the network in
that case you will not be getting any
like Bitcoin from a right so you must
wait for six block confirmation and then
and then only you should be you know
happy that okay now you have received
the transaction but we will talk about
like this six block confirmation more in
our upcoming videos this is just to give
you an you know overview of this that
why you should wait for six block
confirmation whenever you are doing any
Bitcoin transaction hi not only in this
video we are going to start with what is
bitcoin and why do we need it but let me
remind you that this is the starting of
our second module and that is
cryptocurrency so in the starting only I
told you right that we are going to
divide our course into three modules and
this is the starting of our second
module which we are going to start with
what is bitcoin and why do we need it so
let's start
so we are going to understand the
history of Bitcoin we are going to
understand why why do we need Bitcoin
what is the problem with our current
Financial system okay so let's start
with this
so all these things started in year 2008
when U.S economy was very bad nearly 9
million people lost their job and nearly
1.8 million small businesses got closed
and not only this Wall Street of USA
stock market of USA you can think of it
like that was on its knees
and the greatest Bank the biggest bank
of USA Lehman Brothers Bank are well a
billion dollar valuation bank got closed
during this period of time in USA and
you can understand the impact of that
situation by this picture where people
were revolting against the government
people were revolting against the banks
because they have lost all their savings
because they the people who are just
going to retire they have lost all their
retirement money people who were who
wants one who want who were saving for
their child education has lost all their
money child education money people who
are going to buy home they do not have
any money left in order to buy home so
situation was very very painful at that
point of time
now you must be thinking why all these
things were happening and the reason for
this is Banks the banks of USA because
of the foolishness of banks U.S economy
was in such a bad situation and not only
this
the U.S government was supporting this
foolishness of banks right U.S
government was supporting these
foolishness of Banks and now let us
understand what these Banks were
actually doing as you all know Banks
make profit by lending you money right
so when they lend you money they charge
interest on it and that's how they make
profit now in year 2008 or a year before
that
Banks started lending money to people
who were not capable enough to return
back the money
now you must think why they will do that
like what was the reason for doing that
and the reason was simple greed
according to banks at that point of time
they thought that if we are lending
money to someone they will repay back
who will not who is not going to repay
back the money so they were lending
money to people or anyone who was just
coming to the bank and asking for loans
and these type of loans are called
subprime loans means when you are
lending money to someone who is not
capable capable enough to return back to
return you back the money so since they
lended money to people who are not
capable enough to return back the money
so after some point of time bank started
going into loss and that simple right
because they have lended money to people
who will not who are not capable enough
to return back the money so they start
having losses
now to prevent situation like these the
U.S government start sending money to
these Banks just imagine because of the
foolishness of Bank all these things
started
and U.S government were not was not
punishing them but rewarding them with
money they were lending them money they
were giving them money so that the banks
can operate in a proper way now you must
be thinking what kind of just is that
because of the banks we were we the USA
was in that situation and U.S government
is supporting that and yes that's true
this is the true story and after this
incident a question was raised question
that can we trust stock Banks can we
trust our government when it comes to
money matters and the answer was clearly
no and do not think that this was the
first mistake or do not think that this
this was just a mistake which has which
just happened for the first time no this
this is not something which has happened
for the first time if you will look back
to the history you will see that a lot
of time these type of things has
happened in the history also where Banks
and government were doing something both
of them got greedy or something and they
start manipulate they started
manipulating the money situation of that
particular country of that particular
area and at that time only and at that
time only when situation was so worse
when everything was getting destroyed at
that time only Bitcoin was born and who
is the inventor of Bitcoin Satoshi
Nakamoto now nobody knows who Satoshi
Nakamoto is whether he's a person with
whether it is a team of person whether
he is a male or a female nobody knows
anything about sadoshi Nakamoto but he
is the inventor of Bitcoin
now what is bitcoin right we have
understood like like why like what is
the problem with our current Financial
system it is
it is under the control of our
centralized authorities like Banks or or
governments now let us understand what
is bitcoin how it is different from
these banks these garments because these
are the people who are actually
controlling the money the they they
control the supply of money they control
everything related to money let us
understand how Bitcoin is different from
these uh money right these currencies
actually Fiat currencies actually
Bitcoin is a decentralized digital
currency without a central bank or
single administrator that can be sent
from user to user on the peer-to-peer
Bitcoin Network without the need for
intermediaries
so if you will look at this Bitcoin it
is decentralized
cryptocurrency decentralized what do I
mean by decentralization it means that
nobody is controlling the Bitcoin there
is no single person who has a control
over Bitcoin it is a digital currency
okay so currently the currency that we
have is a fiat currency which is
controlled by the government it is a
digital currency it does not require any
Central Bank or any single administrator
and it can be sent over a P2P Network we
have talked about a P2P Network right so
it can be sent from one user to another
using a P2P Network and it does not
require any intermittarius
and it uses a technology called
blockchain and we will see the
difference between Bitcoin and
blockchain in an upcoming video so don't
worry about it but for now blockchain is
a technology that is being used by this
Bitcoin
this Bitcoin uh cryptocurrency okay
so this is how
for a Bitcoin like this is how a Bitcoin
Network looks like where people are
connected with each other uh it is a P2P
Network right where you can see that
people are connected with each other and
people can transact cryptocurrency with
each other it is a decentralized
distributed Network so know anybody who
wants to send money and who anybody who
wants to actually send Bitcoin receive
Bitcoin can can happen over this network
now the question next question that you
might have in your mind that if we talk
about our fiat currency fiat currency
trust is based on our government if the
government of a country is well then the
fiat currency is also good right if the
government is is in an unstable position
then the Fiat this VR currency will be
worthless okay and we will see the
example of this also in our upcoming
videos but for now just remember that
the trust of rpr currency is actually
based on our government
but when we talk about our Bitcoin
when we talk about our Bitcoin the trust
is on these algorithms these
mathematical problems with the help of
which this Bitcoin is actually built
and don't worry you do not need to learn
all those mathematical things there is
no mathematical problem to solve I know
many of you must be thinking oh no it
doesn't contain maths no it does not
contain maths just don't worry about it
I'm just trying to tell you here is that
Bitcoin uses mathematics okay
and yes if you want to learn more about
this financial situation of us in 2008
how Banks how this type of situation
arise in USA because of the foolishness
of banks I will recommend you this movie
this is a great movie all these actors
are great actors so you must watch this
movie if you want to learn more about
and there might be this question also
can this mathematical uh equation can be
wrong or algorithm can be wrong so let
me tell you like 2 plus 2 is equal to 4
right it does not matter whether you are
doing two plus two equal two plus two at
in USA in India or in Brazil whatever
place you choose it is always be going
to 4 right in the same way this
mathematical equation these algorithms
that are used in order to build this
Bitcoin Works 100 percent all time okay
so you are not trusting this no any
single person or something you are
actually trusting this equation this
algorithm and this equation the beauty
of this equation is that it is totally
available open source you can read about
it so it is not something which is
hidden from you you can go and just type
Bitcoin GitHub repository and you can
see all the source code available there
okay and it is not that it has just
started it is since 2008 a lot of people
has have already seen this open source
code but if you are thinking look I
cannot trust this so just go and type
Bitcoin GitHub repository and you will
you can find all the documentations all
the mathematical codes that are being
used in order to build this Bitcoin okay
and this is how Bitcoin ecosystem looks
like we have a miner who solves the
mathematical problem in order to create
a block we have nodes nodes means though
these are the people who are actually
transaction transacting means these are
the people who are sending Bitcoin from
one person to another so this is these
are called nodes okay so the system that
you see are actually nodes okay I'm just
representing it with these person but
definitely these are actually computers
only your computers or your lab laptops
are actually working as nodes are those
laptops can also work as miners also
it's all it all depends upon the like
what do you want to be so you have to
install a software Bitcoin client
software and then you can choose either
to be a miner or you can choose either
to be a node if you have become a node
you will be doing regular transaction
very fine and validation validation of
the blocks if you will become a miner
then you have to solve the mathematical
problem then we have large mines right
and we will talk about these large mines
which are actually using the whole like
a group of miners are there who is
solving the these mathematical problem
in order to create the plot and this is
the mining pool means where group of
miners are you know these group of
miners are working together in order to
solve so these large manners are
actually these mining pools only so they
form a mining pool in order to uh do
this
in order to solve this mathematical
problem in order to create a block so
when we talk about blockchain right
blockchain is actually a technology
as we have discussed in the definition
of blockchain network right not
blockchain Network in the definition of
blockchain where we talked about that
blockchain is a distributed immutable
Ledger right so this is the definition
of blockchain if it is a technology
well we when we talk about Bitcoin right
Bitcoin is actually a protocol slash
coin not only Bitcoin we have other
protocols also like waves we have
ethereum and definitely other Protocols
are also there and all these Protocols
are actually using blockchain as a
technology okay now what are these
protocols Protocols are basically rules
like if we talk about in our web 2 world
in our internet world we have different
set of protocols we have HTTP protocol
we have TCP protocol we have UDP
protocol so they are different protocols
which defines like how we are going to
communicate over the Internet how the
file transfer over the internet will
take place so each and every things is
actually being done on the internet
using these protocols in the same way
for our web 3 world for our blockchain
world we have these different set of
protocols which defines how people who
are connected to the blockchain network
are going to communicate with each other
how many cryptocurrencies they will be
like you know how like how minor will be
ordered with the cryptocurrencies how
mine are going to solve a mathematical
problem all these things are actually
rules which are implemented in this
protocols okay
so for example you can understand in
this in this way also that technology
when we say blockchain blockchain is
just like YouTube okay YouTube is a
platform right YouTube is a technology
on which we can have different set of
videos so these protocols that you are
seeing right these are like your videos
so you can have different varieties of
videos different set of protocols uh
like different varieties of videos over
the blocks over the YouTube in the same
way you can have different protocols on
this blockchain technology
now let us see this more with the help
of an example so we are on the site of
blockchain.com Explorer so here you can
see that we have different blocks of our
Bitcoin blockchain so this is using our
blockchain technology so let me click on
one of the blockchain so let me show you
this okay let me open this in new tab
let us see this okay so this is how our
block of our blockchain looks like we
are going to talk about in great detail
about this in our upcoming videos but
for now just have a look at it so this
is block number seven five two two three
five three okay and this is the hash as
we discussed our blog consists of a hash
this is the height this is the miner
which is unknown currently this is the
fee reward the amount the miners has
received after mining this block so you
can see that they are different set of
fields right and these are all the
transactions that are present in our
blog so as I said right a block can have
multiple transaction so all these things
are done via blockchain technology by
using blockchain technology now let us
have a look at Bitcoin protocol so this
is our Bitcoin protocol okay so this is
the GitHub repository and in this just
search for Bitcoin
uh Bitcoin GitHub just type Bitcoin
GitHub and you will have this repository
and inside this you will see the rules
and regulations are written about the
Bitcoin protocol for ethereum it is
ethereum uh protocol and for that there
can be different set of rules for
Bitcoin there are different set of rules
okay so you can see this a lot of files
are there right like chain dot CPP where
each and everything about how
transactions will be done on bitcoin how
people are going to communicate over
Bitcoin each and everything is present
in this Bitcoin protocol okay so this is
what uh Protocols are all about I hope
you understand about these protocols hi
let's talk about bitcoin's monetary
policy now before understanding what is
bitcoin's community policy let us
understand what is a monetary policy so
monetary policy is actually something
which is controlled by the government of
our country okay so let's say if we talk
about a government it is in government
control that how much supply of money
they want in the
country so government has a machine with
the help of which they can print money
right we all know that and how much
supply of money is needed in a country
is actually decided by the government of
our country so the total supply of money
is in the hand of our government right
so they can they can increase the supply
of money they can decrease the supply of
money it is all under the control of our
government and this is something not
very good and we will see that why it is
but for now I hope you understand what
is a monetary policy let us understand
bitcoin's monetary policy so Bitcoin
monetary policy has two things first the
halving and another thing is block
frequency let us understand these one by
one so what is hopping so according to
bitcoin monetary policy the Bitcoin
reward that is given to the miners will
get half after every four years so if
you will see in 2009 the reward was 50
new Bitcoin in 2012 it is 25 new Bitcoin
in 2016 is is 12.5 Bitcoin so for every
four years the reward is getting half of
the previous year right so 50 divided by
225 25 divided by 2 12.5 and 12.2 root 5
divided by 2 is 6.25 and not only this
the block number are also responsible so
for every 200 and I think two two lakh
now 2 lakh 10 000 block 2 lakh ten
thousand block you will see that uh the
Bitcoin reward system the rewarding
system that is given to the miners will
get half right so it is 2 lakh ten
thousand then it is 4 lakh ten thousand
so this is like this okay and after a
particular time that is after Bitcoin
has hit 21 million in total Supply at
that point of time Bitcoin will get
exhausted means the total supply of our
Bitcoin is only 21 million and it is
estimated that by 2140 we will reach
both at the at this number when we will
have 21 million Bitcoin in our supply in
our like in our Market okay and after
this point of time there will be no no
printing of Bitcoin you can think of or
no rewarding of Bitcoin to the miners
now you must be thinking if there will
be no reward for the miners right
because after 21 million there will be
no reward for the miners because no no
new Bitcoin will be rewarded so how
Miner will earn money
then Miner will earn money from our
transaction fee so whenever you do a
Bitcoin transaction apart from these
reports miners also get a transaction
fee commission okay so you provide them
a transaction fee so by that uh it is
estimated that by that point of time
there will be various people like there
will be many people who will be doing
these Bitcoin transaction and from that
transaction fee only bit the miners will
make profit okay now there must be this
question also that why there is a supply
of Supply cap of 21 million right why
not infinite number of Bitcoins and the
reason for it like the reason that I can
think of is that by limiting the supply
of Bitcoin
we are actually making the value of
Bitcoin more like gold silver these are
our precious metals and these are very
rare right these are very rare you
cannot print gold in your home you
cannot create a silver in your home in
the same way in the same way
the supply cap of Bitcoin is maintaining
this that this Rarity thing so that if
the supply of something just remember
this the simple economic principle that
if the supply of something is less than
the demand then the demand if the supply
of something is less than the demand
then the value of that thing increases
right
and in the case of Bitcoin I think
Satoshi was thinking that why not make
Bitcoin just like gold just like our
silver means let Bitcoin be rare in on
Earth means do not have infinite Bitcoin
just have rare amount of Bitcoin on on
our you know on our Earth okay
and if we do not have a supply then
situation like these this can also
happen so this is a 100 trillion dollars
note which is actually being used in
Zimbabwe just to buy some loaf of bread
yes this is true so what actually
happens you can read about this in much
more detail on Wikipedia that Zimbabwe
started printing money
at a much faster rate means the
president of Zimbabwe thought why not to
just equally distribute money to all the
people so that there is no gap between
rich and poor so he started printing
money so as he started printing money
the supply of money got increased but
the demand was not increasing at that
rate as Supply so due to which since
Supply was more and demand was not that
much the value of our currency the value
of Zimbabwe currency got decreased and
due to which we the due to which
Zimbabwe needed this 100 trillion
dollars note in order to just buy some
loaf operate and I think this is also
one of the reason that Bitcoin has a
limit of 21 million cap so that this
type of situation does not happen in the
future and second monetary policy of bro
of what Bitcoin is that on an average it
will take
10 minute to create a new blog okay so
if you are thinking that you can create
a block you know in just one second or
two seconds
it is not going to happen it will take
around an average of 10 minute in order
to create a new block so this is also
one of the monetary policy of Bitcoin
given in the Bitcoin algorithm and now
like who is deciding all these things
right who is deciding the block
frequency who is deciding this uh
halfing period each and everything is
actually being controlled by the Bitcoin
algorithm there is no Central Authority
who is controlling these like this thing
uh this is all done this is all done by
the Bitcoin algorithm and this is the
beauty of Bitcoin right there is no
Central Authority who is controlling all
these this is totally dependent upon how
the miners are uh mining Bitcoin or how
the people are actually using bit why
now in this video we are going to talk
about mining in much more detail so in
our previous videos we have talked about
mining right we have seen a very quick
overview of mining let me give you a
summary of that so people who haven't
watched that so they can get a overview
of that so in mining when we do a simple
transaction that transaction go to the
spool of Miners and these miners start
solving a mathematical problem The Miner
who solved this mathematical problem
first gets the ability to create a block
okay and after this block is created
this block goes to the these these set
of minus the ones again so that they can
verify and validate this block whether
this block is a malicious block or not
and once they find that okay this block
is not a malicious block they add the
add this block to their blockchain and
this Miner who has solved this
mathematical problem first get rewarded
and the block is added to the blockchain
so this was this was just quick overview
of blockchain mining I hope you have
watched the previous video of blockchain
mining where I have discussed about this
in much more detail now let us
understand this mathematical problem
what is this mathematical problem what
miners are actually solving for like
whether this mathematical problem is
algebraic mathematical problem calculus
mathematical problem or integration
mathematical problem just joking how all
these things are not there but yes let
us understand what type of mathematical
problem are these minors are actually
solving for
now to understand this we have to
understand a new field that is called
nonce so till now we have talked about
block number data previous hash and hash
right but there is also a new field that
is called nonce now
if you will see these different fields
right this block number uh we will talk
about this hidden field this data
previous hash so these were the fields
that we give to our chart of physics
algorithm and this chart if it is a cell
bottom then produces a hash
now if you will look at these fields
block number data and previous hash all
these fields are actually fixed appeals
what do I mean by fix means the miner if
you are a miner you cannot change
anything inside this block number right
because block number is something which
is given by the algorithm right so if
block number five is created after that
block number six will be created so you
cannot say that okay after block number
five I want to create a block number
seven so this cannot be possible you
cannot change the data right you cannot
change the transaction if a is doing
some transaction to B you cannot say
that no C is doing some transaction to B
so you cannot change the date of a block
you cannot change the previous hash as
well because previous has actually
depends upon the previous block right so
because previous hash contained the hash
of the previous block so this can all
this can also not be changed right so
all these fields are fixed we cannot
change them but miners require a field
which they can change so that they can
solve this mathematical problem which we
will discuss in an Optimum video but to
solve this mathematical problem they
need a feel and that field is nulls now
nonce is something which gives power to
the miners so that they can solve that
mathematical problem which we are going
to talk about okay now as I said block
number data cannot be changed previous
hash cannot be changed but nonce is a
number which we can change and if we can
change the nodes we can also change the
output of our chart with X algorithm
right because as we have as we have
discussed about chart of physics
algorithm as we change the input the
output of chart of this x algorithm also
gets changed right
so let's say this is these are some
fields that are given in our blog some
fixed field given in our blog block
number six some data some transaction
some previous hash okay now if I have to
generate this hash if I have to generate
the chart definitely I have to give all
these fields to the chart of physics
algorithm right so let's say if the
nonce is 23 and then we have a hash of
this zero zero zero zero one b a 1. now
since these fields are fixed and let's
say if I want to change the hash what I
will do I will change the notes so as
soon as I will change the nodes you can
see that we have a different hash if I
will change the nouns to 3 so I have a
different hash I cannot change the
remaining fees but I can change the non
so I am changing it so that I can have a
different Dash and why we are doing this
you will understand let us do it
practically also so this is a website
demo blockchain.org block if you will
come to this website and let's say I
have some data let's say a is sending
5 Bitcoin to B definitely this is how
this is not how transaction actually are
there in the black blockchain but just
for Simplicity I'm doing this okay so
now as you can see that as soon as I
have changed the data we have a
different type of hash right if I will
remove this let me remove this so you
will see that this is a different kind
of hash if I am having some data we have
a different kind of hash and as soon as
I am changing the data we have this
color of the block gets pink right now
why it is pink because this is not the
correct nonce for this block okay so the
miner what Miner will do he will solve
our nonce which is going to be perfect
which is going to be correct so that
this block gets green again so let me
click on this mime so that you can see
that I am clicking on mine and you will
see that our nonce will get changed and
as soon as our nouns will get changed
you can see that our block got green and
hash also got changed right
so as I said nonce is a number which is
in under the control of minor Norms can
be changed by the miners whenever they
want so that they can change the hash if
I will let's say again change some data
so you can again see that this what pink
in color now I have to solve this
mathematical problem and to solve this
mathematical problem I have to generate
a nonce so I will click on this mind
button and this will help me in
generating a nonce which will be correct
in order to get this block color again
green means this block then will become
a valid block so if it if it was a pink
block it was not a valid block it was a
malicious block because there was some
change in the data but now it is a
again uh a correct block right not a
malicious block if I will change the
block number for now so you can see
again it's it's pink right if I have to
again click on mine again nonce will get
changed nothing will else will get
changed and now we have a green plot so
this is what nonce is but definitely we
are going to talk about much more in our
upcoming videos but I hope you have
understood how non sexually Works hi so
in the previous video we talked about
nons right and now in this video we are
going to talk about how nons are useful
in mining and not only that we are going
to also see how actually mining takes
place so let's start now what is nonce
let us understand non's first definitely
we have seen nonce in great detail in
the previous video but let's see in the
point of view of mining okay so nonce is
a number that blockchain miners are
solving for and what do I mean by this
statement you will understand once we
are you know once we will go throughout
the whole presentation so just wait for
some time
now what is Target so Target is a number
used in mining which we will see how and
why it is a number that block hash must
be below for the block to be added onto
the blockchain
now what do I mean by this so in the
previous video we have seen that nonce
is a number that can be controlled by
the miners and when the nonce is changed
right when the nonce of a particular
block is changed the hash of that block
is also getting changed right because
nonce is also being added as an input to
our sha-256 algorithm and when we are
changing the nonce we are changing the
input to r236 algorithm so the output
that we are getting that is the block
hash is also getting changed right now
this target is a number that block hash
must be below now what do I mean by that
you will understand once we will start
with our presentation so just don't
worry about it but for now just
understand like this that you have
generated a block hash okay you have
generated a block hash by changing the
nonce now your block hash must be below
the Target that is a number that is
being adjusted by the Bitcoin algorithm
let's let's say that we are talking
about Bitcoin blockchain only so this
Bitcoin blockchain will give you a block
hash means it this Bitcoin blockchain
will give viewer Target okay and you
have to produce a hash block hash which
is below this Target and this will make
sense when we will once we will start
with our presentation
now the target at just every 2016 blocks
so this is something which is being
adjusted after every 2016 blocks and it
also ensures that the blocks are mined
once every 10 minutes now
this is something which is B which is
actually being done by the Bitcoin
algorithm means by the Bitcoin
blockchain only so we are not doing
anything any there is no centered
Authority who is doing these things all
these things are being controlled by the
Bitcoin uh Bitcoin software only okay so
this is how our hashing algorithm looks
like right which we have discussed in
one of the videos of hashing algorithm
where we are giving an input to this
chart of this x algorithm and this chart
this Excel Wortham is then just
producing this uh hash right this hash
64 XL character that is a hash right
now what what what are these numbers
right what is this five eight one nine e
f so this is an alphanumeric character
right we have numbers we have also some
characters so like what are these These
are nothing but these are actually
hexadecimal numbers so if you are from
computer science background or if you
have taken computer in any way then you
might know this that these are
hexadecimal number so like uh we have a
decimal number system like 0 1 2 3 4 5 6
till 15 right so these are decimal
numbers and if we have to write the same
number in hexadecimal number system we
write like this so if you will see that
0 to 9 everything is the same 0 to 9 but
after 10 means after 9 when you have 10
so 10 is represented a in hexadecimal 11
is represented as B in hexadecimal and
12 as C and so on okay so this is what
hexadecimal number are so again if you
want to know a bit more about it just
watch any YouTube video or just go for
any you know Google page and you will
see that it's simple it's simply a
number system like we have decimal
number system we have hexadecimal number
system nothing else okay so these are
the hexadecimal numbers that you are
seeing okay so these are nothing but
these are hexadecimal numbers for
hexadecimal characters so let's say that
this is one of the hexadecimal number
right because as we said that a decimal
number system can be represented in
hexadecimal number system so this is
nothing but this is also a numbered like
we have 100
000 999 or let's say one lakh two crore
or like two crores 10 lakhs 99 000 this
is also a number right in the same way
we have this hexadecimal number we can
have a hexadecimal number looking like
this we can have a hexadecimal number
looking like this
now let me ask you a question that let's
say if you have 64 characters okay let's
say you have 64 characters means you
have 64 blanks and you have to find the
smallest hexadecimal number what will be
the smallest hexadecimal number what you
are going to fill in those 64 characters
in those 64 blanks actually so that you
have the smallest hexadecimal number
take a while pause me for a minute and
then answer it
I hope you have answered it so let's see
uh what will be that number that number
will be zero zero zero right so we are
filling each and every 64 blanks that
are given to us with 0 and if we will
fill it with 0 so the number that we
will get will be the smallest number
right in the same way if I have if I
will ask you that what will be the
greatest number you have 64 again 64
blanks and I want to know which is the
greatest number what are you going to
fill in those blacks what will be your
answer take a minute and pause me for a
second
I hope you have answered the question
and the answer to this is simple that
will be FFF by so 64 f are there why the
reason is simple because in hexadecimal
number system as we have seen
uh 15 if you will see uh f is the
largest number currently in hexadecimal
number like in decimal number system we
have 10 right like what I'm trying to
say here is that in case of decimal
number after this there is a repetition
right 11 12 13 14 15 16 and hexadecimal
number is uh the also the same case the
important thing to note is notice here
is just just remember this that if f is
the largest number right in this table
right f is 15 actually so we can have
FFF in all those 64 blanks right so this
is the largest number now why I am
telling you all these things you will
understand
so this is our block okay we have some
data we do not have any nonce since we
do not have any non so we are not we
have we do not have any hash here right
and this is the set of all possible
hashes so when I'm saying all possible
hashes so what I'm saying is that we
have hashes here means all the
hexadecimal numbers here from smallest
to largest okay so we will start from
zero zero zero zero zero because since
we are talking about 64 blanks 64
because chart 56 produces 64 hexadecimal
characters so there will be 64 zeros
here and then there will be 64 F here
right means between these you will have
all the numbers
so you will have something let me start
my pen so you will have zero zero zero
zero like this zero then zero zero zero
zero one then zero zero zero zero two I
hope you understand right and the same
way you will have FFF FFF till here so
we have all the possible hashes in this
all possible hashes uh in this all
possible hashes Square okay arranged
from smallest to largest this is a
Target that is being set by the Bitcoin
algorithm now how this Bitcoin like why
Bitcoin algorithm set these type of
targets as I said so that it can ensure
that each and every block is mined on an
average of 10 minutes only so no Miner
can mine the block before 10 minutes and
when I'm saying mine what do I mean by
my means no Miner can solve a
mathematical problem before 10 minutes
on an average of 10 minutes okay so this
is to ensure that and for that we have
this Target and this is set by the
Bitcoin algorithm since we are talking
about Bitcoin blockchain okay
now we are going to see what is that
mathematical problem that miners
actually solve for we have seen an
overview that miners solve a
mathematical problem and after solving
that mathematical problem we have block
created and then we add that block after
verification and validation right in the
blockchain uh mining overview if you
haven't seen that video please check
that video in the playlist you will find
that or I will share it in the I button
okay let us see what is the problem that
miners are actually solving for
so let's say we have a nonce Hendrick
okay so we have a non-centric and for a
nons hundred you can see that we have a
hash that is cd1 aefbf okay and this
hash is actually this hash is actually
belongs to this part of the you know all
these possible hash means this is
belonging somewhere this at this
position okay at this position okay
now when we will change this nons you
can change see that when I am changing
it to 76 this has changed and now we are
at this position
an important thing to hear notice is
that none of the noise till now that we
have generated is below the Target and
we have seen right in the definition of
Target that the block hash that we are
generating must be below Target so that
we can add a block to the blockchain or
we can create a block and this is the
problem that miners are actually solving
for what we are trying to do is they are
trying to change the nodes because this
is something which is in their control
they are changing these these nodes now
once they are once they are changing
these laws they have different hashes
right before that if you can see we have
hundred like before at nine at
non-centered we have this hash at 76 we
have this hash so what they are trying
to do is they are changing the nons so
that they can generate hash and what
they are trying to do here is they are
trying to generate a hash they are
trying to generate a hash which is below
this target currently none of the hashes
that the miner has generated is not is
below the target so he will keep on
generating these knots he will keep on
changing these knots so let's say he
started again and now he has a nouns of
201 but still you can clearly see that
this hash is not below this target right
as you can see from the picture okay now
let's say he again
change the noise and now he has a hash
of zero zero zero b6a and this is
something which is below this target now
this is the time where not where the
miner has actually solved the
mathematical problem because he has
generated a nonce not actually I will
say NOS because when I'm saying non so
actually nonce is something which is
actually generating R hash right so when
I'm saying nons or block hash just thing
think like uh I'm going to use them
interchangeably so just don't be
confused so when he is changing the nons
now he has produced a noise or he has
produced a block hash which is below
this target so now this Miner has
actually solved the mathematical problem
and he will be rewarded with a
cryptocurrency and if we talking about
Bitcoin so he will be awarded with
Bitcoin now some of you might be
thinking like why this hash is below
this target now why not these hashes
right some of you might be thinking and
I will explain to you these uh in much
more detail in our upcoming slides but
for now let me give you a hint actually
what is actually happening if you will
see
this is the Target right zero zero zero
this is a number so we are saying that
uh the first four digit since we have 64
characters right so we have 64
characters and in in this we are saying
that for the Target to achieve the first
four numbers should be zero right the
first four number should be zero so any
number which is below this number
it can be anything it can be anything
any number that is below this number
will be the desired hash and the desired
The Miner who will generate that desired
hash will be awarded otherwise if a
number if you will see this number this
b474 this number can never be below this
target right why because in the starting
only in the starting only it has B4
7 for E right since we have taken only
eight characters here right nine
characters actually for the demo purpose
actually eight characters yeah eight
characters only so you can clearly see
that all the eight characters are having
these numbers so none of these numbers
are zero so the target can never below
this
the hash can never be below this Target
and that's why that's why uh the this
hash is the one which was the desired
one but only there can be various other
hashes because this is an area right it
can have mini Target so it can also have
a target of means uh the target can be
right like this also one two three four
okay because again we have four zeros
and the number which will be below this
and don't worry if you still are not
able to understand you will understand
it let's move on and then you will
understand it in a much more detail okay
okay before moving further let me tell
you one more thing I because some of you
might have this question that uh so this
nons like the non that we are generating
is this producing like it is so simple
like it looks so simple that we can
generate and loss and we can be here
right we can generate some nonce and
that will lead to here because you know
all these hashes are from smallest
largest so just generate a nouns which
will lead us to this right but this is
totally a random process why because if
you will see uh if we will start with
hundred this hundred is produced using a
hash which is which is here right which
is some point here now when we have 76
now you can see that the 76 is producing
a hash which is somewhere there means it
is much above uh this the previous one
right so it is producing a hash which is
some point here and let's say if we have
201 so in that case you can clearly see
that it is somewhere below so this is a
totally random process so this is not
something like you can just produce
non-sequentially that 0 1 2 3 and you
know you will start from this this this
no this is not how it works this is a
totally random process so they like you
cannot just produce a nonce like by
thinking okay I will reduce this noise
and that will lead me to this right
right this is the totally random process
there is no pattern to it so just
remember this and do not be confused
with this okay now let's move on to the
detailed topic of this target now let us
understand uh that criteria that Target
and all those things if you're still not
able to understand so let's say we have
a five digit number because as I said
it's a similar number or nothing but
these are also numbers so we are
considering that we have a five digit
number and with the help of this five
digit number we can cover this entire
area right
so we can have numbers starting from 0 0
till and let's say we are only assuming
uh decimal number system so we can have
a number of nine nine right so we are
assuming that we have a decimal number
system for non-not hexadecimal number so
that I can explain you this so we have a
number starting from zero zero zero two
nine nine nine so we are covering this
entire area right we are covering this
entirely but what will happen if I will
make the first number zero if I will
make the first number zero now you can
clearly see earlier we were covering
from 0 0
to
9999 right but now what we are covering
we are only covering these four digit
because we have made this first
character as 0 so now we are covering
from number from 0 0 to 999 since the
first character is 0 the first number is
zero so now you can clearly see we have
much smaller number right we have much
smaller number between this range
because earlier we were having 999999
and now we have only nine nine nine nine
so definitely this range will be between
this small like a small range will be
there between these two numbers right so
that's why we are saying that this is
actually representing this is small area
so this area is actually having numbers
from 0 0
299 and that makes sense also because
999 is a much bigger number so it will
be from here to 0 0 right it makes sense
and what will happen if I will make the
first two characters here again this
area will get reduced why because now we
have only numbers from 0 0 to 999 right
because the first two are already zero
the first two are already zero right so
by this you can clearly see that the
area is getting reduced and the miners
are actually solving for this area only
so they are actually producing a nonce
which is which is lying between these
two ranges between this area so they are
finding let's say uh they have a target
of for example
let's say zero zero
um uh zero zero let's say four five
three just an example so any number
which is below this range like that is
that can be zero zero four five two that
can be zero zero four or three hundred
anything which is below this range will
be the solution for their mathematical
problem or any number which is above
this let's say for example 1 2 one two
four five three or one zero four five
three all these numbers you can clearly
see that will lie above this area right
because it is star it is only a three
digit number but all these numbers are
four digit number so definitely we
cannot have a number four digit number
uh in this area because this is the area
of three digit number right
so that's why we have this type of thing
this type of Target thing and I have
just given you one more example where
I'm saying that first three characters
are zero so now you can clearly see one
more important thing that you can see
that as we are increasing the number of
zero right as we are increasing the
number of zero the target area is
getting reduced and when the target area
is getting reduced it will become more
difficult for the miner to solve the
mathematical problem because now they
have to solve for this small area only
earlier they were solving for this big
area earlier is before that there was
only for this big area but now as the
number of zeros are increasing right
before these two numbers
the target area is also getting decrease
means the solution is the probability of
solving uh finding their solution
through their problem is also getting
reduced and that's what make mining very
much difficult
and just don't uh believe me just don't
trust me I will show you a mathematical
proof for this also okay so just if if
you are comfortable with mathematics
then that's good if you're not just have
a look at it you will have a good sense
why this is so much difficult for the
miners because many of you might be
thinking it's looks so easy we do not
have to do anything we have to just
generate you know we have to just
generate some nonce and by the which
with the help of which we can easily you
know find the block hash and that's an
easy process but not it's not an easy
process and you will understand this
with the help of this example so let's
say this is the current Target
definitely this is not the current
Target I have made this PPT along back
so just say that this is one of the
Target that was given to the miners to
solve for so now the miners
responsibility is to generate a hash
which is below this huge number right
and the first 19 characters as you can
see are leadings zero okay
so now so now let us understand this why
a mining is so difficult okay so let's
say we have a possible hash means we
have 64 hexadecimal characters so we
have 64 inside decimal characters right
and so in total we can have a
possibility of 10 to the power 77 hashes
now what do I mean by that so since we
have 64 characters right so in these 64
characters I can have I have 64 64
possibilities right 16 possibilities
here 16 possibilities here why 16
possibilities because as we have seen in
hexadecimal number we have number from 0
to 15 and if we will count it is 16
There are 16 numbers right 0 to 15 means
or 0 to F actually 0 to F so we have 16
numbers here from 0 to F 16 numbers are
there between 0 to F and that's why we
have 16 possibilities so we can have 0
we can have one we can have you know a
or b or F like this this is something
related to permutation if you are not
comfortable with it this that's fine for
now just a thing like this that we have
66 seen to the power 64 possibilities
because 16 into 16 into 16 till 64 times
we will have 60 to the power 64 and we
have calculated in 10 to the power 70
into 10 to the power so it is 10 to the
power 77. now total valid hashes because
as you can see that uh the Target that
is set has 15 19 leading zeros so the
total possible hashes with these 19
reading 0 is 10 to the power 54 why
because the first 19 first 19 characters
are 0 right first 19 characters are 0 so
we cannot touch them so there's a 0
there's a zero like this we can only
touch the remaining that is 64 minus 19
right 64 minus 19 characters we can
touch so we can say that they are 10 to
the power 54 that is 16 in to the power
if you will calculate it it will be
around I think uh 45 right it is 16 to
the power 45 and if you will uh find it
in the form of 10 to the power it is 10
to the power 54.
now if you ever see the probability of
picking a random hash probability of
picking a random hash from this large
area that is 10 to the power 77 this is
the large area right having all the
possible hashes and this is the small
area having a small set of hash right so
if you will see the probability of
finding a particular hash that is a
solution to your problem
that is 10 to the power minus 23 that is
0.000
till at 22 times right something like
that so this is a very small number this
is a very small number and that's why
minor has to put so much effort in order
to find a solution to their problem in
order to generate that right hash which
is below the target this is the
problematic thing right so mining is not
an easy task that's why it took days if
you are if you're a miner of proof of
work it took days even weeks sometimes
to find the target to find the desired
Target so that you can create the block
of a blockchain
now again I hope you have understand
that so this is something which I
thought you should know that who is
actually adjusting these difficulties so
this is done by the Bitcoin algorithm
only so we are not doing this no Central
authorities doing this everything is
done by the Bitcoin algorithm okay
lecture we are going to talk about
Bitcoin Target history and you will love
this lesson you will learn a lot in this
lesson so in the previous video we
talked about nonce mining in detail
about the Target and how we how the
miners actually solve for that Target in
order to get the reward in order to
solve that mathematic problem so that
they can create a block right now let us
see what are the different Bitcoin
Target that already has occurred in the
history right so this is a beautiful
website if you want to learn about
Bitcoin in detail trust me this is the
best website and you can learn a lot
about Bitcoin in the on this website the
website name is learn me a bitcoin.com
it's a great website and let's go to the
Target page of this website
uh so where's the target let me search
for it
so Target
oh here it is
so this is our Target page and in this
if you will see
we have all the target currently the
target is this okay you can see a lot of
number of zeros are there right and as
we discussed the more number of zeros
that we have the Lesser will be the area
of finding the solution right in the
previous video we have talked about this
and if you will see okay this is the
Bitcoin Target history so you will find
the Bitcoin Target history under this
tab and you can see the Bitcoin Target
history so you can see that how the
Bitcoin Target history is being changing
right it's been changing from time to
time
on every 2016 uh 2016 blog or on every
two weeks right it it's changed and it
is done by the Bitcoin algorithm so with
this is not we what we are doing what
this is done by the Bitcoin algorithm
only so you can see that it is being
changed changed changed right and
currently it has changed on 13th of
September 2022 and today is 14th of
September when I am recording this video
so you can see that the target just
changed uh yesterday only right
and let us see some of the important
things that you should notice here that
that is important right so first thing
if you will notice from 3rd Jan 2009
to
18th of December 2009 the target never
changed you can see that the target is
still zero zero zero zero zero FFF zero
zero zero zero FFF and why this is so
because as we discussed right the target
uh change should change after every 2016
block or after every two weeks right but
the target was never changing
and the answer to this question is very
simple because at that point of time
there were not much miners right who
were actually mining for the Bitcoin so
there were less number of people who
were solving the mathematical problem
so since there were less number of
people so the Bitcoin algorithm never
thought that why should I change the
Bitcoin Target because there are less
number of people and already this target
is very much you know heavy for the
miners at that point of time because at
that point of time there were not so
much good Technologies also I will say
okay so miners were using their computer
or some a little bit high performance
computer or something so at that point
of time uh Bitcoin mining algorithm
thought that why should I change the
target it is good why should I change it
right but after some time means after
18th means after this 18th December 2009
you can see that Target is continuously
changing so if you will see so it is
8868 it is c428 so the target is
continuously changing right the number
of zeros are not changing one important
thing to notice here is the number of
zeros are not changing but it does not
matter because as we discussed right
these are all the numbers so if it is d8
and this is c42 so d8 if you can clearly
see uh
at this point of time ffff right
this number is greater than thus this
number means what actually happened I
think in on 30th December 2009 the
target decreased decrease in the sense
uh this number got much less means the
target become much harder to achieve
because now we are what we are trying to
do here is we are actually reducing the
area right because we are decreasing
this number and this all these things we
have discussed in the previous video so
I'm not going into much depth so we are
decreasing the number so hence we are
decreasing the area where the solution
for the
for the problem is right for the mining
problem is for the miners so therefore
miners are solving for much lesser area
right but after some time you will see
that I think the number of zero also
started increasing means this was making
the Bitcoin
uh solving problem much more harder to
solve means Bitcoin mining problem much
more harder to solve so let us see where
the number of zeros are changing it is
actually very much difficult to find out
right a lot of numbers are here at this
point of time
okay so I think from
around this point of time the number of
zeros are changing or something yeah
this point of time I think the number of
zeros are also enemies now the target is
much more harder right so earlier it was
decreasing you know like it was harder a
little bit harder a little bit harder
but now since the number of zeros are
increasing right so the target is much
more harder at at this point of time so
this is something that you can see right
you can clearly see that the target is
changing on every two weeks fifth August
15th August and the number of blocks the
difference between the number of blocks
is 2016. so all these things you can see
on this page it is a beautiful website
as I said so you can see a lot of
interesting thing here so it is also not
the fact that let me tell you one thing
more that it is not that every time the
target every time the difficulty will
increase there will be times where the
target when the difficulty will decrease
because at this point of time when the
cryptocurrency market is going down and
miners are not much interested in mining
Bitcoin so you will notice that the
Bitcoin difficulty level is decreasing
day byte
now d by d means on every two weeks or
such type of things are going on why
because the number of miners are today
because the cryptocurrency market is
down at that point at the time of making
this video so miners are leaving the
Bitcoin mining industry and hence the
target enhance the difficulty is also
decreasing okay so this is the best time
if you want to be a miner because the
difficulty is decreasing
and there are other things also so if
you want to learn much more about this
target so you can see that a lot of
things again I think there is a
calculator also like how much time it
will take to you know solve the Target
and all those things so this is a good
website you can definitely refer to this
website a highly recommended website so
you must check out this website in the
next video we will talk about the
different machines that we have for
mining like gpus and Asic normal
computers or the CPUs we will talk about
that in detail in the next video and if
you have any doubts please comment below
now in this video we are going to talk
about the difference between the various
technologies that miners use for money
now before talking about the different
Technologies let us go back to our nonce
example where we have learned that by
producing that these nonses which are
being actually being produced by the
miners these miners produce different
nonsense and with the help of which they
are able to reach the Target right
no one important thing to notice here is
that by changing these nonses miners are
able to change the hashes so let's say
we have two miners one Miner who is
actually able to generate five hashes in
one second and we have another Miner who
is able to generate 10 hashes per second
when I'm saying hashes I'm talking about
these hashes now if I will ask you which
Miner has high probability of winning
this target of uh of generating hash
which is below this target
the answer to this question is very
simple that is minor B why because minor
B is able to generate hatches at 10
hashes per second while minor a is able
to generate only 5 hashes per second so
like now minor B has more chances right
because he will be able to change the
different nonsense at much faster rate
as compared to your minor a which is
able to generate hashes at a much slower
rate right it is like minor days having
a car which is running at 25 kilometer
per hour while minor B is having a car
which is running at 50 kilometer per
hour so now minor B is much faster as
compared to minor a
now
why I'm telling you all this I'm telling
you all this because these different
technologies have different mining rate
so if we talk about CPUs so if we talk
about CPUs normal CPUs that we have in
our like we use uh in our day-to-day
life right we have CPUs in our laptop we
have CPUs
like when we use a system so if you will
see CPU is a technology which which is
actually able to generate 10 mega hashes
per second so it is around I think 10
mega hashes is uh is definitely it might
sounds very much high but it is not that
much higher in not in today's world
nobody actually use CPU for Mining and
especially if it is Bitcoin nobody is
actually using CPU for mining Bitcoin
because it is or very less number okay
it is only 10 million hashes per second
okay now after CPUs what miners started
using is gpus now these gpus has a
mining rate of one gigahertz
hash not Hertz actually I actually
literally always get confused between
hashes so it is actually one giga hashes
per second which is around 1 billion
hashes per second and if you will see it
is much higher than CPU right but still
gpus are something which are you know
which are actually used for
multi-purpose things so they are not
specially designed for mining purposes
so still the mining the mining harsh
rate is still very low if we talk about
gpus and there are very few miners at
this point of time in 2022 which might
be using these gpus okay
but now what miners are actually using
is async now what is this Asic Asic is
also a technology with the help of which
miners are able to generate
110 trillion hashes per second so you
can see that among all these
Technologies A6 are the most fastest so
this is what make basic so powerful now
let me show you some of these uh gpus
which are actually available on eBay so
you can go on eBay and you can search
for these gpus the thing with GPU is
that they are actually more cheaper as
compared to your Asic which are actually
very costly you will see they are in
thousands of dollars so this is how your
GPU looks like okay so actually I
haven't used any gpus yet so definitely
it is on eBay so I'm guessing this is
what how gpus actually looks like okay
that's wonderful and I think this is for
mining only any video
on that gpus Creator CDU PCI e-mining
learning something like that I'm not
that much sure but I think this is one
of those GP
okay
so let me let me search this GPU
or
mining
so that we can have better results
okay
different
this is a GPU mining rig so where you
can have various gpus at one time
many gpus at the same time the gpus that
you are seeing and these are I think the
slots are given here okay and now you
can see the Asics so you will see A6 or
as I said the most powerful but they are
very costly also it is around one
thousand dollars
chillio very costly thing
that's the thing
so I hope you have got why do we use
CPUs why do we use these gpus and why do
we use basic actually it's not ASCII but
it is Asic sorry for the song strongest
spelling here so I hope now you got why
a minus currently use ASX most of the
mining pools actually use Asic because
Basics are very much faster miners are
able to generate hashes at a much faster
rate hi now in this video we are going
to discuss about mining pool so let's
start so this is our blockchain Network
and the people that you are seeing in
this blockchain network we are assuming
that these all people are actually
miners now who are miners we have talked
about it that miners are the people who
are solving a mathematical problem and
what is that mathematical problem that
mathematical problem is to solve for a
nouns or to solve for a hash which is
below the Target right and we have
discussed everything in detail in our
previous video so if you have not
watched the previous videos please watch
the previous videos as well in the
previous video we also talked about that
these miners who are actually
participating in the blockchain network
in the mining process they require some
form of Technologies right so let's say
these are different miners they all have
different type of Technology some of
them are using CPUs some of them are
using GPU some of them are using Asic
now the problem arises the problem
arises when there is unequal
distribution of hashing power now what
do I mean by that so let's say all these
miners were actually mining by using
some GPU technology because GPU is a
cheaper technology so these miners can
afford gpus only so what they did they
started using gpus okay so they are they
are enjoying their Bitcoin mining by
using GPU only
but after some time what happened some
big companies comes into picture and
these big company started using Asic
Technologies or big mining
Technologies in order to mine Bitcoin so
these companies that you are seeing on
your screen these are actually people or
big Corporation who have uh who have
millions or not I will say Millions but
thousands of miners working under them
and they are using powerful Technologies
like Asic or let's say you know
gpus or some form of powerful
Technologies in order to mine now if you
will see in this case these miners that
are not part of these big mining
Corporation they they do not have enough
power they do not have enough
Technologies or means in order to
compete with these uh big cooperation
right why because these big corporations
since they are using powerful powerful
Technologies so they might be mining
let's say in in one second they are
mining let's say one trillion hashes per
second but these miners who are working
alone at their home
they are able to mine only let's say
thousands of hashes per second so the
probability of winning definitely is
higher for these big corporations and
not with these individual miners right
who are mining alone at their home
so what these miners can do is they can
form a mining pool okay so you can see
that these miners they have formed a
mining pool in the same way this big
Corporation also thought okay why not to
increase my power and they also uh
become a part of this mining pool now
what is this mining pool all about so it
is a pool of miners where all the miners
like these miners let's say these four
miners has actually formed a group and
now they are solving the mathematical
problem as a group so these these miners
are not solving the mathematical problem
alone but these viners are actually
combining all their power and they are
using all their power in order to solve
this mathematical problem and that's how
they are now I will say they are now as
much as powerful as these big
corporations because definitely I am
showing you only four miners here but uh
in the mining pool you can have
thousands of miners or even lacks of
miners okay so they can now compete with
these big corporations who are actually
using Hi-Fi Technologies uh like
powerful Technologies for mining okay
now let us also discuss some more
benefits of mining pools first benefit
is that you don't have to buy costly
equipments now since you are working as
a group so earlier you might need to buy
an Asic so that you can mine right you
can compete with these big powerful
corporations but now you can form a
group and by forming a group you are now
equally powerful as those corporations
because you are combining all the
Technologies and you are like working as
a group now okay
second is that you don't have to worry
about mining setup now let's say you are
you know you are at your home and you
want to mine but you do not want to you
know have a heavy setup of uh like you
know big big uh Technologies at your
home or something like that so what you
can do is you can join these mining pool
okay and then you have to pay some
amount of you know fees to these mining
pool because definitely you are using
all their software and everything they
will provide you with each and
everything you have to just start your
computer now and you have to just start
mining okay so they will provide you
with everything so you don't have to
worry about these mining setup about the
software about you know the hardware and
everything you have to Simply have a
computer or a simple Technologies and
now you can be a be a part of this
mining pool
now the third thing is that distribution
of rewards is according to the mining
power now what do I mean by that so
let's say these four miners are you know
mining for a Bitcoin and let's say this
Miner is using some powerful
Technologies like Asic okay so now
definitely he has uh you know he is
using much more he's using much more
hashing rate in order to solve for this
uh mathematical problem right definitely
these three people are also using let's
say these three people are using gpus
only and but he is using Asic so
definitely he is actually making uh he
is actually utilizing the most power and
he is actually giving
most to the group right for mining right
he's a he's working most as compared to
these because gpus as we have discussed
has a hashing rate of gigahertz not
Hertz actually Giga a giga hashes per
second but an Asic has a hashing rate of
1 trillion hashes per second right so
definitely he is actually using a lot of
power so in this case if they will warn
if they will uh solve this mathematical
problem and if they will get a reward in
terms of Bitcoin so definitely in that
case this Miner will be definitely given
much more amount of Bitcoin as compared
to these three miners combined right
because he has used much more
Technologies much more powerful much
more power actually in order to mine
this Bitcoin so it is like the effort
you are going to put the reward you are
going to get accordingly only okay and
the fourth point is that there is no
wastage of power since all these miners
can as you can see that all these four
miners are solving the same mathematical
problem right but this mathematical
problem will be divided among all these
four people and which we will discuss in
our upcoming videos but for now let's
say this mathematical problem is let's
say you know this mathematical problem
is of let's say 100 meter just an
example to give you so 25 meter will be
given to am 25 meter be given to M25
meter will be given to him and 25 meter
will be given to him so that they can
equally work on these problems so they
are not you know they are not not
solving the same mathematical problem
means there there is no repetition of
work here right so this work will be
divided equally among all these four
people and they will start solving the
mathematical problem in this way and let
me show you the different hash rate that
we have currently okay so this is for
Bitcoin so I'm on this website
blockchain.com pools and here you can
see that these are different mining
pools so here you can see that these
different mining pools they have a
different hash Aid and this unknown is
actually occupying The major portion
here right so he is the most powerful I
will say in this hash distribution and
then we have this and pool via BTC so
they are different mining pools at this
point of time now you must be thinking
that if this unknown is the most
powerful one why not to join this
unknown mining pool right so that that
you will have higher chances of winning
but in that way you have to also think
that since this unknown is uh you know
this is a big this is a big mining pool
so definitely the distribution of reward
will be done accordingly right so if
let's say you also want a reward but
that reward will be divided among all
the participates all the participants
all around among all the miners who are
a part of this big mining pool right so
the distribution will be done
accordingly and in that way you will be
getting less amount of reward because
there are more number of people right
or let's say more more big technology
they are using in that case they will be
given much more reward than you if you
are a small part of this mining pool
so here you can see much more
information about it definitely there is
much more to explore on this blockchain
explore.com do visit to this website you
will learn a lot about Bitcoin ethereum
and different cryptocurrencies about
their heart rate and everything else
now in this video we are going to talk
about non's range and this is a very
important video because this video
actually will help you to understand our
next topic that is time stamp so please
be a little bit more alert more careful
in this video okay this is a very
important video and this video will be a
little bit tricky I will say because in
this we are going to use a little bit of
mathematical calculations so you might
find it a little bit tricky but I will
suggest you to just be patient and at
the end of this video you will be
understanding each and every thing okay
so just be a little bit patient here
so as we have discussed in our previous
video that this nonce is a is a number
that miners use in order to solve the
mathematical problem so with the help of
this nonce miners are able to generate
different hashes and once they will they
are able to generate a hash which is
below the target they are able to create
the block and once they will create the
block they will get rewarded right we
have X I have explained all these things
in the previous video
now since this nonce as we can see is a
number right
and since this is a number it has a
particular range this nonce is a 32-bit
number
now if you are not from a computer
science background you might not be
getting this bit so I will suggest you
to just go and search for it and you can
easily see an explanation for this bit
okay this is something related to your
computer science fundamentals so just go
and search for it and you will find a
good video uh like about this bit for
now what you can think or not I will say
think for now what you can say that this
nonce the range of nouns we have is four
zero to four to four into ten to the
power 9 means with this 32-bit number we
can generate 0 to 4 into 10 to the power
9 knots that is around 4 billions of
nouns means we can have announced at 0 1
2 until we can have this nons 4 into 10
to the power 9 okay it is a pretty big
number right this is a pretty big number
now and how I have got this calculation
this is something again I will say this
is something related to your computer
science background only so I have just
taken this 0 0 2 2 to the power 32 and
then minus 1. that's how I got this
number 420 power 9 okay
now if you are not getting it just don't
worry just go on with the video you will
understand each and everything at the
end the concept actually at the end of
this video this 4 into 10 to the power 9
nons might looks like a very big number
to you right but trust me this is not a
very big number if you talk about our
sharp 256 algorithm which produces 64
hexadecimal characters and if we talk
about the number of possibilities means
the number of hashes that we can
generate from this 64 hexadecimal
characters is around 10 to the power 77
okay it is around 10 to the power to 77.
now how I got this number since we have
64 characters here and at each character
we have 64 possibilities right because
as we have discussed about hexadecimal
number hexadecimal number is from 0 to F
and if you will see the range it is 16
so we have 16 possibilities here 16
possibilities here 16 possibilities here
and we have till 64 characters right so
I have just multiplied all this 16 into
16 into 16 64 times and that's how I got
this number okay so this is the total
number of hashes that we can produce by
using this sha 256 algorithm and this is
something uh related to your permutation
and combination of mathematics but don't
worry if you just remember this number
and you are good to go since the total
number of valid hashes is around 10 to
the power 77 right which we calculated
using this chart of 56 algorithm and the
total number of nodes that we can
generate is 4 into 10 to the power 9.
now if you will see something uh
something is problematic here the number
of Nas that we are generating is very
very very much lower than this 10 to the
power 77 means this 10 to the power 77
is a very very big number right if you
will compare it with this 4 into 20
power 9 right because we have 10 to the
power 7 here we have 10 to the power 9
so it is a very big number
now this generates a problem now what is
that problem that there are not enough
nouns to generate the valid hash why
because with the help of nons what we do
with the help of nonce we generate hash
right
and with the help of norms you can
clearly see that we can generate only 4
into 10 to the power 9 hashes because we
have 420 power 9 nons so we can generate
4 into 20 to the power 9 hashes right
but the total number of valid hashes is
10 to the power 79 77 right so we cannot
generate we cannot generate all the
hashes that are possible now if you are
not getting it you will you will
understand just see this diagram so
let's say this is our nouns right this
is our number of nodes and this is our
total number of valid hashes okay and
let's assume that this is 4 into 10 to
the power 9 nonsense and just assume
that these are 10 to the power 7 7
hashes okay
now let's say as a miner I use one of my
nons and I was able to generate this
hash okay so I was able to generate this
hash that is present in our chart of
physics algorithm Now by using this I
was able to generate this this this this
this now after some point of time you
will see that I do not have any nonce
remaining in my bucket so I cannot
generate these hashes that are left and
it might be the possibility that my
target is
somewhere here right because it might be
a possibility right that I might I might
have exhausted all my nons I might have
exhausted all my nons but still I was
not able to produce these hashes so I
was not able to go to these hashes and
might be might be my answer is there in
these the in these hashes that are left
it can be a possibility right
so this is a problem and just do not
think that I am just I was just using
this noise and it was admitting this
nons meaning it can be here and here
also like this this can produce this
nons also this hash also this nons can
also produce this hash although I'm just
I'm trying to explain you another
concept here the concept is that with
the help of this noise you cannot
generate all the possible hashes that
are there and if you are not able to
generate all the possible hashes so you
might not be able to generate the hash
which is below the target
okay and this is a problem right this is
a problem
now let's look at another important
thing that let's say that a modest Miner
who is mining is able to generate 10 to
the power 8 hashes per second so this is
just an assumption so he is using some
technology and he is able to generate 10
to the power 8 hatches per second
now since we have only 4 into 10 to the
power nons how much time it will take to
consume all these nonsense so it will
take around 4 into 10 to the power 9
probably 10 to the power 8 equal to 40
seconds right now how how I got this
calculation let me tell you so in one
second
I was able to generate 10 to the power 8
hashes right so let me do it one
seconds and hashes okay so I'm using a
unitary mathemat Unity method of
mathematics so in one second I was able
to generate 10 to the power 8 hashes
right now
I have 4 into 20 Bar None nine nons
right so means I do I have 4 into 10 to
the power 9 dashes right because these
Norms are actually used to generate
hashes so we can say that with the help
of this 420 power 9 knots I am able to
generate 4 into 10 to the power 9 hashes
so the question is how much time will it
take to generate this number of hashes
so I am taking this as x a variable then
I'm going to do cross multiplication a
simple unitary method trick and go and
see this this is a simple thing and
we'll I will be getting X 4 into 10 to
the power 9
into 1 divided by 10 to the power 8 and
by this you can clearly see that in 40
seconds
I will be exhausted with all my nonses
now the question is what I will do if
all my nonsense are exhausted after 40
seconds what I will do right this is the
question
let me erase all these things
so this is my question that so what the
miners will do when nons get exhausted
and miners have not hit the target okay
this is a big question and we will
address this question in our next video
where we are going to talk about
timestamps field in our blockchain okay
hi
in this video we are going to talk about
time stamp so in the previous video we
have talked about a problem that we have
with the nonsense right we have limited
set of knots and the modest Miner and
the modest minded actually mines around
10 to the power 8 hashes per second due
to which a minor will get exhausted with
all its nons in just 40 seconds right
now the question arises that what the
miners will do when all the nouns get
exhausted and miners have not hit the
target this is a big question right and
the solution to this problem is
timestamp timestamp is also a field
given in our Bitcoin blockchain or any
other blockchain but for now we are
talking about Bitcoin and this timestamp
is the time at which a particular block
is created so let's say the timestamp
for this block can be this number now
this number within seconds this is
actually Unix timestamp means Unix time
let me show you that
so if I will go to this Unix timestamp
so this is our Unix time so this is the
time like at the at the time when the
Unix started in January 9 in January 1
1970 so you can clearly see that this
clock is uh going on right so now we
have one more field that is given to our
sha 256 algorithm and with the help of
which we are able to produce our hash
right earlier we were only talking about
block number nons data previous hash but
now we have one additional field and
that additional field is stamp which is
also given as an input to r256 algorithm
so whenever our timestamp will change
and since the timestamp will change in
every second right because this is given
in seconds so in the next time it will
be five six right this number and then
five six so when the timestamp will
change then definitely the output of our
chart of V6 algorithm will also change
hence we will have a different hash of
this blog right now let us see how this
timestamp can help miners like the
problem that we are facing right that
the nons are being exhausted so how this
timestamp can help us in this situation
so let's say this is the timestamp of
this block and let's say this is not
right and timestamp is not of this blog
actually uh this is the timestamp when
like you know the miners are actually
solving for this block okay so they are
solving this mathematical problem and
every time the timestamp is changing so
that's the thing okay currently I'm just
showing it inside the block so that you
can understand this in a better way
so now let us see this is our nonce okay
this is the nonce and it is currently at
zero okay so this is like a scale so it
is currently at zero okay
now let's say
that miners are solving this
mathematical problem they are using
their you know Technologies their mining
equipments in order to solve this
mathematical problem so let's say after
0.5 seconds after 0.5 seconds
okay yes one more thing to tell you yeah
I just forgotten this that a minor
exhaust 4 billion nodes in 40 seconds
this is what we have seen right so a
minor will be exhausting around 0.1
billion nons in one second right simple
calculation 4 billion in 40 seconds so
0.1 billion in one second
now let us say that this is a non scale
as I said let's say after 0.5 seconds
after 0.5 seconds so our timestamp is
not changed right because time stamp
will change in every one second so let's
say this is we are we have only passed
around 0.5 seconds and after 0.5 seconds
you can clearly see that some of the
nonsense get exhausted by the miners
because he is solving this mathematical
problem now in the next 0.5 second what
will happen in the next 0.5 second this
timestamp will change and since this
timestamp will change so we will have an
entirely different kind of a hash for
this block
right we will have an entirely different
kind of a hash for this block since we
will have a different kind of a hash for
this block The Miner can now again start
this nonce from 0 and again reuse the
nonsense I hope you are getting this
this is a little bit you know difficult
to understand so just just try to just
try to understand what I'm trying to say
here that since the hash is changed of
this block is change
partner can again start using nonce from
zero so that he can find its Target
because the hash is changed so by using
nons from 0 he will have entirely
different kind of hash when starting
from 0 right
this is what I'm trying to say so let's
say after one second again okay so again
after one second so what I'm trying to
say here is that after one second he
will be exhausting again some amount of
nonce if let's say it is 58 again some
amount of rocks is being getting
exhausted so after every second some
amount of knots will get exhausted and
once
that one second will hit again the miner
will start from zero and again he will
start using the nonsense again and again
so he is actually reusing the nonsense
again and again so this is what is
actually happening so 56 so now the no
The Miner has used this amount of nodes
and after 57 he will again go back to
zero and he will exhaust some more
amount of noise now let me tell you one
more important thing here just don't be
confused that this this is not starting
from this to this okay
like this at 56 it is was at this so you
might be thinking that at 57 it is
starting from this to this no at 57 it
is again starting from 0 to 57 only okay
at 58 again starting from 0 to this
point only now why this is changing like
why some at some point we have this
green ending here at 57 it is ending
here and at 58 ending here why it is
happening like this because only one
second is passing every time right and
this is a and then and this is due to
what we are taking into consideration is
that Miner is using a technology right
Isaac or GPU whatever technology so this
Asic or GPU technology might get heated
up and since the these technology might
get heated up so the efficiency of these
technology will get decreased right and
since the efficiency of these technology
will get decreased definitely it will
also affect the hashing rate of those
Technologies right if the that's why if
you have some of the pictures that
mining those big mining pools or I will
not say mining pool those big mining
companies have coolers or AC so that
they can cool off their big their big
you know Technologies they are using for
mining right so this is the simple case
that's why I'm showing you different you
know different number of nonsense are
getting exhausted in each and every
second okay
so one thing is for sure with the help
of this timestamp we are able to reuse
our nonsense right so the problem that
we were facing earlier that the nonsense
were getting exhaust again and again now
it will not they will not get exhausted
The Miner will be able to reuse the
nonsense so we have found a solution to
our problem
but here is a catch there is one more
problem let me tell you what is that
problem
if we talk about our current hashing
rate of the whole network okay I'm
talking about the hashing rate of the
whole network okay when all the miners
are and all the mining pools are there
you will see that this is around 234
million trillion hashes per second
234 million three lane hashes per second
this is a pretty big number
and if we talk about the number of
nonsense the number of nonses that we
have is only around 4 into 10 to the
power 9 as we have discussed in our
previous video and if we will divide
this number from this million trillion
hashes 10 to the power 6 10 to the power
I'm not considering this 234 and leaving
it out
then also this time we will see is 4
into 10 to the power 9 seconds
which is way less than one second means
the minor will be exhausting all its
nouns in just the power 9 seconds which
this number as I said is very very very
less than one second
now some of you might be thinking like I
you do not get this right why I am
dividing it this like this number from
this let me show you this
so this is our blockchain Explorer
website if you will go to this link
blockchain.com
hash it you will see that this is our
and I will go here so you can clearly
see might be able might be visible on
your screen it is
234.365 million and you can clearly see
that this is in given in trillion hashes
per second so the estimated number of
tetra hashes per second the Bitcoin
network is performing in the last 24
hours so actually it is for 24 hour data
but this is the total hashing rate of
the whole miners that are actually
mining for the Bitcoin
now
if you will go to our hashing
distribution of the different mining
agencies or the different mining
companies right we will see that a small
mining company is actually around let me
see whether they are providing any
percentage or not
it is not providing any kind of a
percentage I think no they are not
providing any kind of percentage but
what what important thing I want to
share is that if you will see this
unknown is actually
around I think 49 or around 40 percent
right it is around I think 47 percent or
something it is actually using 47 of
this big number
234 million trillion hashes per second
means this person not actually this
person this mining pool is actually
generating or I will say is able to
generate
around 47 of this
234.365 million trillion hashes per
second so if you will combine this
mining pool power they are generating
this nonce in this amount of rate and if
you will see the smallest mining also it
is it will be around I think one person
let's say this is around one person then
also if you will see this number is a
pretty big number and that's why if you
will see I haven't haven't included this
234 in the calculation I will only
assuming that the hashing rate the
current hashing rate is only around
million trade in hashes per second
that's why I have just taken 10 to the
power 6 into 10 to the power 12 I
divided this number by this 4 into 10 to
the power 9 by this number right
so you can clearly see that if we will
combine the mining pools the power of
the mining pools when they are working
together the mining the hash the the
nons are actually getting exhausted in
less than one second
so now again the question arises what
the miners will do
in their Ideal Time
right again this question arises what
the miners will do in their ideal time
because in less than one second they are
exhausting all their nonsense
and we will see the answer to this
question
now in this video we are going to talk
about Maple so let's start
so if we talk about our previous video
where we saw that the current hashing
rate is around 234 million trillion
hashes right for the overall uh Bitcoin
Network okay since we are talking about
Bitcoin so it is around 234 million
trillion hashes per second
and we also saw that if we talk about
the number of nodes we have only four
billion nodes that is 4 into 10 to the
power 9 nons and if we will divide this
uh by this total number of hashes per
second we can clearly see that 4 billion
nouns will get exhausted in Just 4 into
10 to the power 9 seconds that is very
very very less than one second right and
we ended our previous video by this
question what should the miners do in
the ideal time because in less than one
second all the announcers will be
getting exhausted now they do not have
nonsense and if they do not have
nonsense they cannot generate hashes so
they will use the Target right so what
they will do in this one second period
of time so should they wait four times
time to change that after one second and
then they will start again the nonce
process or there is some solution to
this problem and there is a solution to
this problem and the solution is the
transactions as we know that our Bitcoin
block consists of of number of
transactions which we have seen in our
previous video as well right so by
changing the transactions you will see
by changing the transactions we can
change the hash right because
transaction is also one of the fields
that we give to our sha 256 algorithm
and when we will pass our transaction to
r26 algorithm then the output will also
be generated and if we will change the
transaction so because transaction is
one of the input of our sharp 256
algorithm in that case output of our
chart to physician algorithm will change
hence we will have a different kind of a
hash right so now the question arises
from there these transactions come from
these transactions actually come from an
area that is called mempool and we will
talk about mempool in detail in our next
video but for now uh just imagine that
mempool is an area Okay from which
miners pick your transaction so whenever
you are transaction let's say you are
sending some Bitcoin to your friend this
transaction will be uh this transaction
will be transferred to this mempool okay
which is an area where all the
transaction will be there and from this
only miners will pick your transaction
so you can clearly see that I have not
actually I have this map I have a number
of transactions right and this thing
that you are seeing ff3 a b c d two
three ABC so this is the transaction
hashes and this is the fees okay because
as we know that miners also take a
little bit amount of fees whenever they
are processing your transaction because
they are you know they are doing a lot
of work there right they are solving
this mathematical problem and solve this
mathematical problem requires a huge
amount of energy and for that they
charge this a little bit amount of fees
for your transaction
okay so this is a very simple process so
here you can see that there are a lot of
number of there are so many transactions
so there will be so many people who are
doing some transaction in transaction
are actually being the part of this
mempool and now miners will pick their
transaction from this mempool only now
let me ask you a question if you are a
miner okay let's say if you are a miner
then which of these following
transaction you will pick and put it
inside your blog okay so let's say there
is a transaction there are a lot of
transactions here right in this mempool
and now you are a miner and you have to
create this block and in order to create
this block definitely you need some of
these transactions and you need to pick
some of these transactions into this
block and let's say you can pick around
four transactions from this mempool so
my question to you is which of the
following transaction you will pick from
these uh eight number of I think there
are eight number of transactions given
in the mempool what you will choose
pause me for some time and answer me in
the comment section of this video okay
and see whether you are right or not so
so I hope you have answered with the
question in the comment section now let
me tell you which of the which of the
following transaction The Miner will
pick
so you can clearly see that from among
these transaction this transaction if
you will see has the most amount of
transaction fee and since you are a
miner you want to make some profit then
definitely you will pick this
transaction as your first transaction
and you will put this transaction in
your Bitcoin below right second
transaction that you will pick since I
said right you can pick four
transactions so definitely you will
choose this transaction because this in
this you are getting a few of 0.06 and
in the same way you will choose this
0.05 and then 0.04 right because these
transaction these transactions have the
most amount of fees and you will take
these transaction you will put this
transaction to this Bitcoin block right
simple as it now you can clearly see
that these transactions are also part of
your Bitcoin blockchain and when there
will be a change in transaction your
hash will also change now let us go back
to our question that what happened if
all the nonsense will get exhausted in
less than one second let's start with
that question or let us start with the
solution of that question so let's say
this is our clock this is a beautiful
clock okay and this is our current
timestamp at 58 okay which is which is
has which has not changed yet okay let's
say this is our nons okay that we are
using
and let's say in less than one second in
less than one second you can just see
the clock just see this clock clear free
okay just see this Fork carefully and
you will see that in less than one
second we have exhausted all our
nonsense right
and still the timestamp is the same now
what Miner will do in this case because
nonses are exhausted he cannot depend
upon the timestamp he can only do one
thing in this case and that thing is
transactions he can change the
transactions given in this transaction
block and how he will do that he will
pick up a transaction which is having
the least amount of value okay which is
the 0.04
and he will replace this transaction
with a transaction which is just below
this 0.04 means Below in the sense which
is having a transaction fee of just less
than this 0.04 and if you will see in
this mempool the 0.02 is a transaction
which is having a transaction fee of
just less than 0.04 right and he will
replace these two transaction now as
soon as he will replace these two
transactions right you can clearly see
that now Miner can again use back all
the nonsense right because once he will
change the transaction the hash will
change right now he will have a
different kind of a hash and now he can
again change these nonses in order to
generate the target hash right I I hope
this makes sense because earlier if you
will go back to this situation we were
having some climate of a hash right and
by changing the nonce we were not able
to reach toward
now once we will change the transaction
like in this case we have replaced the
0.02 with 0.04 now this hash will change
so now we can again reuse our nonce
right now let's say again he will start
the same process he will generate some
nonce and only less than in less than
one second here again if you will see he
has again exhausted with all his nons
now what he will do again he will check
which is which transaction is having the
least amount of value in this case you
can clearly see it is 0.02 and he will
replace this with this 0.01 right he
will not replace it with this 0.04
because again he will land up to the
starting right so he will replace this
0.02 with this 0.01 transaction and now
again he is having an authority or I
will say not an authority again is
having a power to reuse the nonce right
and again you can clearly see that a
timestamp is still not changed so again
he will start the non-process and boom
in less than one second he has
again exhausted with all his nons now
what he will do he will again do the
same process again and again he will
replace the 0.01 with this
0.008 right
now
he will again start the same process
this is our repetitive process right and
again you can clearly see that he has
exhausted with all his Lawns and let's
say minor was not able to find the
solution with the help of this nons also
now what will happen because now you can
clearly see we are taking an example
error assumption here that we have we
have exhausted with all a transaction in
our mempool okay we can take this
assumption definitely there can be
thousands of transaction in our mempool
but I am entering this assumption that
we have exhausted with all our uh
transaction in our mem now what Miner
will do in this particular case
and the answer is if you will clearly
see here the timestamp will change after
this
one second has passed right till now the
case is that we were working with were
less than one second right so we started
with this less than one second less than
one second less than one second and now
we have reached R1 second now once he
will reached our once again
and since our trying stamped a timestamp
has changed in this case now you can
clearly see that the miner can again
restart the process of nons he will
again take the transaction which is
having the you know he will again take
the 0.04 which he has displaced earlier
so that he can found the solution he
will again take this 0.04 because it
this transaction is having the uh having
the most amount of transaction fee as
compared to the remaining transaction
and he will again start the process of
this generation of nons and if he will
be lucky he will get the answer in this
case otherwise again the same process
that we have discussed right this
process will get repeated again and
again till the time he will find his
solution
so I hope this makes sense let me just
give you a quick summary to you if you
are still not able to catch up with just
let me give you a quick summary to you
once again okay so we started with this
position okay and we exhausted with all
our nonsense in less than one second so
we replace our 0.04 transaction with
0.02 and now again we will start with
our nonsense again we exhausted with all
our nonsense still we haven't reached to
our solution so what we will do again we
will change the transaction means we
will replace the transaction so 0.02 was
replaced with the 0.01 now again the
mining process will start and boom again
you can clearly see that we assuming
that okay The Miner was not able to find
the solution and he has exhausted with
all his loans now what he will do again
he will again replace means
replace this transaction the 0.01
transaction with 0.08 and again he will
start the same process okay
okay 0.08 and again he will start the
same process and once he will reach to
this one second and let's say he is
still not he was now still not able to
find a solution he will do nothing just
he will wait for the timestamp to change
and once the timestamp will change again
he will be in power to use the nonsense
again and he will also take back his
piece right this transaction P of 0.04
why he is taking back a 0.04 transaction
first this is the this is the
transaction fee which is this
transaction is having the most amount of
transaction fee as compared to the
remaining transaction second reason is
because the timestamp will change so
with the timestamp has changed he will
be having a different kind of timestamp
right not timestamp actually different
kind of a hash for this block right and
due to which he can again use the
nonsense and again the same process will
start until or unless he will find the
solution to his problem so I hope hope
you understood this by now if you have
still any doubts please let me know your
doubts in the comment section below I
will be happy to answer your doubts okay
and yes let me tell you one more
important point in this video that never
try to have a transaction fees which is
two less okay so always see that what is
the current market transaction fee rate
if you will have your transaction fee
two Less in that case what will happen
Miner will never pick your transaction
in this case because minor let's say R
minor was not having any option right
that's why he picked this 0.008 but
still you can clearly see that 0.008 it
is wave pay way less than the these
transactions so chances that this
transaction will never be picked by The
Miner okay so just be careful if you are
doing any type of transaction
cryptocurrency transaction on a Bitcoin
or any other type of a blockchain just
remember that your transaction fee
should not be
so less that the miner will never pick
your transaction from the mempool okay
and in the next video definitely we will
talk about this mempool in much great
detail in this video we are going to see
how mempool Works behind the scene so
let's start
so this is our blockchain Network okay
so this is our blockchain Network and
the systems that you are seeing here
right so we are like we are assuming
that these systems these computers that
you are seeing on your scene are
basically miners
and this person like these people that
you're seeing in black color these
people are basically representing nodes
okay so these are the people who are not
doing any kind of mining these people
who are just here here it connected to
this blockchain network in order to do
some transaction let's say this person
wants to send some Bitcoin to this
person so that's why he need to connect
it to this blockchain network okay and
in the same way let's say the these
nodes also help in uh verification and
validation of a block so let's say if a
block will be created so these people
these nodes basically can validate and
verify a particular blog now let me tell
you one thing more that there is no like
any uh specific specialty or difference
between a node and a miner which
basically a miner is actually a node
only okay so this is a node only who has
actually opted for mining so these
people can also opt for mining so do not
just think that these two people are
basically two different kind of a people
they are same just the thing is that the
this node has opted for Mining and this
these nodes that you're seeing in Black
alert they have not opted for mining
okay
okay now as we have discussed in our
last video right that mempool is an area
where we store all our unconformed
transactions so let's say if this person
is doing some transaction that
transaction will go to mempool and
miners will pick transaction from that
mempool and I have discussed this in
great detail if you haven't watched the
previous video please watch that video
and then only continue with this video
okay
now many of you might think that when I
am seeing that mempool is an area where
all uncomfort transaction go you might
think that mempool is a centralized
database
but that's not the case mempool is not a
centralized database mempool is
something which is associated with each
and every node so this mempool is also
with the miners this mempool is also
associated with these nodes means these
nodes these miners has this area so
whenever you convert into node so your
system will be working as a database you
can think like your system is a database
not your system is a storage and in that
storage this mempool will be stored so
each and every person who is connected
to this blockchain network will consist
of this mempool okay so if you want to
have a mempool of your own means not of
your own actually a mempool like this so
you just need to be a so you need to
install a software called Bitcoin a
Bitcoin client and once you will install
this software you can also become a node
and then you will also have a mempool in
your system okay in your node
okay that's good now let's say this
person that you are seeing here this
node uh wants to do some kind of a
transaction so let's say this is our
transaction ID and he did some kind of a
transaction df123 now this information
will be conveyed to the
connected participants or the connected
nodes now one thing important to note
here is that you can clearly see that
this transaction is at this point of
time is an unconfirmed transaction so
until or unless this transaction will
not be verified and validated by The
Miner and will go to a block this
transaction will come under the category
of unconfirmed transaction and this is a
mempool this screen this green area that
you are seeing on your screen is a
mempool now this information will be
conveyed to the as I said to the
nearby nodes now once this information
will be converted to the nearby nodes
this transaction will also be added to
their mempool and the same way this
information will be transferred to the
remaining other nodes that are connected
to this blockchain network and by this
you see clearly see that these
transaction will be a part of each and
every mempool okay so any Miner can pick
these transaction from his mempool and
he will be able to then start mining
okay
now let's say this is also one of the
person who wants to do some kind of
transaction so let's say she did a
transaction of abc56 and this
transaction will again be added to the
uh nearby nodes so this information will
travel to the nearby nodes and from the
those this information will travel to
the other nearby nodes and this way you
can clearly see that all these
transactions actually added to the
mempool and by this only this mempool uh
will be filled with all the transactions
now currently what I am showing to you
on the screen is only four transactions
here right but that's not the case your
mempool can consist of thousands of
transactions but definitely I cannot
illustrate that here that's why I'm just
showing you four transactions okay so
this makes sense I hope now let us
understand so this is a process where we
have seen that how an unconformed
transaction goes to the mempool now let
us understand how this unconfirmed
transaction is taken from the miners
means how miners uh take these
transactions from the mempool and create
a blog for this so let's say uh
definitely since this is the blockchain
network so each of the nodes will have a
blockchain right exact copy of the
blockchain I have discussed in the
starting lecture right that blockchain
is a distributed immutable Ledger and as
we know that people are minors so they
will start mining for the Bitcoin
now let's say this Miner was the first
Miner who was able to create who was
able to solve this mining problem okay
he was able to solve this mining problem
and that's how he was able to create a
block and since he has now the
capability to create this block he can
add these transaction to this block okay
now once he will add these transaction
to this block he will convey this
information to the nodes to the nearby
miners that okay I have created this
block and I have like I have used this
like I have put these transaction into
my blog please confirm please verify and
will date my blog whether it is correct
or not now these nodes will start very
we'll start verifying and validating
these blocks and once they will verify
and validate and say that okay this
block created by this Miner is a correct
block
this block to their blockchain so you
can clearly see that so this information
has traveled to this this and this
person and that's why they have added
this block to their blockchain and once
they will add this lock to their
blockchain these transaction will also
move from this unconformed category to
the confirm category because now a block
is created and any transaction within
the block is a confirmed transaction now
this information again will be conveyed
to the remaining nodes they will also
create a will also take the remaining
like the transaction from this mempool
and I will they will add it to their
blog and in the same way others will
also do and this is how you can clearly
see that transactions are taken from
this mempool area to the blockchain area
okay so transactions are getting like
these unconfirmed transaction which
belongs to mempool are now becoming
confirmed transaction once they are once
they are part of this block of the
blockchain and this is how mempool works
but let me show you mempool in real life
also so how does mempool looks like so
this is our blockchain.com unconformed
like website and I have chosen this
unconfirmed transaction and now you can
clearly see that this is how mempool
looks like so what they are doing is
they also are this company
blockchain.com
um is running a node and now they are
displaying the data on our screen so
there you can clearly see that each and
every time one of the transaction is
being added to this mempool and all
these transactions are basically
unconfirmed transaction and this place
is nothing but this place is a mempool
now from this uncome from transactions
only miners will pick some of these
transaction and will add to the block of
the blockchain and once they will verify
and validate those block means from the
other participants of that blockchain
node once they will verify and validate
this block then these transactions will
become a confirm transaction so I hope
this makes sense do check out this
website this is a great website if you
are looking for some practical insight
about Bitcoin or ethereum or any of the
you know
like blockchain so mainly I think they
deal with Bitcoin and ethereum and then
Bitcoin cash and all those things but
still I will definitely suggest you to
do come and visit this website hi in
this video we are going to talk about
transactions and utxos in Bitcoin
blockchain so let's start so how
transaction actually occurs in a Bitcoin
blockchain okay so let us understand
that if you will understand this you can
easily understand how transactions
actually occur in any other kind of a
blockchain okay so this is very
important lecture so just be a little
bit more I will say cautious a little
bit more aware during this lecture so
let's say some of my friend okay let's
say some of my friend let's say Arjun
one of my friend transferred me some 0.4
Bitcoin to me okay in the same way there
is some friend of mine Raj who also sent
me some 0.3 Bitcoin Alice and Bob so
here you can see that all these people
Arjun Raj Alice
all these people have sent me some
amount of Bitcoin right
and these transaction that you are
seeing on your scene are basically
called as UT exos now what is the full
form of utxos these are unspend
transaction output unspent transaction
output or you can call them as UT exos
now let's say I want to buy this coffee
which is of 0.5 Bitcoin definitely a
very costly coffee but let's say I want
to buy this coffee of zero point but now
how this transaction will takes place
okay so let us understand this now if we
talk about a normal Banks transfer right
or a normal Bank uh I will say
transactions how it will work in a bank
Transaction what will happen let's say
if I have to buy this let's say 0.5
rupees or for 0.5
then in the bank statement what you will
see is that you will have some total
amount that is 0.4 plus 0.3 plus 0.7
plus 0.1 so you might have seen this
also right in your bank statement that
you have some this total bank account
balance and from that total account
balance from that total bank account
balance some amount get detected right
and this is how a normal transaction
Bank transaction looks like but in case
of Bitcoin this is not how it works okay
in case of Bitcoin what will happen so
understand how this transaction will
take place in the Bitcoin blockchain so
first thing that we will have is the
input okay so we will have an input and
from this utxos from this unspend
transaction output
our wallet because we are not going to
do that our Bitcoin wallet will select a
utxos which will help us in buying this
0.5 Bitcoin coffee
so either we can go for this 0.4 Bitcoin
plus 0.1 Bitcoin utxo or we can select
any other udx0 given here like this 0.3
Bitcoin udx so we cannot select because
this is not uh this will not be helpful
right to buy the 0.5 Bitcoin but we can
select this utxo so this is the total
random process this is done by just
selecting this Alice utxo definitely you
can also go for the 0.10.4 but we will
talk about this case in our upcoming
videos but in this case let let's say
that this utxo was selected from our
like by our wallet okay
now this utxo will be divided into two
first utxo the first output actually
will be 0.5 Bitcoin to the coffee shop
okay so 0.5 Bitcoin will be given to the
trophy shop so that we can buy the
coffee
the remaining utx so that is 0.5 0.7
minus 0.5 that is 0.2 Bitcoin will be
written back to us right because this is
this will work as a change we are giving
0.7 and 0.2 Bitcoin is written back as a
change right
now this UT this transaction that you
are seeing right this output that you
are seeing this will be utxo for the
coffee shop and this uh thing that you
are seeing this transaction that you are
seeing this output that you are seeing
this will be the utxo for our wallet
okay for our uh cryptocurrency wallet
where we have all these uh these all
these Duty xos now this is something
very different from a bank uh Bank
transaction right as I said in a bank
Transaction what will actually happen
from your total savings some amount will
get detected and this is how the
transaction will take place in a bank a
transaction in a bank in a banking world
right but in case of blockchain this is
now how it is done and don't worry if
you are still not able to get this
particular example we are going to have
many examples in our upcoming videos
then you will be able to understand this
in a much better way okay if you are
still not able to understand it if you
are able to understand it that's good
but in our upcoming videos I am going to
take some more examples so that I can
explain you this concept of udx host
because this is very important to
understand okay so we will see that so
this is how our utxo field will look
like so we will have Arjun utxo Raj Bob
and this will be a utxo from me to me
right because I am transferring 0.2
Bitcoin from my wallet to me only right
so that's how this will looks like in
our cryptocurrency in our Bitcoin wallet
and yes definitely we have also brought
this copy
now let me take one more example so that
you can better understand this so let's
say we have again these u2xos and we
want to buy this noodles which is a very
costly noodles of 1.4 Bitcoin but let's
say we want to buy this noodle so how
this input will work in this case let us
see some different kind of example now
in this case let's say our wallet can
select this 0.4 Bitcoin udx0 then this
0.3 Bitcoin udx0 and then this 0.7
Bitcoin udx0 so our wallet is selecting
all these three because 0.4 plus 0.3
plus 0.7 will be equal to 1.4 Bitcoin
and then this will be now this is while
this was our input and there will be an
output now this will be transferred to
our uh noodles shop only right because
we do not will be having any remaining
amount of beauty XO in this case right
because there is no change so this
output will become the utxo for our
noodle shop okay so this is how it will
work when we are adding all those but
still we will see some more example in
our upcoming videos and yes this will be
the only UD Expo that will be left in
our wallet because all these utxos this
religion Raj Alice we have spent all
these utxos so in our wallet we will be
seeing only this utx so okay and why
this is done like how why this is so
complicated actually this is done so
that in Bitcoin blockchain we can have a
track of each and every transaction and
we are not missing any kind of a
transaction that's why we are doing all
these complicated stuffs so that we can
have a track of each and every
transaction that is happening on Bitcoin
blockchain now in this video we are
going to talk about transaction fee the
previous video of utxos we talked about
how utxos work and if you haven't
watched the previous video please watch
that video
now in this example that we have
discussed in our previous Edo
so these were our available utx if
someone has done some payment and these
were the available uh udxos in our
wallet now once we will do this payment
for the coffee one of the U2 XO will be
selected from this given set of udxos
and let's say in this case we have
selected the 0.7 Bitcoin from LSU dxo
and once we are doing this payment you
can clearly see that this utxo has been
divided into two parts first is 0.5
Bitcoin to the coffee shop because we
want to buy this coffee and the second
utxo is there's 0.2 Bitcoin which is
given back to us just like we are like
we are actually giving back the change
right so we are providing some
additional money and the shopkeeper has
given us back the change now there is
one problem the problem is that we
haven't considered the transaction fee
so whenever we are doing some kind of
transaction in this case we are doing a
transaction right we are spending some
Bitcoin to buy this shop to buy this
coffee so we are doing some kind of a
transaction and in order to process this
transaction we need to pay some amount
of transaction fee to the miner because
Miner will be solving a mathematical
problem he will be taking our
transaction to create our to create a
Bitcoin block and then only our
transaction will get processed now in
order to know in order to make our
transaction get selected from The Miner
we have to pay a certain amount of
transaction fee so that transaction fee
can be anything but in this case let us
assume that we need to pay a transaction
fee of 0.1 Bitcoin so now what will
happen the 0.7 Bitcoin that you are
seeing on your screen it will not be
divided into 0.5 and 0.2 Bitcoin but it
will be divided into 0.5 Bitcoin and 0.1
Bitcoin because 0.1 Bitcoin will be the
fees that we are paying to The Miner
okay
and now the utxo will look something
like this so this utxo will be given
back to us right it will be the part of
our utxos field this udx0 will be the
part of our coffee shop owner and this
utxo the fees that we are giving right
this fee zero point 0.1 Bitcoin this
will be given back to the miner and this
is how actually utxos work in real life
okay
so remember this whenever you are doing
any kind of a transaction so in that
transaction you need to pay some amount
of fees to The Miner and that fees will
also be considered as a utxo for the
miner because it is like you are paying
some something to The Miner so it will
be a utxo for minus wallet so this is
how our utxo field will look like after
we will do payment for this coffee hi
welcome back now in this video we are
going to talk about cryptocurrency
wallets
so if we talk about cryptocurrency
wallets and if you have seen any
cryptocurrency wallet if you have it let
me show the cryptocurrency wallet I have
this metamask for it
so in this metamask wallet what you will
be seeing is that metamask wallet is
actually showing me the total amount of
cryptocurrency that I have in my wallet
means in my account actually
now this is actually rinky B this is
actually test Network actually it is uh
these are just generally these are
actually fake okay so just do not
confuse it with real ethers and try to
hack my account or something these are
fake ethers actually those these are on
test Network and we will talk about
these technical details what are test
networks what are fake ethers in great
detail in our upcoming courses but this
is not the part of this particular
course okay so in this if you will see
that I have this amount of balance in my
wallet so this arises a question right
that whether cryptocurrency wallets are
actually storing our balance right
because it is showing our balance so it
might be that whenever we are getting
some amount of cryptocurrency it is
getting stored on this wallet but this
is the case or not we are going to
answer this in this video okay and this
will be a very useful video for you to
just watch this video uh full okay
So currently you can see that I have
four blocks here okay and in all these
four blocks we have certain transactions
so if you remember from our coffee shop
uh utxo video if you do not just see
this screenshot I am attaching here so
here you can see that I have all these
transaction done to me and all these
transaction I'm showing on this block
number one so I am assuming that all
these transactions that are done to me
are actually the part of this block
number one this is just an assumption
okay so that I can explain you this
concept about cryptocurrency wallets so
this is just an assumption
this another set of transaction the
transaction that I am doing to the
coffee shop I am assuming that these are
the part of this block number two okay
in the same way and yes one more thing
that this transaction that you're seeing
right LS to me this transaction is
actually getting used up why because I
am using this 0.7 Bitcoin from Alice and
I'm giving it to the coffee shop and 0.2
back to me and these are the part of
this block number two so I am completely
using up this Alice 2 me transaction
right
now in the same way if you will remember
from our noodle shop utxo
example in that case we will see I have
some more amount of transaction done to
be and let us assume that okay my
friends are a little bit generous and
they are doing some more kind of
transaction they are sending me some
more Bitcoin to my wallet okay this is
an example and all these transactions
are plot of block number three and the
transaction that I am doing to the
Noodle Shop is a part of this walk
number four okay now in this also if you
will see this Arjun to me Raj to me
Alice to me all these three transactions
are getting used up so that I can pay to
this noodle shop right and I have shown
this here also
now
let us discuss uh let us discuss about
those transaction that we are not
spending so if you will see this
transaction which is done to me by Bob
we are not using this transaction we are
not using this transaction which is done
to me from me only while I when I was
giving the change
and if you will see this urgently
transaction rash to me transaction Bob
to me L transaction all these
transactions are those transactions
which are done to me means I was the
receiver and I haven't used up these
transactions well if you will see these
green transactions that you can see here
green viewed circles all these
transactions are Dawn transactions which
are actually used up transactions means
they are they do not uh definitely they
belong to the blockchain but we do not
care about it right because now we have
used all these transactions and the
remaining transaction that I'm showing
with the help of an arrow not actually
error because like this transaction
actually what I'm trying to say like
this transaction where I'm doing a
transaction to this noodle shop so this
transaction is a transaction where I am
the sender I am not the receiver right
so I am the sender here in the case of
this also me to coffee shop I am the
sender so this transaction is also I'm
not highlighting with yellow because I
am the sender I am detecting some
balance from my account to pay the this
coffee shop to pay this noodle shop
right
now let us see how actually
cryptocurrency wallets work how whether
like since we have this
questioning our cryptocurrency or not
now this in with the help of this
example it will be very clear that
cryptocurrency wallets are not actually
storing our cryptocurrencies so what
cryptocurrency wallets are actually
doing is they are keeping track of all
these yellow utxos
means those utxos which we haven't spent
like this green one and those udxos in
which we are the receiver because once
we are receiving something that will be
the part of our balance right so
cryptocurrency wallets are just keeping
the track of all these utxos by talking
to the blocks that you can see here
right they talk to these blockchain the
different blocks of the blockchain and
from that only they are able to keep the
track of all the unspent transactions
that are done to me and then what they
do they tap the value of all these
transaction and by that they are able to
determine the total amount of balance
that I am having on my account in my
account
so they are not actually storing our
cryptocurrency they are just keeping the
track means they are just keeping the
track on these blockchain the different
blocks of the blockchains and by that
they are able to calculate the total
amount of balance so they are just
displaying they are just displaying the
total amount of balance they do not have
our cryptocurrencies in any way they are
not in a position to uh to anything with
our cryptocurrencies and anyway until
unless it is a centralized wallet so we
have different kind of wallets we have
different kind of exchange like we have
centralized exchanges as well we have
decentralized exchanges so the X the
wallet that I have shown you right the
metamask wallet metamask wallet is
actually a decentralized wallet so
metamask wallet is not storing our
cryptocurrency
cryptocurrencies or metamask wallet is
not in a position to manage our
cryptocurrencies because the total
control of our cryptocurrencies is in
our and only metamask cannot do anything
in that case Okay so by this
remember that wallets if a wallet is a
decentralized wallet they do not keep
track of our cryptocurrencies but
definitely if you are using a
centralized exchange or a centralized
wallet chances are high that they are
actually storing all your
cryptocurrencies and they are displaying
the result to you on your wallets okay
so be aware about this also whenever you
are trying to use any cryptocurrency try
to go for a decent rise exchange try to
go for a decent eyes wallet but
definitely see whether it is safe or not
okay just do not blindly go to any
decentralized exchange or wallet the
point is that remember this thing that I
do not want to go in the detail of the
trading and all those things the point I
want to make clear is that decentralized
exchanges decentralized wallets are able
to keep track of your cryptocurrencies
by this method by keeping the track of
the different transactions that are
happening on the blocks and then they
are fetching those results and showing
you to you in the wallet so that you can
see easily on the UI part of the wallet
okay
now in this video we are going to talk
about private and public key and this
will be an important video so please be
with me
so in the previous video what we have
seen is that whatever transaction that
we do get actually stored on our
blockchain right and we also discussed
about the cryptocurrency wallets how
they work if you haven't watched the
previous video please watch it then you
will be having a better Clarity during
this video now the problem with this
model is that there is no Central
Authority who is actually verifying who
is actually doing a transaction let's
say for example like you can clearly see
that there is a transaction right Bob is
sending some Bitcoin to me 0.1 Bitcoin
to me right but how and who will
actually verify whether this Bob is
actually doing a transaction
and this 0.1 Bitcoin is actually being
sent by Bob we do not know right if we
talk about banking system they have
their own identification function so
which they are able to verify okay this
person is sending some amount of money
to this person so they are able to
verify all of those things but in case
of a decentralized financial system if
like it is a decentralized financial
system because we can send transactions
right we can money we can receive
Bitcoin actually so it is a kind of a
decentralized financial system right so
in this case you can see that there is
no centered Authority who can verify
whether the transaction is being done by
a particular person or not
just imagine a situation where a miner
is keeping some fake transaction in
these blocks because Miner have the
authority of uh of mining transactions
right of creating things so what they
can do is they can generate some fake
transactions let's say they can generate
some transaction of a is sending some
Bitcoin to them and they can have this
transaction in these blockchains right
now if this will happen in that case the
whole financial system of blockchain of
Bitcoin blockchain or any other
blockchain will collapse so how this
verification and validation of a
transaction takes place we are going to
see that in this video so this
verification and validation of a
transaction takes place with the help of
two keys first key is our private key
and second key is our public key so let
me show you this private key and public
key in my metamask wallet so this is a
wallet that I have talked about right in
the previous video so let me enter my
password here okay so this is my
metamask wallet and in this if you will
see this this is an account right so
this is an account so let me do one
thing
let me go for Account Details now if you
will see that this is my account this
account is nothing but this is account
is actually our public key but
definitely uh we will talk about this
account in more detail in our upcoming
video but for now you can think of this
account address as our public key
because this will be the address that we
will be sending to other person whenever
they want to transfer some Bitcoin or
some ether to our address okay and I
will show you that so don't worry about
it
so another thing if you will see let me
show you the
private key of this
count
details I think export private keys so
let me type my metamask password
remember one thing guys that this
private key is something that you should
never disclose to anyone because I'm
using fake ether here definitely if I
will be having some real ether I will
not be showing you this private key
because this is something very
confidential that you should never share
with anyone and that's what metamask
what it's also saying that never
disclose this key anyone with your
private keys can steal any asset held in
your account we've got this private key
will actually act as a nature okay I
will talk about this in great detail
just don't worry just see this that this
is your private key okay so this is your
private key so this is your public key
and let's say I want to send some ether
to some different account let's say I do
do I have another okay no issues what I
will do I will send some ether to my
account only so let me do that so I will
copy this I will send I will send to so
you can clearly see that I am this is
actually the sending address is actually
the public address where I want to send
some either I'm taking the example of
ether because this is Rinky B test
Network actually provides us with
ethereum transactions so don't worry
whether it is ethereum or whether it is
a Bitcoin because concept Remains the
Same okay so let's say I want to
transfer some 0.0001
rinky B it and when I will click once
you can clearly see that
so this so This transfer of ether is
actually taking place from my account to
the account that I am sending ether to
so when I'm sending this ether I will be
signing this transaction with my private
key stating that this transaction is
actually done by me okay and to whom I
am sending this transaction is the
person I am having the public key or you
can think of it as address or public
address of that person where I am
sending this ether to so when I will
click on confirm
so this transaction will take place and
some amount of ether will be transferred
from my account to some other person
account okay now the question arises as
I said who will verify this whether the
transaction that I have done right now
in front of you whether that transaction
is actually done by me or by some other
person so let us see that so for that we
have something
which is called as verification function
let me show you that so this is our
message message means this is our data
or you can think of it as transaction
also this is our private key I have
shown you this right now with the help
of this private key only our public key
our public exp is actually generated
okay so this private key is something
that you keep
with you only you never shared this
private key with anyone in the world and
this public key is something that you
share with anyone from whom you want to
receive some amount of cryptocurrency so
you can think of private key as your
email address password and public key as
your email address so you can share this
public key with anyone but you cannot
share this whatever key with anyone okay
now since this is our message and we
want to make sure that this message is
actually signed by us so what we will do
is with the help of this private key we
will sign this transaction now when we
will sign this transaction what we will
have is a signature now in order to
verify whether this message or this
transaction is being signed by me or not
what we will have we will be having is a
verification function now we will pass
as an input to this verification
function this message the transaction
that we have done this in nature okay
the signed message that we have done and
the third thing is our public our our
public key when we will pass these three
things to this verification function
this verification function will either
give in the output in either in yes or
no output is yes then we will say okay
this this message is actually being done
by this public key only means this
message this transaction is actually
done by me or the person who is actually
doing this transaction only and if this
verification function says no Then we
will say that okay the person who is
doing this transaction is not the right
person and then we will uh this
verification function will give an
output no with the help of which we will
be able to verify whether this message
is a correct message or a corrupted
message okay so this is a very simple
process we will talk about this in much
more detail in our upcoming videos this
is just to show you an overview of how
private key and public key is actually
used in cryptocurrency transactions hi
now in this video we are going to talk
about public key and private key
demonstration in the previous video we
have seen how we can use private key and
how we actually use public key and
everything in detail right now in this
video we are going to see a
demonstration for it so let's go to this
website and just for search for this
super data science public key and you
will find this link okay this first link
public slash private key pairs just
click on this
now once you will click on this you will
see that you will have two things that
is your private key and as well as your
public key Now by clicking on this
random function you can have different
private keys and different public key
lists say if I want to click on this if
you'll you can see right I'm just
clicking on this random function and as
I'm clicking on this random function my
public key is also getting changed
because as we have discussed in our
previous video with the help for private
key we generate our public key right
so let's say if I'm having something
like this so you can clearly see that as
I am changing the private key I'm
removing some elements from the private
key my public key is actually getting
changed right now remember one important
point that never have your private key
too short because if you are going to
have your private key Too Short in that
case what will happen anyone can guess
your private key and on behalf of you
they can do transactions so which I
don't think so you want it so do not
create your I will suggest you that do
not create your private key because when
you are going to create your own private
key chances are very high that it can be
easily used because humans are very poor
in creating random numbers okay in
generating random numbers that's why we
have computers so let the computer do
this work do not do that just for the
demonstration purpose I'm showing you
that by changing the elements here you
can have your different set of private
key I think it does not support the
alphabets that's why it is not changing
but no shoe so let's have number only
okay right now let's go to the
signatures part so in the signatures
part as we have discussed that with the
help of our private key what we do we
generally
verify that the message that we are
doing the transaction that we are doing
is actually done by us right so let's
say this is me
chitage I know it is a complicated name
sends some Bitcoin to
let's say uh Raju okay so we have Chutes
we have Raju this is our message so I
want to sign this transaction I want to
sign this transaction so what I will do
I will just click on the sign now as
soon as I will click on the sign you can
see that I have this message signature
and you cannot change this message in
nature because this is something which
is actually being done by using your
private key and by using your message
okay
so for different messages you will see
different kind of message in nature so
let's say if I'm changing it okay some
random text now if I will click on sign
okay
I think it is not supporting alphabets
that's right no no I don't think
I think oh no it is supporting alphabet
I just do not thought I do not see that
it is changing the signature it is too
long right so you can clearly see right
as I'm changing the message and I am
signing it okay I'm not saying
so now I am changing the message and I'm
signing it so you can see that I have a
different message in nature right
private key is the same definitely you
can change your this private key Also
let's say you want to have some
different private key like this and if
you will click on sign you will have a
different kind of message okay message
initial actually so this is how this
works in uh in Practical right now let
me show you this verification function
also so as we have discussed in the
previous video that for verification we
need message we need public key as well
as we need signature right and you can
see that we have all three elements here
when I will click on this verify you
will see that this will turn into green
color so let me click on this so now you
can see that it turns into green color
and if I'm going to change anything and
then I am going to verify it then you
will see that it will turn into red
color so let's say I am manipulating
this message okay I am a hacker and I am
trying to manipulate this message I'm
trying to change some data from this
message so what I am doing is I am just
instead of sending a transaction money
to Raju I am sending this money to me
let's say Okay so let's say this is me
just like this only and now if I will
click on verify you will see that it
will turn red in color white does white
girl get turn red in color because the
message because the signing that we have
done was for actually
H2 Raju right but now we have changed
the message we have uh manipulated the
message and since we have manipulated
the message that's why when we are doing
this verification it is turning into red
okay so if anyone is changing the
message or public key or signature in
any way then this verification function
will always give red color or I will say
no as an answer and this verification
will not be done okay and if it is
turning green in color means if the
verification function is sending an
output yes then it is working perfectly
fine mean your means your message public
key answer nature everything is fine and
you can work with this okay so I hope
you enjoyed this video this
demonstration video I will meet you in
the next video and definitely if you
have liked this video please click on
that like button if you are new to this
Channel please subscribe to this channel
because I'm regularly going to upload
new blockchain courses on this channel
and yes meet you soon take care bye bye
if you have any doubts comment below
this video okay
now in this video we are going to talk
about public key versus Bitcoin address
so if you remember from our previous
video where we talked about private and
public key where we talked that with the
help of this private key we generate
this public key and let's say if you
want to do any kind of transaction or
let's say we want to do any kind of you
know any we want to send any kind of
message then we sign this message using
this private key means we take this
private key this message and with the
help of which we generate a signature
right and then we take the signature
this message and the public key to this
verification function and with the help
of which we can verify whether the
transaction whether this message is
actually being sent by us or not right
and if you haven't saw the previous
videos please saw this video I have
talked about this in detail
now in this example we have more entity
and that entity is Bitcoin address now
what is this Bitcoin address
people think that Bitcoin address and
public key are the same thing but that's
not the case Bitcoin address is the
address at which you receive Bitcoin so
let's say you have a friend and you want
to receive some Bitcoin from your friend
so what you will send is your Bitcoin
address to your friend and then your
friend will transfer some Bitcoin to
that Bitcoin address
people think that public key is actually
being sent but actually Bitcoin address
is being sent in order to receive
Bitcoin here okay now what is the use of
public key so public key as we can
clearly see it is actually used for the
authentication right so whenever we are
doing some kind of transaction let's say
I'm sending some Bitcoin to my friend in
that case I will be using my public key
so public key is a different thing and
Bitcoin address is a different thing
now there might be some questions here
that why do we have publicly different
even though public is something that can
be you know that can be public in nature
so why do why do we not send our public
key for receiving Bitcoin why do we have
this special Bitcoin address and the
reason for this is that we want to make
our system more secure by sending our
public key we are actually making
ourselves more I will say vulnerable
because now we are sending our public
key to each and every one person and
might be individual they might be uh you
know I will say
0.0001 possibility that with the help of
our Public public key we might Trace
back to our private key but that's not
the possible case because we can only go
from private key to public key we can
never go for go back from public to
private key but there might be any case
in future must like any invention or
something like that there can be a
situation where we are able to go back
from our public to private key from this
public key to private key now that that
will be a very you know dangerous
situation now to have some additional
layer here to have some additional
security layer here what we have done is
we are generating a Bitcoin address from
this public key so let's say if someone
is trying to decode this Bitcoin address
might be again this is a might be a very
less probability case if something
happens in the future also then also
they will they will be able to go back
to the public key but not directly to
the private key so we are actually
adding one more security layer here so
that nobody can go to this private key
because private key is something that
needs to be private if someone is having
access to our private key they can take
all our funds they can manipulate all
our funds means they can do anything
with our cryptocurrencies that we have
in our wallet so that's why we have this
public key as well as this Bitcoin
address Bitcoin has to receive Bitcoin
public key for the verification of this
uh for for the verification of this for
a verification of our transaction okay
so if we talk about a Bitcoin blockchain
a typical block of a Bitcoin blockchain
is of size 1 MB okay so in this 1 MB we
have the block number some different
fields like you know as we have
discussed timestamp nodes and other
other fields as well as well as we have
a lot of transaction definitely I'm
showing only three transactions here but
definitely there are more transactions
here these are the transactions ID by
the way and this is our previous hash
this is our cache so you can see that
this one MB of block is containing so
many things right
and not only this this thing this 1mb
block also contains some more
information about the transactions
because we cannot only depend upon the
transaction ID right we need some more
information about the transaction like
uh who is doing this transaction to whom
this transaction has been done the
amount of Bitcoin that has been sent as
well as the signature and public key why
do we require signature in public key as
we have discussed in our previous video
of private and public key where we
talked about that so nature and public
key is required so that the other person
can verify whether this transaction is
actually being done by me or not by me
uh by me as in like in this case X is
doing some transaction so to verify
whether X has actually done this
transaction or not so nature and public
key is required and we have discussed
this in the previous video right so you
can see that transaction is involving so
many different fields also and this
thing this script sick means this in
nature as well as this public key
acquires around 60 to 65 percent of
space
now just imagine we have our MMB block
with 60 to 65 percent of space is
actually being acquired by this in
nature and by this public key which is
not a good thing why because if this
thing is acquiring around 60 to 65
percent of space then we have few space
left in order to have our transactions
means if we will cover this amount of
space just by its nature and public key
then we will have only few transactions
right because if this is acquiring 60 to
65 percent then we have on we are left
with only I think 30 to 35 percent of
space for our transactions which we do
not want right we want to accommodate
more number of transaction to our block
why so that more number of processing
can take place more number of
transaction can be solved means can be
processed in per second like in the case
of Visa which is actually solving
processing around thousands of
transaction per second and we've also
want the same with blockchain right with
Bitcoin blockchain because if we we will
process less number of transactions per
second then people will not be good
right people will not be happy that
let's say they have they have done some
transaction and not they have to wait
for let's say three to four days and
nobody wants this type of thing right
nobody wants to wait for three to four
days for a single transaction which can
be done using you know your via bank
transfer by a Visa in just few
milliseconds
so blockchain Community decided
something what they thought that instead
of having this 60 to 65 percent of a
space this stick with this this thing is
actually called as thick weight okay
segment as in segregated witness okay so
segment is segregated witness because
this is the witness that are doing this
transaction
and what the blockchain community taught
that why not to remove this thing and
said like let's send this thing
separately let's do not send this thing
the 60 to 5 65 percent script say within
this blog instead of this why not to
send this separately so first you will
have a Blog in which you will have all
the transaction okay so you can fully
use a block for filling up the
transactions and once you have fill up
the transaction once you are running
with
the feeling of transaction now you can
send this script Sig afterwards so by
this we are able to accommodate more
number of transaction with the by which
the miners will be able to process more
number of transaction per second and by
which people will be more happy in the
Bitcoin community so this was the
suggestion that was adopted and due to
which we have this thing this in nature
and public key which is also known as
segregated by segregated because now
they have they have been segregated
means they have been detached from this
and now they are being sent separately
in the Bitcoin Network okay so this is
something very important to know that
now you have this these things in nature
in public here as a separate entity and
this transaction field and all these
fields as a separate entity once your
transaction is filled up like once your
block is created then you send these
cigarette segregated Witnesses or script
sick after that okay so this is done so
that we can have more space for our
transaction so that we can process more
number of transactions per second okay
so this is all about segregated witness
hi in this video we are going to talk
about hierarchically deterministic
wallet or HD wallets so let's see what
it is and what is the use of HD wallets
so if we talk about our previous video
in that video we have discussed that
this Bitcoin address is actually used in
order to receive Bitcoin right and this
Bitcoin address is there so that we can
have secure kind of transaction because
so that we do not have we do not have to
reveal the public key every time we are
doing any kind of transaction right so
this was the whole purpose of Bitcoin
address but if I will tell you here that
there is still one problem one issue
with this particular approach where we
are using only single Bitcoin address
and the issue is that there are privacy
concerns now what is this privacy
concern since we are using the same
Bitcoin address again and again to
receive Bitcoin from our friends from
our relative or from our customer let's
say if you are a business owner so
anybody can track my Bitcoin address
transaction because I'm using the same
address again and again and everyone is
doing kind of transaction what kind of
Bitcoin to my this same Bitcoin address
so anybody can go to bitcoin Explorer or
any website like this and they can
search for my Bitcoin address and once
they will search for my Bitcoin address
they can see all kind of transaction
that I have receive or all kind of
Bitcoin that I have received from my
friend or from a relative or any other
person
now this is a dangerous kind of a
situation right because
now any person who is who who we do not
know any hacker or any you know scammer
can track down
the pattern that we are doing means he
can track down the pattern in
transaction that okay this kind of like
this this particular Bitcoin address is
receiving this kind of Bitcoin so might
be this person is a business owner or
let's say might be this person is a very
rich person because he receiving
constantly receiving some amount of
Bitcoin to his Bitcoin address so
anybody can easily find out the pattern
anybody can easily find out all the
transaction that we are doing and this
is not we want to show right to all the
person we do not want to show this to
the public you do not want to show that
okay today you have brought some coffee
or you have brought some clothes you do
not want to show this to the public that
you are doing this kind of transaction
so what is the solution to this problem
what we can do in order to prevent from
this problem what we can do is we can
use HD wallets so what are HD Waters HD
wallets are those wallets which actually
provide you functionality to have more
than one Bitcoin address if you talk
about early cryptocurrency wallets those
cryptocurrency warrants only give us the
functionality of having one Bitcoin
address and the problem as I said was
that anybody can easily find out the
type of transaction you are doing okay
so with the help of HD wallet what we
have is now is a master private key so
this HD wallet provides us with a master
private key and this master private key
is actually used to generate a private
key and this private key is used to
generate a public key and with the help
of which we can generate a Bitcoin
address and not only this now what we
can do is we can add
on let's say we added plus one to this
private key so no not have an entirely
different kind of private key and then
we can use this second private key in
order to generate second public key in
order to generate second address and in
the same way if you will see we can
continue on so we can have numbers of
private key we can have hundreds of
private key and we can have hundreds of
Bitcoin addresses and with the help of
which nobody can track out what who we
are or what we are doing actually now
remember I'm not saying that by tracking
your addresses anybody can find out your
home or your name no I'm not saying that
I'm just saying that your transaction
since every each and every transaction
is in public anybody can find out uh you
know pattern in that and from that
pattern he can he might reach to you
okay this is one of the possibilities it
is not that completely true that it will
always happen but it there can be a
possibility of happening that right so
for that SD wallets provide us with this
safeguard that now you can clearly see
that we have multiple addresses we can
use these multiple addresses we have our
crypto wallet and you can select any of
the addresses that are provided and you
can use those addresses in order to do
any kind of transaction and by this your
identity your privacy is totally
protected and why they are called
hierarchically deterministic wallet and
the reason for this is very simple
because as you can clearly see right
that it is like an hierarchy right so
someone is donating this this then this
so a hierarchy is there not only this if
you talk about real world application
let's say you are a CEO of a company
okay and you want to give certain
authority to your employees let's say
you have some top managers so what you
can do is you can hold your master
private key and you can provide these
private key one private key to private
key three private key four to your
managers so they so let's say they want
to do any kind of transactions any kind
of payment for their for your company
because since you are providing then the
private key so every transaction that
you will be doing with the help of this
driver key will be for business purposes
right so they will be able to do all
kind of transaction with these private
key because private key is actually used
for the transactions right and with the
help of this master private key you can
easily find out what kind of
transactions your managers are doing now
your managers cannot find out what kind
of transaction you are doing with the
help of this master private key but with
the help of this master private key you
can find out what kind of transactions
your managers are doing so you can
easily find out like if this is manager
one kind of transaction he is doing or
manager 2 what kind of transaction she
is doing so you can find out each and
every detail about these private keys so
you can go from here to here again but
you cannot go from here to right so this
is something we have talked about in the
previous videos also right
so this is the use of HD wallets and
that's why we use HD wallets because
they provide service privacy as well as
safety and let me show you one example
also so this is an address and you can
clearly see all the associated
transactions of this address what amount
of Bitcoin he is sending what amount of
Bitcoin he is receiving each and
everything is given in this blockchain
Explorer just you have to come to this
particular website just paste down the
address any random address or any
address that you have just search for it
and you can find out each and every
transaction that this particular address
is doing okay hello hello hello now in
this video we are going to start with
ethereum so in the starting of our
course as I said right that I have
divided this course into three parts
module a where we talked about
blockchain what would be where we talked
about cryptocurrency that is Bitcoin and
now we are going to cover module C so I
am very excited to start this new module
and in this module we are going to learn
each and everything about ethereum like
what is ethereum what is a smart
contract decentralized application evm
Dao hard and soft Fork Dao attack Ico
and all coins and definitely much more
this is just an overview so do not be
confused that only they are going to be
only nine videos they are going to be so
many new things in our upcoming videos
but let's start with this new module and
let's start with what is ethereum now
before talking about ethereum let us
talk about the founder of ethereum who
is vitalik Butrin vitalic butane is the
founder of ethereum he proposed the idea
of ethereum in 2013 when he was only 19
years old
and his story is also very inspiring
guys he proposed the same idea to the
Bitcoin community that we should have a
blockchain in which at which actually we
can run programs but nobody in the
Bitcoin Community believed in him and
then only he launched the ethereum
blockchain
now what is wonderful about ethereum
blockchain ethereum blockchain like if
you talk about uh Bitcoin blockchain
which came before ethereum blockchain
Bitcoin blockchain
only supports transactions of Bitcoin
means you can do transactions on bitcoin
like you can send some Bitcoin to your
friend or your friend can send some
Bitcoin to you but you cannot run
programs on bitcoin blockchain and
ethereum is a blockchain that gives you
a facility to run programs on the
blockchain on this ethereum blockchain
and these programs are called smart
contracts and we will talk about this in
much more detail in our upcoming videos
but for now this is the most interesting
thing about ethereum that you can run
programs on ethereum blockchain and with
the help of which you can create
decentralized application and again this
is a topic which we will discuss about
in our upcoming videos in great detail
and if we talk about the cryptocurrency
related to ethereum that is ether so if
we talk about Bitcoin Bitcoin provides
us with Bitcoin and if we talk about
ethereum it provides us with ether as a
cryptocurrency okay but we will talk
about ethereum in much more detail in
our upcoming videos this is just an
introductory video could tell you what
is ethereum and who is the founder of
ethereum but we will talk about ethereum
in much more detail in our upcoming
videos now in this video we are going to
talk about ethereum notes let us see
what are they
so let's say this is our ethereum
blockchain Network okay where a b c e f
these are different systems and they are
part of this ethereum blockchain network
now let's say you also want to become a
part of this ethereum network let's say
you also think that okay I also want to
be the part of this ethereum network and
I also warned that I should have the
access to the blockchain you want you
may want right in future
so what you have to do in order to
become a part of this ethereum
blockchain network
now in order to become a part of this
ethereum blockchain network you need to
install a software called get
or we also called these kind of software
as client so you need to install this
client that is get in order to become a
part of this ethereum blockchain network
now once you will become a part of this
ethereum blockchain network you can also
have access to the ethereum blockchain
like these nodes have okay so let me
show you that software so this is get so
this is our get
okay so once you will install this
software into your system then you can
also have access to the ethereum
blockchain you can do transaction on
ethereum blockchain let's say you want
to become a miner in the ethereum
blockchain then you can also become a
miner in the ethereum blockchain once
you will install this get software okay
now in order to become this and yes one
more important thing that I should tell
you that once you will become a part of
this ethereum blockchain network then
you will not be a normal system then you
will be called as node so let's say
before installing of get you are having
a normal laptop normal system okay let
us call that now once you will install
get and once you will start running get
on your system then your system will not
be a normal system now it is a special
kind of system because now it can be a
part of our ethereum blockchain and we
called that kind of a system as node
okay so you need to install git in order
to become a part of this ethereum
network and if you will become a part of
this ethereum network work you will be
called as no
now we have different kind of nodes
because
if you talk about ethereum blockchain we
have different kind of people there are
few people who want to be minors there
are few people who just want to be
validators there are few people who just
want to do normal transaction on
ethereum blockchain
so that's why we have three kinds of
varieties three types of nodes in the
ethereum blockchain first we have full
node second we have light node and third
we have our cheap node let us see what
are these three different nodes
so if we talk about full load as the
name suggests it consists of the whole
copy of the blockchain so whatever is
happening on the blockchain ecosystem
ethereum blockchain ecosystem each and
every data each and every block
information is consists of with this
full node so if you become a full node
you will have access to the whole
ethereum blockchain but definitely not
the whole I will say there will be some
amount of data you have to request from
a different kind of a node that we
called as archievement you can see that
it stores full blockchain data although
this is periodically pruned so a full
node does not store all state data back
to Genesis so definitely you will be
having some amount of data let's say if
they are 100 blocks so you will be
having information about let's say 80
Blocks but rest 20 blocks will be pruned
okay so you cannot have access to that
20 blocks definitely you can ask that
like you can ask about that data about
that 20 blocks data from our cheap node
and we will talk about Archie notes so
don't worry but one thing is for sure
you can have access to around 80 percent
of the blockchain data that is happening
that is there in the ethereum blockchain
ecosystem now if you will become a full
node then you can participate in the
validation verification as well as
mining of the blocks okay validate the
blocks are malicious whether the
transaction are right or not so you can
do all kind of thing if you will become
a full node third thing is that it
serves the network and provide data on
request means we will in the next slide
we will talk about light node and light
node actually depends upon full node
full node depends upon our chief node
and light node depends upon full node so
if you request some data full node will
be the one that can also provide you
with that data especially light mode
access uh lightning request for that
data from Full node and we actually
request data from light node so this is
how this whole process actually works
and all states can be derived from Full
node although very old state are
reconstructed from request made to RT
node as I said that you can definitely
have access let's say if you have
hundred blocks and you as a full node
you have only access to 80 Blocks but
let's say you want to have access to
those 20 left blocks then in order to do
that you have to just request from the
archive notes that hey I just want that
data can you please send me that data so
our achieve node will send you that data
so this is how full node works but
definitely in order to become a full
node you need to have a good system you
need to have a system which has higher
storage because if you will have less
amount of storage or let's say your
internet is not that kind of a stable in
that case full full node will not work
for you so you need to have a dedicated
system in order to run a full node now
let's talk about light node and light
node is the most favorite one for most
of the users and the reason is very
simple because light node does not store
the entire blockchain it only store the
summary of blockchain okay so it is like
blockchain is a whole story and it is
having some input like light node is
loading only the summary point of that
story so this is how light node works
okay and it depends upon full load so
whatever transaction are happening it if
it wants to have the you know if it
wants to know about that transaction it
has to request from the one node
and it is very good for those system
which have low capacity devices so let's
say you you have you are having a system
which is not of you know good storage
and your internet is not that good in
that case you can become a light node
and by becoming a light node you can do
transaction on the ethereum blockchain
definitely you cannot become a validator
or a miner by using light mode so the
light node do not participate in the
consensus means it does not participate
in the you know in the proof of work
because definitely Now ethereum does not
work on proof of work now it has chapter
problems take so you cannot participate
in the consensus part means you cannot
participate in the decision making part
whether a block is a malicious block or
not whether a block is a correct block
or if not do that you cannot mine a Blog
you cannot create a blog you can only
access the ethereum block like you can
see what is happening on the ethereum
blockchain this is the only role you
will be having if you will become a
light Road let's talk about archive node
so archive node as I talked earlier also
these are the nodes that have the entire
history of the blockchain so if there
are hundred blocks in the ethereum
blockchain our chief node will store the
entire 100 blocks in its you know in its
data storage so this is how our cheap
node works and that's why it is written
that built an archim of historical data
means from the beginning like uh
ethereum when ethereum started from that
point of time time till now they are
storing each and every data and yes it
requires terabytes of disk space if you
want to become an archive node so if you
are having you know some GB of space
then it will not be beneficial to become
an archive node it will not be fruitful
so you need to
have terabytes of data space disk space
actually in order to become our cheap
node so these are the three different
nodes that we have in ethereum
blockchain and trust me this light node
is the most
easy one if you want to become a part of
this ethereum blockchain this is the
most easy one because it does not
require much from you it only requires
some amount of storage and if you have
those like certain amount of storage you
can become a light now in this video we
are going to talk about ethereum
accounts let's start
so what is an ethereum account an
ethereum account is an entity with an
ether balance or it balance that can
send or receive transactions on ethereum
blockchain the definition is very simple
if you will see the ethereum account
works
just like our bank account with the help
of our bank account we can send some
money we can receive some money in the
same way with the help of ethereum
account we can say some ether we can
receive some ether so if you have an
ethereum account now you can send ether
to someone and receive ether from
someone
there are basically two types of
ethereum accounts first one is
externally owned account that is e o e o
a and second one is contract account let
us understand each of them with the help
of an example
so what is an externally owned account
so externally owned account are those
account that are actually opened by a
human so if you are a human definitely
if you are listening to me you are a
human so if you will open an account on
ethereum then that account will be an
externally owned account now the key
feature of this externally owned account
is that for opening this extra new
account you will need a wallet so that
can be any cryptocurrency wallet and in
order to access this wallet what you
will have is a private key and we have
seen this also right I was talking about
private key and publicly I have shown
you this also that with the help of this
private key you can access this wallet
and this wallet will provide you the
complete control over your externally
Vodacom okay and we will see an example
also so don't worry so with the help of
this private key you can access this
wallet and this wallet will then show
you your current balance whatever
balance you have in your cryptocurrency
wallet and also with the help of this
you can send transaction you can receive
transaction and not only this with the
help of externally owned account you can
access your smart contract and we will
see an example for this also definitely
I will talk about smart contract in much
more detail in our upcoming videos but
for now you can think a smart contract
as a simple program and with the help of
our externally owned account we can
access our smart contract okay so let me
teach you an example also so this is our
metamask wallet I'm using this for a
long time right throughout this video so
in this this account that you're seeing
right on your scheme this account is
your externally owned account or eoa and
with the help of this account you can
send some ether to some other account
also but for now I don't think so I have
any other account to test this so what I
will do is I will just copy the same
address I will send some ether to my own
address only so I am copying this
address so it is like you are no this is
that this is the account address of the
person to whom you want to send some
ether so let's say I want to send some
0.0001 if and then I will click on next
and then I will
click on confirm now once I will click
on confirm
0.00018 will be transferred to this
particular account okay because I have
the I have this account only at this
point of time so I am sending the same
to my address only but definitely if you
will have some other address you can
send ether to that address as well okay
so let's wait for our transaction to be
get confirmed so you can now see that
our transaction is confirmed and we can
see that on
this gorily etherscan.io so this is you
as you can see that
this is our ethereum blockchain means
ethereum blockchain block and this is
the from address means this is the
person who has actually sent some meter
and this is the address of a person to
whom this address was uh this ether was
actually sent and also you can see other
details on the ethereum blockchain that
the transaction fee they charged and the
amount of ether that I have sent from
this address to this address so this is
the whole use of external account so
that you can send receive ether with the
help of extend your own account now
let's talk about the second account and
that account is one product account so
this contract account is which is
actually controlled by your contract so
definitely in future I will create a
course on solidity in that course I will
definitely show you how you can create
your own contract account but in this
video because this is out of the scope
of this course in this video I will just
demonstrate you how a contract account
looks like and what is the use of
contract accounts so with the help of
contract account just like with the help
of your ex in your account you can send
and receive it you can also do the same
with the help of your contract account
the only difference is that this
contract account is totally controlled
by the contract code so whatever code
you have written in your contract in
your smart contract that will control
how the sending and receiving of ether
will be done okay let me show you that
also so
let me show you one contract okay so
this is one of a random contract address
okay this is not I have created or
something this is a random contract
address that is available on ethereum
blockchain okay and let's say I want to
send some ether to this contract so can
I do that yes you can do that this is
your contract account address okay so
you have to just copy this
and you have to open your wallet because
as I said that with the help of your
externally owned account you can
interact with the smart contract right
so I want to send some ether to this
contract so I will click on send I will
paste the address of this contract
account okay so this is the contract
account address and let's say I want to
send some Zero Point again some 0.0001
ether and then I will click on next I'm
not sure whether it will get confirmed
or not because this is not my contract
okay it is a random contract if if this
contract does not have any functionality
of receiving either definitely it will
fail okay so I'm just telling you this
beforehand because I haven't created
this contract I'm just randomly sending
some ether to this contract address
so let's see what will happen let's wait
for our transaction to get confirmed
okay let's go to block Explorer
so now in this you can clearly see that
this is the contract account that I have
used in order to send some ether and
this is the contract address at which I
have sent this ether okay
and whether it will fail or pass I do
not know let's wait and let's see so now
you can see that it got failed because
this contract might not have any
functionality to receive the ether
because as I said everything in contract
account means in this contract account
is totally dependent on the smart
contract so if in your smart contract
you do not have any functionality of
receiving ether then definitely you
cannot receive anything right but you
can see that I tried I tried to send
some either this was the transaction fee
this was the value that I have sent and
everything but it got canceled that's a
different story okay so this is how
contract account looks like this address
that you are seeing this is how your
contract account looks like and why do
we have this contract account
so that we can provide a unique identity
to our contracts right because let's say
in future I want to talk to my contract
I want to receive some data from my
contract and definitely I need to have
some address right where I can locate my
contract and this contract account
actually help us in that so that's why
we have this contract address and
everything
let me show you a quick picture like
what is the difference between extending
on account and what is the difference
between contract account so in action
you want account you require a private
key so that you can access your wallet
in Conrad account you do not require any
kind of private key or public key this
is controlled by human because we are
creating this wallet but this is
controlled by the contract code this is
uh having a unique account address and
this is also having a unique account
address so that we can locate it right
we can talk to them and this also hold
ethereum balance and this can also hold
ethereum balance okay so because they
work just like your normal extra new
account contract the only difference is
that they are in control of contract
code and not by humans this is the only
difference otherwise they can do all
sort of things that this extra new
account can do they can receive balance
they can send balance they can receive
ether they can send ether they can have
their own balance like okay this account
this contract is having let's say two
eth of balance so this is also possible
in the case of contract account okay
so I hope now it is clear what is the
difference between extreme account and
what's the difference between contract
account now we are coming to
hi now let us talk about the
Topic in ethereum blockchain that is
smart contract let's see what it is
so if we talk about smart contract what
is a smart contract a smart contract is
simply a program written on ethereum
blockchain so just like you write
programming C C plus plus Java right you
write programs
in the city you write programs for the
ethereum blockchain and those programs
are actually called as a smart contract
what yes it is true smart contracts are
nothing but simply programs now you must
be wondering that why do we call them a
smart contract if they are simply
programs actually the thing with the
smart contract is that in a smart
contract you write projects like you
have that Logics like if this will
happen then this will happen if this
will happen then this will happen so it
is just like a contract right where you
are writing some if and else statement
where you are stating certain rules that
if this will happen then this will
happen if this will happen then this
will happen so because of this I think
the name was given as a smart contract
otherwise smart contracts are simply
program that are written on ethereum
blockchain nothing else nothing more now
let us talk about one important thing
about smart contract that if we talk
about ethereum blockchain we have the
foundation of writing programs that is
smart contract but if we talk about
Bitcoin we do not have any functionality
writing smart contracts on bitcoin
blockchain why this is so let us answer
this question if we talk about Bitcoin
blockchain the programming language that
is used in order to create our Bitcoin
blockchain is Bitcoin script and the
programming language that we are using
in order to create our smart contract is
solidity it is a very popular
programming language for either ethereum
blockchain you might have heard this
name solidity and we use this
programming language in order to write
programs of the ethereum blockchain now
the thing with Bitcoin script is that
Bitcoin script is not during complete
while our solid reprogramming language
is Turing complete now what do I mean by
not Turing complete and during complete
so when I say Turing complete tuning
complete means that you can code any
form of logic that you can think so
whatever you can think you can code in
solidity programming language while in
case of Bitcoin script that's not the
case you cannot write all the programs
that you can can think and the reason
for this is that Bitcoin script does not
support Loops while salty programming
language support loops and that's the
reason and that's the reason ethereum
blockchain supports programs means you
can write programs on ethereum
blockchain but you cannot write programs
on bitcoin blockchain because Bitcoin
blockchain is using Bitcoin script which
is not during complete means you cannot
write loops on bitcoin script and since
you cannot write loops on bitcoin script
you cannot code any form of program that
you can think right and now you must be
wondering like why Satoshi Nakamoto will
do that why Satoshi Nakamoto use a
programming language that is not during
complete why not any other programming
language that is student complete and
the reason is very simple guys at the
time when Satoshi Nakamoto was
developing this Bitcoin blockchain
he thought of a problem and the problem
was actually real the problem was that
let's say Bitcoin is providing you
facility to ride programs on the Bitcoin
blockchain okay so let's say this is a
program that I have created using
Bitcoin blockchain and now I'm I'm
trying to run this program on the
Bitcoin blockchain so these are the
participants that are connected with
each other and they are forming the
Bitcoin blockchain so definitely they
will be having their blockchains and
everything will be there
now the problem is that when we will run
a program on this Bitcoin blockchain the
same program will run on each of the
computers or I will say in each of the
nodes that are part of this Bitcoin
blockchain because if we talk about
Bitcoin right we have seen right that
blockchain is a distributed immutable
ledger so this program that we will be
writing will be a part of our Bitcoin
blockchain so this will also get
distributed all across the network so if
it will get distributed all over the
network so the same program will be
running on each and every system now the
problem is that if this program consists
of an infinite Loop then what will
happen if this program will consist of
an infinite Loop then this infinite LEAP
program will run on each and every
system and the thing is nobody can stop
these programs why because in Bitcoin
blockchain we do not have any Central
Authority and since we do not have any
Central Authority nobody can control
these programs nobody can stop this
program and this will totally destroy
the Bitcoin blockchain right because
these programs will keep on running will
keep on running and they will slow down
the network and Bitcoin blockchain will
collapse so this was the problem when
Satoshi Nakamoto was designing Bitcoin
blockchain
now you must think like then how
ethereum is able to do that right
because as we can clearly see on this
screen that we cannot have programs
running on blockchain because if we are
running a program running on blockchain
and if the program consists of a loop
then this program will be running
continuously all over the network and
this will totally destroy the network
so what vitalik butane taught that
definitely we have we have we will have
a smart contract in this transactions
field because we have different
transactions right we want to send ether
we want to receive ether all these
things will be there but we will also be
having smart contracts right in this
blockchain in this ethereum block
blockchain so what he said that okay you
can write smart contracts you can write
programs on ethereum blockchain but you
need to pay for every single line of
code that you are running on this
program this is the beauty of ethereum
blockchain just imagine what he is
thinking what he actually thought
actually
that when you will create programs you
will be able to create you will be able
to write code whatever code you want to
write you can do that but for every
single line of code that is executing on
the ethereum blockchain you need to pay
money
and this is done using gas which we will
talk about in our upcoming video but
this this is how vitalybutrin stopped
this infinite Loop concept because if a
person is running an infinite Loop then
he will be exhausting all his money that
is that he is having in his ethereum
account balance right so nobody wants
that right nobody want to exhaust their
money and this is how ethereum
stopped this infinite Loop problem
definitely other measures were also done
but this is one of the beautiful thing
that vitalik butane thought so that he
can stop this infinite Loop programs in
the ethereum blockchain and that's why
now we can run programs on so many
systems mean when our program is running
it is running on so many different
systems without collapsing the ethereum
blockchain because if someone tries to
collapse that he has to exhaust with all
his money and nobody can have infinite
money in his account right you can have
some you know let's say one crore two
let's say let's say 100 crore but at one
point of time your money will get
exhausted right and that's how ethereum
blockchain is
you know much more ahead of the hackers
and the scammers I will say so that's
why we are able to run programs on the
ethereum blockchain and that's why we
are not able to run programs on the
Bitcoin blockchain and this is very
important interview question also so
remember this concept this is very
important and might be asked in your
interviews hi now in this video we are
going to talk about decentralized
application so let's start so before
talking about decentralized application
let us talk about how our centralized
application works so this is our
architecture
centralized application where we have
various clients okay and we have one
server So This Server is actually owned
by a central Authority so let's say this
is Amazon Amazon is having all your data
whenever you request something from
Amazon Amazon respond you with that data
so we are simply clients and Amazon is
actually having the server means this is
the server of Amazon okay so this is
house client server model works
to talk about decentralized application
since this application is decentralized
we do not have a client server model
each and everything is done on
peer-to-peer Network only means on this
ethereum block so this is how our P2P
Network looks like so our application
will not be running on a single node but
our application will be running on each
and every node so this is how
decentralized application works and you
can clearly see that how this is running
on each and every system right
now let us see some one formal
definition of decentralized application
how our decentralized application is
created then you will understand why it
is called decentralized so for creating
our decentralized application we require
smart contract definitely because in
this smart contract we write our
business logic because this smart
contract is also decentralized in nature
right we write our smart contract this
smart contract is running on each and
every node so this decentralized
application is actually using this as
smart contract okay as our backend so if
we talk about our centralized
application federalized application they
use server right and that server is
owned by a particular company but in
case of a smart contract smart contract
is not owned by any particular company
it is the part of our whole ethereum
blockchain then we take this smart
contract and then we connect one front
end with this smart contract why do we
have this front end so that we can with
the functioning of this smart contract
right because Normal user cannot
directly talk to our smart contract so
they require one UI in order to talk to
this smart contract and when we
integrate these two things and deploy it
over the blockchain or over the
decentralized network the application
that we get by integrating these two
technologies is a decentralized
application so this is one simple
definition of decentralized application
when you integrate your smart contract
with your front-end and deploy it on the
decentralized network then the
application that you get is a
decentralized application and here is
the list of some decentralized
applications so Google which is a
centralized application that alternative
is research Twitter which is a
centralized application for social media
lbry is different like it is our
decentralized application for your
social connections and like in YouTube
be a video platform via YouTube
alternative is
you can use in order to watch videos
definitely all these decentralized
applications are not totally I will say
fully equipped with each and everything
with each and every features they are in
development phase only but you can have
a look at these different decentralized
application they are available so let me
show you dtube so this is dtube
okay so it is taking some time let's
wait
so now you can see that this is our DQ
and you can see that there are certain
videos that are being uploaded at each
and every time right so yes this is how
our D tube looks like you have to login
it in order to run it so now you can
clearly see that we have options for
username and YouTube private qk I
haven't used this application yet but
you can see that right you have a lot of
options here and definitely we will talk
about this what is this 0.089 dollar we
will talk about this also but this is
how it looks and currently definitely
they are not much you know users at this
point of time because as I said it is
totally new people are still you know
working on it still doing it
yes this is good so let us see the
difference between our centralized
applications and decentralized
application if we talk about our
centralized application they are not
trustworthy right because they are
owning our data they can use they can
manage anything with our data because
server is actually in control of the
company that is providing us the
services and you have seen users like
this you might have seen news also
related to this that your data got
compromised or something like that
credit card details got the because each
and everything is in the control of this
centralized Authority and you cannot
trust it but in a decentralized
application since everything is open it
is not in control of a central Authority
so you can trust on them and not only
this these three centralized application
code is totally available in the open
source so you can go and read about the
code while in centralized application
you cannot read their code whatever they
are doing with your data you do not know
nothing about it they can censor our you
know they can censor important things
let's say I have a video which which is
against government just an example
people so these centralized applications
can censor those videos right but in
decentralized application you cannot do
that once a video is live nobody can
remove until unless we have some kind of
you know feature in it that okay after
Democrats like after certain vote you
can remove the video or something like
that otherwise nobody can remove the
video because once it is on
decentralized application it is on
thousands and lacks of computers and you
you can you might remove some computers
right but still it will be running on
some other different like in on some
other different note right because in a
decentralized network we have lacks and
thousands of computers so if we talk
about centralized application we need to
pay means let us understand this with
the help of YouTube YouTube is a
centralized application and if you were
watching some we need to see some ads
how YouTube and if you do not want to
watch those ad what you have to do you
have to buy a YouTube membership right
you need to pay in order to use their
application well in case of
decentralized application this is not
the case in the case of decentralized
application definitely decentralized
application let's say dtube will show
you ads but they will give you an option
that whether you want to see those ads
or whether you do not want to see those
ads if you want to if you are willing to
see those ads then you will be paid for
every ad that you are watching yes they
will be paying you for every ad that you
will be watching while in case of
centralized application this is not the
case right you need to pay so remove ads
but in decent AS application you will be
having some options that okay you want
to watch what's if you want to watch ads
or not if you do not want to watch ads
then you will not be paid but if you are
willing to watch ads then they will pay
you for watching ads if we talk about
centralized application they can go down
right once a server is down nobody can
access that application but in the case
of decentralized application this can
never happen because your application is
not running only on single server but
your application is running on each and
every node that is part of that
ethereum blockchain right so there are
thousands and lacks of computers that
are running your applications so nobody
can stop it so those application cannot
go down because they are running on so
many nodes right so do let me know in
the comment section whether
decentralized applications are great or
not okay don't forget do comment it now
let us talk about ethereum virtual
machine and what are they
so as we discussed in the previous video
that decentralized applications are
application that run on each and every
node that is part of our ethereum
blockchain Network right
now the problem in this approach is that
it may happen some hacker or some
malicious user is running an application
that is containing some virus right and
if that application if that
decentralized application is containing
some virus then that virus will be
running on each and every system that is
part of this ethereum blockchain network
right and this is not we want right we
do not want that virus should run on our
system
so what ethereum community so ethereum
Community got an idea they said that why
to run decentralized application
directly on your system they said that
you need to install a client that we
have talked about right get you need to
install a client called get that get
will run an ethereum virtual machine
inside your computer and this
decentralized application will not be
running on your computer but this
decentires application will be running
on this ethereum virtual machine so it
is like if you have used virtualbox
right if you have used virtualbox so you
might know this that let's say if you
are having a host operating system
Windows and you want to run Linux
operating system on your Windows
operating system in order to do that you
need to install virtualbox and then you
can run Linux operating system on your
Windows operating system yes if you
haven't used it it move you might find
it complicated just search on just
search for virtualbox and you will see a
lot of different videos with the help of
which you can run Windows you can run
Linux operating system on a Windows
operating system machine and then what
ethereum community did they designed
this ethereum virtual machine so
whatever will be happening like whatever
result this decentralized application or
whatever this decentralized application
will be doing it will not be interacting
directly with your machine it will be
only interacting with this ethereum
virtual machine which is like an
operating system running on your on the
top of your operating system so this is
the beautiful thing about ethereum
virtual machine and how do you have this
ethereum virtual machine so when you
install this git client software in your
system when you become the part of this
ethereum blockchain in that way only you
also get access to this ethereum virtual
machine okay so whatever blockchain
whatever thing is happening in you it
might look like that it is happening in
your system but it will be happening on
the this ethereum virtual machine now
let us talk about ethereum gas which is
a very important concept for the
ethereum blockchain
so let us understand the concept of
ethereum gas with the help of an example
let's say you are having a car okay at
position a and you want to reach to this
position B
now in order to reach from position a to
position B you require one thing right
and that one thing is petrol or I will
say gas without gas or without petrol or
diesel you cannot reach from A to B
definitely you have a car you have a
machine it might be beautiful it might
be expensive but without petrol can it
move from a b no right so you need to
refill some petrol to this car so that
you can reach from point A to point B
right now in the same way let us say
that you have a smart contract and you
want to deploy this smart contract on
the ethereum blockchain you want to
execute some code on this on this smart
contract that is deployed on this
ethereum blockchain now in order to do
that you will require gas but this gas
will not be like your petrol or like
your you know diesel but this gas will
be called as ethereum gas now why you
will require this ethereum gas let us
understand this with the help of an
example
so let's say you want to execute this
code in your smart contract okay so this
just create a beautiful smart contract a
program okay in which you want to
execute this expression 10 into 3 minus
6 okay so this is a simple expression
and you want to execute it in your smart
contract
now in order to execute this statement
you will require some amount of cash for
each and every operator right there is a
particular gas associated with it so for
example if we talk about multiplication
if you are doing a multiplication
operator multiplication operation then
you require five amount of cash for this
subtraction operator that you are seeing
right the subtraction operator this
requires three amount of gas and if we
talk about this equal to operator right
this equal to operator is equal to
operator requires three amount of gas so
in order to run this code it is like
running a car right in order to run this
code you will require this amount of gas
so that you can run this expression so
if we if I talk about like if I say that
what is the total amount of gas you will
be required in order to execute this
expression that will be 5 plus 3 plus 3
that is equal to that's right I hope
this makes sense that you require 11 gas
so that you can get the result of this X
expression so let me show you one
important one important document
where you can find the list of all the
gas associated with all the opports okay
let me show you that
so this is this
close this t-tube
okay so this is an official website okay
of ethereum popcodes okay in this I
think
we have to go to this right
awkward gasless now in this you can
clearly see that for each and every
operator for each and every instruction
that you are executing on the ethereum
blockchain within your smart contract or
on your ethereum blockchain you have to
pay certain amount of cash okay so for
stop it is zero gas for add this is
three gas for multiplication five gas
right with this which is we have seen
also for subtraction this is three gas
so you need to have certain amount of
gas in order to run in order to code any
kind of expression on the smart contract
again we will see much more about it in
our upcoming videos but I hope this
makes sense right I will share the link
also if you want otherwise you can
search it it is given there also yes and
one important point that why do we not
use ether in this case like why do we
have this another entity called gas
remember right guys that ether
fluctuates a lot because ether is
something sometimes either price will be
one thousand dollars at another point it
will be two thousand dollars so there is
no particular you know a particular
value associated with ether it keeps on
changing and that's why we have this
concept of gas and which we will talk
much more about in our upcoming video
where we will talk about ethereum gas
price but before that let us talk a
little bit more about this Am gas so
let's see some important points related
to ethereum gas first
production that modifies the blockchain
costs some amount of gas so any
transaction that you are doing right
which is modifying the state of your
blockchain let's say you are changing
the value of a variable in the in your
smart contract okay and which I will
talk about in much more detail in our
solidity course but for now so if you
are changing a variable if you are
changing something in your smart
contract on the ethereum blockchain then
that will cost you some gas
and who will pay this gas the user that
is generating this kind of transaction
so let's say you want to you know let's
say you want to print hello world in
your smart contract so you are making
some changes right you are actually
calling some function into a smart
contract so if you are calling those
function you need to pay cash okay and
when I'm saying transaction do not be
consumed that transaction is something
when I send something to someone no
transaction is anything in ethereum
blockchain that changes the state of
your
just remember like this anything that
you are doing and which is actually
changing the state of your block is
actually your transaction so in the
previous video we talked about gas right
that what is gas and how why it is used
in everything let's talk about what is
this price so let's say again we have
this beautiful car and we want to reach
from point A to point B and definitely
in order to reach from point A to point
B we require some amount of gas so let's
say in order to reach from point A to
point B I require some 10 liters of
petrol okay let's say I in order to
reach from point A to point B I require
some 10 liters of petrol now if I ask
you what is the total price you have
spent in order to reach from point A to
point B definitely you can tell me the
total amount of petrol that you have
consumed in order to reach 1.8 to point
B that is 10 liters but now I am asking
you that what is the total price
that you have paid in order to reach
from point A to point B
now you will say this is a silly
question because you haven't told me the
price of petrol because it will depend
upon the price of petrol that how much
cost I have paid in order to reach from
point A to point B and I will say
definitely you are right so let's say
the price of petrol is 5 rupees I know
this is silly it can never be it can
never be so little as five rupees or
let's say one dollar or two dollars so
yeah this is silly but still
let's say five Rupees is used in order
to reach from point A to point B now if
I will ask you the total price then you
can say that okay the total price will
be 5 into 10 that is 50 rupees because I
am using uh 10 liters and for per liter
I am paying 5 rupees so 10 into 5 that
is 50 rupees and I will say yeah you are
completely right
now the same goes for our gas so in the
previous video we have seen right that
we can calculate the total amount of gas
that we are consuming in order to
evaluate this expression now if I will
ask you that what is the total amount
you have paid in order to evaluate this
expression you will say again the same
thing right that okay I know the total
amount of Gap
I do not know the total amount of money
means the total amount of price I have
to pay for per amount of gas right and
this is what we called as gas price
so what is grass price it is the amount
the sender wants to pay per unit of gas
to get that transaction mined gas price
is something which is sent which is set
by the sender so in case of petrol the
petrol price is actually fixed by the
government right government decides that
what will be the total amount of price
you are going to pay for per liter of
petrol but in case of gas it is not
determined by the government it is you
who is doing the transaction who will
decide the amount of price you are
willing to pay for each amount of gas
that you are spending okay and I know
you might be thinking I will pay as low
as possible but this is now how it works
let me tell you why and before moving
further let me tell you this also that
gas prices are denoted in GOI and one
guy is equal to 10 to the power minus 9
ether so this is a unit of ether okay
just like we have 1 kg is equal to one
thousand gram uh one meter is equal to
centimeter in the same way in one way we
have 10 to the power minus 9 ether so
remember that so your gas price can be
in 10 Way 100 GUI or it can be 1000 GUI
whatever you will decide so it totally
depends on you whether you want to have
your gas price as 10 gray whether 100 or
1000 quid now let's go back to again
that question that okay if the gas price
is set by me only because I am going to
set this gas price I will have my gas
price as low as possible I will pay some
0.00001 way in order to do my
transaction
but now let me tell you one catch here
the catch is that definitely you can
decide the gas price but still if you
want your transaction to get mined
faster then you need to pay good amount
of gas price so the higher the gas price
the faster the transaction will be mine
it is just like in Bitcoin so in Bitcoin
we discussed about the transaction fee
right that the higher transaction fee
you will be having the more chances of
your transaction to get mined the more
chances that your transaction will be
successful in the same way if you are
going to pay more amount of gas price
then your transaction will be elected
means sorry not elected actually will
selected by the miners then only they
will take your transaction and put it
inside the block and then only they will
mine your transaction right so you need
to have a gas price which is
according to the market level so your
gas price should not be too low or your
gas price should not be too high okay so
remember this if you will pay more
amount of gas price then you will be
having your transaction mined in less
amount of time the more gas price the
less time it will take it doesn't mean
that you have to pay you know 10 million
in order to have your transaction you
know in order to run in order to
make your transaction successful no I'm
not saying that it totally depends upon
the market you have to see what is the
market rate of gas price and you have to
Choose Wisely in order to boost that
kind of transaction but generally most
of the wallets that you see that your
metamask wallet they assume like they
they take the market price and they
provide you the gas price accordingly
but still if you want to increase the
speed of your want to have your
transaction done in you know in as much
fast as it can possible in that case you
need to pay a higher gas price than any
other person who is doing that kind of
transaction let me show you this with
the help of an example so I will open my
metamask wallet in this let me copy this
same send I will select the address
where I want to send so now I am doing
some kind of transaction right I am
sending
so I have selected let's say this amount
of GUI I will say next now you can see
that hey if you will see this is they
are calculating this Max V right so how
they are calculating this Max V so what
they are doing is they are seeing the
total amount of gas you are going to
spend okay so for every transaction
there is a gas limit we will talk about
this uh we will talk about that in our
upcoming video so what they are doing is
they are giving you the estimated price
it will take in order to do your
transaction successfully and let me show
you this Market tab so I will clicking
on this Market tab now you can see that
if you are willing to pay some this
amount of it in that case your
transaction time will be 30 seconds if
you are paying this amount of edge so
this is the market price this is on
average I think this will be less than
30 seconds so it is more than 30 seconds
it is less than 30 seconds and then you
have this aggressive that if you want
your transaction to be confirmed in like
you know in less than 30 seconds in that
case you have to go for this amount of
the gas price okay or I will say this
amount of fees okay they are calculating
your gas price uh by taking the gas
consume and the total um the total gas
price you are willing to pay so they are
doing it on your behalf so this meta
Mass quality is doing on your behalf
definitely you can go to the advanced
settings and you can change it but I
will not advise you to do that because
your metamask for it is good enough to
do that but still if you are thinking no
I want to change it I want to change the
gas price I want to change the gas
amount or whatever you want you can do
that also okay but I would say that let
it do by metamask only okay so this is
how it is in this video we are going to
learn ethereum gas limit which is a very
important topic in the ethereum
blockchain so let us see what is
ethereum gas limit ethereum gas limit is
the maximum gas the transaction can
consume so let's say you are doing some
kind of transaction the maximum gas that
your transaction can consume will be
your ethereum gas limit means will be
the ethereum gas limit of your
transaction and what is the transaction
as we have discussed before also
anything that changes the state of our
blockchain for our ethereum blockchain
in this case is a transaction right and
who sent this ethereum gas limit so this
ethereum gas limit is actually set by
the sender of the transaction so let's
say you are doing some kind of
transaction some ether transfer to your
friend now in this case you will be
setting this ethereum gas limit
no okay we understood what is this
ethereum gas limit and this is set by
the sender but what is the use of
ethereum gas limit why do we have this
we have learned about ethereum gas then
we learned about lithium gas price and
now we have another term related to gas
that is ethereum gas limit what is the
use of it let us understand this so if
we talk about our smart contract
our smart contract is
a program that is deployed on the
ethereum blockchain right and our smart
contract is something that also changes
the state of the blockchain so if you
are doing any kind of you know a state
change operation with the help of your
smart contract you are at the end doing
a transaction let's say you are calling
some function of your smart contract and
your smart contract is deployed to the
blockchain on the blockchain and let's
say this function is changing some data
on the ethereum blockchain okay on the
Block which is which is uh at which this
is smart contract is deployed now this
function calling that you're doing is
actually changing the state of the
blockchain right so this will be a
transaction
now since this smart contract is not
running only on your system but this is
smart contract is running on each and
every system that is part of this
ethereum blockchain right
now just suppose just suppose let's say
this person is a hacker okay just
suppose that this person is a hacker and
this person has launched a smart
contract and in this smart contract he
has some transaction
which is consuming infinite amount of
gas just uh assumption just uh you know
just an example that let's say this this
smart contract consists of a function
which consumes infinite amount of gas
now what will happen in this case now
you may say that okay since this person
is launching some function which is
which is going to definitely consume you
know infinite amount of gas when I'm
saying infinite you think of it as a
huge amount of gas okay you can think
like that also
now definitely he has to pay good amount
of money for that but another drawback
of this situation is definitely let's
say this person is a rich person and he
said okay I have no problem in giving
money to the ethereum blockchain so he
said okay no issues I will call this
function and I will pay the money
whatever money you require and I will
pay that to the ethereum blockchain I
have no issue with that but there is one
drawback the drawback is that this smart
contract is not running or not only
running on his system but this smart
contractor is running on each and every
system of this ethereum blockchain means
this will actually slow down the
ethereum blockchain right let's say this
is smart contract consists of an
infinite function so this for smart
contract function is keep on running and
running the loop actually not function
in finite Loop now this Loop will be
running infinitely it will be
continuously running and he said okay
I'm a rich person I'm ready to pay you
anything whatever you want but this will
actually affect the overall system
because each and every system has this
smart contract as we talked about also
that in blockchain everything is
distributed so this is smart contract
will be running on each and every system
which will actually slow down the
ethereum blockchain right and we do not
want that so that's why we have a
concept of gas limit we in the starting
of a transaction only ask from the
person who is doing any kind of
transaction that how much amount of gas
you think your transaction is going to
consume definitely it is totally an
estimated guess you cannot say that okay
this will be the total amount it is a
totally estimated guess okay this is the
amount of
gas my transaction is going to consume
you have to tell this to the ethereum
blockchain in advance actually to the
ethereum wallet whatever wallet you are
using in advance so that the ethereum
blockchain can okay see that okay this
transaction is consuming this amount of
gas okay this is good I have no issue
with it and then only that come out of
that transaction will be executed on the
ethereum blockchain so that it does not
slow down the whole system so that's why
we have a limit we are having a limit
that has to be decided by the sender
that okay this is the gas limit of my
transaction with the transaction that
I'm going to do this will be the gas
limit of my transaction okay so you have
to give it a finite number so that the
ethereum blockchain can accept it if it
is a good amount of limit and if the
limit is too high it will reject that
transaction let me show you that also so
this is my madamas wallet let me copy
this address and let me send some amount
of ether to me only okay I'm sending
some amount of ether to my address only
just to show you what do I mean by that
so I will have
0.0 Point sum zero zero zero one ether
okay I want to send this amount of ether
to me I have to click on next
now when I will click on next if you
will go to this part this Market part
and then if you will go in this advanced
settings
you will see that there is an option of
ethereum gas limit that you can set you
can edit this ethereum gas limit
according to the type of transaction
that you are doing typically whenever
you are doing an ethereal transfer an
ether transfer in that case twenty one
thousand is the ethereum gas limit okay
it is a ethereum gas limit in like
whenever you are sending some amount of
ether to your friend but definitely when
it is a smart contract transaction in
that case your gas limit may vary it can
be more than twenty one thousand but 21
000 is the minimum so it can be more
than 21 000 only okay
and also this gas limit is also used in
order to calculate your ethereum
transaction fees okay so here you can
see that there are a lot of things right
maximum base fee priority fee but you do
not have to go in the calculation of it
because this thing keep on changing okay
earlier there was another criteria in
order to calculate the gas fee and now
we have another criteria of calculating
the gas fee so do not if you want to go
into that definitely you can but I will
not suggest you because this is
something which will keep on changing
and I don't think so there is any use of
it but definitely if you want to you can
go and learn about this on ethereum.org
website and as I said this gas limit you
can change it according to your
convenience and you might be thinking I
can have let's say 42 000 definitely you
can have a 42 000 gas limit then you
also have to pay uh the amount you know
you you have to pay for the 42 000 gas
limit amount of fees as well so do not
think that you can have hundred thousand
of gas limit so if you are going to have
hundred thousand gas limit then you have
to pay accordingly now what will happen
let's say you might be thinking that
okay if my guess is wrong if let's say
my transaction is consuming only 35 000
in this case so what will happen the
remaining 7000 gas limit fees will get
reverted to your account so don't worry
about it if it is let's say your
transaction is consuming 35 000 and you
have put it you know you have put 42 000
in that case 7000 will be reverted back
to your account and if you are having
less amount of gas limit let's say your
transaction is going to consume 42 000
and you have only used thirty five
thousand let's say now in this case what
will happen your transaction will get
failed and your money will also be not
refunded because it's your mistake
because the miner who has picked your
transaction has put all his effort in
order to solve for your transaction but
now since you have given only 35 000
amount of gas limit he will not be able
to execute your transaction because your
gas limit must be 42 000 so it will be
rejected and you will not get any kind
of refund okay so that's the case now in
this video we are going to see a demo of
the ethereum blockchain we will see like
what are the different fields in the
ethereum blockchain the transactions
that ethereum blockchain have and how it
is different from the Bitcoin blockchain
okay so this is a beautiful website
etherscan.io you can
learn a lot about ethereum on this
particular website about its
transactions about the mining rate each
and everything is given at this website
in a great detail okay so just come to
this website either scan dot IO now here
if you will see we have all the latest
transactions field and here we have all
the latest blocks field okay so let's
let me go to this particular block and
you can see the block number here the
block number is around I think some
lacks I think once tense hundred
thousand ten thousand lakhs and lacks
crores actually so it is in crores and
then we have status uninitialize okay so
it is not successful yet this is the
timestamp at which this particular block
was created and this is the proposed
slot and Epoch okay nice and we have the
number of transactions so you can
clearly see that this block is now at
this point of time is having 168
transactions and 44 contract internal
transactions that's great okay then we
have the recipient so this is our
recipient address then we have the block
reward and then the difficulty wow
that's great so this is the difficulty
and this is the block reward guys okay
and this is the size of our block okay
and this is the gas use so we have
discussed about gas right so you can
clearly see that how gas is actually
being you know involved in the
blockchain and this is the gas limit and
if you will see a very good example it
is that this is the total amount of gas
that is used and this is the gas limit
set by the sender right and you can
clearly see that only
84.59 of this ethereum gas limit is used
so the rest amount that is the rest I
will say around 16 percent of the gas
will be refunded back to the sender okay
now this is base fee base fee per gas
now I am not going to into the
technicals of this for this as I
suggested you before also you have to go
to ethereum.org there you can find much
more details about this fee per gas and
everything so this is the burn fees
extra data this is the hash of this
particular block so as we have discussed
in the blockchain video as well right
that each and every block has a hash so
ethereum blockchain also has a hash this
is the parent hash so you can think of
it as a previous hash okay so it is
pointing to this particular block okay
and this is the state route so stay
tuned is currently out of the scope of
this particular course but this has to
you know do with your Merkel tree okay
but this is not a part of this
particular course definitely I will
discuss this in some other video so this
is actually the state route of that
Mughal tree and this is the nonce now
currently you can see that nonce is zero
because now ethereum has shifted from
proof of work to proof of state
blockchain that's why it is 0 here okay
and if you want to discover about this
parent hash okay so if you will see the
block number is uh some 547 right in the
last let me see this particular block
which is the parent block and if you
will see it is 546 which makes sense
also because this was the first block
five four six then the next block will
be five four seven right
and here also you can see the number of
transactions in each and every detail is
given in this particular block as well
right so this is a great website guys if
you want to explore about ethereum
blockchain I will suggest you I would
highly suggest you to visit this
particular website you can learn a great
deal about blockchain in on this
particular website so this is the base
fees this is the priority fees so this
is the market rate currently this is the
price of our ether okay that's great and
these are the different things okay if
you want to learn about the rc20 tokens
definitely this is not a part of this
particular course we will talk about
this in our solidity course okay but
this is not a part of this particular
course and blockchain and everything is
given in this particular you know
website and let's say if you want to
search for a particular address you have
to Simply search that address here okay
you have to just type the address here
and you can learn about that app that
particular account address about that
particular block the transaction has
anything so if you have anything having
like transaction as block token or
anything you can have a look at that
particular block okay so that's great
right so I hope you like this video if
you have liked this video please click
on that like button if you are new to
this Channel please subscribe to this
channel because I'm regularly going to
make new blockchain courses on this
channel and if you want to join me on
Instagram Instagram ID is given in the
description as well as our blockchain
developer Community Discord link is also
given in the description so you can join
me there okay so meet us in the next
video till then bye bye hello guys
welcome back to code reader channel in
today's video we are going to talk about
decentralized autonomous organization so
let us see what are they now before
talking about decentralized autonomous
organization let us understand this word
organization how does a typical
organization looks like so if you will
see a typical organization looks
something like this right we have a
director under this director we have
some managers under these managers we
have some employees right so if director
has some work he will assign to it to
the manager then manager will assign it
to the employees and this is how an
organization runs right in a
hierarchical manner that director is the
supreme authority after that we have
managers and after that we have
employees right now there are certain
tasks in any organization which are very
repetitive in nature right in which we
do not require human intervention like
for example uh let's say
there is a customer who has certain
doubts related to the product let's say
this organization is selling some
product and this customer has some
doubts related to the product now this
organization can solve the doubt of the
customer by two ways right first way is
that this organization can you know
assign some person to that customer who
will actually solve the customer doubt
or what this position can do is this
organization can have a bot and AI bot
which will actually solve the doubt of
the customer and I think the second
option is better than the first one
because it will not require any human
intervention so it will actually save a
lot of money for this organization and
it will be a very fast process right
because you will have an artificial
intelligence bot which will be solving
all the doubts in a very much faster way
because customers uh poor or the same
will have the same doubts right so we
can have documentation linked or we can
have some videos linked and that but
will provide the customer with all those
documentation and with all the videos
and customer care can refer it
afterwards right so what we can do is
for all repetitive kind of tasks in
which uh you know human intervention is
not required we can install Smart
contracts now these smart contracts will
work just like an organization the only
difference will be that there will be no
human intervention in running this
decentralized autonomous organization
and as the term if you will see why it
is called decentralized because it is on
blockchain or a smart contract is on
blockchain that's why we are calling it
as decentralized we call this autonomous
because we do not require any human
intervention so let's say if there is a
task we will assign that task to this
smart contract now according to the you
know variety of tasks this is smart
contract assigned this this particular
task to this particular smart contract
and then this smart contract can assign
the same task to this smart contract so
you can think of it like this smart
contractors working as a director
definitely all these smart contracts are
the same right because all these are
actually programs but just to make you
you know make you understand this
concept of decent eyes autonomous
organization we can assume that this
smart contract is a director this is
that you are seeing on the second level
are basically managers and at the end we
have
the employees which are actually working
in this decentralized autonomous
organization
and the beauty of this decentralized
autonomous organization is it is very
very cost effective and very very
transparent and total democracy is there
because there is no human intervention
let us see the difference between Dao
and a typical organization a traditional
organization so if we talk about Dao
right it is totally democratized because
we do not have any humans so each and
everything is done by the words and
which are totally transparent as well
while if we talk about organization it
runs on hierarchy right because there is
a director who will be ruling the
organization and he will be telling what
to do and what not to do if we talk
about Dao we require voting but if we
talk about traditional organization it
might be or it might not be the case if
you talk about Dao no trusted
intermediary to count for right because
we does not we do not need to depend on
someone else for the counting of word
because smart contracts are smart enough
to count the votes in this we require
some other person some person who
actually manually uh you know do the
voting you know counting of the votes
and everything so we are actually
dependent so much on our centralized
Authority right if we talk about fourth
services offered are handled
automatically right right because no
human intervention just give it a task
and smart contract are smart enough they
will do your task if you talk about a
traditional organization we have human
handling or what we can say is Sentry
controlled automation if we talk about
the fifth Point all activity is
transparent because smart contracts are
totally present in the public space so
you can check the smart contracts how
the smart contract code is running each
and everything is totally transparent if
you talk about a traditional
organization you never know what is
actually happening inside an
organization right it is is totally
private it is limited very very much
limited to the public right so this is
the beauty of decentralized autonomous
organization and we will also discuss
one case study where this Tau was used
in order to raise fund okay and we will
talk about that in the next video but in
this video I hope you get what the what
is the idea behind this Tau right let me
give you an example of this in this case
also like how this decent lives
autonomous organization can be very
helpful so let's say you are here and
you want to donate some money to this
NGO right so in this NGO because this
NGO is our organization right which will
have a lot of people which will have a
director manager and so many other
people will be involved right so this
money that you are sending to the NGO
can be utilized for good purpose and can
also be utilized for bad practices right
and we do not know like where our money
is going we do not know whether the
director of the Sanju is a good person
or a bad person we do not know right so
what we can do is instead of you know
having this NGO as a as an organization
where humans are running it we can have
our decentralized autonomous
organization where we will write each
and every rules that okay if this money
is coming from let's say this person and
this person wants to donate this money
for human education so this money should
go to human education only or let's say
for child education then it should go to
the child education only and the pets
best part is and the best part is that
this organization will be totally
transparent so you can go and read it
and not only that you can see all the
transaction as well that okay if the
money that you are sending to this
decentralized autonomous organization
whether this money is actually going to
the right account address or not and
this is the beauty of decentralized
autonomous organization but in the next
video we will talk about Dao attack
which was the biggest attack I think and
we will talk about that in the next
video hi in today's video we are going
to talk about the Dao attack so in the
previous video we talked about Dao right
decentralized autonomous organization
and we have seen that in a decentralized
autonomous organization each and
everything or I will say most of the
work is actually done by smart contract
right
and using the same principle of
decentralized autonomous organization an
organization was formed by the name of
the Dao the Dao was an organization
which was established in year 2016 and
it was working on a very simple
principle anyone who wants to invest
some money to some startup like it was
working as a venture capitalist form
which was actually helping others to
invest in a particular company so let's
say we have certain group of investors
okay so what they do actually they buy
some Dow tokens by providing some ether
to the organization and they were
provided with some Dow tokens now this
Dao tokens were actually used for the
voting so let's say if some investment
proposal let's say some startup is there
and it says okay I am a startup and we
need some money in order to you know to
run our startup so people who will be
having this Dao token they were allowed
to vote on this investment proposal
whether to invest for this particular
startup whether to invest for this
particular company or not so with the
help of this Dow token people who are
given this Authority this power to
invest in a particular company or not so
what they do they simply vote for a
particular investment proposal and if
the investment proposal votes are let's
say more than 50 percent then definitely
they go for this investment proposal
otherwise this investment proposal was
rejected so you can clearly see that it
was a very simple concept and it was
very much successful also let me show
you the timelines so it was established
as I said the Dao was established in
2016 so 34 2016 it was established and
by 15 5 2016 in just 15 days the da was
able to raise over 100 million US dollar
which was you know record breaking in so
much less time the Dao was able to raise
so much high amount of money via
crowdfunding and one month after this
race the Dao was attacked there was some
issue there was some vulnerability in
the smart contract of the Dao because as
I said right when we talk about
decentralized autonomous organization
most of the things that is actually done
by smart contracts and there was some
vulnerability in the smart contract code
and that vulnerability was exploited by
some hacker and they were able to
extract huge amount of tokens from the
Dow smart contract which was a very
panic situation because the investors
who have invested huge amount of money
in this Dow contract they were losing
this money so this was a panic situation
at that point of time you can clearly
see right U.S 100 million dollar was
raised right so a lot of amount of money
was there in the Dow contract the Dow
Community came up with a proposal that
what should they do in order to stop
this attack and the solution that was
accepted on 27 2016 was to go for hard
Fork which we will talk about in great
detail in the next video after hard folk
only the ethereum blockchain got
splitted into two different blockchains
one was ethereum classic and the another
was ethereum blockchain the core
ethereum blockchain but we will talk
about this hard for Concept in the next
video but before moving before uh
completing this video before ending this
video I want to draw some important
points to you so that you are not
confused because many of you guys might
be thinking that the Tao was attacked
means the blockchain can be attacked and
the blockchain can be hacked no the
blockchain was not actually hacked the
problem was with the quote person who
has written this smart contract code has
not written this Smartphone track
properly and that's why this blockchain
or I will say this is smart contract was
hard so the problem was not with the
technology the problem was with the
smart contract code that was written by
some human so it is is very very very
necessary if you are creating a smart
contract your smart contract should be
written in a very secure way otherwise
you will be you will be losing millions
of amount of dollars because your smart
contracts can hold millions of amount of
dollars right so you have to be very
careful you need to have good developers
who are actually creating your smart
contract in this video we are going to
talk about a very important topic that
is hard Fork so in the previous video we
have seen that the Dow smart contract
was hacked and the hacker was able to
extract out funds from the Dow smart
contract if you haven't watched the
previous video I will suggest you to
watch the previous video on the Dao
attack now to stop this attack not to
stop this hacker from extracting out the
fund from the Dow smart contract the
ethereum community came out with a
solution and that solution was hard Fork
now in this hard folk what was proposed
actually that let us upgrade our smart
contract because our smart contract
consists of some vulnerabilities and due
to these vulnerabilities some hacker is
able to extract out funds some people of
the ethereum community thought of that
we should upgrade our smart contract if
we will upgrade our smart contract then
the hacker will not be able to extract
out fund but there were some other
members who thought okay if we are going
to upgrade our smart contract we are
actually going against the principle of
a smart contract that smart contract
must be immutable you cannot change a
smart contract once it is deployed to
the theme or to any other blockchain so
two parties were formed one who was
suggesting that we should upgrade the
smart contract so that we can stop the
hacker from extracting out the fund
another party who was saying that if we
are going to upgrade our smart contract
it will be against the principle of our
smart contract that is immutability so
we should not upgrade our smart contract
and due to which only two blockchains
were formed one was the ethereum
blockchain this over blockchain this
blockchain supported the upgradation of
the smart contract while this blockchain
this ethereum classic blockchain said
okay I am not going to participate in
this upgrading of the smart contract so
we will split from here and this process
where you are seeing right that a single
blockchain got splitted into two
different blockchain this process is
actually called as hard folk but you
have to understand much more about this
because there is another term also that
is called Soft Fork but we will talk
about sort folk in the next video in
this video let us understand what is
hard fork and what is hard folk all
about so during a hard four soft
implementing a protocol and its mining
procedures is upgraded so the underlying
software the ethereum software that
people are using so that they can be the
part of this ethereum blockchain that
software is updated so that the desired
changes can be made second thing is once
a user upgrades their software that
version rejects all the transaction from
older software effectively creating a
new branch of the blockchain and you
will understand this we will discuss
about all these Concepts in much more
detail just don't worry for now however
those users who retain the old software
continue to process the transaction so
if you will go back in this example this
ethelium classic who said that we are
not going to upgrade the smart contract
they were following the old version of
the software while this new blockchain
after this point this new blockchain was
adopting a new version of the software
so that's why we see a split after this
one nine one nine nine nine nine block
and hard work is not something that has
actually happened to the ethereum
blockchain hardwood is something that
has already done on the Bitcoin
blockchain in year 2017 August 2017 two
different blockchains were formed one
was our core blockchain that that is
Bitcoin core blockchain and another
blockchain by the name of Bitcoin cash
now why we have these two different
parties the reason is very simple this
Bitcoin cash Community there's Bitcoin
cash party they said that we should have
much more size of the Bitcoin blockchain
like if we talk about a typical Bitcoin
blockchain block size it is around 1 MB
and since it is around 1 MB we have
limited number of transactions inside a
block right so this Bitcoin Cash Company
said that okay uh this 1mb block is not
suitable because we are not able to have
more number of transaction in the
Bitcoin block why not to upgrade the
block size from 1mb to 8 MB but this
Bitcoin Community this party they said I
know we do not want that we only want
that Bitcoin blockchain block should be
1 MB because this is good we should not
increase it to 8 MB but this community
said no we want to increase it to 8 MB
and that's when this split happened at
four seven eight five five eight block
talk this two parties are formed this
Bitcoin who was supporting 8 MB block of
the Bitcoin blockchain and this Bitcoin
that was supporting only 1 MB of the
Bitcoin blockchain and now let us
understand this hard fork with the help
of an example so here we have this
Bitcoin cash blockchain who said that
okay we are ready for the 8mb block of
the Bitcoin blockchain and this Bitcoin
blockchain this uh our core Bitcoin
blockchain who said that no we are not
going to upgrade to block size of 8 MB
so these are the people who haven't
upgraded right and these were the people
who have upgraded and I have given some
timestamp definitely this timestamp can
be in months or in a year but I have
just to for the illustration purpose I
have have 11 am 12 p.m 1 pm 2 pm okay so
this is just an example to illustrate
and here we are going to upgrade the
block size to 8 MB so this this
community of Bitcoin cash has upgraded
it MB block but this one has not updated
or has not upgraded to 8mb blog let us
understand this with the help of an
example so this is the line after which
people have a choice that they can
either go to you know 8mb block or they
can remain in the 1mb block so let's say
Urban MB block is mine at this by by
this Bitcoin Community okay and after
some time at 12 pm let's say they again
mind one more block that is of 0.7 MB
and since 0.7 MB is less than 1 MB so
they can mine this particular block
right now at 1 pm at 1 pm a Blog is mine
which is of 7 MB now since this block is
of 7 MB so these people cannot mine this
block right why because they have not
upgraded to the latest version of the
software right this is what we have seen
right in the previous video while these
people they have upgraded to the new
software so they can mine a block of 7mb
right now again at let's say 1 pm again
a new block Is Mine by these people
which is of let's say 0.5 MB and that's
fine right but now you can see that we
have a split in the blockchain right
after this particular block we can see
we can clearly see that we have a split
now after this part after this
particular time both of these Community
will mine the block separately so let's
say another block of 8mb was mined by
this community at 2 pm and at 2 pm a
block was mined by this community of 1mb
in the same way again some 0.8 MB block
was mined by this particular community
and 8mb block was mined by this Bitcoin
cash community in this process will go
on parallely means these people will not
affect these people and these people
will not affect these people because now
we have two separate blockchain this
people these people have actually
upgraded the software while these people
have not upgraded the software that's
why we have these different blockchains
and this is what we have learned about
the hard poke right and the definition
of heartful that there will be two
versions of the software the people who
will will go for the latest version they
will have a different blockchain but the
people who will be you know in the old
version of the software who will be
using the old version of the software
they will be still be using that old
blockchain only and this is what we are
seeing in this particular example also
so I hope now you have understood what
is hard fork and all these three points
are very clear to you so I now in this
video we are going to talk about soft
work in the previous video we talked
about hard Fork right now in this video
we are going to understand soft food if
you haven't watched the previous video I
will suggest you to watch that video
before watching this video okay let me
present you certain points related to
sort fork okay and if you are not
getting those points just don't worry we
are going to understand those points
with the help of an example for now just
have a look at these different points so
that you can have a you know just have a
look so that when I'm going to explain
those things
you can connect the dots okay so just
for that just have a look at these
different lines and you will understand
this by the end of this video so just
don't worry okay so let's talk about
software software changed to the
protocol but the end product remains
unchanged now what do I mean by this
like it simply means that you are going
to make some changes let's say if you
talk about ethereum so you are going to
make purchase to the ethereum protocols
means the rules and regulation on which
ethereum program on which ethereum
blockchain is running you are going to
change those rules and regulations but
the end product remains unstranged in
your ethereum blockchain will remain the
same there will be changes but those
changes will not affect the product so
let us understand if we have talked
about hard Fork right in the previous
video where we have seen that after hard
work we got two different ethereum
blockchain first was this ethereum
blockchain and another was the classic
blockchain right this ethereum classic
blockchain has its own Community this
ethereum blockchain has its own
Community this ethereum classic
blockchain has its own cryptocurrency
and this ethereum blockchain has its own
cryptocurrency so you can clearly see
that in hard Fork our end product that
is our ethereum blockchain got changed
but the blockchain got splitted into two
different blockchains so we got two
different products right but in case of
sore folk this is not the case and you
will understand this first we will see
the exam if we talk about the second
point a soft Fork is Backward Compatible
if we talk about hard folk heart found
Backward Compatible once our hard Fork
is done as the name suggests hard so you
cannot go back once a hard Fork is done
but if you talk about soft Fork soft
Fork are actually Backward Compatible
meaning that upgrade nodes can still
communicate with non-upgraded ones means
as I said right software soft folk is
also going to change the protocol so it
is like you are updating your software
so after the upgradation of your
software the people who are going to use
that upgraded software
will be able to communicate with those
people as well who has not who have not
actually upgraded their own software so
both of these different parties will be
able to talk to each other will be able
to communicate each other okay third
point that all nodes not upgraded nodes
could still validate blocks and
transaction but they just wouldn't
understand them I understand all these
things are so overwhelming so confusing
so just don't worry let's see the
software of an example okay
so let's understand this soft work with
the help of our game analogy okay so
let's say you are playing some video
game okay and do previous game you have
two different teams first team a so this
is our team a and we have this team B
okay so you can clearly see that this is
our team B and in order to play this
game they need to fight with each other
so they have some swords given in the
game okay not in reality they are doing
everything in the game only okay so just
don't take it seriously that they are
you know fighting with sword no so this
player they they have their own players
and this player can use this sword in
order to fight okay so you might have
played these type of games now after
some time the game community means the
company who was actually providing this
game they thought why not to upgrade
this so This sword okay this sword was
weak okay so they thought why not to
upgrade this sword to a new sword okay
and this is uh more enhanced so it is
more stronger than this previous sword
so they thought okay we will upgrade our
gaming software and we will provide this
latest sword to all the new players okay
to all the players who are going to join
the game as well as players who are
already part of this game they can
upgrade their software in order to have
this and the change was made but this
team a they say that okay this sword
that we are using uh in by it and we are
comfortable to use it so we are not
going to upgrade our software okay we
are comfortable and we are going to play
with this same old sword while Team B
they said okay this sword is much more
enhanced one much more stronger so we
are going to upgrade our software and
they are very software so now they knew
stronger sword okay so team a using the
old sword while Team B is using the new
much stronger sword but after some time
this team a started facing some problems
since this sword is much more stronger
than this sword so they are easily Team
B is easily able to defeat team a right
first they are in majority so they have
much more players and they have much
more stronger sword so they are beating
team a in a much more easy way right it
makes sense a much more stronger sword
will definitely going to defeat this you
know old uh weaker sword
so team a after some realization they
said okay this is not working definitely
we are comfortable you know operating
the sword but we need to upgrade it we
need to upgrade our gaming software so
at the end they need to upgrade from
this old sword that they were using to
this new sword provided by The Gaming
Community
now you might be thinking like why I'm
explaining you this whole story right
what what is the point of it but you
will understand this once we are going
to say take the same analogy in this
soft Fork example okay so in this soft
focus so we have two teams one who who
is not ready who are not actually ready
to upgrade their software and we have
this another team who are in majority so
they are in majority like Team B the
team B was in majority right so they are
also in majority and they are ready for
the upgrade and what is the upgrade so
this team a or the team that haven't
upgraded yet their software they are
saying that okay we are going to have
one MB Block in our blockchain so we are
going to we are going to mind block of
size up to 1mb while this team B they're
saying that no we are not going to we
are not going to mine you know block
size of 1 MB we are going to mine block
size of up to 0.5 MB that's why this is
0.5 MB right so they are ready for
mining this 1mb like block size of up to
1 MB but this team B they are not
willing to mine 1mb block they are
saying that we are going to mine only
0.5 MB blocks okay up to 0.5 MB blocks
so the mining process starts and since
this is a soft Fork both of the teams
are in communication this is what we
have seen in the first point as well
right that both of the teams will be in
communication even though after soft
work so let's say uh Team a okay so the
team who haven't upgraded their software
they they mined a block of 0.5 0.4 MP
okay at 11 am and after some time again
they got this opportunity of mining the
0.5 me block so they were able to mine
the 0.5 MB block
it was some time that after let's say 1
pm at 1 pm they again got an opportunity
to mine the 0.8 MB block okay so this is
totally random so they are you know they
are lucky I will say so they are able to
mine these blocks 0.4 MB 0.5 MB as well
as 0.8 MB because they are supporting
blocks of like up to 1 MB right
but at 2 pm at 1 pm actually not 2 pm at
1 pm at same time our team B team who
have upgraded their software and who are
in majority they mind a block of 0.3 MB
okay okay this can happen right because
we have seen in the consensus algorithm
video right if you haven't watched
please pause that video where I've
explained about the consensus and
everything
that it might happen that two nodes or
two miners can
minor block at the same time so in this
case this community okay so as as both
of them are the part of the same
Community they are in communication so
in this community there was some Miner
who was able to mine the 0.8 MB block
and in this community as well there was
a miner who was able to mine the 0.3 MB
block so it makes sense right this type
of things happens in the blockchain
community there are so many Miners and
they might be mining at the same time so
this happened at 1 pm only okay in this
community as well after 1 pm at 2 pm
again they got this opportunity Team B
again got this opportunity of mining a
0.4 MB block okay this makes sense and
as soon as Team B mined this 0.4 MB
block
team a this team realized that okay uh
there is a problem and the problem is
that this team this team B has the
longest stream why because they have
mined is 0.4 0.5 0.3 and 0 4 0.4 MB
blocks right so they have in total four
blocks in their you know in their
in their bucket well if you talk about
Team B or not sorry not Team B actually
team a they have only 0.4 0.5 and 0.8 MB
blocks means in total they have three
blocks in their bucket so by the longest
chain as I have discussed in the
consensus algorithm video as well right
that by the longest chain rule
this block would be discarded from the
blockchain ecosystem because this is not
this block is not the part of the
longest string now some of you might be
thinking right like but 0.5 MB and 0.5
MB were not actually mined by Team B so
why you are saying that 0.4 and 0.5 MB
is actually mined by Team B see I'm not
saying that they have mined this
particular block the point is that both
of these Community are the part of the
same Community right and this is what we
have seen in the software video also
that even though after upgrade both of
these nodes will still talk to each
other they will still you know
participate in the validation and the
you know verification of the blockchain
so they are the part of the same
community so they have they have not you
know they have not split it like like we
have seen in the heartfold they are the
part of the same Community the only
thing is that one of the teammate have
upgraded the software while another have
not upgraded the software this is the
only difference that is lying so still
this whole blockchain this still this
the whole blockchain that you're seeing
is part of the both of these people
right but the 0.8 MB is not part of this
uh this community right why because the
0.8 MB is a block which they they do not
support so they say that okay we have
upgraded our software and we are not
going to you know ex we are not going to
accept this 0.8 MB block so it it makes
sense because they have they have
upgraded their software right so they
will not calculate this block at the
part of the blockchain while this team
will only accept this block as the part
of their blockchain because they have
not upgraded their software
so they will so the whole Community will
discard this particular block and you
can clearly see that why because this
this team B is in majority right and we
always go for the majority so they will
discard this particular block and again
the mining process will start so let's
say at 3 pm this team may again mind
some blocks 0.5 MB and then off at 2 pm
this particular you know this majority
majority team that Team B mined the 0.3
MB block and this process will go on but
here one important thing to note here is
that you can clearly see that this
blockchain does not got splitted right
this blockchain is still the same while
in case of hard Fork we saw that we have
two different blockchain definitely it
might look that okay this blockchain is
getting spreaded at this point of time
but no this is not getting split because
we are going to discard these blocks
right and this is what we have seen in
the game video as well right that after
some time team realizes that we are
going going to lose this particular game
so we need to we need to upgrade our
software right and the same thing will
happen in this case as well when when
this team a will see that okay these
people this these people who are in
majority they have upgraded their
software so we need to upgrade our
software so that we can also be the part
of this game right so that we are not
losing this whole game so this is what
actually happens in soft fork and still
if you have any confusion please let me
know in the comment section of this
video I will definitely answer your
queries hi now in this video we are
going to talk about icos that is initial
coin offering now to understand this
definition let us take an example
because I know this definition
is a little bit Technical and you might
not get this definition
so let me give you an example to
understand this definition let's say uh
you do a bakery shop okay it this bakery
shop consists of some delicious pastries
and king and you find one of those
pastries and one of those you know cake
and you're okay I need to buy this
particular cake it looks delicious to me
so you went to this bakery shop and you
said to the owner okay I want to buy
this pastry and you provided him with
the money but this bakery shop owner
said no I cannot directly provide you
this cake if you want to buy this cake
you need to buy some tokens from me and
then you need to go to the K counter in
order to get this cake so instead
directly providing you with the cake
this bakery shop owner provided you with
some tokens now this tokens are
something which you can use in order to
buy anything from this bakery shop Okay
so this Billy shop this owner gave you
this tokens he said that okay with the
help of this token you can buy anything
from my shop you can go to the you can
go to a specific counter let's say if
you want to go to buy a cake you have to
go to the cake counter if you want to
buy a pastry you have to go to the
pastry counter and you can use these
tokens in order to buy this cake and you
said okay that's good and you and you
give Who provided the money to the
bakery shop owner and bakery shop owner
provide you with this tokens and you use
these tokens in order to buy this
particular cake now if you will see in
this example these coins that you are
seeing right on your screen these coins
are basically known as tokens okay and
you might have gone to a bakery shop
like this right you might have gone to
so if we will go back to the definition
tokens are a type of cryptocurrency that
represents an asset so if you will see
if you will look closely these coins
these tokens are actually
representing a particular asset and that
asset is cake in this example right so
tokens are are a type of cryptocurrency
so our base they are also basically type
of cryptocurrency
represent an asset in this case as I
said these tokens this physical world
tokens are actually representing this
cake or specific use okay we will talk
about it and resides on their blockchain
means every blockchain has its own token
like if we talk about ethereum ethereum
has erc20 token okay Solana will have
its own token so every blockchain will
have its own token okay so this is the
whole definition this tokens definition
I think now clear right that tokens are
a type of representsy that represent 10
assets so remember this line that tokens
are nothing but these are cryptocurrency
that are representing some asset okay
now if this definition is clear let us
talk about icos now let us talk about
initial coin offering now before talking
about initial coin offering let us
understand what are basically IPOs so
IPOs are something that if you might
have heard this term in the stock market
so let us understand that so that it
will be much easy to understand stand
what basically took icos are so gay so
we have jaff buzzers okay so we have jab
azos invested some amount of capital to
Amazon right now when he invested this
amount of capital into Amazon because
Amazon as you all know is a business
right
Amazon provided their business with some
shares right because let's say in the
starting their business owned the whole
Amazon so he has all the shares of
Amazon right
and how Amazon make profit Amazon makes
profit by providing service and products
right to the consumers and in return
Amazon gets some profit so this is how
Amazon makes money right
now Zeb was all thought okay this is
good but I need some more capital I need
some more Capital so that you know I can
grow my business at 10x speed
so what he did he launched an IPO
now in this IPO
anybody can invest
and
like invest to the Amazon so these
people these people who are you know
part of the general public they will
provide some cash to Amazon because
jabezos needed some cash right in order
to expand the Amazon business
so they will provide him some cash
meaning they will provide some cash to
the Amazon and in return Amazon will
provide them with some shares now what
are what are the benefits of the share
so in like when Amazon will give the
shares to these shared folders so these
shareholders will have a say according
to the number of shares they hold right
so if someone is holding some let's say
for example 40 of the shares of this
Amazon so he will be giving you know he
will be having much more authority over
the shareholders who have only 30
percent or let's say 20 percent stake in
Amazon right because he owns much more
shares of Amazon because he has provided
more cash to Amazon right so this makes
sense right so this is how an IPO works
okay this is how a company some money so
that it can expand and these people who
have invested some money to the Amazon
they have some shares so that they have
you know some rights over Amazon as well
as whatever profit Amazon will make they
will have their own shares now let us
talk about an ice you now icos works
exactly the same as an IPO the only
difference is that icos are much more
faster because they do not require any
kind of paperwork or the paperwork that
will be that is required is minimal no
legal procedures no use documentations
nothing is required you can launch an
Ico right now as well so it is so easy
well if we talk about an IPO you need a
lot of legal procedures required it
takes you know around one year to two
years even to launch an IU to launch an
IP or even more also because a lot of
Regulation is there a lot of you know
legal documents a lot of formalities are
there but if we talk about an Ico Ico
does not require any of these things
they are very simple they are very easy
to launch so if you talk about an Isis
an ISO works so again let us say that
zip is also is thinking to launch his
business Amazon now instead of receiving
some shares what he will receive will be
some tokens so as we discussed that
tokens represent some asset right and in
this case tokens are representing Amazon
okay now again how Amazon will make
profit against service and products and
then by you know selling these services
and products Amazon will make some
profit now again this episode thought
okay I need some you know money so that
I can expand my business so what their
business will do he will launch an ICU
again people will come provide cash room
as well
and his business and in return
these users these people these people
who are investing their cash to this
Amazon They will receive some tokens now
with the help of these tokens these
people again will make some profit
whenever Amazon will make profit they
will make some profit and definitely
when Amazon will make some loss they
will also have those losses right
because they are actually you know
investing to this Amazon for the
betterment of Amazon so if Amazon is
going in lost it will also experience
loss in terms of tokens so tokens value
will start decreasing if Amazon will be
not working properly
and again since they will have tokens
they will own tokens so they will also
have some rights over you know Amazon uh
big decisions like say Amazon is
thinking to launch one more business or
Amazon is thinking to launch one product
so the people who will be owning these
tokens right so they will have some
voting rights and they will also decide
whether the whether a particular product
should be launched by Amazon or not or
whether a you know particular Services
should be provided by Amazon or not all
these decisions
will also go to go through these people
as well because they have invested their
money and they also have some tokens so
they will also have authority right in
order to say something whenever Amazon
is taking some major decision so this is
what an Ico is all about simple right
just like an IPO the only difference is
it is very fast no complex procedures no
legal documentation and everything
definitely if there are no legal
documentation it is so easy chances are
high that you know Ico is a scam so you
have to be very very much careful
whenever you are investing in an Ico or
chances are high that you get corned
okay because either as I said right
there are no legal documentations there
are no legal procedures so anybody from
their home can launch an Ico so you have
to be very very very much careful
whenever you are investing in an Ico
okay always read the white paper
documentation provided by the company
before investing in any kind of icos I
AI now in this video we are going to
talk about ethereum 2.0 so let us see
what it is on 15th September 2022
ethereum shifted from a proof of work
blockchain to a proof of stake
blockchain so the mining concept that we
have discussed in our previous video
right when we were discussing how minor
solves a mathematical problem and
everything right I hope you have watched
those videos so all those Concepts were
related to your proof of work consensus
and now ethereum is using proof of stake
consensus so now it is not using proof
of work consensus at all and now it is
using proof of stake consensus so now
you must be thinking like why ethereum
shifted from proof of work blockchain to
a proof of stake blockchain and we will
discuss about that also don't worry we
will also discuss the difference between
proof of work and proof of stake
consensus okay like in proof of work
actually we were having minors right in
proof of stake we have validators so
definitely you can call them the miners
but in proof of stake terminology you
call them validators now what these
validators do these validators is take
some of their ethers to the ethereum
network so this is your ethereum network
you can think of it as a locker okay for
now I am just demonstrating it as a
locker so what they do they stick some
ether to the ethereum network so it is
like you have some let's say some two
ethers and you are going to stake two
ether to this ethereum network now once
you will take some ether to the ethereum
network you are eligible and now you can
mine for the ethereum blockchain so like
in proof of stake uh miners were using
you know miners who are were solving
some mathematical problem in order to
solve the blockchain you know that
mathematical pressure in order to a mine
a particular blockchain in the same way
after staking these ethers these
validators can now mine for the ethereum
blockchain let's say this validator who
has actually staked is he meter right to
the ethereum blockchain once he will
mine a ethereum block and he will add
this ethereum block to the ethereum
blockchain the state ether The Ether
that he has take to the ethereum network
will be returned back to him so The
Ether that he has take let's say he has
state two ether just for example so this
two ether will be written back to him as
well as he will get some commission for
solving or I will say for mining the
ethereum block blockchain okay so this
is how the validators make profit by
this transaction fee but if during the
verification and validation of the block
the like this validator has done some
cheating for example so if during the
verification and validation of the block
other validators found that okay this
valuator has done some sort of cheating
then the ethereum network will not
provide the state ether back to the
validator and he will not be receiving
any kind of transaction fee like in
Bitcoin blockchain the block was
discarded and the miner was not getting
any kind of reward in the same way in
ethereum blockchain the miner who will
be doing any kind of cheating or
valuator who will be doing any kind of
cheating that validator will not get any
transaction fee and the state ether The
Ether that he has taked in the ethereum
blockchain will not be provided back to
him so he will be at a loss so he have
to be very much careful whenever he is
mining for the ethereum blockchain so
now let us understand this with the help
of an example also that let's say all
these people a b c e f are validators
who have actually staged some amount of
ether in the ethereum blockchain now the
question arises which of these people
will be selected for the mining of the
blockchain whether all will be selected
for the mining of the blockchain no all
of these people will not be selected for
the mining of the blockchain because in
proof of stake there is no competition
between the miners like in Bitcoin
blockchain we have a lot of competition
between the miners right which Miner
will solve the mathematical problem
first but in proof of stake there is no
there is no competition
let's say if all these people have a
stake some amount of ether then only
randomly one of these people will be
selected so it is a total it is a
totally random process so in this total
random process if let's say a has Stakes
amount of ether the chances are there
that a will be selected or chances are
there that e can be selected so it is a
total random process this selection
process is total random anybody can be
selected from the ethereum blockchain
network so e can be selected B can be
selected any of these people can be
selected but they is also one condition
means
definitely anybody can be selected this
total this is definitely total random
process but in this also the person who
has the most amount of ether the chances
of getting selected as a validator are
very much higher so if you are a person
let's say if you have you know stay 10
ether in the ethereum blockchain and
your friend has taked 20 e 13 ethereum
blockchain so the chances of your friend
getting selected are much higher than
you because he has taked 20 either and
you has you have actually state only 10
ether right so in this case your friend
has a higher chance of getting selected
it is not that you will not be selected
there will be a chance that you will be
selected you might be selected because
it is a total random process but chances
of getting selected for the person who
has take most amount of ether will be
much higher than those people who have
stayed less amount of ether okay now let
us see the difference between proof of
work and proof of stake consensus so if
we talk about proof of work proof of
work in proof of work we have minors
right in case of proof of stake we have
validators improve of work high
performance Hardware is required so
people need to buy miners actually need
to buy Asic technology so that they can
mine you know so that they can
competition of mining right so anybody
who will be solving the mathematical
problem first will be the winner right
so for that they need to invest huge
amount of money in the technology but in
case of proof of stake you just require
your mobile or your laptop and that is
more than enough if we talk about proof
of work it requires a huge amount of
electricity well if you talk about proof
of stake it does not require any kind of
electricity and that is very simple
right you can simply mine for the
ethereum blockchain using your mobile or
your laptop if we talk about proof of
work the more hashing power you have the
more blocks you can validate so the
person who will be having you know huge
technology for mining he will be having
the most most hashing power right and
since he will be having the most hashing
power the chances of mining a particular
block are very high while in case of
proof of stay the person who has
invested the most amount of ether will
be having higher chances of validating a
particular block or mining a particular
block I am saying for mining again and
again so just don't be confused I'm
talking about validation only okay
if we talk about proof of work we for
attack need to happen we need 51 hashing
power right we have discussed all these
things in the uh in the Bitcoin
fundamental videos right I hope you have
watched those videos while in case of
proof of stake anybody who wants to have
control over the ethereum blockchain
need to stake 51 percent of the stake
amount and that is very much very very
high means just imagine the price of
ether is around I think one thousand
dollar at this point of time I just
don't know but 51 percent
to stake 51 percent you know seeing to
the total ethereum blockchain you know
number of validators and let's say if
each validator is only investing one
ether just just an example let's say
they have one lakh validators so total
amount that you have to invest will be
51 of this one lakh ether around that is
I think very very much high so that's
the case when it comes to proof of stay
if we talk about proof of work
competition is there right everybody is
competing with each other but in case of
proof of stake there is addition it is a
total random process of selection right
so these are the differences between
your proof of work consensus and proof
of stake consensus so I Welcome to our
last video of this course that is old
coins what are basically all coins all
coins are basically all cryptocurrencies
other than one so if we talk about you
know life Bitcoin Theta usdte link BNB
Ada there are so many cryptocurrencies
apart from Bitcoin and all these
cryptocurrencies come under the category
of altcoins now you must be thinking
what is the need of so many different
cryptocurrencies what is the need of
altcoins you know means cryptocurrencies
uh apart from Bitcoins like Bitcoin was
uh Bitcoin was not enough actually there
are three reasons uh the reasons why do
we have so many different all coins
first reason is application and uses if
we talk about Bitcoin let's say Bitcoins
only support transactions right we can
only send transactions we can send some
Bitcoin to our friend or our friend can
send some Bitcoin to us and this is how
Bitcoin works but if you talk about
smart contracts Bitcoin does not support
smart contracts right and ethereum as a
blockchain supports smart contracts so
you can clearly see that ethereum is
supporting transaction as well as a
smart contract while Bitcoin is only
supporting transactions right second
thing is protocol if you talk about
Bitcoin Bitcoin has a different kind of
a protocol protocol means rules okay so
like uh like if you talk about Bitcoin
and ethereum both of them are actually
using blockchain as a technology right
but both of them Works in a different
way if we talk about Bitcoin Bitcoin
uses proof of work while if we talk
about ethereum ethereum uses proof of a
stake and both of these consensus are
different consensus right so this is the
second reason why we have ethereum right
otherwise Bitcoin was more than enough
right but since proof of stake is much
more environmental friendly that's why
we have another altcoin and that is
ethereum okay third reason is technology
so if you talk about Bitcoin Bitcoin is
using public blockchain right but if you
talk about Ripple Ripple is also a you
know Ripple is also a altcoin but it is
using you know different kind of
Technology it is using blockchain but it
is not working on the principle of
decentralization all these different all
coins like you you can see that there
are so many different all points right
so all these different altcoins are
basically developed because all of them
have either different applications
different protocols or they are using
some different kind of Technology that's
why we have so many cryptocurrencies
that's why we have so many old coins
otherwise if we want only one
application that is only sending of
transactions then Bitcoin was enough but
since we require so many different
things that's why we have so many
different altcoins and with this we have
completed our course so congratulations
we have learned so many different things
right we covered three different modules
first was blockchain second was
cryptocurrency and the third was
ethereum blockchain if oh I hope you
enjoyed this course please do leave a
comment below any feedback anything that
you want to say please leave a comment
below of this video I will be be happy
to address it this is only for you
I hope you have liked this course if you
have liked this course please click on
that like button if you are new to this
Channel please subscribe to this channel
because I'm regularly going to upload
new blockchain courses on this channel
if you have any doubts or queries you
can comment your doubts and queries in
the comment section below I will be
happy to help you there and if you want
to talk to me directly then you can
connect with me at Instagram code eater
21 is my ID or you can connect with me
at LinkedIn web3 is my LinkedIn ID and
please do not forget to share your
feedback thank you so much meet you soon
in the next course
UNLOCK MORE
Sign up free to access premium features
INTERACTIVE VIEWER
Watch the video with synced subtitles, adjustable overlay, and full playback control.
AI SUMMARY
Get an instant AI-generated summary of the video content, key points, and takeaways.
TRANSLATE
Translate the transcript to 100+ languages with one click. Download in any format.
MIND MAP
Visualize the transcript as an interactive mind map. Understand structure at a glance.
CHAT WITH TRANSCRIPT
Ask questions about the video content. Get answers powered by AI directly from the transcript.
GET MORE FROM YOUR TRANSCRIPTS
Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.