Virtual currency core hardware
The differences between e-money and virtual money are as follows:
1. Electronic money refers to using a certain amount of cash or deposit to exchange from the issuer and obtain data representing the same amount, or through the quick payment service launched by the bank and the third party to transfer the balance in the bank through some electronic ways, so that transactions can be carried out. Strictly speaking, it is a kind of currency that consumers use the bank's Internet banking service to store value and make quick payment to the issuers of electronic currency, and make consumers trade electronically through media (two-dimensional code or hardware equipment)
Virtual currency refers to non real currency. Well known virtual currencies, such as online currency of Internet company, q-coin of Tencent company, q-point and voucher of Shanda company, micro currency launched by Sina (used for micro games, Sina reading, etc.), chivalrous Yuanbao (used for chivalrous road game), silver grain (used for bixue Qingtian game), and popular digital currencies in 2013 include bitcoin, Laite coin, infinite coin, quark coin, zeta coin, etc Barbecue coins, pennies (Internet), invisible gold bars, red coins, prime coins. At present, hundreds of digital currencies are issued all over the world. Popular in the circle & quot; The legend of "bitcoin, Wright silver, infinite copper, pennies aluminum" The detailed explanation of electronic currency is as follows:1. Concept: it is an encrypted serial number representing cash, which can be used to represent the currency value of various amounts in reality. With the transformation from paper-based economy to digital economy, e-cash will become the mainstream
2. Features: anonymity, transaction cost saving, transmission cost saving, low holding risk, flexible and convenient payment, anti-counterfeiting and anti repetition, non traceability
There are two kinds of e-cash: one is based on the Internet and keeps the binary data representing the value of money in the hard disk of the computer terminal; One is the electronic wallet that keeps the monetary value in the IC card and can be circulated without the bank payment system4. Definition: consumers pay traditional money to the issuers of electronic money, and the issuers store the equal value of traditional money in the electronic devices held by consumers in electronic form
in the future, blockchain will be applied in any field and bring great impact on human life. Blockchain technology is regarded as one of the main protocols of the next generation of value Internet. Blockchain technology will be useful in any field of proction and life that lacks trust. From digital currency to securities and financial contracts, health care, games, artificial intelligence, intelligent contracts, Internet of things, identity authentication, asset trading, e-commerce, social communication, file storage and other fields can be widely used
in the aspect of medical treatment
when the blockchain technology is used to save the personal medical records, there will be the historical data of personal medical treatment, which can be understood as the electronic medical records on the blockchain. In the future, there will be data for medical treatment or health planning, and the real master of this data is the patient himself, not the hospital or a third-party organization. In addition, these data have strong privacy, and the use of blockchain technology also helps to protect the privacy of patients
payment system
compared with the existing traditional payment system, blockchain technology can avoid the complex system, directly between the two sides of the transaction, does not involve intermediary institutions, even if part of the network is paralyzed, it will not affect the operation of the whole system. This method has the characteristics of low price, fast speed, and no intermediate fees
banking
as a digital, secure and anti-interference account, blockchain realizes the core function of Banking: the safe storage and transfer center of value. Some banks with keen sense of smell in the world have begun to actively plan to join the army of blockchain research and application in order to gain the initiative in the fierce competition in the future
identity authentication of blockchain
blockchain has the feature of being accessible to everyone. Everyone can query the block information in any place with network. The high transparency also makes blockchain full of charm. In the future, ID card and account book are basically not needed, because every identity information can be written into the blockchain. When you need to verify the information, you only need to look it up to find it
election
based on the voting transaction on the blockchain, it can be confirmed that no vote has been modified or deleted, and there will be no improper voting
Real Estate
blockchain technology can change the operation mode of the real estate market. It can combine many complex processes and cases that real estate companies usually deal with, speed up the transaction process, rece fraud, and provide more transparent and secure transactions for each participant. Provides a way to achieve paperless and fast trading needs
securities issuance and trading
the probability of various kinds of errors in general stock and other securities trading is too high, which requires manual correction, thus prolonging the time required for transaction settlement. Through the transaction of distributed ledger, the automation of the whole process can be realized, and the security and efficiency can be improved. The identity and transaction volume of the trading party are recorded on the blockchain in real time, with an open, transparent and traceable system. It is concive to the market maintenance of securities issuers and regulatory authorities, and can rece the occurrence of black box operation and insider trading
in the scenario of relatively closed, multi-party trust problems and carrying value transmission, blockchain has unique technical advantages and also shows unique charm, which has great application imagination space. At the current stage, blockchain is worth exploring in some scenarios.
First of all, we need to understand what bitcoin is. As we all know, bitcoin did not become a trading currency many years ago. A long time ago, after bitcoin sold pizzas, some people began to identify with bitcoin, and then bitcoin became valuable. Although bitcoin did not have any government endorsement, its value was that people thought it could be used as an exchange currency, Especially from the blockchain, more and more people understand that the underlying architecture of bitcoin is built on the blockchain, and Nakamoto himself has never been exposed, but people recognize that the total number of bitcoin is 21 million
well, after we know about bitcoin, we'll come back to see why our China investment bank and tycoons blow bitcoin to the sky:
1) efficient and scalable performance
borderless system realizes over 100000 times / s batch transfer
high performance blockchain technology is necessary for cryptocurrency and smart contract platform, and can provide a solution that may replace the existing financial platform for the instry. In order to be able to process more transactions per second than visa and MasterCard, unbounded redesign starts from the bottom. Through the share authorization mechanism, the unbounded network can confirm more than 100000 transfer transactions in an average of one second
overview of borderless system architecture. The Lmax can process up to 6 million transactions per second. The key point of unbounded learning from its technology, As follows:
A) put everything in memory
b) put the core business logic in a single thread
C) put the encryption algorithm operation (hash and signature) outside the core business logic
d) divide the verification operation into state independent and state dependent checking
e) use an object-oriented data model
by following these simple rules, Unbounded can process 100000 transfers per second without disruptive optimization. If there is further optimization work, unbounded can achieve the performance similar to that of Lmax exchange (i.e. 6 million times per second). It should be noted that unbounded performance is highly dependent on one of the compatible transaction protocols. If you want to use business logic to run on a virtual machine that operates encryption algorithm and calls all objects with hash identifier, it is impossible to achieve the same level of performance. Blockchain is inherently single threaded, and the performance of single core CPU is one of the most scarce and difficult to expand. Unbounded technical logic can make the single thread execution highly efficient
endorsement of core business of borderless system
blockchain is a global account book that determines to modify a shared global state transaction. The orders contained in these transactions can change the validity of other transactions. For example, you cannot withdraw money from your bank account before the deposit of your check takes effect. You can't know if a transaction is valid until all previous transactions that can affect a particular account are processed. If two unrelated accounts do not share any common dependency, theoretically, the transactions between the two accounts can be processed at the same time. In fact, it's tricky to identify which transactions are truly independent on a smart contract driven ledger with arbitration conditions. The only way to ensure that the two transactions are truly independent is by maintaining a completely separate ledger and then transferring value between them on a regular basis. If we want to use this kind of performance tradeoff to compare, it can be like the relationship between non-uniform memory access (NUMA) and uniform memory access (UMA). In fact, the consistent memory access architecture is easier for developers to design, and the cost is lower. Inconsistent memory access architecture is usually used as a last resort when building supercomputers and large computer clusters. The computer instry has graally realized that it is not as easy to achieve performance expansion through parallel computing as it was in the early days. After all, the most important thing to do at that time was to increase the frequency of the processor. It is for this reason that processor designers are trying to improve the performance of single thread before trying to use multi thread settings. When multithreading is not enough, and only in this way, cluster computing will be considered
many people in the cryptocurrency instry try to solve the problem of scalability by cluster computing before exploring what can be achieved by a single core of a computer technically
2) Lmax disruptor decomposer technology
Lmax decomposer provides a learning example of what can be achieved on a single thread. Lmax is a trading platform for end customers with the goal of becoming the fastest exchange in the world. They have been very generous in publishing what they have learned<
overview of Lmax architecture:
business logic processor is where all sequential transactions and order matching occur. It is a single thread that can process millions of orders per second. This architecture can be easily used in the field of cryptocurrency and blockchain design. The role of the input resolver is to collect orders from many users from different sources and assign them to a certain order. When the order is assigned to them, they are copied, recorded and broadcast to many rendant business logic processors. The input resolver is highly parallel and can be easily sub contracted into a computer cluster system. When the business logic processor has finished processing the input, an output resolver is responsible for informing those who care about the result. This is also a highly parallel task. Finally, by using a single threaded sample processor and Java virtual machine in the business logic processor, Lmax can execute 6 million transactions per second. If Lmax can achieve this goal, then cryptocurrency and smart contract platform do not need to consider the cluster network solution under the condition of less than 10 transactions per second. High performance blockchain
to build a high-performance blockchain, we need to use the same technology as Lmax. Here are a few things that must be done: put everything in memory, avoid synchronization primitives (locking, atomic operations), and avoid unnecessary calculations on business logic processors. Because memory is designed to be highly parallel, it's getting cheaper. The amount of data needed to track everyone's account balance and permissions on the Internet can be stored in less than 1TB of ram, which can be purchased for less than $15000, and can be installed on the commercialized (high-end) server motherboard. Before the system was adopted by 3 billion people, this kind of hardware would be seen in ordinary desktop computers. The real bottleneck is not the demand of memory capacity, but the demand of bandwidth. In the case of 1 million transactions per second and 256 bytes per transaction, the network will need 256MB of data per second, that is, 1GBIT / s bandwidth. Such bandwidth is not common on ordinary desktop computers. However, such bandwidth is only a little bit of the 100Gbit / s bandwidth of the second generation Internet. The second-generation Internet is available to more than 210 U.S. ecational institutions, 70 companies and 45 non-profit and government agencies
in other words, blockchain technology can easily keep everything in memory, and if properly designed, it can be extended to support millions of transfers per second
3) allocate ID and avoid hash calculation
in a single threaded system, processor cycle is a scarce resource that needs to be reserved. Traditional blockchain design uses hash calculation based on encryption algorithm to generate a unique global ID system, so as to ensure that there will be no collision statistically. The problem with these hashes is that they consume more and more memory and processor cycles. Compared with a direct array index, this method will significantly take up more processor time to find the records of an account. For example, 64 bit integers are easier to compare and operate than 160 bit IDs. A larger hash ID mechanism means less space in the CPU cache and more memory is needed. In the modern operating system, the ram which is not often accessed will be compressed, but the hash identifier is a random number, which cannot be compressed. The model blockchain gives us a way to assign unique IDs around the world. These IDS will not conflict with each other. Therefore, it completely avoids using the identifier based on hash algorithm like bitcoin address to refer to an account, balance or license
4) remove signature verification from the business logic processor
all transactions in the cryptocurrency network depend on the use of encryption algorithm signature to verify permissions. In most cases, the requested permissions can be changed by the results of other transactions. This means that in the business logic processor, permissions need to be defined as a case that has nothing to do with the calculation of encryption algorithm
to achieve this goal, all public keys need to be assigned a unique and irreplaceable ID. After the ID is assigned, the input resolver can verify whether the provided signature matches the specified ID. When the transaction arrives at the business logic processor, you just need to check the ID
the same technology can remove prerequisite checking on objects with irreplaceable static IDs
5) designing transactions for static verification
for transactions, there are many features that can be statically checked without referring to the current global state. These checks include parameter range checking, input de rendancy and array sorting. In general, there are a lot of checks that can be done if the transaction contains data that it "assumes" is global. After these checks are executed, the business logic processor has to make sure that these assumptions are correct. The process is to check the modification timestamp of an object reference related to the transaction signature time
6) smart contract
many blockchains are integrating a common scripting language to define all operations. These designs ultimately define the business logic processor as a virtual machine, and all transactions are defined as scripts run by the virtual machine. This solution has a single threaded performance limit on a real processor, and the problem is exacerbated by forcing everything to be executed through a virtual processor. A virtual processor will always be slower than a real processor even if it uses JIT, but the computing speed is not the only problem of this "everything is a script" scheme. When the transaction is defined at such a low level, it means that the static check and encryption algorithm operation will still be included in the business logic processing, which will also rece the overall throughput. A script engine should never ask to perform a signature checking request for an encryption algorithm, even if the request is implemented through a native mechanism
according to the course we learned from Lmax, we know that a virtual machine designed for blockchain should consider single thread performance. This means that compiler optimization should be implemented at the beginning, and the most commonly used smart contracts should be natively supported by blockchain, while only those rarely used and customized contracts will run on a virtual machine. These custom contracts are designed with performance in mind, which means that the virtual machine should limit the range of memory that can be accessed to a level that can be placed on the processor cache
7) object oriented data schema
in memory