49131
![]() Big data abstract works, please see the end of the article for reprint requirements Author | Mohit Mamoria Compiled | Wu Shuang, Happen, Bian Zheng Elaine,Yawei Xia The ultimate guide to understanding why Ethereum is more than just another cryptocurrency. “"Bitcoin" and "Ethereum" are terms that are often paired together, but in fact they are very different. The only thing the two have in common is that they are both cryptoassets that operate on the blockchain. Compared to pure cryptocurrencies, such as Bitcoin, Ethereum has some other functionalities that make it a huge decentralized computer in a sense. To understand Ethereum, you must understand what blockchain is all about. If you are already very familiar with it, or have read my Ultimate Guide to Blockchain, please skip to the next section. Note: "The Ultimate Guide to Blockchain" https://hackernoon.com/wtf-is-the-blockchain-1da89ba19348 What is blockchain? A blockchain, simply put, is a database. It is a growing database containing a specific kind of data, with very distinctive properties: 1. Once data is stored in a database, it can never be modified or deleted. Every record on the blockchain is saved permanently. 2. It is not one person or organization that maintains this database, but thousands of people doing it, each with their own copy of the database. To understand how people can keep their own copy of a database synchronized with everyone else's, let's imagine ten people on a network. Everyone has a blank folder and a blank page in front of them. Whenever someone in the network does something important, such as transferring money, everyone in the network will receive an announcement. ![]() Everyone records these announcements on their page until the page is filled. When the page is filled, everyone must encrypt the page by solving a mathematical puzzle. This mathematical puzzle is solved to ensure that everyone's page has the same content and is never modified. Whoever completes the process first will be rewarded with some cryptocurrency. Once the page is sealed and encrypted, the page will be added to the folder, a new page will be generated, and the process will continue forever. ![]() Blockchain Over time, these pages (blocks) containing important records (transaction information) will be continuously added to the folder (chain), forming a database (blockchain). What exactly does the blockchain store? Any kind of data can be stored using a blockchain, and the value of a blockchain is given by the type of data it stores. Bitcoin’s blockchain is used to store records of financial transactions, making it similar to currencies like the U.S. dollar or British pound. Bitcoin has exactly the same functions and features as the U.S. dollar, but Ethereum is different. Ethereum is not just a currency like USD, GBP or Bitcoin. Compared to becoming a currency, Ethereum has a higher goal and mission. Ethereum is as shown below: ![]() Ethereum is basically a giant computer! However, it was a very slow computer—five to a hundred times slower than today's average computers—and very expensive. “The "Ethereum computer" has the same capabilities as a rare smartphone from the 90s, and can only do some very trivial things. This doesn’t sound like it’s going to be a big deal. Why is Ethereum so popular? This is a very good question. The reason why Ethereum is taking the world by storm is that it is a completely decentralized computer that can be distributed and deployed around the world. Understanding how the Ethereum blockchain works will reveal how it operates as a world-class computer. How does Ethereum work? Like any other blockchain, Ethereum requires thousands of people running a piece of software on their computers to power the network. Each node (computer) in the network runs a scripting language called the Ethereum Virtual Machine (EVM). The EVM can be thought of as an operating system that understands and executes software written in Ethereum-specific programming languages. These software or applications executed by Ethereum Virtual Machine are called "smart contracts". No matter what you do on this world-class computer, you get paid. However, you don’t need to pay with regular currencies like dollars or pounds, everything has to be paid in one of the network’s native cryptocurrencies, called ether. Ether has almost the same capabilities as Bitcoin, except that it can also be used to pay for the execution of Ethereum smart contracts. ![]() Whether it is a person or a smart contract, they are all considered users on Ethereum. What human users can do, smart contracts can do the same, and both can pay and receive ether just like other currencies. ![]() But unlike human users, smart contracts can also execute predefined computer programs that perform various actions when triggered. To understand the power of smart contracts, let’s take an example. The power of smart contracts Imagine we make a bet on the weather tomorrow. If I bet it will be sunny tomorrow and you bet it will rain tomorrow, the loser must pay $100 to the winner. How do we complete this bet and ensure that the loser will fulfill his promise? I can think of three ways: 1. Mutual trust The simplest thing to do is to choose to trust each other. If we have been friends for a long time, trusting each other is fairly easy. I know where you live, and you know anything embarrassing about me. But if we were complete strangers, things would be more difficult. You have no reason to believe me, and I have no reason to believe you. 2. Sign a legal agreement Another plausible approach is to formulate our bet into a legal agreement that both parties must sign. The agreement detailed the terms of our bet, including what would happen if the loser violated the agreement. This agreement obligates us to pay the bet to the winner, but it does not have any practical significance because the cost of using legal means to formulate this agreement will be much more expensive than the bet itself. 3. Seek help from our mutual friends We can find a friend we both trust very much and give her/him $100 for safekeeping. The next day, she/he gives the winner $200 based on the weather results. It's very simple, unless something unexpected happens, such as this trusted friend taking the money and running away. We currently have three different ways to complete a bet, and each option has its drawbacks. Because we are strangers to each other, we can't trust each other ; Forcing a legal agreement would be too expensive to enforce ; Asking for help from a mutual friend again raises trust issues. Ethereum’s smart contracts can solve such problems. Smart contracts are like mutually trusted friends, but written in code. Ethereum allows us to develop a software that charges both parties $100 worth of Ether coins, query the weather results through the open source weather API the next day, and transfer all $200 worth of Ethereum coins to the winner. ![]() Once a smart contract is signed, it cannot be modified in any way. Therefore, you can ensure that it is executed under any circumstances, regardless of what instructions the contract issued. But how are smart contracts executed? How does it relate to the blockchain? How do smart contracts relate to blockchain? When a smart contract is executed, it records the execution information as a transaction on the block. At a high level, a transaction on the Ethereum blockchain executes as follows: ![]() Except for one place, these fields are relatively easy to understand. “The "data" field gives Ethereum speciality. It is used to record the creation and execution of smart contracts in a transaction. Any block on the Ethereum blockchain can contain three types of transactions: 1. Common transfer transactions between one user and another These are common Bitcoin-like transactions on the network. If you send ether directly to your friend, the "data" field will be left blank. ![]() 2. Sending ether from an account, but the destination account is empty When a transaction occurs without a target account, it means that the purpose of the transaction is to create a new smart contract in the network using the content in the "data" field. “data" field contains software code that makes it appear like another user on the network. ![]() 3. Send Ether from an account to a smart contract Whenever an account user (or a smart contract) wants to execute a smart contract, he/she/it needs to transact with the smart contract and store the execution instructions in the "data" field. ![]() Just like other blockchains, whenever the three transactions mentioned above occur at any time, a notification will be sent to the entire network and every account user will record it. In addition to noting records, each node executes specified smart contracts to keep the EVM state synchronized with other nodes in the network. Each node executes a portion of the software, allowing the entire network to act as a giant (but slower) decentralized computer. For permanence, each execution is stored in the blockchain. Wait a minute, I heard there is a word called GAS. What is it? I just told you that the account that executes the smart contract must pay a certain fee. It pays nodes that consume memory, storage space, computing power, and electricity to execute smart contracts. To calculate smart contract fees, each statement has a specified fee. For example, if you execute a statement that uses the node's memory, the statement has a specific cost. If you execute a statement that uses that node's disk space, there is a specific cost attached to that statement. This fee is called Gas. Eventually, Gas is converted into Ethereum at a certain exchange rate. When you execute a smart contract, you must predefine the maximum value of Gas to be consumed. When Gas reaches this value, execution will be terminated. This is to avoid infinite loops in smart contracts, causing the program to repeat a set of statements without continuing to execute. This situation is often caused by carelessness on the part of the programmer. Each iteration consumes some designated Gas, which makes infinite loops finite. There is no point in stalling node execution because of a programmer's mistake. The concept of Gas solves this problem. Classmates, this is Ethereum Ethereum is not just for trading cryptocurrencies, its true value lies in its mission. Ethereum’s mission is to give users access to a world-class decentralized computer containing thousands of powered nodes. Of course, since every simple statement is executed by every node in the network, decentralized, distributed computers would be slow and expensive. But what’s the opposite of slow? is a faster, but centrally controlled server. In order to enjoy the lower costs of using central computers, we give them control over us. If the central computer (server) goes down or is attacked, it affects all connected users. A decentralized computer will only go down after all nodes have been compromised, so it can always work. As long as there is a network, there is Ethereum. author ![]() Mohit Mamoria: CEO of godtoken.or and editor of Unmade, a weekly newsletter that delivers cutting-edge ideas to users’ inboxes. Original link: https://hackernoon.com/wtf-is-ethereum-c65e0d67ac09 Discount countdown! Early bird discount of 44% off only 2 days left! Teachers’ 33% off discount only has 4 days left! Deep learning series courses Live broadcast by famous lecturer + Teaching assistant guidance and Q&A + Cloud laboratory has sufficient GPU Enrich and efficient new learning experience! See poster for details↓↓↓ ![]() About reprinting If you need to reprint, please indicate the author and source in a prominent position at the beginning of the article (Reprinted from: Big Data Digest | bigdatadigest), and place the eye-catching QR code of Big Data Digest at the end of the article. Articles without original logo should be edited according to the reprint requirements. They can be reprinted directly. After reprinting, please send us the reprint link. ; If you have an article with an original logo, please send [Article Name - Name and ID of the public account to be authorized] to us to apply for whitelist authorization. Unauthorized reprinting and adaption will be investigated for legal responsibility in accordance with the law. Contact email: zz@bigdatadigest.cn. Volunteer introduction Reply "Volunteer" to join us ![]() ![]() ![]() ![]() ![]() Excellent articles from past issues Click on the picture to read What exactly is the Bitcoin ransom demanded by hackers? Bitcoin’s Past and Present Life ![]() ![]() ![]() |