Blockchain
The scheme for obtaining a hash of transactions
Blockchain (blockchain or block chain [1]) is a continuous sequential chain of blocks (linked list), a set of information built according to certain rules. Most often, copies of the chain of blocks are stored on a set of different independent of each other.
General information
For the first time, the term appeared as the name of a fully replicated distributed database implemented in the Bitcoin system, because of which the block is often referred to as transactions in various crypto-currencies, but the technology of block chains can be extended to any interconnected information blocks [2]. Bitcoin became the first application of blocking technology in October 2008 [3].
Implementation in Bitcoin
Transaction Block
A transaction block is a special structure for recording a group of transactions in the Bitcoin system and similar ones [4]. A transaction is considered complete and reliable ("confirmed") when its format and signatures are checked, and when the transaction itself is grouped together with several others and written into a special structure - a block. The contents of the blocks can be checked, since each block contains information about the previous block. All the blocks are lined up in a single chain, which contains information about all the operations that have been performed at any time in the database. The very first block in the chain - the primary block (English genesis block) - is treated as a separate case, since it does not have a parent block [5].
The block consists of a header and a list of transactions. The block header includes its hash, hash of the previous block, hash of transactions and additional service information. In the Bitcoin system, the first transaction in the block always indicates the receipt of a commission, which will become a reward to the miner for the created block [4]. Next, there is a list of transactions generated from the transaction queue, not yet recorded in the previous blocks. The selection criterion from the queue is set by the miner independently. It does not have to be a timeline. For example, only transactions with a high commission or with the participation of a given address list can be included. For transactions in the block, a tree hash is used [6], similar to the generation of a hash sum for a file in the BitTorrent protocol. Transactions, in addition to charging commission for creating a block, contain a reference to the transaction with the previous state of data within the parameter input (in the Bitcoin system, for example, a reference is made to the transaction where the consumable bitmicons were obtained). Operations to transfer commission for creating a block to a miner do not have "input" transactions, therefore this parameter can indicate any information (for which this field is called the English Coinbase parameter).
The created block will be accepted by other users if the numerical value of the hash of the header is equal to or less than the specified target number, the value of which is periodically adjusted. Since the result of hashing SHA-256 function is considered irreversible, at the moment there is no algorithm for obtaining the desired result, except random enumeration. If the hash does not satisfy the condition, the nonce parameter is changed in the header and the hash is recalculated. Typically, a large number of conversions is required. When a variant is found, the node sends the received block to other connected nodes that check the block. If there are no errors, then the block is considered added to the chain and the next block must include its hash [4].
The value of the target number with which the hash is compared is adjusted in the Bitcoin system every 2016 blocks. It is planned that the whole network of the Bitcoin system should spend about 10 minutes on the generation of one block, about 2016 blocks - about two weeks. If 2016 blocks are formed faster, then the target decreases slightly and it becomes more difficult to reach, otherwise the target increases. The change in the complexity of the calculations does not affect the reliability of the Bitcoin network and is only required for the system to generate blocks at almost constant speed, independent of the computing power of the network participants [7].
Chain of Blocks
The basic sequence of blocks (black) is the longest from the initial (green) to the current one. Side branches (violet) are cut off.
Blocks are simultaneously formed by a set of "miners". Satisfying blocks are sent to the network, including all replicas of the distributed database of blocks. Regular situations arise when several new blocks in different parts of a distributed network call the previous one the same block, that is, a chain of blocks can branch. Specifically or accidentally, it is possible to limit the retransmission of information about new blocks (for example, one of the chains can evolve within the local network). In this case, parallel build-up of different branches is possible. In each of the new blocks, there can be both the same transaction, and different, entered only in one of them. When relaying blocks resumes, the miners start to consider the main chain taking into account the level of complexity of the hash and the length of the chain. If the complexity and length are equal, the preference is given to the chain whose end block appeared earlier. Transactions that have entered only the rejected branch (including payment of compensation), lose the status of confirmed. If this is a transaction for bitcoins, it will be queued and then included in the next block. Transactions of receiving remuneration for creating cut-off blocks are not duplicated in another branch, that is, the "extra" bitcoins paid for the formation of cut-off blocks do not receive further confirmation and are "lost" [6].
Thus, the chain of blocks contains a history of possession, which can be found, for example, on specialized sites [8].
Block is formed as a continuously growing chain of blocks with records of all transactions. Copies of the database or its parts are simultaneously stored on a variety of computers and synchronized according to the formal rules for building the chain of blocks. The information in the blocks is not encrypted and is available in the clear, but the absence of changes is verified cryptographically through hash chains [9] (digital signature element).
The database publicly stores, in an unencrypted form, information about all transactions signed using asymmetric encryption. To prevent repeated waste of the same amount, timestamps are used [10], realized by splitting the database into a chain of special blocks, each of which, among other things, contains the hash of the previous block and its serial number. Each new block carries out confirmation of transactions, information about which contains and additional confirmation of transactions in all previous blocks of the chain. Changing the information in a block that is already in the chain is not practical, since in this case it would be necessary to edit the information in all subsequent blocks. Thanks to this successful double-spending attack (re-spending previously used funds) in practice is extremely unlikely [11].
Most often, an intentional change in information in any copy of the database or even in a fairly large number of copies will not be recognized as true, as it will not comply with the rules. Some changes can be made if they are included in all copies of the database (for example, deleting several last blocks due to an error in their formation).
To more clearly explain the mechanism of the payment system, Satoshi Nakamoto introduced the concept of "digital coin" [10], defining it as a chain of digital signatures. Unlike the standardized denominations of conventional coins, each "digital coin" has its own denomination. Each bit-address can match any number of "digital coins". With the help of transactions, they can be divided and merged, while the total amount of their denominations minus the commission remains.
Prior to version 0.8.0, the main client used Berkeley DB to store the chain of blocks, starting with version 0.8.0 the developers switched to LevelDB [12].
Transaction Confirmation
While the transaction is not included in the block, the system considers that the number of bitcodes on a certain address remains unchanged. At this time, there is a technical opportunity to issue several different transactions for the transfer of the same bitcoins to the same recipients from the same address [13]. But as soon as one of such transactions is included in the block, the system will already ignore the remaining transactions with these same bitboxes. For example, if a later transaction is included in the block, then the earlier transaction will be considered to be erroneous. There is a small chance that when branching two such transactions will fall into blocks of different branches. Each of them will be considered correct, only with the death of the branch one of the transactions will be considered erroneous. In this case, the timing of the operation will not be significant.
Thus, the hit of a transaction in a block is a confirmation of its reliability, regardless of the presence of other transactions with the same bitkoy. Each new block is considered an additional "confirmation" of transactions from previous blocks. If in the chain 3 blocks, the transactions from the last block will be confirmed 1 time, and those placed in the first block will have 3 confirmations. It is enough to wait for several confirmations, so that the probability of canceling a transaction becomes very low.
To reduce the impact of such situations on the network, there are restrictions on the disposal of newly obtained bitkoy. According to the service blockchain.info, until May 2015 the maximum length of rejected chains was 5 blocks [14]. The required number of confirmations for unlocking received depends on the client program or on the instructions of the receiving party. The Bitcoin-qt client does not require acknowledgments for sending, but most recipients have 6 confirmations by default, that is, you can actually use the received one in an hour. Various online services often set their threshold of confirmation.
The bitmograms received for the creation of the block allow the protocol to be used after 100 confirmations [15], but the standard client program displays a commission after 120 confirmations, that is, it is usually possible to use the commission approximately 20 hours after it is charged.
"Double spending"
Main article: Double expenditure
If you control more than 50% of the total processing power of the network, then there is a theoretical possibility for any threshold of confirmation to send the same bitocones twice to different recipients [16] - one of the transactions will be public and confirmed in the general order, and the second will not be advertised, its Confirmations will occur by blocks of a hidden parallel branch. Only after a while the network will receive information about the second transaction, it will be confirmed, and the first will lose confirmation and will be ignored. As a result, there will be no doubling of bitcoins [17], but their current owner will change, with the first recipient losing counters without any compensation.
The openness of the chain of blocks allows you to make changes to an arbitrary block. But then you need to recalculate the hash not only of the modified block, but all subsequent ones. In fact, for such an operation, the power will not be less than the one used to create the modified and subsequent blocks (i.e., all current power), which makes this possibility extremely unlikely.
As of December 1, 2013, the total capacity of the network exceeded 6,000 THash / s [18]. Since the beginning of 2014, the association of miners (pool) Ghash.io has been monitoring over 40% of the total capacity of the Bitkoyn network for a long time, and in early June 2014 more than 50% of the network capacity was briefly concentrated there [19].
In practice, double consumption bitkoynov was not recorded once. As of May 2015, parallel chains never exceeded 5 blocks [14].
Complexity
A special parameter called "complexity" is responsible for the requirement for block hashes. Since the computing power of the network is unstable, this parameter is recalculated by the network clients every 2016 blocks in such a way as to maintain the average blocking block formation rate at 2016 blocks in two weeks. Thus, 1 block should be created approximately once every ten minutes. In practice, when the computing power of the network grows - the corresponding time intervals are shorter, and when decreasing - longer [20]. Recalculation of the complexity with time-binding is possible due to the presence of the time of their creation in the header of the blocks. It is written in Unix-format according to the system clock of the author of the block (if the block is created in the pool, then by the system clock of the server of this pool) [21].
Application outside the scope of Crypto-currency
At present, representatives of various fields are interested in blockade technology. At the same time, the degree of interest of companies in different sectors of the economy varies considerably. The financial sector is actively preparing for the widespread introduction of detachment, while manufacturing companies leave this technology without attention [3].
Banking sector, investments and exchanges
In the Russian banking sector, companies such as VTB [22] and Sberbank are interested in technology [23].
VISA payment systems [24] [25], Mastercard [26] [27], Unionpay [28] and SWIFT [29] [30] have announced the development and plans for using blocking technology.
London division of Deutsche Bank Innovation Lab is developing a system of investments based on block-based technology, which accelerates, simplifies and reduces the cost of investing by eliminating or reducing the role of intermediaries, lawyers (attorneys), auditors and clearing agents [31].
In July 2017, S7 Airlines and Alfa-Bank launched [32] a block-platform for the automation of trading operations with agents based on Ethereum.
Land registry
Sweden [33], Ukraine [34] and the UAE [35] plan to maintain the land registry with the help of blocking technology.
The government of India is struggling with land fraud with the help of blockboys [36]. Andhra Pradesh became the first Indian state, where the government took steps to implement blockade decisions [37]. To do this, a technological park will be created in Vishakhapatnam with the participation of Aplea, Phoenix and Oasis Grace blockbuster companies [38].
In the first half of 2018, an experiment will be conducted on the use of blocking technology to monitor the reliability of the Unified State Real Estate Register (EGRN) data in Moscow [39].
Identification
In 2014, Bitnation was founded, which provides services to the traditional state, such as identity cards, notaries and several others [40].
In June 2017, Accenture and Microsoft introduced a digital identity system on the blockroom [41].
In August 2017, the government of Brazil began testing the identity card system for blockbusters [42].
Finland identifies refugees with the help of block-technologies [43].
In Estonia, a blocking system of electronic citizenship operates [44].
Payment means
The World Food Program uses block-building technology to provide food for refugees with food through local outlets and networks, instead of distributing food directly or giving refugees cash to buy food. The idea belongs to Houman Haddad. Biometrics (scanning the iris) is used to identify the recipients of food. Savings in 2018 due to the use of this technology only in Jordan amounted to $ 150,000 per month.