Decred 백서

Decred

원문

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

to log output. (default: ~/.dcrwallet/logs ) --profile= Enable HTTP profiling this interface/port --memprofile= Write mem profile to the specified file --cpuprofile= Write cpu profile to the specified file Wallet Description --walletpass= The public wallet password – Only required if the wallet was created with one --promptpass The private wallet password is prompted for at start up, so the wallet starts unlocked without a time limit --pass= The private wallet passphrase --promptpublicpass The public wallet password is prompted for at start up --enableticketbuyer Enable the automatic ticket buyer --enablevoting Enable creation of votes and revocations for owned tickets --purchaseaccount= Name of the account to buy tickets from (default: default) --gaplimit= The size of gaps between used addresses. Used for address scanning and when generating addresses with the wrap option. (default: 20) --watchlast= Limit watched previous addresses of each HD account branch --allowhighfees Allows the wallet to send transactions with very large fees. By default, this is any fee over 0.1 DCR/kB --txfee= Sets the transaction fee in DCR/kB that this wallet will pay to miners (default: 0.0001) --accountgaplimit= Number of accounts that can be created in a row without using any of them (default: 10) --disablecointypeupgrades Never upgrade from legacy to SLIP0044 coin type keys --pooladdress= DEPRECATED: This field was for legacy Stakepools, which have been replaced by Voting Service Providers (VSPs). The ticket pool address where ticket fees will go to --poolfees= DEPRECATED: This field was for legacy Stakepools, which have been replaced by Voting Service Providers (VSPs). The per-ticket fee mandated by the ticket pool as a percent (e.g. 1.00 for 1.00% fee) --stakepoolcoldextkey= DEPRECATED: This field was for legacy Stakepools, which have been replaced by Voting Service Providers (VSPs). Enables the wallet as a stake pool with an extended key in the format of “xpub…:index” to derive cold wallet addresses to send fees to RPC Client Description -c or --rpcconnect= Hostname/IP and port of dcrd RPC server to connect to --cafile= File containing root certificates to authenticate a TLS connection with dcrd --clientcafile= Certficate Authority to verify TLS client certificates (default: ~/.dcrwallet/clients.pem ) --noclienttls Disable TLS for the RPC client – NOTE: This is only allowed if the RPC client is connecting to localhost --dcrdusername= Username for dcrd authentication --dcrdpassword= Password for dcrd authentication P2P Proxy and Tor Description --proxy= Connect via SOCKS5 proxy (eg. 127.0.0.1:9050) --proxyuser= Username for proxy server --proxypass= Password for proxy server --circuitlimit= Set maximum number of open Tor circuits; used only when --torisolation is enabled (default: 32) --torisolation Enable Tor stream isolation by randomizing user credentials for each connection --nodcrdproxy Never use configured proxy to dial dcrd websocket connectons SPV Description --spv Sync using simplified payment verification --spvconnect= Full node addresses to SPV sync from; disables DNS seeding RPC Server Description --rpccert= File containing the TLS certificate (default: ~/.dcrwallet/rpc.cert ) --rpckey= File containing the TLS key (default: ~/.dcrwallet/rpc.key ) --tlscurve= Curve to use when generating TLS keypairs (default: P-521) --onetimetlskey Generate a new TLS certpair at startup, but only write the certificate to disk --noservertls Disable TLS for the RPC servers – NOTE: This is only allowed if the RPC server is bound to localhost --grpclisten= Listen for gRPC connections on this interface/port --rpclisten= Listen for legacy JSON-RPC connections on this interface/port --nogrpc Disable the gRPC server --nolegacyrpc Disable the legacy JSON-RPC server --rpcmaxclients= Max number of legacy JSON-RPC clients for standard connections (default: 10) --rpcmaxwebsockets= Max number of legacy JSON-RPC websocket connections (default: 25) -u or --username= Username for legacy JSON-RPC and dcrd authentication (if dcrdusername is unset) -P or --password= Password for legacy JSON-RPC and dcrd authentication (if dcrdpassword is unset) --jsonrpcauthtype= Method for JSON-RPC client authentication (basic or clientcert) (default: basic) IPC (Interprocess Communication) Description --pipetx= File descriptor or handle of write end pipe to enable child -> parent process communication --piperx= File descriptor or handle of read end pipe to enable parent -> child process communication --rpclistenerevents Notify JSON-RPC and gRPC listener addresses over the TX pipe --issueclientcert Notify a client cert and key over the TX pipe for RPC authentication Mixing (CSPP) Description --csppserver= Network address of CoinShuffle++ server --csppserver.ca= CoinShuffle++ Certificate Authority --mixedaccount= Account/branch used to derive CoinShuffle++ mixed outputs and voting rewards --ticketsplitaccount= Account to derive fresh addresses from for mixed ticket splits; uses mixedaccount if unset --changeaccount= Account used to derive unmixed CoinJoin outputs in CoinShuffle++ protocol --mixchange Use CoinShuffle++ to mix change account outputs into mix account --mixsplitlimit= Connection limit to CoinShuffle++ server per change amount Auto Ticketbuyer Description --ticketbuyer.balancetomaintainabsolute= Amount of funds to keep in wallet when stake mining (default: 0 DCR) --ticketbuyer.votingaddress= Purchase tickets with voting rights assigned to this address --ticketbuyer.limit= Buy no more than specified number of tickets per block (0 disables limit) --ticketbuyer.votingaccount= Account used to derive addresses specifying voting rights VSP Options Description --vsp.url= Base URL of the VSP server --vsp.pubkey= VSP server pubkey --vsp.sync Sync tickets to VSP --vsp.maxfee= Maximum VSP fee (default: 0.1 DCR) --manualtickets VSP Admins Only: Do not discover new tickets through network synchronization ## /wallets/cli/dcrctl-rpc-commands dcrctl RPC Commands Last updated for CLI release v1.8.0. The dcrd and dcrwallet daemons have APIs that can be used to access lower-level functionality not available in their respective Command-line Interfaces (CLIs) . These APIs are called using Remote Procedure Calls (RPCs). RPCs also allow for integrations with clients written in any language that supports RPCs. Below are some common RPC commands for dcrd and dcrwallet. For a full list of supported RPC commands and more detailed documentation, see the dcrd RPC API and dcrwallet RPC Documentation . dcrd RPC Commands Click to expand full list of dcrd RPC commands RPC Method Params addnode "addr" "add|remove|onetry" createrawssrtx [{"amount":n.nnn,"txid":"value","vout":n,"tree":n}] ( fee ) createrawsstx [{"txid":"value","vout":n,"tree":n,"amt":n},...] {"address":amount} [{"addr":"value","commitamt":n,"changeaddr":"value","changeamt":n},...] createrawtransaction [{"amount":n.nnn,"txid":"value","vout":n,"tree":n},...] {"address":amount,...} ( locktime expiry ) debuglevel "levelspec" decoderawtransaction "hextx" decodescript "hexscript" ( version ) estimatefee numblocks estimatesmartfee confirmations ( mode="conservative" ) estimatestakediff ( tickets ) existsaddress "address" existsaddresses ["address",...] existsliveticket "txhash" existslivetickets ["txhash",...] existsmempooltxs ["txhash",...] generate numblocks getaddednodeinfo dns ( "node" ) getbestblock getbestblockhash getblock "hash" ( verbose=true verbosetx=false ) getblockchaininfo getblockcount getblockhash index getblockheader "hash" ( verbose=true ) getblocksubsidy height voters getcfilterv2 "blockhash" getchaintips getcoinsupply getconnectioncount getcurrentnet getdifficulty getgenerate gethashespersec getheaders ["blocklocator",...] "hashstop" getinfo getmempoolinfo getmininginfo getnettotals getnetworkhashps ( blocks=120 height=-1 ) getnetworkinfo getpeerinfo getrawmempool ( verbose=false "txtype" ) getrawtransaction "txid" ( verbose=0 ) getstakedifficulty getstakeversioninfo ( count ) getstakeversions "hash" count getticketpoolvalue gettreasurybalance ( "hash" verbose=false ) gettreasuryspendvotes ( "block" ["tspend",...] ) gettxout "txid" vout tree ( includemempool=true ) gettxoutsetinfo getvoteinfo version getwork ( "data" ) help ( "command" ) invalidateblock "blockhash" livetickets node "connect|remove|disconnect" "target" ( "perm|temp" ) ping reconsiderblock "blockhash" regentemplate sendrawtransaction "hextx" ( allowhighfees=false ) setgenerate generate ( genproclimit=-1 ) stop submitblock "hexblock" ( {"workid":"value"} ) ticketfeeinfo ( blocks windows ) ticketsforaddress "address" ticketvwap ( start end ) txfeeinfo ( blocks rangestart rangeend ) validateaddress "address" verifychain ( checklevel=3 checkdepth=288 ) verifymessage "address" "signature" "message" version dcrwallet RPC Commands Click to expand full list of dcrwallet RPC commands RPC Method Params abandontransaction "hash" accountaddressindex "account" branch accountsyncaddressindex "account" branch index addmultisigaddress nrequired ["key",...] ( "account" ) addtransaction "blockhash" "transaction" auditreuse ( since ) consolidate inputs ( "account" "address" ) createmultisig nrequired ["key",...] createnewaccount "account" createrawtransaction [{"amount":n.nnn,"txid":"value","vout":n,"tree":n},...] {"address":amount,...} ( locktime expiry ) createsignature "address" inputindex hashtype "previouspkscript" "serializedtransaction" createvotingaccount "name" "pubkey" ( childindex=0 ) disapprovepercent discoverusage ( "startblock" discoveraccounts gaplimit ) dumpprivkey "address" fundrawtransaction "hexstring" "fundaccount" ( {"changeaddress":changeaddress,"feerate":feerate,"conftarget":conftarget} ) getaccount "address" getaccountaddress "account" getaddressesbyaccount "account" getbalance ( "account" minconf=1 ) getbestblock getbestblockhash getblock "hash" ( verbose=true verbosetx=false ) getblockcount getblockhash index getblockheader "hash" ( verbose=true ) getcfilterv2 "blockhash" getcoinjoinsbyacct getcurrentnet getinfo getmasterpubkey ( "account" ) getmultisigoutinfo "hash" index getnewaddress ( "account" "gappolicy" ) getpeerinfo getrawchangeaddress ( "account" ) getreceivedbyaccount "account" ( minconf=1 ) getreceivedbyaddress "address" ( minconf=1 ) getstakeinfo gettickets includeimmature gettransaction "txid" ( includewatchonly=false ) gettxout "txid" vout tree ( includemempool=true ) getunconfirmedbalance ( "account" ) getvotechoices ("tickethash") getwalletfee importcfiltersv2 startheight ["filter",...] importprivkey "privkey" ( "label" rescan=true scanfrom ) importpubkey "pubkey" ( "label" rescan=true scanfrom ) importscript "hex" ( rescan=true scanfrom ) importxpub "name" "xpub" listaccounts ( minconf=1 ) listaddresstransactions ["address",...] ( "account" ) listalltransactions ( "account" ) listlockunspent ( "account" ) listreceivedbyaccount ( minconf=1 includeempty=false includewatchonly=false ) listreceivedbyaddress ( minconf=1 includeempty=false includewatchonly=false ) listsinceblock ( "blockhash" targetconfirmations=1 includewatchonly=false ) listtransactions ( "account" count=10 from=0 includewatchonly=false ) listunspent ( minconf=1 maxconf=9999999 ["address",...] "account" ) lockaccount "account" lockunspent unlock [{"amount":n.nnn,"txid":"value","vout":n,"tree":n},...] mixaccount mixoutput "outpoint" processunmanagedticket ( "tickethash" ) purchaseticket "fromaccount" spendlimit ( minconf=1 "ticketaddress" numtickets=1 "pooladdress" poolfees expiry "comment" dontsigntx ) redeemmultisigout "hash" index tree ( "address" ) redeemmultisigouts "fromscraddress" ( "toaddress" number ) renameaccount "oldaccount" "newaccount" rescanwallet ( beginheight=0 ) revoketickets sendfrom "fromaccount" "toaddress" amount ( minconf=1 "comment" "commentto" ) sendfromtreasury "key" amounts sendmany "fromaccount" {"address":amount,...} ( minconf=1 "comment" ) sendrawtransaction "hextx" ( allowhighfees=false ) sendtoaddress "address" amount ( "comment" "commentto" ) sendtomultisig "fromaccount" amount ["pubkey",...] ( nrequired=1 minconf=1 "comment" ) sendtotreasury amount setaccountpassphrase "account" "passphrase" setdisapprovepercent percent settreasurypolicy "key" "policy" ( "ticket" ) settspendpolicy "hash" "policy" ( "ticket" ) settxfee amount setvotechoice "agendaid" "choiceid" ( "tickethash" ) signmessage "address" "message" signrawtransaction "rawtx" ( [{"txid":"value", "vout":n, "tree":n, "scriptpubkey":"value", "redeemscript":"value"},...] ["privkey",...] flags="ALL" ) signrawtransactions ["rawtx",...] ( send=true ) stakepooluserinfo "user" sweepaccount "sourceaccount" "destinationaddress" ( requiredconfirmations feeperkb ) syncstatus ticketinfo ( startheight=0 ) ticketsforaddress "address" treasurypolicy ( "key" "ticket" ) tspendpolicy ( "hash" "ticket" ) unlockaccount "account" "passphrase" validateaddress "address" validatepredcp0005cf verifymessage "address" "signature" "message" version walletinfo walletislocked walletlock walletpassphrase "passphrase" timeout walletpassphrasechange "oldpassphrase" "newpassphrase" walletpubpassphrasechange "oldpassphrase" "newpassphrase" ## /wallets/spv Simple Payment Verification (SPV) What is SPV? Simple Payment Verification (SPV) allows the use of a Decred wallet without having to download the entire Decred blockchain. A wallet operating in SPV mode only needs to download full blocks containing transactions relevant to it (i.e. transactions involving the wallet’s addresses). In a typical case, this means downloading tens of megabytes, rather than multiple gigabytes. This reduces the wallet’s hardware requirements and greatly reduces the initial load time for new wallets. SPV has been built directly into the dcrwallet CLI tool — what Decredition and other official wallets use behind the scenes — so all users of official wallets are able to enable SPV. Why was SPV added to dcrwallet ? The hardware requirements to run a Decred wallet are drastically reduced when operating in SPV mode. Storage and download requirements are reduced because rather than downloading the whole blockchain, an SPV wallet will only download the blocks which contain relevant transactions, and for all of the other blocks in the chain only the headers are downloaded. The amount of processing power required is reduced because a device running an SPV wallet will only validate the proof-of-work and the header chain rather than validating every transaction in every block and ensuring the block contents are consistent with the headers. As a result of these decreased requirements, Decred wallets can operate on a wider set of devices - particularly mobile devices. Smartphones and tablets are typically limited in at least one of CPU power, storage or download capacity, and mobile operating systems limit the amount of background work processing each application can perform, which makes running a full node either impractical or impossible. Another benefit offered by SPV is an extreme reduction in the time required for a brand new wallet to become operational, offering a huge improvement to the user experience. How does SPV work? At the start of every block added to the Decred blockchain is 180 bytes of data called the block header . The block header describes key information about the block including the hash of the block, the Merkle root (the sum of all the transaction hashes in the block), and the nonce calculated by the proof-of-work miners. A predetermined filter is also created for every block, based on the all of the transactions within the block. When an SPV wallet initializes it will connect to the Decred network using peer-to-peer connections, and it will download the full set of headers and filters. It will then validate the header chain to ensure that the chain and its proof-of-work are valid. Once this is complete, the wallet will use the filters to locally identify which blocks contain owned transactions without uploading any private data to remote nodes. The wallet can then use the peer-to-peer network to download these blocks, scan them for relevant transactions and select these to update personal transaction history and balance. How is this different from a “light” wallet? “Light” wallets such as Exodus or Atomic already bring some of the benefits of an SPV wallet - for example these wallets allow sending and receiving Decred transactions with a minimal start-up time and without downloading the full chain. Light wallets certainly provide a level of convenience but there are often subtle consequences because they depend upon an API provided by a centralized service: Light wallets depend on a remote service to watch owned addresses and provide notifications when transactions are received by the addresses. Notifications could be missed or incorrect. Users will often be required to upload an extended public key to the central server so it is aware of all of owned addresses, potentially compromising the users’ privacy. Light wallets do not validate the information they receive by checking the blockchain directly - they have to blindly trust the information provided by the central server. These concerns do not apply to SPV wallets because they connect directly to the decentralized, peer-to-peer Decred network. They upload no private data to remote nodes and they discover their own transactions by inspecting the blockchain directly. Are there any disadvantages? SPV does not support voting wallets. Voting wallets have the responsibility to vote on the validity of the last block, and a wallet cannot be sure of the validity unless it fully validates the whole blockchain leading up to that block. It is possible to purchase tickets and allocate the voting rights to a Voting Service Provider . SPV wallets only download blocks which have transactions related to their owned addresses, which could potentially reveal more information about the wallet than if it downloaded every single block. This only presents a very minor decrease in privacy, but it is a decrease nonetheless. This can be mitigated by downloading blocks from multiple peers so no single peer is able to see the full list of blocks downloaded by a wallet. Even if a passive observer on the network is able to see which blocks are downloaded by a wallet, they are not able to identify which transactions in those blocks are relevant. Wallets operating in SPV mode are only able to validate the block headers they download and not the filters. This makes a “false-negative” attack possible, whereby a malicious peer that knows a wallet is waiting for a particular transaction could send the wallet a fake filter which does not include the transaction, resulting in the wallet not downloading the block and so not becoming aware of the transactions existence. This transaction would still be visible to all fully validating nodes and wallets, and it will still appear in the block explorer . DCP-0005 was activated by a consensus rule vote in early 2020, and this enabled adding the hash of the filter into the part of the block header that is PoW validated. As a result, SPV wallets will in future be able to easily check the validity of the filters without having to download their blocks. A “false-positive” scenario is not possible
프로젝트로 돌아가기