Learn more about Ethereum

1. About Ethereum

        In 2013, Vitalik Buterin released the Ethereum white paper. In July 2014, the pre-sale of Ethereum began. Insiders called this token issuance "coin crowdfunding". Through a 42-day pre-sale, the Ethereum team passed the pre-sale 60,102,216 ethers raised more than 30,000 bitcoins. In addition, early contributors who participated in the development before the pre-sale and developers who have been engaged in project research for a long time were distributed according to 9.9% of the total ether sale at that time, so ether There were more than 72 million ETH at the time of its official launch. After the Ethereum pre-sale is over, the proof-of-work mechanism POW is used for mining, and the miners are rewarded every year according to 26% of the total issuance at that time.

        In October 2014, Ethereum reduced the block production time of the blockchain from 60 seconds to 12 seconds, and it is now basically stable at 15 seconds. Each block rewards 5 ETH. Although the POW mining mechanism is adopted, the block-producing mechanism of Ethereum is still different from that of Bitcoin. Due to the short block-producing time of Ethereum, it is easy for Ethereum to form an orphan. Piece. Orphan blocks refer to blocks that are not on the longest chain. Bitcoin's orphan blocks do not have any block rewards, but in Ethereum, orphan blocks can be referenced, and the referenced orphan blocks are called "uncle blocks", and they are packaged The data will also be recorded in the blockchain. Unlike Bitcoin, Ethereum's uncle blocks are rewarded, and each uncle block can be rewarded with 4.375 ETH.

        Ethereum is a programmable, Turing-complete blockchain development platform, equivalent to a decentralized global computer. On top of a programming system, there are usually some compiled and executed virtual machines to support. JAVA has a JVM, and in Ethereum, there is also an Ethereum virtual machine EVM that can execute arbitrarily complex algorithm codes. Developers can use existing programming languages ​​such as JavaScript or python to create their desired applications on Ethereum. Through the virtual machine of Ethereum, it is easy to issue digital assets, write smart contracts, build and run decentralized applications, and establish decentralized autonomous organizations.

        Ether (ETH) is also used as the fuel within Ethereum. Unlike currency digital assets, Ethereum is used to pay for smart contracts in addition to transfers. In order to avoid the Ethereum blockchain being flooded with junk contracts and junk applications, to build and run smart contracts on Ethereum, smart contract fees must be paid in ether (ETH). For example, to transfer A's newly created digital assets on the Ethereum blockchain, the transaction fee needs to be paid in ether (ETH), not A's newly created digital assets.

2. About the Ethereum Virtual Machine

        Ethereum is a programmable blockchain. Unlike Bitcoin, Bitcoin is positioned as an application, while Ethereum is positioned as a platform on which smart contracts can be used for various applications. In this way, Ethereum has become a platform for many different types of decentralized blockchains, including but not limited to cryptocurrencies.

        Ethereum in a narrow sense represents a set of protocols that define a platform for decentralized applications, and its core is the Ethereum Virtual Machine EVM. Like other blockchain systems, Ethereum also includes a peer-to-peer (P2P) protocol. The Ethereum blockchain database is maintained and updated by multiple nodes connected to the network, each node on this network running the EVM and executing the same instructions. Therefore, Ethereum can also be called the "world computer". This massively parallel computing across the entire Ethereum network is not for greater efficiency. In fact, the process is that computations on Ethereum are much slower and more expensive than those on traditional computers. Each Ethereum node runs the EVM for consistency across the blockchain. Decentralized consistency makes Ethereum very fault-tolerant, guarantees zero downtime, and makes the data stored on the blockchain immutable and uncensorable forever.

3. How Ethereum Works

        Ethereum incorporates many features and technologies similar to Bitcoin, with certain modifications and innovations. Whereas the Bitcoin blockchain is purely a list of transactions, the fundamental unit of Ethereum is the account. The Ethereum blockchain tracks the state of each account, and all state transfers between accounts are transfers of value and information. Ethereum has 2 account types:

  •     Externally Owned Account (EOA), controlled by a private key and without any code associated with it;
  •     Contract accounts, controlled by their contract code and have a code associated with it, can only be "activated" by an EOA account.

        For most people, the most basic difference between the two is that the external account is controlled by a person - because the person controls the private key, which in turn controls the external account. The contract account is controlled by the contract code. Only when the external account issues an instruction, the contract account can perform corresponding operations. The popular "smart contract" is the code in the contract account, a program where a transaction is sent to the account for execution. Users can create a new contract by deploying code to the blockchain.

        Like Bitcoin, users need to pay a small fee for each transaction to maintain network security and stability. Nodes validate the entire network by collecting transaction fees. Nodes (miners) in the network accept, propagate, verify and execute transactions, then organize and archive these transactions, package them into a block, and compete with other miners to add the block to the blockchain. Successful miners will receive award. Through these measures, people are encouraged to provide more computing power to the entire network.

4. Description of the Ethereum Model     

        The Ethereum blockchain is essentially a transaction-based state machine. In computer science, a state machine refers to reading the contents of a sequence of inputs and transitioning to new states based on those inputs.



        In Ethereum's state machine, we start with the "happening state". This is similar to a blank state before any transaction takes place on the network. When the transaction is executed, this origin state transitions to some final state. At any time, this last state represents the current state of Ethereum.

        The state of Ethereum has millions of transactions. These transactions are grouped into "blocks". A block contains a series of transactions, and each block is linked to its previous block.

        In order for one state to transition to the next, the transaction must be valid. In order for a transaction to be considered valid, it must go through a verification process known as mining. Mining is when a group of nodes (i.e. computers) use their computing resources to create a block containing valid transactions.

        Any node on the network that claims to be a miner can attempt to create and validate blocks. Many miners around the world are creating and validating blocks at the same time. Each miner provides a mathematical "proof" when submitting a block to the blockchain. This proof is like a guarantee: if the proof exists, then the block must be valid.

        In order for a block to be added to the main chain, a miner must provide this "proof" faster than other miners. The process of verifying each block through a "proof" of a mathematical mechanism provided by miners is called proof of work.

        Miners who confirm a new block are rewarded with a reward of a certain value. What is the reward? Ethereum uses an intrinsic digital token, Ether, as a reward. Every time a miner proves a new block, a new ether is generated and rewarded to the miner.

        Earlier, we defined the blockchain as a single transaction machine with shared state. Having multiple states (or multiple chains) destroys the system because it is impossible to get a uniform result on which is the correct state. If the chain forks, you may have 10 coins on one chain, 20 coins on one chain, and 40 coins on the other chain. In this scenario, there is no way to determine which chain is the most "efficient".

        Whenever multiple paths are created, a "fork" occurs. We generally want to avoid forks because they break the system and force people to choose which chain they trust.

        To determine which path is the most efficient and to prevent the creation of multiple chains, Ethereum uses a mathematical mechanism called the "GHOST protocol."

        GHOST = Greedy Heaviest Observed Subtree

        Simply put, the GHOST protocol is that we have to choose a path on which the most computations are done. One way to determine the path is to use the block number of the most recent block (leaf block), which represents the total number of blocks on the current path (excluding the genesis block). The larger the block number, the longer the path will be, which means that more mining power is consumed on this path to reach the leaf block. Using this reasoning allows us to agree with the canonical version of the current state.




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325857958&siteId=291194637