Recently read some papers, books and code on Ethereum to make a little summary.
The evolution of any technology is complementary to the problems it needs to solve, and a deep understanding of the requirements can grasp its design concept and development context.
So what was Ethereum born for? Simply, in the currency as a decentralized encryption currency, in addition to transfer transactions, everyone wants to put the COINS behind the block chain technology application in the field of more and more complicated, such as decentralized domain name system, storage system, auction, etc., some people try to make changes on the basis of the currency code, but the cost is very high, In order to address these needs, a young man named Vitalik Buterin wrote a paper called Ethereum White Paper, and a group of technical people started to design and implement the Ethereum blockchain.
With a clear requirement, the next step is model abstraction, which is stated in the Ethereum whitepaper that ethereum nodes deliver anonymous messages equally and jointly maintain a set of states. The first is to stand on the shoulders of giants, with asymmetric encryption of blockchain to provide a degree of anonymity, with consensus protocols and economic incentives to stimulate miners to promote ecological health while ensuring safety; Followed by abstracts the status of a more general collection and state transition mechanism, in the etheric fang state can be divided into currency status and custom status, i.e. accounts – the etheric COINS and accounts – custom data in custom data, and cannot be modified after is divided into the upper chain program data and can be run after the modification of numerical data, in the etheric lane, The program in question is called a smart contract and can only be triggered by a message, either a transaction initiated by an ordinary user or a message invoked by another smart contract. Ethereum provides a Turing-complete operating environment for smart contracts, which are much more expressive than Bitcoin. However, when technology solves a problem, new problems always arise: compute-centric smart contracts struggle to improve TPS on a decentralized architecture; The status data that can be kept permanently at a one-time fee cannot continue to motivate miners, making it difficult for the ecology to maintain healthy development. The evolution of Ethereum 2.0 addresses these issues.
So let’s expand on that.
In Ethereum, states and events (transactions) are stored using a Merkle Patricia Tree (MPT) data structure. Each account keeps a record of balances, programs, and custom data. Each account has a unique address. Stored as key-value pairs in the database. And then the question is, who is responsible for maintaining the status of each account, who is going to write it, who is going to read it and who is going to store it?
When we use Alipay or web disk software, the data is stored in their server, and all our operations are processed through their server. In the world of the etheric fang, each participating nodes are equal, there is no central node, and each node can save a whole state records, namely each participating nodes can see status value of the other nodes, it sounds not so good, after all, the individual account balance is very intimate, so how to protect personal privacy?
In the etheric lane network, node to transfer, the balance of these operations news broadcast to nearby nodes, receive message to verify there is no problem again after the news spread to the other nodes, until the whole network knows the news, update their own native state of the record, here involves two questions, How to ensure that only you can put your money to give to others and how to ensure that your message has not been tampered with in the process of transmission, using asymmetric encryption algorithm here, namely, each of the participants own operating information is encrypted with the private key and the hash, the account address is generated by a public key, receive information that each node will be the solution you encrypted with the public key information and the operation, Use abstracts to verify that the operation information has not been tampered with. Since everyone assumes that your private key is stored privately, only you can encrypt the operation, thus ensuring that only you can touch your money. And since the public key is randomly generated, the anonymity of the account can be guaranteed to a certain extent. Talking about here, we will think, if we use pay treasure, they will accept all kinds of fees (advertising), profitable so they will help us manage funds and assets security responsibility, so in the etheric lane network, everyone is equal nodes, will not send any advertising, also can’t literally to receive poundage, natural unprofitable, without interest, There is no node willing to participate in the process of other nodes’ messages, and there is no intermediate node, any node may appear evil or hardware and software failure, to promote everyone to actively and honestly participate in the need for a reasonable reward and punishment mechanism.
What is called “the world xi all for profit, all bustling all for”, based on the hypothesis that all nodes are only for their own interests, to promote all participating nodes active and sincerity to deal with the operation of the other nodes, the price we need to establish a mechanism that evil is enough big, far more than the great, the good faith or integrity of earnings is enough big, Too big to be bad. First of all, each operating message node can participate in dealing with other nodes in the pack to a block, a chance to win a cash reward, due to the operation messages can choose to pack, so I can not packaged those who want to freeloaders, namely do not pay fees operation, thus message node will be in accordance with the market price for handling charge, Some nodes are stimulated to actively participate in processing operational messages i.e. packaging blocks and modifying state records. Participation enthusiasm is now, so how to ensure the integrity, simply be let evil cost is very big, because the chain block before each new blocks to a block of information are included, so as long as the good control of the difficulty of each block package, if you want to modify a block in front of the content, behind each block have to calculate it again, And the difficulty increases exponentially, some people may ask, I want to change the old block, don’t want to leave the back, no, in the world of blockchain, the length represents the cost of paying the most, so people only accept the longest chain. Because modifying a block is nothing more than to delete their own money records, and can not transfer other people’s money to their own accounts, so the evil benefits are limited, but the cost (calculation) is very large, so this system basically meets our needs.
Smart contracts are arguably the biggest innovation in Ethereum. The program has the status of “independent” and can be executed openly and transparently in the history of ethereum. Alan Turing’s complete platform provides enough flexibility but also has hidden dangers. So a node in the execution intelligence before the contract is unable to identify malicious intelligent contracts, so the etheric fang platform provides detailed billing standard calculation, before implement intelligent contracts to ensure that the account balance to a certain extent, to perform after the completion of the charge will be awarded to the miners, if in the process of execution, the cost has reached a threshold (sending trading account set), If the execution is not complete, these fees are deducted and the content that can only be executed by contract is rolled back. Designing the charging mode of computing resources provides valuable theoretical and practical experience for the development of blockchain technology in the direction of abstract computing.
Each participant in the etheric fang ecological “profitable”, a total of promote the development of ecology, quantity is more and more, when the account mentioned above state of TPS is too low and the cost of maintenance problem is becoming more and more significant, the etheric lane 2.0 planning put forward a technology, fragmentation and PoS fragmentation using divide and conquer the ideas to improve intelligence contracts run concurrent degree, PoS, namely Prof of Stake, is to replace the existing PoW to reduce energy consumption, improve consensus efficiency and further improve TPS. There is still no consensus in the community on the cost of state maintenance. Some people suggest charging rent for custom data storage. The right to use data will be frozen after the balance is deducted, and the right to use data will be unfrozen after the balance is sufficient. This approach is similar to an asset tax in today’s world architecture, giving flexibility to the economy to adjust, but is harder to implement than an asset tax for Ethereum.
To sum up, ethereum, as a technological testing ground for first-class blockchain technology, lets us see that the public chain is trudging on the road of development. Technology and humanity are like two feet of adventurers. Only by constantly exploring better ways of cooperation can we go further.