Decred 백서

Decred

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 12쪽 중 9쪽

. If a malicious node provides a fake filter which includes a non-existent transaction, the wallet will simply download the full block, compare it to the filter and discover that the filter is not genuine. How do I use SPV? dcrwallet CLI To enable SPV mode in dcrwallet simply provide the --spv flag when starting the process. There is also an optional --spvconnect flag which disables DNS seeding and allows you to specify the IP of a full node you wish to sync from. --spvconnect can be specified multiple times to sync from multiple peers. Decrediton When Decrediton is started for the first time, a dedicated screen is displayed during the setup wizard which asks if you would like to enable SPV mode. If Decrediton has already been used before, it is possible to change to SPV mode through the settings tab. There is also a “SPV Connect” textbox on this tab, which will allow you to specify the IP address of a full node you wish to sync from. ## /wallets/hardware-wallets Hardware Wallets Traditional software wallets such as Decrediton store your private keys in a file on your computer. A hardware wallet is a device that stores your private keys on a dedicated piece of hardware with the intention of providing an additional level of security. Hardware wallets typically do not connect directly to the internet, and so they are often considered more secure than software wallets. It is not currently possible to participate in Proof-of-Stake using hardware wallets. Below is a table of hardware wallets that support Decred (last updated 2020-08-24). Hardware Software Trezor Decrediton , Exodus Ledger Ledger Live ## /wallets/mobile-wallets Mobile Wallets Mobile Wallets Decred is supported on multiple mobile wallet platforms for both Android and iOS: Cake Wallet : Privacy-focused, open-source multi-chain wallet Exodus : Multi-chain wallet with intuitive design Trust Wallet : Popular multi-chain wallet Architecture and Privacy Considerations Mobile wallets do not download and validate the entire Decred blockchain like desktop wallets. Instead, they use lightweight methods to minimize system resource usage and data consumption: Cake Wallet uses SPV (Simplified Payment Verification) mode for Decred, which connects directly to the blockchain network and validates block headers. This provides better privacy and decentralization compared to server-based architectures, making Cake Wallet the preferred option for mobile users. Cake Wallet is also maintained by Decred developers via Politeia proposal. Exodus and Trust Wallet use RPC (Remote Procedure Call) connections to remote servers/nodes to retrieve blockchain data. While convenient, this approach relies on third-party infrastructure and may have different privacy characteristics. Proof-of-Stake and Privacy Participation Mobile wallets do not support Proof-of-Stake participation (ticket buying and voting) or privacy mixing. If you want to mix, participate in Decred’s PoS consensus system and earn staking rewards, please use a desktop wallet instead. ## /proof-of-stake/overview Proof-of-Stake (PoS) Voting Overview Proof-of-Stake (PoS) voting is a form of Proof-of-Stake (PoS) security, but the way Decred integrates this as a complement to Proof-of-Work (PoW) mining gives it a distinctive set of roles and characteristics. PoS voting serves a number of purposes: Allowing stakeholders to vote for or against proposed changes to the Decred blockchain. If stakeholders vote in support of a change, the chain will hard fork and the new feature becomes active automatically. More information on voting can be found in the Mainnet Voting Guide . Providing a mechanism for stakeholders to influence Proof-of-Work (PoW) miners. Stakeholders can vote to withhold a miner’s reward even if the block conforms to the consensus rules of the network. This allows stakeholders, in principle, to discourage problematic mining behavior such as mining empty blocks. For a block to be valid, it has to be signed by at least 3 of the 5 tickets that are called to vote in that block. This makes the Decred blockchain more robust to certain kinds of attack, such as those which rely on secret mining. The same principle makes the Decred blockchain resistant to contentious hard forks. PoW Miners are unable to build on a chain without the Votes of the tickets that are called. Snap voting of live tickets is used to make decisions about the project treasury through Politeia . These roles are incentivized; ticket-holders (or “Proof-of-Stake (PoS) Voters”) collectively receive 89% of the block reward when their tickets are called to vote. How Ticket Voting Works To participate in PoS voting, stakeholders lock some DCR in return for a ticket. An individual stakeholder can purchase one or more tickets. The amount of DCR locked, or Ticket Price , is adjusted dynamically every 144 blocks (~12 hrs). The current ticket price can be found in Decrediton or on dcrdata.decred.org . Every ticket owned gives its holder the ability to cast a single vote. Upon voting, each ticket returns a small reward plus the original Ticket Price of the ticket. Tickets are selected pseudorandomly according to a Poisson distribution. The average time it takes for a ticket to vote is 28 days, but possibly requiring up to 142 days, with a 0.5% chance of expiring before being chosen to vote (this expiration returns the original Ticket Price without a reward). Every block mined must include a minimum of 3 votes (miners are penalized by a reward deduction if fewer than 5 votes are included). Below is a chart showing the probability of a ticket voting by day. Every block mined can also include up to 20 fresh ticket purchases. A new ticket requires 256 blocks to mature before it is entered into the Ticket Pool and can be called to vote. There are a few important variables that you should familiarize yourself with while staking. Every 144 blocks (~12 hours), the stake difficulty algorithm calculates a new Ticket Price in an attempt to keep the Ticket Pool size near the target pool size of 40,960 tickets. This 144 block window is referred to as the StakeDiffWindowSize . The Ticket Price / Stake Difficulty is the price you must pay for a ticket during a single 144 block window. The Ticket Pool is the total number of tickets in the Decred network. The Ticket Fee ( ticketfee ) is the fee that must be included in the ticket purchase to incentivize Proof-of-Work (PoW) miners to include that ticket in a new block. Ticket Fee usually refers to the DCR/kB fee rate for a ticket purchase transaction. The Ticket Fee defaults to the minimum (0.0001 DCR/kB), which is typically sufficient. When a ticket is called to vote, the wallet that has voting rights for that ticket must be online. If the wallet is not online to cast its vote, the ticket will be marked as missed and you will not receive a reward for that ticket. In practice, Solo Voters often run voting wallets on a number of servers on different continents, to minimize the chance of their tickets missing a call to vote. Voting Service Providers (VSPs) offer a service whereby ticket buyers can delegate the act of voting to the VSP. The ticket-buyer instructs the VSP how their ticket should vote on any open rule change proposals, and shares voting rights with the VSP to take advantage of the voting infrastructure they provide (i.e. at least three always-online servers). VSPs charge a fee for this service, which is paid upfront before the ticket is added to the VSPs voting wallets. This fee is generally 5% or less. A list of VSPs is maintained on decred.org. VSPs do not take custody of DCR. By using them, you only delegate the voting rights of a ticket. Ticket Lifecycle Purchasing a ticket is quite simple (see below), but what happens to it after you buy it? A ticket on mainnet (testnet uses different parameters) will go through a few stages in its lifetime: You buy a ticket using a Decrediton or dcrwallet wallet. The total cost of each single ticket transaction should be Ticket Price + Ticket Fee ( ticketfee ). Your ticket enters the mempool . This is where your ticket waits to be mined by PoW miners. Only 20 fresh tickets are mined into each block. Tickets are mined into a block, with higher Ticket Fee transactions having a higher priority. Note that the Ticket Fee is DCR per KB of the transaction. A few common transaction sizes are 298 Bytes (a solo ticket purchase) and 539 Bytes (a pool ticket purchase). A - If your ticket is mined into a block, it becomes an immature ticket. This state lasts for 256 blocks (about 20 hours). During this time the ticket cannot vote. At this point, the ticket fee is non-refundable. B - If your ticket is not mined, both the Ticket Price and Ticket Fee are returned to the purchasing account. After your ticket matures (256 blocks), it enters the Ticket Pool and is eligible for voting. The chance of a ticket voting is based on a Poisson distribution with a mean of 28 days. Given a target pool size of 40,960 tickets, any given ticket has a 99.5% chance of voting within 40,960 blocks (approximately 142 days, or 4.7 months). If, after this time, a ticket has not voted, it expires. You receive a refund on the original Ticket Price . A ticket may miss its call to vote if the voting wallet does not respond or two valid blocks are found within close proximity of each other. If this happens, you receive a refund on the original Ticket Price . After a ticket has voted, missed, or expired, the funds (ticket price and reward if applicable, minus the fee) will enter immature status for another 256 blocks, after which they are released. If a ticket is missed or expired, a ticket revocation transaction is submitted by the wallet which then frees up the locked ticket outputs. NOTE: Revocations can only be submitted for a corresponding missed ticket. You cannot revoke a ticket until it is missed. Additional Information Mainnet Voting Guide Proof-of-Stake FAQ - General Proof-of-Stake FAQ - Buying Tickets and Fees Proof-of-Stake FAQ - Solo Mining Proof-of-Stake FAQ - Voting Service Providers ## /proof-of-stake/how-to-stake How to Stake/Vote Participating in Decred’s Proof-of-Stake system requires the use of an always-online voting wallet. This wallet must remain online and unlocked 24/7, ready to sign vote transactions immediately when tickets are selected to vote on a block. Advanced users with some sysadmin skills may choose to run their own voting wallet. This is known as Solo voting . Beginners, or those who are unable or unwilling to maintain an always-online voting wallet can instead choose to use a Voting Service Provider (VSP) . Solo PoS Voting Solo PoS voting is only recommended for advanced users. Using the command line tools is required, it is not possible using Decrediton. You must ensure your voting wallet is online and unlocked 24/7. Downtime on the voting wallet can result in missed votes and lost voting rewards. You must feel confident in your ability to keep your voting hardware secure. Reasons to solo vote include contributing to the decentralization of the Decred network, retaining full control of your funds and wallet, increased privacy, and avoiding VSP fees. The Buying Tickets with dcrwallet guide explains how to set up a voting wallet and buy tickets using dcrwallet . Voting Service Providers Voting Service Providers (VSPs) maintain a pool of voting wallets and allow users to add their tickets to those wallets in exchange for a small fee. VSPs are completely non-custodial - they never have access to any of their user’s funds - the user is only delegating the rights to vote their tickets to the VSP. It’s easy to purchase tickets with a VSP inside of Decrediton. Your wallet doesn’t need to stay online since the VSP’s wallets are always online on your behalf. Not only is this convenient, but it’s also more secure for you to keep your wallet offline when not in use. VSPs rarely miss votes because they’re a pool of wallets, usually in multiple physical locations. If you chose to try solo-voting with a single wallet, and if your internet/power was unreliable, there’s a greater risk of missing votes and voting rewards. A list of VSPs and statistics is maintained on the decred.org website . In order to support network decentralization, it is recommended that you join a smaller VSP with fewer live tickets. As VSPs control tickets delegated to them, they could in theory vote those tickets in a way which contradicts the expressed wishes of the ticket owners. This could be easily detected, and any VSP which attempted it would likely be abandoned by the stakeholder community. However, it is good practice to limit the power of individual VSPs, to limit the potential for damage from this kind of attack. Unlike Proof-of-Work (PoW) mining pools, VSPs do not pool work or rewards. The number of tickets a VSP has does not affect how regularly one’s tickets will be called and rewards received. All VSPs run the same basic code, but they may differ in the amount of redundancy available. More redundancy equals less chance of missed votes, although all VSPs will have some missed votes as many missed votes are caused by PoW miners. This is because sometimes miners will find a solution to the next block so quickly that votes haven’t had time to propagate around the network. PoS voting using a VSP can be done using Decrediton or dcrwallet. Decrediton - GUI wallet for Windows/macOS/Linux. The Staking menu, Purchase tab is used to buy tickets. dcrwallet - CLI wallet for Windows/macOS/Linux. The Buying Tickets with dcrwallet guide explains how to purchase tickets via command line. Interested in running a VSP? Public VSP servers are a key part of the Decred infrastructure, and as such, new operators are always welcome. vspd is the reference implementation of VSP software, and the GitHub repository contains guides covering how to deploy the software, and how to get a new VSP listed on decred.org and in Decrediton. ## /proof-of-stake/redeem-script Redeem Script Note The release of vspd in Summer 2020 overhauled how VSPs operate. Redeem scripts are no longer part of the process. The following article only applies to legacy VSPs which were running dcrstakepool software. When users sign up with a Voting Service Provider (VSP), both the user and the VSP jointly create a 1-of-2 multisignature script. This script is known as the redeem script. When a VSP user buys a new ticket, the voting rights are given to a hash of the redeem script. The redeem script involves both a public key from the user and a public key from the VSP, so either are able to vote or revoke the purchased tickets. Why users must backup their scripts At first, when a user has just signed up to a VSP, the redeem script is not known by anyone except the user and the VSP. When a ticket votes or is revoked, that redeem script is revealed on-chain as a part of the process. The VSP handles voting and revoking for the user, but if it goes offline, it is up to the user to vote the remaining active tickets or revoke those that have expired. In order to do this, the users wallet also needs to know the redeem script. When registering with a VSP, the users wallet will automatically store a copy of the redeem script, but currently, users can’t reconstruct these scripts from their own seed. This is why they must backup their redeem scripts to ensure they don’t end up with locked funds due to the VSP going offline. What happens if the script is lost? A user who purchased a ticket through a VSP that is no longer available and lost their redeem script won’t be able to vote or revoke their tickets. Users risk having their funds locked if the following conditions are met: The user has not backed up their redeem script The user lost all access to their existing wallet The user has not backed up their wallet (or underlying wallet.db) that knows the script The VSP went offline before ever voting or revoking a ticket with that redeem script The user’s wallet has been offline during that entire period to have not voted or revoked a ticket with that redeem script The VSP operator is unresponsive to requests for the copy of the redeem script Recovery methods When a redeem script is first generated it is only known by the VSP and the user, therefore it is not possible for the script to be recovered if both parties lose it. However, when a ticket votes or is revoked, the redeem script is revealed as a part of the process. Only redeem scripts that have been used at least once to vote or revoke a ticket can be recovered. If this is your case, you can find it using Decred’s block explorer, dcrdata . Look for one of your vote or revoke transactions. This can be done creating a new wallet using your seed phrase, and checking your past tickets. Search for the transaction using dcrdata. Once found, look under the ‘Transaction Details’ tab for the decoded JSON. Inside this JSON file, find the scriptSig in the vin key. Under scriptSig , you should see a field for the asm , a deserialized form of the script. The asm value should be a long string separated by a white space. Grab the second part of the scriptSig asm , this is your redeem script. Import the script into your wallet to vote or revoke your tickets as usual. ## /privacy/general-privacy General Information on Privacy This page provides a list of things you can do to improve your privacy when working with DCR, or cryptocurrencies more generally. This list is not meant to be comprehensive, and does not offer any guarantees, only ideas. Do keep in mind that nothing is bullet-proof! If you are a person in extreme danger, for example, because you live in a territory controlled by an oppressive regime, we advise you do more research on the topic. Transaction Graphs The Decred blockchain contains a public ledger of all Decred transactions, including the amount sent in each transaction, as well as its senders and its recipients. The senders and recipients are not identified by any real-world personal identity, only by cryptographic public keys. This provides a level of pseudonymity , but not necessarily true anonymity . It is possible to use this public information to build a transaction graph, a representation of how Decred has been moved between the various network participants. If one of your personal transactions is somehow connected to your real world identity, it may be possible to build a transaction graph which profiles more of your personal activity. An observer may be able to deduce other transactions which you have participated in, or they may be able to deduce your total balance. One possible way your personal identity could be linked to your blockchain activity is through the use of a block explorer. The administrator of the block explorer may be able to view your IP address and which addresses or transactions you are browsing, and they may infer that you own those addresses or transactions. A possible solution for this is to use blockchain explorers exclusively over Tor. Transaction Broadcasting When you broadcast a transaction from your dcrd node, it is possible that other peers on the network may deduce that the transaction belongs to you, and they may be able to link it to your public IP address. It is possible to route your dcrd traffic through Tor to mitigate this risk. Another solution is to broadcast your transaction through a public website, using Tor to provide anonymity. For example, dcrdata has this functionality, and is available as a hidden service on Tor using the URL http://dcrdata5oppwcotlxkrlsp6afncnxvw54sw6jqftc4bjytm4rn27j3ad.onion/ . It’s also important to note that different wallets might use different address types . This can also give a hint about your identity, which combined
프로젝트로 돌아가기