In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
What are the characteristics of the DCR consensus, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
As anyone who may know DCR knows, DCR uses a mixture of PoW and PoS for mining. There is a hard need for POS digging.
Beg, that is, the voting wallet must be a wallet that is long-term stable and always unlocked, so why is there such a requirement? And
What is the vote we often talk about? what is the purpose of the vote? How did we get the money we bought the ticket and the corresponding prize when we succeeded in voting?
Where's Li? Next, let's talk about how DCR realizes the mixed mining of POW and POS.
The principle of DCR's POW is the same as that of BTC, which is familiar to us. First, the miners verify the transaction, and then divide the transaction into two types.
Carry on the package, one is the regular transaction, the other is the ticket transaction. The corresponding data structure is as follows:
"stx": ["466fe29dd96e3f00f9aea94405a92b6717b2888def3dc43d42757b052cf8ee55", "494f27293061768ab68fbdf32648462ee0477f13a8c74e6d006d846f0c08a223", "0bdbb8acc9481d3af2744ff3e04d77b3c65a05f2f0e68a20b5c80e5a350ba4d7", "0fc020215bd93f17b2531e998937d2449fdc75cbe2d41c7f30f9a8a556a58112", "5026fdcefc675c19aca8f0078f2667038c8a5e756aa12174fcb994b0168c8e5a", "ac4e79927dd918ab4695a4e89a388c3226107fb6a05779b079d504ce09a6cbca", "4a6696e543383c8fd03339916bb58b6f9cf18e69870d298c1af5371f2125a146"], "sbits": 95.48797324, "merkleroot": "81c157aff346e33ddc33be781f3562f80f5692ec5b654563d92b310fddf9e7c9", "height": 249170, "tx": ["94ca365af201c29ce4eaf9dc8d40bf52571e7f7fc924c8cbc1f6c71700665d89", "e74da8d3a78a6ce4841582934ed7fc9c87972f5260674583956891797fde0149", "40c6c39a39f55a0475c8601af89c63ee2573dae2e30cb500d7ff63ca9381a4f8", "5046d4e4db049b5c8228301d9f227ed1b7956e2a4221245512cc2bc2efea1f24", "8a85db1ea71a5689287aefb1beb1e3409e109d336a7460542f3f36adba68824b"]
The above stx corresponds to the ticket purchase transaction, and the tx corresponds to the ordinary transfer transaction. The miners verify the validity of the corresponding transaction, and then
Calculate the block hash, find the number that meets the calculation goal of a certain degree of difficulty, and then submit the block to spread through the P2P network.
POW's work is done in.
The following is to verify the validity of the block, which is different from the consensus mechanism of Bitcoin, which relies on the joint verification of miners throughout the network.
In the end, the effective block is the block on the chain with the greatest cumulative computing power, which has the advantage of security. The corresponding disadvantage is inefficiency, and
Since all the processes from packaging to verification are attended by miners and have the right to make decisions, which in turn leads to who has more computing power.
With the right to speak, it is easy to have all kinds of forked coins that were popular last year (2017), which is not conducive to the stable development of the community.
On the other hand, DCR uses another more efficient and democratic way to verify the effectiveness of blocks, which is mentioned at the beginning of the article.
Arrived at POS. We all know that when a new block appears, DCR will randomly select five votes from the ballot pool to vote, only if there are at least three votes.
The block is only recognized as valid after the situation. What does the vote pass mean here? In fact, the so-called vote is: the new block will be randomly
The five selected tickets correspond to the ticket buying address (usually the multi-signature address of a personal wallet address and the mine pool address), the wallet and the whole section.
Instead of being verified by all nodes across the network; that's why we mentioned earlier why pos voting needs a long-term place.
For the reason that the wallet is stable and unlocked all the time, when the DCR network sends the verified block to the wallet corresponding to the ticket address, the wallet must
The validity of the transaction must be verified and feedback must be given, otherwise the ticket will be lost. Once the user's vote is lost, the user will no longer have the right to vote.
You need to initiate a manual undo action to release the DCR that bought the ticket.
The reward for the successful verification of the block is 30 new DCR coins, which will be divided into 60 per cent to PoW miners and 30 per cent to PoS ballots.
For some, the remaining 10% is reserved for programmers involved in software development. We all know that the Pow Mining Union generates a point to the coinbase transaction.
UTXO of our address to get mining rewards; and how do we get the corresponding rewards and buy tickets after we successfully voted through POS?
Where's the coin? When a block is verified to be a valid block, the wallet selected to vote initiates a transaction that corresponds to two
Input, the first is the stakebase transaction, which is the number of rewards we successfully voted for; the second input is when we buy tickets.
The generated UTXO, as shown in the following figure:
"vin": [
{
"sequence": 4294967295
"blockindex": 4294967295
"amountin": 1.25716648
"blockheight": 0
"stakebase": "0000"
}
{
"scriptSig": {
"asm": "30440220324e0a76af30921d284d69984fb5895af188da5cee292afccc72f6fb59657ed302203a8283e650c8e47d389434e881fee85096a451dd28d193c67adbbddb13332f1c01 5121027e489297a84b4ab0188f8e1a9db05785a64e839c00ebb0b4d27fcb9f6ea52aad2103d6851bf8fdb553003d8a532f1a8c38e5dbcc7f68f9c1ef11a1afd6256e95bcb652ae"
"hex": "4730440220324e0a76af30921d284d69984fb5895af188da5cee292afccc72f6fb59657ed302203a8283e650c8e47d389434e881fee85096a451dd28d193c67adbbddb13332f1c01475121027e489297a84b4ab0188f8e1a9db05785a64e839c00ebb0b4d27fcb9f6ea52aad2103d6851bf8fdb553003d8a532f1a8c38e5dbcc7f68f9c1ef11a1afd6256e95bcb652ae"
}
"txid": "08c0991a1da833d5a840b3a71c8ba5dc6323af82e666dccf53f58936866ea71c"
"sequence": 4294967295
"vout": 0
"tree": 1
"amountin": 95.60623877
"blockheight": 238400
"blockindex": 8
}
]
When we succeed in buying tickets, the pos mining pool (not solo mining) will help us generate a transaction that will lock in the currency in which we buy the ticket.
On a multi-signed address (the multi-signed address of the user and the mining pool), that is, the UTXO in the second input corresponding above. When the vote is successful
After the work, we spend it and go to our own wallet address, which means we get our money by spending the utxo generated by buying tickets.
The DCR who bought the ticket before.
From the point of view of the design of decred's consensus mechanism, it does solve some of the disadvantages of bitcoin. From an architectural point of view, decred combines dcrd and Bitcoin.
Dcrwallet and dcrctl are separated, and the bottom layer adopts a modular design, which has a very good expansibility and can be easily added.
New features. Therefore, from the perspective of technical implementation, it is a very high-quality currency, and I also hope that decred can develop better and better.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.