Ethereum double flower random number
POW: full name of proof of work
pos: proof of stake
both of them are the consensus mechanism of blockchain and the bookkeeping method of digital currency
the difference is:
1. POW mechanism: workload proof mechanism, that is, the proof of workload, is the requirement that must be met when generating a new transaction information (that is, a new block) to be added to the blockchain. In the blockchain network based on workload proof mechanism, the ability of nodes to obtain the correct numerical solution to generate blocks by calculating the numerical solution of random hash hash is the specific performance of node computing power
POS mechanism: the proof of rights and interests requires the certifier to provide a certain amount of ownership of cryptocurrency. The operation mode of the proof of rights and interests mechanism is that when creating a new block, the miners need to create a "currency right" transaction, and the transaction will send some coins to the miners themselves according to the preset proportion. According to the proportion and time of token owned by each node, the equity proof mechanism reces the mining difficulty of nodes proportionally according to the algorithm, so as to speed up the speed of searching for random numbersextended materials:
the concept of bitcoin was first proposed by Nakamoto in 2009. According to Nakamoto's ideas, the open source software and the P2P network on it were designed and released. Bitcoin is a kind of P2P digital currency. Point to point transmission means a decentralized payment system
unlike most currencies, bitcoin does not rely on specific currency institutions. It is generated by a large number of calculations based on specific algorithms. Bitcoin economy uses the distributed database composed of many nodes in the whole P2P network to confirm and record all transactions, and uses the design of cryptography to ensure the security of all aspects of currency circulation. The decentralized nature and algorithm of P2P can ensure that it is impossible to artificially manipulate the value of bitcoin through mass proction
1. Blockchain links
as the name suggests, blockchain is a chain composed of blocks. Each block is divided into block head and block body (including transaction data). The block head includes the prevhash value (also known as hash value) of the previous block used to realize the block link and the random number (nonce) used to calculate the mining difficulty. The hash value of the previous block is actually the hash value of the head of the previous block, and the random number calculation rule determines which miner can obtain the right to record the block
2. Consensus mechanism
blockchain is accompanied by the birth of bitcoin, which is the basic technology architecture of bitcoin. Blockchain can be understood as an Internet-based decentralized accounting system. A decentralized digital currency system like bitcoin requires the consistency of accounting of honest nodes without a central node, which needs blockchain to complete. Therefore, the core of blockchain technology is a consensus mechanism to reach a consensus on the legitimacy of transactions between indivials without mutual trust without central control
there are four main types of consensus mechanisms in blockchain: pow, POS, dpos and distributed consistency algorithm
3. Unlocking script
script is an important technology to realize automatic verification and contract execution on blockchain. Every output of every transaction does not point to an address in the strict sense, but to a script. A script is like a set of rules that constrain how the receiver can spend the asset locked on the output
the validation of transactions also depends on scripts. At present, it depends on two kinds of scripts: Lock script and unlock script. Locking script is a condition added to the output transaction, which is realized by a script language and located in the output of the transaction. The unlocking script corresponds to the locking script. Only when the conditions required by the locking script are met can the assets corresponding to the script be spent, which is located in the input of the transaction. Many flexible conditions can be expressed by script language. Interpretation script is similar to the "virtual machine" in our programming field, which runs in every node of the blockchain network in a distributed way
4. Transaction rules
blockchain transaction is not only the basic unit of a block, but also the actual effective content recorded by the blockchain. A blockchain transaction can be a transfer, or the deployment of smart contracts and other transactions
as far as bitcoin is concerned, a transaction refers to a single payment transfer. The transaction rules are as follows:
1) the input and output of the transaction cannot be empty
2) for each input of a transaction, if its corresponding utxo output can be found in the current transaction pool, the transaction will be rejected. Because the current transaction pool is the transaction not recorded in the blockchain, and each input of the transaction should come from the confirmed utxo. If it is found in the current trading pool, it is Shuanghua trading
3) for each input in a transaction, the corresponding output must be utxo
4) each input unlocking script must verify the compliance of the transaction together with the corresponding output locking script
5. Transaction priority
the priority of blockchain transaction is determined by the blockchain protocol rules. For bitcoin, the priority of a transaction to be included in a block is determined by the time when the transaction is broadcast to the network and the amount of the transaction. With the increase of transaction broadcast time on the network and the increase of transaction chain age, the priority of transaction will be improved and eventually be included by the block. For Ethereum, the priority of the transaction is also related to the transaction fee that the publisher is willing to pay. The higher the transaction fee that the publisher is willing to pay, the higher the priority that the transaction is included in the block
6. Merkle proof
the original application of Merkle proof is bitcoin, which was described and created by Satoshi Nakamoto in 2009. Bitcoin blockchain uses Merkle proof to store transactions in each block. So that the transaction can not be tampered with, but also easy to verify whether the transaction is included in a specific block
7. RLP
RLP (recursive length prefix) is one of the main encoding methods of object serialization in Ethereum. Its purpose is to encode the sequence of arbitrary nested binary data.
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
I have seen your question. In which aspects can blockchain be applied? Below by the small series to answer for you
molarity principledifferent parts of enyc should be designed based on molarity and separability of big health instry. In the development process, it should be easy to make a small change in the protocol somewhere, while the application layer can continue to run normally without any change. Ethereum development should do these things to the greatest extent to help the whole cryptocurrency ecosystem, not just itself
the principle of non discrimination
the agreement should not actively attempt to restrict or hinder specific categories or usages, and all regulatory mechanisms in the agreement should be designed to directly monitor hazards, and should not attempt to oppose specific unpopular applications. People can even run an infinite loop script on ency, as long as they are willing to pay the transaction cost calculated according to the calculation steps
functional application
enyc is a big health instry platform, which provides various moles for users to build applications. If building instry applications is compared to building houses, then enyc provides walls, roofs, floors and other moles. Users only need to build houses like building blocks, so the cost and speed of building applications on enyc are greatly improved. Specifically, enyc builds applications through a set of Turing complete scripting language (EVM language for short). It is similar to assembly language. We know that it is very painful to program directly in assembly language, but programming in enyc does not need to use EVM language directly, but is similar to C language, python, lisp and other high-level languages, Then it is translated into EVM language by compiler
the application on the platform mentioned above is actually a contract, which is the core of enyc. A contract is an automatic agent living in the enyc system. It has its own enycoin address. When a user sends a transaction to the address of the contract, the contract will be activated. Then, according to the additional information in the transaction, the contract will run its own code, and finally return a result, which may be another transaction from the address of the contract. It should be pointed out that transactions in enyc not only send enyc, but also embed a lot of additional information. If a transaction is sent to a contract, then this information is very important, because the contract will complete its business logic based on this information
the business that the contract can provide is almost endless, and its boundary is your imagination, because Turing's complete language provides a complete degree of freedom, allowing users to build a variety of applications in the big health instry.