Position: Home page » Ethereum » Single thread package Ethereum

Single thread package Ethereum

Publish: 2021-05-17 06:49:25
1. Ethereum, ETH for short. At the end of 2013, vitalik released the white paper of Ethereum, and in July 2014, the pre-sale of Ethereum began. At that time, insiders called this kind of token issue "crowdfunding". Through the 42 day pre-sale, the Ethereum team raised more than 30000 bitcoins through the pre-sale of 60102216 Ethernet coins; In addition, the early contributors who participated in the development before the pre-sale and the developers who have been engaged in project research for a long time are allocated according to 9.9% of the total amount of Ethernet coins sold at that time. So when Ethereum was officially released, there were more than 72 million Ethereum coins. After the end of Ethereum's pre-sale, it uses the proof of work mechanism POW for mining, and rewards the miners according to 26% of the total amount issued at that time every year. In October 2014, Ethereum reced the block output time from 60 seconds to 12 seconds, and now it is basically stable at 15 seconds, with 5 etheric coins awarded for each block
although the pow mining mechanism is adopted, the block out mechanism of Ethereum is different from that of bitcoin. Due to the short block time of Ethereum, Ethereum is easy to form isolated blocks. Isolated blocks refer to the blocks that are not on the longest chain. Bitcoin's isolated blocks have no block rewards, but in Ethereum, isolated blocks can be referenced. The referenced isolated blocks are called "Uncle blocks", and their packaged data will also be recorded in the blockchain. Unlike bitcoin, Ethereum's TERT block has a reward, and each TERT block can get a reward of 4.375 Ethernet coins at most
Ethereum is a programmable and Turing complete blockchain development platform, which is equivalent to a decentralized global computer. In a programming system, there are usually some virtual machines to compile and execute. Java has JVM. In Ethereum, there is also Ethereum's virtual machine EVM, which can execute any complex algorithm code. Developers can use existing programming languages such as JavaScript or Python to create their own applications on Ethereum. Through Ethereum's virtual machine, you can easily issue digital assets, write smart contracts, set up and run decentralized applications, and set up decentralized autonomous organizations
eth is also known as the internal fuel of Ethereum. Unlike currency digital assets, Ethereum is not only used for transfer, but also for payment of smart contracts
in order to prevent the Ethereum blockchain from being full of junk contracts and junk applications, and to establish and run smart contracts on Ethereum, you must use eth to pay for smart contracts. For example, when you transfer your newly created digital assets on the Ethereum blockchain, you need to use eth to pay the handling fee instead of your newly created digital assets.
2. Smart contract & quot The term "smart contract" can be traced back to at least 1995 and was proposed by the prolific interdisciplinary legal scholar Nick Szabo. He mentioned the concept of smart contract in several articles published on his website. His definition is as follows:
& quot; A smart contract is a set of promises defined in digital form, including the agreements on which the contract participants can execute these promises& quot;
let's explore the meaning of his definition in more detail
commitment
a set of commitments refers to the (often mutual) rights and obligations agreed by contract participants. These commitments define the nature and purpose of the contract. Take a sales contract as a typical example. The seller promises to deliver the goods and the buyer promises to pay a reasonable price
digital form
digital form means that contracts have to be written into computer-readable code. This is necessary, because as long as the participants reach an agreement, the rights and obligations of smart contract establishment are executed by a computer or computer network
to further explain:
(1) when will the parties to the smart contract reach an agreement? The answer depends on the specific smart contract implementation. Generally speaking, the contract is discovered when the parties are committed to the execution of the contract by installing the contract on the contract host platform< (2) contract execution
& quot; Execute & quot; And the real meaning of it also depends on implementation. Generally speaking, implementation means active implementation through technical means
(3) computer readable code
in addition, the contract needs specific & quot; Digital form & quot; Very much depends on the agreement that the parties agree to use
protocol
protocol is technical implementation, on this basis, the contract commitment is realized, or the contract commitment is recorded. Which agreement to choose depends on many factors, the most important of which is the nature of the assets being traded ring the performance of the contract
take the sales contract as an example. Suppose that the participants agree to pay in bitcoin. The chosen protocol will obviously be bitcoin protocol, on which the smart contract will be implemented. Therefore, the contract must use & quot; Digital form & quot; It's bitcoin scripting language. Bitcoin scripting language is a non Turing complete, imperative, stack based programming language, similar to forth.
3. At the top of Ethereum is DAPP. It exchanges with the smart contract layer through Web3. JS. All smart contracts run on EVM (Ethereum virtual machine) and use RPC calls. Below EVM and RPC are the four core contents of Ethereum, including: blockchain, consensus algorithm, mining and network layer. Except DAPP, all other parts are in the Ethereum client. The most popular Ethereum client is geth (go Ethereum)
4.

Ethereum miner fee

1. In a public chain, anyone can read and write data. Reading data is free, but writing data to the public chain costs a certain amount of money, which helps to prevent junk content and protect its security through payment

Secondly, any node on the network (each connected device containing a of the account book is called a node) can participate in the mining method to protect the network. As mining requires computing power and electricity charges, miners need to be paid for their services, which is also the origin of miners' fees

Third, the difference between Ethereum and bitcoin, Ethereum introces the concept of gas, the purpose of which is to limit the amount of work required to execute the transaction and pay for the execution. Gas is used to measure the resources (including computation, storage, bandwidth, etc.) consumed by your transaction (or contract code call)

extended data:

ten rights of miners:

1. The "ten rights" of coal mining enterprise workers in safe proction include: the shift leader does not go down the well, and the workers have the right not to go down the well; The workers have the right to leave the well early if the shift leader leaves the well early; Workers have the right not to work if potential safety hazards are not investigated; If the management personnel command against rules and regulations, the workers have the right not to carry out them

Without safety measures, workers have the right not to start work; Workers have the right not to go down the well if they don't organize safety study before class; If the "Trinity" (monitor, safety inspector and gas inspector) safety inspection is not carried out, workers have the right not to start work

The workers have the right not to start the work if the detection and monitoring system is not installed in place and operates abnormally; Workers have the right not to go down the well if they are not equipped with fully qualified labor protection and protective equipment; The route to avoid disaster is not marked, and workers have the right not to go down the well. The coal mine shall not dect the wages and dismiss the workers for the above reasons

5. Life is like a pool of ckweed, green and green, with a little bit of water color. When there is no wind, it is like a piece of cloth on the surface of the pool, without any wrinkles. It is also like a natural bronze mirror floating in the pool. Among them, there are also several branches that go straight across the surface of the pool. The surface of the ckweed is slightly broken, but it can't be completely cut, which shows its vitality. Weeds and Kingfisher also disturb the surface of ckweed from time to time, and the ripples of fish are inevitable, which makes ckweed more crowded and tense. Strong wind, wrinkled is ckweed; It is weeds that bend their heads; It is Kingfisher that has disappeared for a long time. The wrinkle is only for a moment. When the wind is a little small, Ping's face returns to its original state. After that, it was wrinkled and floating. Sometimes there are fish "visits.". Wind is the devil, weeds are bacteria, but they can't destroy it. After the wind, the surface is still intact - except for a few sundries. This reminds me of Wen Tianxiang's poem "life experience is ups and downs, the rain hits Ping". Yes, life is not like ckweed. There are always disturbances in a quiet life; And the wind and waves contain a peaceful life. The twists and turns of life, it is not the wind ckweed survival, ckweed is to take root in the water, and people are to survive in the world. Bumpy, long life, sighing to the sky, sighing the past life; Praise the Yellow River, praise the Yellow River majestic; Weeping at the grass, weeping grass nobody knows; Standing on the high mountain singing, singing the power of the high mountain; If there is only the tranquility of ckweed and no strong wind in life, then life is a cup of fresh water and tasteless; If there is only Xiaohe's selfishness, the world is frozen everywhere; If there is only the arrogance of Dashan, there is no selfless love in the world... Your own life and your own road are under your own feet and controlled by yourself. life! Duckweed!
6. Return the result of ifconfig
eth0 to awk for processing
where - F & # 39;:|< br />+'
this is a separator defined by awk and then matched with "BCAST & quot;, Take the content of the fourth column
since your command is not universal, you can't output the result here, but you should intercept the broadcast address
7. We say that the blockchain is not mature at present, and there are various problems, such as slow processing speed, high handling charges, security risks and so on. These are the most intuitive experience of users, and the experience is not very good. Another problem of blockchain is high concurrency
let's talk about the problem of high concurrency. High concurrency is a problem in the computer field. In short, the problem of high concurrency is that the system cannot run multiple tasks at the same time smoothly
many tasks are running at the same time, and a large number of users rush in. The system can't bear so many tasks. There will be high concurrency problems, and your system will be stuck, just like the 12306 system is always stuck ring the Spring Festival, which may be caused by the high concurrency problems
the traditional Internet still has the problem of high concurrency, which naturally exists in the blockchain network. After all, the maturity of the blockchain is still far behind that of the traditional Internet. However, if there is no safe, reliable and efficient public chain, the development of the whole blockchain instry will be seriously restricted, and the application landing is empty talk
in this context, DAG technology has been proposed, DAG's full name is "directed acyclic graph", which is translated into "directed acyclic graph" in Chinese
What's the matter with DAG directed acyclic graph and what role it can play? Let's explain< Dag: a new data structure
DAG, Chinese name is "directed acyclic graph", literally, "directed & quot; That is to say, it has direction,
"no loop" means that it has no loop and cannot form a closed loop. Therefore, DAG is actually a new type of data structure. This data structure has direction and can not form a closed loop
in terms of traditional blocks, we always take "block" as the unit, and a block often contains multiple transaction information. In DAG, there is no concept of block. Instead, it takes "unit" as the unit. Each unit records the transaction of a single user. The unit is not a block, but a transaction. In this way, the time of packing blocks can be saved
in short, the biggest difference between blockchain and DAG directed acyclic graph is that blockchain is one block after another to store and verify the distributed ledger of transactions, while DAG regards each transaction as a block, and each transaction can be linked to multiple previous transactions for verification< Second, the working principle of DAG
in the traditional blockchain, take bitcoin as an example, it is a single chain structure. The blocks are arranged according to the time stamp sequence (as shown in Figure 1), and the data is recorded on a main chain. To use an inappropriate metaphor, this "single chain" structure is a chain arranged word by word
there is only one single chain in the blockchain, so it can not be executed concurrently when the block is packaged. The new block will be added to the original longest chain, and all nodes will follow the longest chain and continue to spread infinitely in the order of timestamp. For DAG, each newly added unit is not only added to one unit of the longest chain, but also to all previous units (as shown in Figure 2)
for example: suppose I publish a new transaction, and there are two effective transaction units in DAG structure, then my transaction unit will actively link to the previous two at the same time to verify and confirm until it is linked to Genesis unit, and the hash of the previous unit will be included in its own unit
in other words, if you want to make a transaction, you have to verify the previous transaction, specifically several transactions, according to different rules. This verification method enables DAG to write many transactions asynchronously and concurrently, and finally forms a topological tree structure, which greatly improves the scalability
according to DAG directed acyclic graph, every transaction is directly involved in the maintenance of the whole network. When the transaction is initiated, the whole network is broadcast directly, skipping the block packing stage. In this way, the time of block packing is saved, and the transaction processing efficiency of the blockchain is improved
with the increase of time, the blockchains of all transactions are interconnected to form a graph structure. If you want to change the data, it is not just the problem of several blocks, but the data change of the whole block diagram. Dag is more complex and difficult to change
to sum up, DAG, as a new type of decentralized data structure, belongs to a kind of generalized blockchain and has the attribute of decentralization. However, the differences between the two are as follows:
the composition unit of blockchain is block and the composition unit of DAG is TX
blockchain is single threaded, DAG is multi-threaded
all transactions of blockchain are recorded in the same block, and each transaction of DAG is recorded in each transaction separately
blockchain needs miners, DAG doesn't need miners< (3) representative of DAG: iota is undoubtedly the most famous representative project of DAG. It can be said that it is precisely because iota, the currency, broke into the fourth place in market value in the second half of 2017 that people really realized its underlying technology: DAG directed acyclic graph
iota puts forward the concept of "entanglement" on the basis of DAG directed acyclic graph. In iota, there is no concept of block, and the minimum unit of consensus is transaction. Each transaction will refer to the past two transaction records hash, so that the previous transaction will prove the legitimacy of the past two transactions and indirectly prove the legitimacy of all previous transactions. In this way, a small number of nodes such as miners in the traditional blockchain are no longer needed to verify transactions and package blocks, so as to improve efficiency and save transaction costs< Fourth, the current situation of DAG
although DAG directed acyclic graph can make up for some disadvantages of traditional blockchain in theory, it is not mature at present, and it has been applied to the field of digital currency for a short time
it did not take as long as 10 years to verify the security of the whole system as bitcoin did, nor did it achieve a wide range of application scenarios as Ethereum did. However, some voices now propose to adopt the data structure of "traditional blockchain + DAG", but there is no outstanding case, so I won't say more here
to sum up, in this section, we introce the derivative technology of blockchain: DAG directed acyclic graph, which is a new data structure, and can significantly improve the efficiency and power of blockchain transaction processing.
8. More than ten hours have passed since I picked up Ethereum from setoken's wallet, and I'm still packing because the back office has to carry out accounting and calculation. If not, you need to call customer service.
9. Gas required by ordinary exchange
& gt; eth.estimateGas({ from:eth.accounts [1], to: eth.accounts[2], value:50000000000000 })
21001
> Eth. Gasprice
2000000000

as above, the account [1] = & gt; The transaction of account [2] needs 21001 gas, and the current gasprice is 2000000000. Let's verify that
unlock account 1, send this transaction, and start mining packaging
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750