Quick Guide to Block Technology for all of steemeainsteemCreated with Sketch.

in #bitcoin7 years ago

Quick-3-Step-Guide-to-Blockchain-Technology.jpeg

What is, in fact, blockade?
In short, blocking is just a way of structuring the data. That's all. This registry is the file that stores the accounts.
This file can be compared to a book that never ends.
Each page of the book has information and a page number at the bottom. Thanks to this page number, you immediately know where in the book this page belongs. Page 49 is clearly between pages 48 and 50.
Like pages, blocks are filled with information. Although the blocks do not have exact numbering, they have a timestamp that performs the same function. A new block is always added after the block with the latest time stamp. Thus, a chain of blocks is formed.
Important feature
Ejnshtejn-obyasnyaet-tehnologiyu-blokchejna.jpeg

Understanding of a role of peer networks
To apply a blockchain as the register to data storage about transactions, we have to have an opportunity to check a blockchain to be convinced whether really someone has executed transaction to our address or a purse.
If the blockchain remained only on one computer which for any reason would be switched-off, at least, it would be very annoying. Therefore, the current state of a blockchain is synchronized and becomes available to a huge number of computers worldwide.
These computers are called "nodes", and they work everyone on the peer-to-peer network to guarantee safety and relevance of data of a blockchain. Each of these nodes stores complete, upgraded version of a blockchain. Every time when the new unit is added, each node on a network updates the copy of a blockchain. Application of a peer-to-peer network has a row of advantages:
• Always it is possible to check a blockchain status independently with the help a blockchain of the observer;
• It is not necessary to rely on any one side to learn the true status of a blockchain;
• It is not required to rely on one server to make sure of data security of a blockchain;
• For cracking of a blockchain the malefactor should crack thousands of computers at the same time instead of one server;
• It is possible to be sure that data of a blockchain will never be deleted because they should be deleted from all nodes.
All this is very important, but one it doesn't mean yet that safety of a blockchain is maintained at the sufficient level for its real application on storage of values or carrying out transactions with them.
For example, how we can know that these (transactions) in a blockchain are right? How it is possible to know that in blocks there are no invalid transactions? And if there are different versions of a blockchain how to recognize which them them represents a true condition of a blokchen?
All these fears inventively are resolved by use of the mechanism of reaching consensus which use has become possible, first of all, thanks to peer network.

  1. Understanding of the mechanism of reaching consensus
    The peer-to-peer mechanism was already used in 1999 by a musical online service of Napster.
    The blockchain also existed to Bitcoin.
    The genius of a sentence of Satoshi of Nakamoto, the mysterious anonymous founder Bitkoyn, consists in the idea of combining of the first two components about the reaching consensus mechanism on the basis of cryptography. In reaching consensus mechanisms the real magic is also concentrated: it allows nodes of a peer-to-peer network to work together needlessly in knowledge about each other or trust to each other.
    "The purpose of an algorithm of reaching consensus is in providing safe up-dating of a status according to some specific rules of transitions of statuses where the right for execution of transitions of a status is distributed between (…) users who are granted the right for collective execution of transitions of statuses by means of a certain algorithm" — Vitalik Buterin
    Now, if you yet not absolutely understood the idea, the mechanism of reaching consensus is just a rule set which are coordinated by network nodes by means of the software of a network. These rules provide that nodes of a network worked properly and remained the synchronous.
    The protocol of an algorithm of reaching consensus sets the following rules:
    • it depends blocks have to be added to a chain of blocks,
    • blocks are considered as valid, and
    • as the conflicts when determining the validity are resolved.
    Addition of blocks in a chain of blocks
    Various blockchains differently add blocks to chains of blocks. The most known mechanism of reaching consensus is the Proof of Work (Proof of Work, PoW)
    The first rule of the Proof of Work is that one block has to be added to a blockchain on average each ten minutes.
    The process realizing this rule is called a mining. Knots which try to add the block to a chain (are called mayner) use the computing power of the computers to try to solve cryptographic "puzzle". Rules assume that only when this puzzle is solved, the block can be added to a chain.
    Mayner who solves a puzzle and, therefore, "gets" the new block for addition in a chain, is rewarded by network. At the same time in advance defined quantity of new coins which are provided to a mayner together with operational cost of all transactions which are contained in the block is created.
    The proof of Work in the Bitcoin network — not the only mechanism of reaching consensus. The proof of the Share (Proof of Stake, POS) is also widely used in the distributed registers. In the mechanism of the Proof of the Share the mayner can "stake" the coins for obtaining chance to be chosen as network for addition of the following block. In some sense staking says: "I put my coins on the fact that I will correctly add this block". And if he lies, then will lose the coins.
    The discussion concerning what mechanism of reaching consensus is better continues. After all, despite the fact that as the block is created, other knots in network nevertheless have to have an opportunity to solve whether the block is valid or not.

Reality of units
When the mayner solves a puzzle and "gets" the unit, all nodes on a network carry out an inspection of the reality of the unit and add it to the copy of a blockchain. Nodes first of all shall reach a consensus on the reality of the unit. Only after that the network is synchronized and the status of a blockchain is updated.
Nodes will add to a chain again got unit only if it corresponds to the rules set by the reaching consensus mechanism. The software at which nodes work checks the unit is valid or not. The invalid unit will be rejected.
Naturally, the unit is same to the valid, as well as the transactions which are contained in it. On the example of the Bitcoin network it is possible to show that rules of the protocol are set that any node cannot send bitcoins which he did not receive from someone else or as a result of "getting" of the unit.
In other words, whether the software of nodes checks all transactions in the unit regarding senders have enough bitcoins for making of transactions. For this purpose they check network condition.
Now, let us assume, I received 1 bitcoin which I send to Alice later. Then I try to send the same bitcoin to Bob. As soon as the unit with my first transaction is added to a chain, all nodes will update a blockchain to reflect that I do not have this bitcoin any more. Any again "got" unit which will contain my transaction with Bob will be simply rejected by nodes. The software of nodes defines that the unit does not correspond to rules, thus, nodes do not add this unit and do not update a blockchain.
Also, rules dictate that transaction is the valid only if it is signed with the sign-code signature of the owner of bitcoin. Only the person controlling a purse or the address from which the bitcoin goes can sign transaction. Therefore only you can spend the bitcoin.
As the conflicts in case of truth determination are resolved
Can happen so that accidentally, two mayner at the same time will add the valid units to a chain. Provide that a part of nodes accepted one valid unit, and other part accepted other unit. The first group turned on the unit with my transaction to Alice, and another turned on the unit with my transaction to Bob. Now we suddenly have two different statuses of a blockchain at the same time!
We call it (inadvertent) "branching": the blockchain branches on two different chains. Who received my bitcoin, Alice or Bob? What of two chains is the "true" blockchain?
As a rule, all consensus protocols solve this problem the simple rule: the longest chain benefits.

Varianty-primeneniya-blokchejna.jpeg

When there is an inadvertent branching of a blockchain, one mayner begin production on one chain, and others — on another. Inevitably, on one chain there will be more mayner, than on another, as a result, new blocks will be added to this chain quicker. Other mayner then will pass to longer chain, and the branched-off chain will die off. No damage to the main chain will arise.
From where we know that quite so all and will occur?
So comes from the fact that mayner are economic subjects which work in the personal interests. Mayner isn't interested in "getting" on the branched-off chain, knowing that it will die off. Transactions on the branched-off chain are never registered on the main chain that means that the mayner extracting blocks on the branched-off chain won't earn reward for the work. For a mayner the alternative cost of getting of blocks which won't be switched on in the main chain is too high — therefore there is no need to spend on performance of this work the time and money.
In rare instances on the branched-off chain there can be a large number of mayner or mayner with considerable computing resources. In this case some time before it becomes clear what chain is the main can be required. The worldly wisdom prompts that for this reason it is reasonable to wait 6 blocks before considering transaction confirmed.

Servernaya-model-protiv-odnorangovoj-seti.jpeg

The rule by which the longest circuit benefits in combination with the fact that huge computational capability for adding of units in a chain is required, does a blockchain incredibly safe. Almost only way to attack a network is to return to any unit in a blockchain, to branch a chain and to begin "to get" on it new units. However, for this purpose the malefactor should redo all operation done by mayner from the moment of a vetaleniye and "to catch up" with the main chain. Without locating bigger computational capability, than cumulative a network hash power, it is simply impossible to reach it. In other words, the electric power and graphic processors necessary for such operation would be too expensive.
Inference
All aforesaid should be considered as very short introduction to operation of the distributed registers. Now you can understand why "blockchain" is not absolutely exact name for the distributed registers which we see today.
However, next time, when someone will mention blockchains at a party, please, do not repeat what I told today about, and just tell: "Hey, the man, a blockchain is only a method of structuring data. I think that you mean the distributed register applied to guiding of accounting of transactions placed on a peer-to-peer network of nodes-maynerov whose interaction is carried out and regulated by the consensus protocol which sets rules for this network."

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63131.59
ETH 2586.04
USDT 1.00
SBD 2.78