laitimes

Xiaobai can also understand the Web3 technology getting started guide

Xiaobai can also understand the Web3 technology getting started guide

Write on the front

I've been mulling about writing such an article. This is a technical essay for non-technical students. But this article attempts to go a little deeper than most popular science texts: we explore the technical nature of Ethereum, hoping to give students with a level of mass computer use a preliminary clear idea of Ethereum's technical framework.

If the reader does not just want to understand a few fashionable Web3 words as a capital for talking, but is ready to embrace Web3, then whether or not you do technology, it is certainly not a bad thing to have an essential understanding of the underlying principles of Ethereum.

When the author began to delve into Web3 and Ethereum, as a person with a technical background, he also felt the novelty of many basic concepts in this world.

Of course, I have also seen some friends who have only learned people, such as the team's product manager handsome man, from zero entry to grow into a Web3 blockchain expert completely barrier-free, not only to do a good job of product design, but also to rush to the forefront of technical departments to do technical difficulties.

But there are too few such people. For most people, the authors suggest that the introductory learning curve for Web3 may be steeper. Many people may still be stuck in the stage of knowing what they are doing and not knowing why they are.

Therefore, the idea came to me, to write an article for all friends with non-technical backgrounds who need to really understand the Web3 blockchain, and to tell the technical knowledge points that friends with non-technical backgrounds deserve to know in a way that can be understood. Writing such technical content, but also expecting to write in depth and simplicity is not boring, the challenge is really big. But if it does help those who do not do technology to understand Ethereum more deeply, the purpose of this article has been achieved.

Ethereum is a computer

What is Ethereum?

Of course, there have been many articles about Ethereum, and if the reader has known more or less, he should know that Ethereum is a second-generation blockchain network (different from the first-generation Bitcoin network), and the common currency of Ethereum is called Ethereum. Distributed applications (dapps) based on smart contracts can be run on top of Ethereum.

Let's take a look at the entry for Ethereum on Baidu Encyclopedia: Ethereum is an open-source public blockchain platform with smart contract capabilities that provides a decentralized Ethereum Virtual Machine to handle peer-to-peer contracts through its dedicated cryptocurrency, Ethereum (Ether).

This explanation is no problem. Everyone also knows that Ethereum is a public blockchain platform.

But if you understand Ethereum a little deeper from a technical point of view, the essence of Ethereum may surprise the reader: Ethereum is essentially a universal computer. Based on its globally distributed nature, it is undoubtedly worldwide.

Why is Ethereum a computer?

From the beginning, the creators of Ethereum wanted to build the Ethereum network for general purpose computing purposes. It's a very beautiful idea: to use a distributed network to build a universal computing system that people all over the world can participate in. Note that unlike the current mainstream Internet system, the Ethereum distributed network is a unified single whole. In computer science, we say that Ethereum as a whole is a Turing-complete state machine.

The word "Turing-complete" is so pedantic that the reader need only understand that this represents the ability to perform general-purpose computations. This is quite different from the first-generation Bitcoin network: the Bitcoin network has no general computing power.

In addition, what is the so-called "state machine"?

This is better understood, using the analogy of a personal computer: when the computer is running, the CPU loads instructions and data from memory to perform operations, and after the calculation is completed, the intermediate operation results are saved in memory (updating the "state"), and then the next load and calculation is carried out. A logical machine like this that needs to save state is a state machine.

Although the above explanation gives a particularly simplified description of how computers operate, today's computer systems are essentially a so-called Turing-complete state machine that "computes-saves state-recalculates".

What about Ethereum, which is a general-purpose computer, means that Ethereum as a whole is also a logical machine that "computes-saves state-recalculates".

Unlike a personal computer, which keeps state in the machine's memory (and thus on a hard disk), Ethereum's "state" is recorded on tens of thousands of nodes around the world.

Ethereum's breakthrough innovation was that it combined a general-purpose computing architecture such as a stored program computer with a decentralized blockchain, thus creating a distributed, monolithic state world computer.

No matter where Ethereum's program is running, it is able to produce a consistent state, ensuring that data is correct and secure through consensus rules.

Ethereum's way of recording data is to keep the same piece of information on each node.

That is to say, any Ethereum node records all the information of the Ethereum network. In particular, such nodes are called "full nodes". This means that all state information about the Ethereum network is fully synchronized on each node.

As long as not all full nodes are destroyed at the same time, Ethereum can be reborn. What a strong vitality.

To fit the information of the entire Network of Ethereum, how big the whole node needs to be, which is much smaller than the reader imagines: today, the total size of all the block information of Ethereum is 345GB. This capacity is actually small compared to today's personal computer movement is several terabytes of hard disk capacity.

Ethereum's total information capacity is increasing every day, but it's not particularly fast, because recording information on the Ethereum network requires a very high fee, which is also an important feature of Ethereum: all computing operations and data recording cost real money.

As mentioned earlier, the word "Turing-complete" describes the general computing characteristics of the Ethereum system. Ethereum can run user-defined universal code, which is called smart contracts, which is a fundamental innovation that distinguishes Ethereum from the first generation of the Bitcoin network.

Thanks to the support of smart contracts, Ethereum can complete the universal computing tasks that personal computers can complete, and from the perspective of computer science theory, Ethereum is a general-purpose computer, that is, the state machine that "calculates-records the state-recalculation".

Since Ethereum is a "state machine", it is better to continue to ask two questions: When will the state of Ethereum be updated? Does Ethereum run automatically like Skynet in Terminator?

The answer may surprise the reader again. Although Ethereum is the world's computer, full nodes all over the world, its operating mechanism is completely non-parallel. Ethereum is a single-threaded system without compromise. That is to say, the Ethereum computer first calculates a task, and then the computation result "state" is updated to various nodes around the world, and then it will continue to the next task.

Ethereum users can submit transaction requests concurrently (Concurrency), but Ethereum is not processed in parallel (Parallelism). All transactions try to change the overall state, and Ethereum chooses to process transactions one by one.

Readers may have heard of the growing congestion queuing problem on the Ethereum network, and now understandable: this is the pot of Ethereum's single-threaded task processing mechanism. The tasks performed on Ethereum can only be obediently queued up in order, and the more people used are not blocked.

How to solve the congestion problem of Ethereum is a hot topic in today's blockchain technology research. For example, new words such as Layer2/sidechain that you may have heard of are mainly aimed at circumventing Ethereum's main chain congestion problem (and high operating costs).

Looking back, from the perspective of the execution mechanism of the task, Ethereum is much simpler than the personal computer or even mobile phone system that the reader is using.

Today's personal computer systems are all kinds of real-time multitasking, and various background foreground programs run concurrently; Ethereum, in addition to the information state, exists in the nodes of the distributed world at the same time, and in terms of the way the system runs, it is a particularly simple single-threaded mode.

In addition, does ethereum have a continuously operating so-called operating system at the bottom, and is this world computer somewhat automatic and intelligent like Skynet in Terminator? Or, at least a computer-like operating system to control the overall operation?

The answer is: non-also.

There is no such thing as "auto-running behind the scenes" on Ethereum. All of Ethereum's computational tasks are driven by "transactions", which are initiated by the Ethereum address account held by the user, with only two outcomes: success and failure. If the transaction is successful, the global status is updated in the Ethereum record; If the transaction is unsuccessful, the global status remains unchanged.

It's worth repeating, Ethereum is a global monolithic state machine, and trading is the only thing that can get this state machine to move forward and change state. Smart contract code on Ethereum does not run automatically. Ethereum also doesn't run "in the background" either. All of this is triggered by user transactions.

So, despite being the same general-purpose computer, Ethereum's operating model and personal computer system are very different.

As for whether the Ethereum computer has mysterious artificial intelligence, or even whether there is a prototype of "Skynet", the reader can also answer directly: Ethereum does not have any automatic operation mechanism, let alone artificial intelligence; it is not Skynet, just a good distributed platform. Judging from the underlying mechanics of task execution, it's probably much simpler than the laptop on your desktop.

The nature and foundation of decentralization

We always say that the Web3 network represented by Ethereum is a decentralized network. So what is decentralization? Why decentralize? Who guarantees the credibility and security of decentralized transactions?

Centralization, in the sense of the current Internet model, refers to the interaction between users on the Internet, all based on Internet services maintained by a trusted company. Technically, it is a typical server-client model.

For example, a seemingly simple peer-to-peer transfer: user A transfers 100 yuan to another user B through mobile phone WeChat or Alipay. In fact, it is necessary for tencent or Ant Financial's background server, which both A and B trust, to operate the accounts of both parties, and the server will reduce the account amount of user A by 100 yuan, increase the account amount of user B by 100 yuan, and ensure that the two operations occur together. Because WeChat Pay or Alipay is already widely used enough, users "trust" their back-end servers to go wrong.

We can see that in the current Internet model, Internet services are characterized by:

The Services are operated by a specific company. If the server goes down, user service can be disrupted. Of course, countless engineers have worked hard to ensure the stability of various Internet-centralized services.

Based on these services, interactions between users, even if they appear to be completely person-to-person, are done through a central server. The underlying logic behind this is that users "trust" these corporate servers to be impartial and that they serve users as promised.

This is also the reason why the Internet services provided by large companies today seem to be more "reliable" and "reputable" than those provided by smaller companies. Because of the current user volume of large companies, the technical and operational capabilities of services are more likely to win the "trust" of users.

So, in essence, the current Internet application model is that the company that provides the service makes a guarantee, and the user who uses the service chooses to believe.

So what is "decentralization"? The most basic point is that there is no centralized server.

There is no total server on Ethereum that sits on top of sentient beings (nodes), nor does it have any servers that provide specific services. In other words, on Ethereum, there is no concept of a server for a specific application. There are only completely equal "full nodes", each of which holds the information state of the whole network.

On Ethereum, any user can directly initiate a transaction with another user, and the legitimacy and correctness of this transaction does not need to be guaranteed by a large company server; and it is precisely because user interaction can be thoroughly peer-to-peer, Web3 users no longer need to entrust their account information to a large company to complete the service.

The user's account information is completely in their own hands, and when users A and B have a transaction such as an Ether transfer, this operation is ensured by the Ethereum network as a whole to complete correctly.

As mentioned earlier, the Ethereum network is essentially a general-purpose computer; user-initiated transactions are the only mechanisms that drive the world's computers to produce "state changes." But as mentioned earlier, Ethereum doesn't have artificial intelligence that goes beyond; or more specifically, there aren't any programs on Ethereum that govern the whole thing to act as the server arbiter of the Internet.

So, here's the problem: no one or AI regulates it, and the transaction is completely trustworthy. How did such a wonderful thing come about?

The answer is that it is not "trust", let alone magic, but a basic and absolutely credible science - mathematics. Here's a simple explanation of how mathematics supports this wonderful decentralized system from the very bottom.

There is a very interesting kind of mathematics called asymmetric cryptography.

Let's remember a few nouns a little bit:

Public key: A large number, usually represented by a string of hexadecimal numbers.

Private key: A larger number, represented by a longer string of hexadecimal digits.

Digital signature: it is a kind of information processing method, which processes any binary information through the "private key" for mathematical operations to obtain a string called a digital signature.

By a simple analogy, the public key can be regarded as an account number, and the number is public; the private key is a password, which only the user knows. The public and private keys are paired one by one.

A wonderful property is that knowing the private key makes it easy to deduce the public key; but the other way around, knowing the public key makes it impossible to deduce the private key. This is also the source of "asymmetry".

The wonderful mathematical theory of "asymmetric cryptography" guarantees an outcome: anyone who gets the public key and digital signature information can confirm through standard mathematical methods that the digital signature is processed or "signed" by the private key corresponding to the public key; and the mathematical theory ensures that only the private key can produce the result of the digital signature.

Therefore, the mathematical theory guarantees us that this information with a digital signature is indeed sent by the person who has the corresponding private key, and no one else can forge it.

But what does this have to do with what we call decentralized trading?

In the Ethereum system, the account address of each of us is a public key. This is not a metaphor, but literally. If the reader has used Ethereum-related software, he knows that the Ethereum account is represented by a hexadecimal address, which is nothing else, but a public key in the cryptographic sense.

So, where is the user's private key?

In fact, everyone who uses Ethereum for the first time will be prompted by the Web3 account management software to remember a string of mnemonics and will be repeatedly reminded by the software not to tell anyone about the mnemonics, let alone lose the mnemonics, otherwise the account will never be recovered. This mnemonic is some kind of mapping of the private key; to put it simply, the string of mnemonics is the private key itself.

Web3's account management software, also known as Web3 "wallet", is to store and manage the private key locally for the user, and to help the user generate transaction requests that have been digitally signed with the private key and send it to Ethereum, thus becoming the de facto entrance to the user's Web3 network.

(There's another little detail here that readers who have used Web3 wallets like MetaMask will know that an additional password is set to enter the wallet.) But it is important to note that this password is not an Ethereum password. Ethereum accounts do not have passwords, and the user's private key is the only and highest credential to access the account. This password is only used to protect the private key information of the Ethereum account stored locally, and even the password itself does not do network storage synchronization: the private key information itself will not be synchronized to the server, and the wallet password will have no reason to do online synchronization. Wallet Tool is a localized software. )

When an Ethereum account initiates a transaction against another account, all the information requested for that transaction is digitally signed by the account's private key, and the signature information is broadcast to Ethereum along with the transaction request data itself and the account address (i.e., the public key).

On Ethereum, this transaction request is not responsible for any centralized server, and a large number of full nodes that receive broadcast requests will confirm the legitimacy of this transaction at the same time.

(A little detail is hidden here: only those full nodes that want to receive the system reward will actively verify the legitimacy of user transactions and win the ether rewarded by the system with the amount of work - this is the so-called "mining".) )

The verification method of Ethereum transactions is exactly the password verification mechanism introduced earlier:

The initiator's account address information is the public key, and at the same time, there is a digital signature of the transaction information that is claimed to be initiated from this address and the account private key. Then, any full node can confirm that the transaction request is indeed from this Ethereum account through the verification of the public key + digital signature.

That is, any node on Ethereum can be very confident in confirming that a transaction is not faked but actually came from the account owner. After confirming this, each Ethereum full node can happily perform operations according to the transaction request and record the new status result on the Ethereum datalink. This is the core cryptographic communication mechanism of the Ethereum blockchain.

This reliable communication mechanism, built on cryptographic theory, fundamentally allows any two accounts to complete transactions without the need for a central server. It is true that there is no need for the trust of a third party, all operations are peer-to-peer; or that the "trustworthiness" of this peer-to-peer transaction is supported by mathematical theory.

Math guarantees that someone on Ethereum will give you a sum of money (initiate a transaction) and you can immediately tell if it's a scammer or a pie in the sky.

In the end, what we can believe is not commitment, but mathematics.

What exactly is in an Ethereum account

What's in your Ethereum account? In a word, there is basically nothing in the Ethereum account.

There are two kinds of Ethereum accounts, one is for people, called external accounts, and the other is for smart contracts, called contract accounts.

The word "smart contract" is really unpredictable, but in fact, the so-called smart contract is a piece of code, and under the mechanism of Ethereum, the smart contract code is generally very short, and hundreds of lines of smart contracts are already behemoths.

Both external and contract accounts are represented by an address on Ethereum. For external accounts, that is, accounts used by people, there is only one data field in it, and that is the amount of Ether owned by this account. For smart contract accounts, the data is a little more, in addition to the Ether amount field (yes, the smart contract account itself also owns Ether independently) and the data field stores the code of the smart contract itself, as well as the data storage area required for this smart contract.

In addition to the amount of Ether, there is an internal count in the Ethereum account called nonce, which is a statistic of the number of transactions on the account, which increases by 1 after each transaction. This count is important to prevent "reusable attacks".

Simply put, if someone with ulterior motives copies the transaction data that was once sent out by this account and then sends it again, because the public key and signature in the packet are true, if the user account does not have this one-way incrementing transaction count for verification, the transaction may be repeated many times.

The architecture of Ethereum accounts is particularly simple, just as the Ethereum blockchain network is connected by the most concise cryptographic communications.

The code of smart contracts is also very simple, but the power of smart contracts is that the entire Ethereum code can be "used for me": each smart contract code can freely call another smart contract.

It's particularly similar to building Lego bricks, each of which looks bland, but countless bricks are combined to create a glorious edifice.

Architectures like Ethereum are reminiscent of ant-based community organizations. Each ant can do very limited, but the whole colony together, as if there is a higher level of intelligence. This existence is not in the sense of artificial intelligence, but in the sociological sense.

The founders of Ethereum must be a group of idealistic people, and only such people will be obsessed with constructing a new world that operates according to the simplest rules, but can derive complex and powerful social functional logic on its own.

In the process of diving deeper into Ethereum, we will feel this again and again.

Ether, gas

The concept of Ethereum currency (referred to as "Ether") is more or less involved in the front, and here we continue to break it clearly.

The value of Ether is now very large, and it is true that this value fluctuates greatly, and there is also a lot of discussion about the authenticity of the value of blockchain coins. But the author can judge that this value will fluctuate, but the value of Ether will not die. There are many reasons for this, but here is only one technical and fundamental: what ethereum does for its most basic purpose.

Yes, Ether is the universal currency of the Ethereum ecosystem, and it can now buy a lot of virtual items, but the intrinsic value of Ether, on a technical level, is the purchasing power of computing resources designed for the Ethereum network.

A core concept of Ethereum's operation needs to be addressed here, and the operation needs to pay a corresponding fee.

As we all know, on Ethereum, each user can freely initiate a network-wide synchronization operation, that is, a "transaction". However, this transaction consumes the entire network computing resources, and the corresponding fee is paid by the initiating account.

Ethereum uses a unit of gas (meaning gasoline in English, special image) to measure the computing and storage resources spent to perform specific operations.

Contrary to the concept of using basic free network services in the current Internet ecosystem, any Ethereum user who wants to initiate a transaction needs to pay the corresponding gas fee first. The gas fee is a fixed value for a particular operation, for example: adding two values costs 3gas, computing a hash costs 30gas, and sending a transaction request costs 21000gas.

What is used on Ethereum to buy gas is not anything else, it is Ether. Interestingly, the "exchange rate" of ether purchase gas fees is still floating.

Therefore, if we are convinced that the Ethereum network has a value to work, then Ether will always have value because it benchmarks the computing resources of the Ethereum network.

Why is the computing on Ethereum designed to be paid? There is no free lunch in the world, and it is natural for users to pay. However, there is another layer of reason here: Ethereum is a universal computer, and the operations of a general purpose computer can enter an endless loop.

If the PC loops deadlocked, then you can simply unplug and start over. But the Ethereum network does not have a plug, ah, how to avoid the operation of Ethereum by a malicious cycle deadlock?

In addition to repeated attention to the underlying design, the most important thing is to introduce gas fees, which need to be paid for each operation, so that no matter what, there will be a moment when the cost is spent, and the dead loop calculation will naturally end.

Gas is an extremely important part of Ethereum. The user who creates a transaction needs to show the price he is willing to pay for the execution of the transaction, preventing unintentional or malicious infinite loops in the network and other forms of waste of computing resources.

A wonderful design that doesn't require complex rules to constrain, just talk about the benefits.

Human nature is profit-seeking, which is also a weakness of a certain human nature. Ethereum's design, in turn, utilizes human nature to keep the system running. This design idea is reflected more than once in the entire Ethereum system design.

Human desire is heavenly reason, and Ethereum really practiced this sentence.

Wallet, remote client

Web3 Wallet is a tool that blockchain network users deal with on a daily basis, and it is the de facto Web3 entry point.

People who are in contact with Web3 wallets for the first time will most likely compare it to WeChat Pay wallet or Alipay wallet as the name suggests, that is, a server-side supported system for storing a certain currency. This is the biggest misconception about Web3 wallets.

Web3 Wallet is a localized blockchain account management tool, and localization means that it does not store personal account data online. All activity on Ethereum is driven by sending transaction requests to the Ethereum network through one's own Ethereum address account. So who will help users do this, it is the web3 wallet software.

For example, when a user opens an NFT trading market and places an order to buy an NFT, the web page will call up the browser's MetaMask wallet plugin. This MetaMask plugin stores the user's Ethereum account address private key, metaMask wallet helps users package the transaction request data, and confirm the required fee with the user, and then send this transaction request information to the Ethereum network to complete the transaction.

What to do if the user loses the Ethereum private key, the answer is - cold mix. The private key is presented to the user in the form of a string of mnemonics, if the mnemonic is lost and the wallet software that stores the key locally is accidentally deleted, the corresponding Ethereum address account will never be accessible.

So, is it possible that there might be a centralized service to host user keys?

The advantage of this is that users also have the opportunity to recover their account keys from the server through traditional identity recovery methods. This is feasible in terms of ease of use, and there are already some Web3 products such as MetaNotey.IO that are doing this - providing users with hosting services for Web3 accounts.

After all, the web3 wallet also has a threshold for use, and the user's Web3 learning curve will be smoother after hosting; On the other hand, if you allow a centralized server to host your own Web3 account, you are back to the proposition of the traditional Internet, losing 100% privacy security. Privacy and ease of use are likely to be 100% unmet at the same time. We have a choice.

In addition, account management tools like MetaMask have another name: Remote Client.

On a blockchain network like Ethereum, all nodes are so-called clients (a name that's not always accurate, as full nodes also carry the functionality of serving Ethereum users). The status of all nodes in Ethereum is equal, and all contain the complete information of the entire Ethereum.

However, many users do not want to be a full node, but only want to access the Ethereum network. The concept of a remote client was derived. Remote clients do not need to store information about the entire Ethereum network locally, and their information about Ethereum is done by accessing other full nodes. The remote client is responsible for broadcasting account-initiated transactions to Ethereum and receiving the results.

Web3 wallets like MetaMask are essentially a remote client.

Tokens

"Tokens" is a concept that is often mentioned. Tokens are a direct translation of the English token, which refers to the virtual currency that users on Ethereum can self-publish through smart contracts. As long as the interface meets the ERC20 standard of a protocol, any smart contract can become the issuer of a token.

Why is it often said that the so-called coin issuance is "air coin" and "leek cutting behavior"? The reason is actually very simple, because everyone is free to build smart contracts to "issue" some kind of token.

"Issuance" is a very advanced-sounding word, but on a technical level, the token contract can do very simply by declaring a certain amount of a token in a few codes and granting tokens to different Ethereum accounts through the standard ERC20 interface.

As mentioned earlier, each Ethereum account has a field that records the amount of Ethereum coins for that account. So, are the amount of tokens granted also recorded in the user's own Ethereum account? It seems like it should be, but the answer will surprise you: no.

The only amount recorded in your Ethereum account is the Ether amount. The amount of tokens granted to each Ethereum account for various tokens is only recorded in the data area of the smart contract that created the token.

The reader can imagine that there is a table in the data store of this token smart contract, and each row in the table records "Address xxxxxx: Own xx tokens". Token contracts record the token amount of each account in a publicly visible form in the most intuitive way.

If you dig deeper, why is this amount of tokens that is not even recorded in personal accounts recognized by the public? This is also due to Ethereum's data openness and immutability.

The token contract code based on the ERC20 protocol is publicly available and can be read and verified by anyone; and the data records of the token are technically unmodified. Although the data is only recorded in the data area of the smart contract account, the data is publicly visible and immutable, so it does not matter. Once again, the data characteristics of the Ethereum network have helped all users to recognize the validity of the contract's "issuance" of tokens.

This, of course, refers to effectiveness in the technical sense, not in the economic sense.

When it comes to tokens, we must mention the hot topic now: NFTs. NFT is an abbreviation for Non-Fungible Token. So essentially, NFT is also a token. One of the meanings behind this sentence is that NFTs are also "virtual coins" created and recorded by a smart contract.

Unlike the tokens discussed above, each NFT token is different, and this "different" technical understanding is that each NFT has its own unique metadata, points to different virtual items (an avatar image, a game equipment, etc.) and does not support segmentation on the protocol.

All "homogenized" tokens, as well as Ether, can be split into less than 1 amount such as 0.01 for trading. It's also easy to understand: at the data logging level, Ether and various tokens are just a certain digital quota that can support counting after the decimal point.

NFTs, on the other hand, do not support splitting. It is worth mentioning that there are two main NFT protocols. One is ERC721, which is mainly used to generate a single NFT, which is now the generation protocol of most NFTs; there is another NFT protocol, which is born to solve the transaction needs of similar game items.

A lot of the virtual items in the game are weighed, such as a set of 20 potions, 10 herbal raw materials... ERC721 struggles to support such groups of virtual items, as the NFTs it describes are generated individually. Therefore, another protocol, ERC1155, was proposed to support the batch generation of NFTs for this different category.

In addition to the name and "token" relationship, the NFT has little to do with other aspects. The core cognition of the NFT is actually "warrant", which uses a string of characters, or more pedantic, a string of hash values to correspond to a virtual object, such as an avatar or a video, or even a real object such as a pair of socks. This correspondence is generated by a mathematical algorithm.

A question that NFT skeptics often challenge is: How does the "ownership" of virtual objects (not to mention real-world items) become 100% inextricably linked to a string of characters in NFT metadata?

There is no answer to this question.

At present, there is no national law to guarantee the property rights corresponding to the NFT. The current value of NFTs is still based on the consensus of all people on NFTs and the real money presented in the open market. The authors privately believe that those who support Web3 will not argue too much about what the "value" of NFTs is, just as gamers never doubt the value of virtual equipment.

The essence of value is a kind of "group consensus", as long as enough people recognize the positioning of NFTs as "circulating commodities in the Web3 era", as long as a specific NFT can be associated with a certain intangible value of scarcity, coupled with the liquidity of NFTs themselves, the popularity will continue.

Smart contracts, DAO

Smart contracts are the essence of Ethereum. Supporting users to publish their own executable code, the smart contract mechanism allows applications on Ethereum (so-called distributed application dapps) to flourish.

Comparing smart contracts with the current Internet ecology, the same is that all users can develop their own applications and publish them to the network (mobile app V.S. smart contracts); the former is sent to the app store, and the latter is deployed directly to the smart contract account.

But one thing is different is that the smart contract code is completely public and has the ability to call each other. This is unimaginable in the current closed mobile Internet model.

This linkage model of Ethereum smart contract is somewhat similar to the history of AWS. In the earliest days, Amazon opened up the company's technical capabilities, forced each back-end technical team to develop modules in a unified interface, and allowed each other to call each other company-wide, which is the prototype of AWS cloud services.

This is a typical building block system construction idea. Ethereum goes a step further, because of the public nature of the code, the entire iteration of the Ethereum ecosystem technology is presented to the world in a particularly transparent and cooperative way.

Technically, there is no place to hide, and you need to understand what others are doing to go directly to the other party's smart contract code. Under this extreme transparency, a new community-created technology culture is thriving.

There is a hot spot about smart contracts that deserves to be mentioned alone, that is, the hot and trendy concept DAO. The word DAO many people first heard of was derived from Sequoia tweeted a tweet, wanting to be all in DAO. It is a bit early to decide whether the future belongs to the DAO, but the DAO (Decentralized Autonomous Organization) is an interesting concept, and although the name is a bit circumvented, its core concept is easy to understand.

The DAO writes the organization's management and operation execution rules into the smart contract code, and the tokens issued by this smart contract are very similar to company stocks, with not only economic value, but also equity value. All users who own DAO contract tokens decide an execution result through the voting mechanism agreed upon in the contract code, which is the so-called smart contract-based governance.

In addition, the smart contract account itself also has an Ethereum quota, so the DAO smart contract can be seen as a virtual corporate organization with a capital pool and a strict voting governance system. The program execution of this organization is based on the Ethereum mechanism, ensuring that no one can break the established rules of the organization.

According to the characteristics of Ethereum, the smart contract cannot be changed once deployed, which means that the operating mechanism of this "smart contract" DAO company must be fully confirmed before deployment. Any code omission can become a problem in the future.

This is not really a problem with the DAO, but a challenge that all smart contracts in the Ethereum network must face.

Interestingly, because of this "one deployment must be completely accurate" challenge, smart contract code on Ethereum is built in a particularly simple and straightforward way: since the more complex the code, the easier it is to be error-prone, it may as simple as possible.

Proceeding from the practical interests, the Ethereum machine guides all the developers involved in the construction to follow the idea of the creator: to create a new world in the simplest way possible. Failure to follow such a design line of thought imposes a higher probability of error and irreparable risk.

Using humanity and interests rather than dogma to drive communities to follow a common direction is yet another glimpse of this genius idea.

Consensus mechanisms and mining

After understanding the various details of Ethereum, why talk about the consensus mechanism? Because this is the basis for decision-making in Ethereum.

In a distributed network without centralized management, what should be done to get the entire network nodes to reach a unified opinion, such as deciding who will generate a new data block?

This is where the "consensus mechanism" comes into play.

In computer science, the term "consensus" predates "blockchain" and refers to the agreement of different participants in various distributed systems on a single state.

Consensus is a key attribute of Ethereum, and it's so critical because this system of real money is not "controlled" by any one person or a team; or rather, control is distributed across a wide range of participants. The ultimate goal of consensus is to create a system that operates strictly according to the rules and does not have a single controller.

This is simply the ideal country for technology.

Consensus algorithms are very low-level, far more low-level than the abstract concept of smart contracts. For the reader, it is not necessary to understand how it works to use Ethereum, just as there is no need to understand the principle of routing with the Internet. But a simple understanding of the mechanism of consensus can help readers further understand what "mining" is, a concept that everyone hears a lot.

The creators of the earliest blockchain (Bitcoin) invented a consensus algorithm called Proof of Work (PoW), and a popular expression of proof of work is "mining".

Many people think that the purpose of mining is to obtain new blockchain currency from the system, but in fact, the essential purpose of mining operations is to ensure the decentralization of the entire blockchain system and ensure that the entire system runs with a consensus mechanism. The reward for "mining" following this mechanism is the currency minted by the blockchain.

This mechanism has an implicit penalty mechanism, and if the consensus rules are not followed to get block rewards, the electricity spent on mining may be lost. This practical interest-driven rule-following mechanism is the core idea of various consensus algorithms.

Interestingly, PoW Proof of Work is easier to understand though (...) Are you sure? ), but it is not the first consensus algorithm in history to be proposed. Before the advent of PoW, some people proposed a consensus algorithm based on collateral, which is called Proof of Stake (PoS).

Consensus mechanisms all make validators comply with consensus rules through systematic rewards and penalties: the penalty for PoW Proof of Work is external, the penalty for spending power to do useless work is not rewarded by Ethereum, and the penalty for PoS Proof of Stake is blockchain intrinsic, that is, the ethereum that loses the pledge.

Interestingly, rigorous computer science once again leverages human nature, the core of the blockchain distributed network that needs to be maintained by the whole "consensus rule", and its verification mechanism uses human nature to ensure that the follower benefits and the violator is punished.

From the beginning, Ethereum's founders hoped that one day Ethereum's consensus mechanism would switch to proof-of-stake, as proof-of-work has some obvious drawbacks, such as wasting real-world energy.

So, Ethereum planted a "difficulty bomb" mechanism at the beginning of its creation, with the intention of forcing Ethereum's PoW mining to become more and more difficult, and eventually had to make the network move to PoS. At the time of this article, Ethereum's PoW era is in its final chapter, and Ethereum is transitioning to its PoS era.

This switch is not easy and has been postponed several times. The latest news is that the Ethereum network will officially switch to PoS mode within this year, when The "mining" of Ethereum will no longer exist.

The huge application volume on Ethereum has increasingly high requirements for the performance and scalability of the underlying architecture, which is also an important reason why Ethereum is determined to transition to a PoS mechanism.

No matter how nostalgic miners are for the current Ethereum, the Ethereum network will irreversibly lower the curtain on mining.

Write at the end

If the reader can still insist on seeing the final, there should be some initial understanding of the technical concept of Ethereum, the most important infrastructure of the Web3 era.

Ethereum's technological construction shines with technological idealism in every detail. The creators of Ethereum wanted to construct a new web3 world that all users could participate in equally and freely build in a concise and clear way.

This new world of the Republic is built on rigorous mathematical theories and concise logical structures. Countless technological geniuses are adding to this ideal country. The more you learn, the more likely you are to believe that this network will have an extraordinary and lasting value.

Read on