2 minute read
Consensus Methods
from Cryptocurrency Master Everything You Need To Know About Cryptocurrency and Bitcoin Trading, NFTs...
by mourbako
This consensus algorithm is a feature contained with the blockchain‘s algorithm. It
is a core function in that it keeps the system in check and avoids the forking of the
Advertisement
blockchain. It can be said that the consensus algorithm is related to the gossip
protocol because it tells the next node what it knows, and also checks to see if
that node has anything to add. It tries to build a consensus of what is right and
what is not. An occasion that requires the execution of the consensus protocol
hardly happens, but if it does, the protocol staves of a forking in the chain.
The consensus algorithm takes information from the node population, attaching it
to the previous block that it has in its version of memory. In the event that someone tries to make their own block (or alter a block to include an unsanctioned
transaction), the few nodes around the offending node may accept the block for a few
moments. The moment they receive word of the other block that has really been
accepted by the general network population, and that information gets to them, they
will now realize that there are two blocks in the system vying for the same space in
the chain.
Because two blocks can‘t occupy the same spot in the chain, the nodes that receive
conflicting information will await the next confirmation. They will then look at the
block that was used, and they will also use that block. Eventually, the block that
has the longest chain survives.
For any block to be confirmed, it has to have the consensus of 50% + 1 of the nodes
in the network. The only way the node in the network will accept the newly minted block is if it is part of the longest chain. That is the only way the nodes (or rather the algorithm in the nodes) will reach a consensus. If there is a discrepancy as we
that are slowly increasing. It will then erase from its memory the offending block.
The entire network will reflect the appropriate transactions in the block at that
point.
This is why you should wait for at least three confirmations to ship your product. It
is not until there are a few confirmations built on top of the block that contains your
transaction that you canbe confident that the payment is legitimate.