CONSTRUCTION OF A BLOCKCHAINThe construction of a blockchain is done in a cycle of two stages repeated indefinitely. The first, the construction of a block, is equivalent to putting on a page the new writings that arrive, then to permanently seal this page by building its header. The second is to add this new page to the registry irreversibly.
These operations can very well be performed by one and the same computer. The true originality of Bitcoin and the systems that derive from it, which give them their unique qualities but also their complexity, is to be implanted on an open peer-to-peer network. Open because anyone who owns a computer can join the network at any time without having to ask anyone for permission. Peer-to-peer because everyone can choose freely the functions he/she wants to assume, including the most central ones. In such a network, there is no central control point or even privileged nodes.
This architecture is based on communication protocols that allow the machines located at the nodes of the network to exchange information, in particular to communicate writings and blocks. It is accompanied by a separation of roles that each user can choose to exercise or not: – create new transactions, using “wallets” (wallet or better keychains since they do not contain bitcoins) , but only the computer keys that give access to transactions recorded in the blockchain), – check and relay transactions across the network, but without keeping a local copy of the blockchain (the “simple nodes”), – build the blocks (the “miners”), – maintain a local copy of the chain of blocks (the “complete nodes”), – access the transactions, without being able to modify them.All software used in the system is freely available, and each user can download, install and run on his/her computer the software of his choice, without having to seek authorization. There is a preferred distribution platform (Github) and software recommended by different instances, but there is nothing to prevent anyone from proposing new software or using a different platform.
These principles of openness and decentralization make it impossible to know the number of actors in each role. The number of holders of bitcoins, and therefore of keyrings, is estimated at several millions, of which a few hundred thousand actually are active. The nodes of the network count in tens of thousands, the only number measured continuously by specialized sites being that of the nodes “listening” (listening nodes), that is to say which are currently in a state to receive and retransmit new transactions; this number oscillates between 5000 and 7000.Miners can group themselves into cooperatives (pools) to pool computing resources and gains while sharing a single complete node, which makes the pool appear as a single miner. A dozen of these cooperatives, bringing together an undetermined number of miners, provides 95% of the blocks admitted in the chain. For complete nodes and thus the number of copies of the chain of blocks, which may not all be identical as we will see, estimates range from 5,000 to 30,000, located in 85 countries on all continents.
A BLOCKCHAIN ??IN OPERATION: Each newly created entry enters the system through a network node, which checks that its structure is correct and is legitimate with respect to the entries already recorded. For example, in the case of a payment system such as Bitcoin, it will be verified that there are previous transactions that feed the account with an amount at least equal to the sum to be paid, and that the author of the transaction is allowed to use them. If these tests are satisfied, the writing is put on hold in a local list and broadcast gradually to the entire network. Otherwise, it is rejected.Each type of write corresponds to a validation protocol, which operationally defines which entries are valid in the system. This protocol is re-executed many times during the following steps of block construction and validation. The same system can contain a directory of validation protocols, each of which is associated with a code at the beginning of each writing, which makes it possible to write in the same chain of blocks writes of different natures.Each node that receives this message in turn verifies the formal validity and the legitimacy with regard to the information that it possesses.
Indeed, the open nature of the network imposes a fundamental principle of security: each node must make the assumption that the rest of the system can be defective or fraudulent, and therefore consider all that it receives as suspect, to determine it itself. even nature and validate it independently before using it. The entire system is designed with the assumption that it is always the target of a large number of extremely competent fraudsters.At the end of this first step, the invalid entries were eliminated, and each valid and legitimate entry was copied step by step in tens of thousands of copies, one on each computer in the network, each copy having been duly validated and revalidated at each stage of its journey from its point of entry.
THE CONSTRUCTION OF BLOCKS In the second step, users who have chosen to build blocks (miners) draw writes from their local waiting list and organize them in a tree structure to facilitate access to individual entries. All the miners work simultaneously and freely choose which scriptures they incorporate in their block under construction. They complete the block by adding a header, which contains in particular its checksum and the identifier of the previous block.The cost of this operation is voluntarily made very high by requiring the checksum to comply with very strict standards that require considerable consumption of computing resources, but whose compliance can be easily verified by all nodes, forming what we calls a “proof of work”. This requirement limits the number of miners to a few hundred for Bitcoin, most of them grouped into cooperatives, only those who can implement a considerable computing power with a chance that their blocks will be accepted in the next step, as we will see.In systems using the same principle, this operation is remunerated in order to motivate a sufficient number of operators. In Bitcoin, this compensation is done by inserting in the block a special transaction crediting the miner with a certain number of bitcoins created for this purpose, which will be executed if the block is actually added to the chain in the next step. It is this operation, the only way to create new bitcoins, which is at the origin of the term “miner”.
When a miner has built a valid block, that is to say correctly formed, accompanied by a checksum conforming to the requirements of “proof of work”, and of which each transaction is valid, it distributes it to its neighbors , which in turn will broadcast it gradually to all nodes of the network, after checking the validity and that of all the entries it contains. As soon as a miner receives a block from another miner, he stops building the current block, which has practically no chance of being accepted, eliminates from the local waiting list all the transactions contained in the block that he just received, and starts to build a new block.New blocks are produced and broadcast continuously across the network. But at this stage, no copy of the blockchain has yet been modified, the only ones being able to do it being the “complete nodes”, which each host one of these copies.THE CONSTRUCTION OF THE CHAINFor each new block that it receives, each computer of a complete node executes a protocol that results either in rejecting this block if it has already been received, if it is invalid or if it contains a writing already present in the local string, either to add it to the end of the local string after a final check of all the scripts it contains, or to put it on hold.Recall that each block contains the identifier of its predecessor in the blockchain of the miner who built it.
In the most common case, this predecessor is also the terminal block of the local chain, to which it will be added after a final verification of its validity. Otherwise, it will be kept pending, becoming the end of a secondary branch of the blockchain.In order for all copies of the blockchain to be identical, although independently constructed, this protocol incorporates a “consensus” mechanism, which is a vital part of the system. The rule used by Bitcoin is to retain the string that has requested the greatest construction work of the blocks that compose it. To this end, the header of each block contains a measure of the work done to build it, which allows to calculate the total amount of work expended to build the chain that leads to this block.
If a secondary channel has requested more work than the current main chain, this secondary chain must become the main branch. For this, the program goes back to the place where it has detached itself from the main branch, revalidates one by one each block left pending and the writings it contains, adds this block to the end of the new chain. course of construction if these controls are satisfied, abandoning this process as soon as the first mistake.This critical and complex protocol is the true heart of the system. It also provides some ancillary services, including automatic rebuilding of the local channel after a shutdown of the computer or network.At the end of this second phase, each of the thousands of blockchain copies that exist on the complete nodes has been extended by a block chosen by each node among the miners’ propositions by applying the consensus rule programmed.
If all the complete nodes implement the same validation rules of the writes and blocks, this additional block is the same for all the nodes, and thus all these copies of the blockchain remain identical.OVERVIEWIn summary, the sequence of construction operations of the block chain is broken down into steps that can be executed by different operators. The miners build the blocks, but add them to their own copy of the chain.
The complete nodes add or not the blocks to their copy of the chain, but without being able to modify them, and everyone rechecks what the others did. These operations are executed in parallel by thousands of sites managed by independent operators and located anywhere in the world, anyone being free to play any role in the system, including the most central ones.In the end, the scripts created by millions of users are recorded in thousands of identical files on as many different sites, in the form of unalterable blocks of blocks and freely available. Let’s insist that these files are built independently. So, contrary to what one often reads, it is improper to qualify the chain of blocks of “distributed”, which implies that different nodes would carry different parts, or to say that it is “replicated”, which implies that it would be built at a central point and then copied to the different nodes.While offering great security to its users, the multiplicity of copies of the blockchain poses a problem: since, in application of the “precautionary principle”, it can not be assumed that all copies are identical, which to take as a reference in case of disagreement? It is up to each user to define the consultation protocol of their choice according to the use they want to make of the results.
A typical example is to query nodes randomly until a certain number, defined in advance, gives the same result. The user can also use trusted nodes, or any combination of these two approaches. It is up to him to choose his method, which may be critical for a user, but not for the system.Suggestion:A simple and basic would help our user, As suggested we will go with basic and then we will cover deeper and more researched artcle.Such article can be avoided.