Decred 백서

Decred

원문

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

e of messages (start at the bottom of the file for the most recent messages). If the blockchain has been corrupted, remove the dcrd data folder and restart the sync. Disable any antivirus or protection software and try running again. Run Decrediton’s dcrd version in the terminal and look for any fatal messages or panics. Error “Already Have Transaction…” If you receive a message similar to the one above, it means your dcrd node already has the transaction you’re trying to publish. This is harmless, but if the transaction is left pending for a long time, you could try: Rebroadcast the transaction using the button in the Transactions tab Check if your transaction has been broadcast by using the block explorer Perform a rescan Cannot Purchase Tickets This is usually caused by shutting down Decrediton before a ticket has been mined. Perform the same steps as described in “Cannot see all my coins” Debugging Other Errors If you can start the wallet but get error messages when performing an operation, then the first thing is to verify the wallet logs from within Decrediton. Access the Settings -> Logs page and look for any ERR messages: ## /wallets/cli/cli-installation CLI Installation guide Last updated for CLI release v1.8.0. dcrinstall is an automatic installer and upgrader for the Decred software. It makes it easy to install Decred Command Line Interface (CLI) tools on a single machine. Everything is automatically configured to work right out of the box. This includes dcrd , dcrwallet , dcrctl , dcrlnd , and dcrlncli . The newest release can be found here: https://github.com/decred/decred-release/releases . Binaries are provided for Windows, macOS, Linux, and BSD. dcrinstall will… Automatically download the precompiled, signed binary package found on GitHub Verify the signature of the downloaded package Copy the binaries within the package to a specific folder dependent on OS Create configuration files with settings to allow the applications to communicate with each other Run you through the wallet creation process. After running dcrinstall , you will be able to launch the software with no additional configuration. Looking for a more advanced setup? If you are interested in advanced configurations or Solo PoS Voting, consider reading the Solo Voting guide. If you are interested in networking between multiple devices, consider reading the Secure Cold Wallet guide. macOS Linux Windows BSD Download the correct file for your computer: Architecture Filename Intel dcrinstall-darwin-amd64-v1.8.0 Apple Silicon dcrinstall-darwin-arm64-v1.8.0 For your security, verify that your download hash matches the hash in the Decred releases manifest. For detailed instructions, read about Verifying Binaries . Make the downloaded file an executable within your terminal and run it: Navigate to the directory where the dcrinstall file was downloaded using the cd command, run chmod with u+x mode on the dcrinstall file, and run the executable that is created. Below is an example of the commands (change directories or filename as needed): cd ~/Downloads/ chmod u+x dcrinstall-darwin-amd64-v1.8.0 ./dcrinstall-darwin-amd64-v1.8.0 The executable binaries for dcrd , dcrwallet , and dcrctl can now be found in the ~/decred/ directory. Before the dcrinstall process completes, you will be taken to the wallet creation prompt. Follow the steps within the Wallet Creation Walkthrough of the dcrwallet Setup guide to finish. Download the correct file for your computer: Architecture Filename 32-bit dcrinstall-linux-386-v1.8.0 64-bit dcrinstall-linux-amd64-v1.8.0 32-bit ARM dcrinstall-linux-arm-v1.8.0 64-bit ARM dcrinstall-linux-arm64-v1.8.0 For your security, verify that your download hash matches the hash in the Decred releases manifest. For detailed instructions, read about Verifying Binaries . Make the downloaded file an executable within your terminal and run it: Navigate to the directory where the dcrinstall file was downloaded using the cd command, run chmod with u+x mode on the dcrinstall file, and run the executable that is created. Below is an example of the commands (change directories or filename as needed): cd ~/Downloads/ chmod u+x dcrinstall-linux-amd64-v1.8.0 ./dcrinstall-linux-amd64-v1.8.0 The binaries for dcrd , dcrwallet , and dcrctl can now be found in the ~/decred/ directory. Before the dcrinstall process completes, you will be taken to the wallet creation prompt. Follow the steps within the Wallet Creation Walkthrough of the dcrwallet Setup guide to finish. Download the correct file for your computer: Architecture Filename 32-bit dcrinstall-windows-386-v1.8.0.exe 64-bit dcrinstall-windows-amd64-v1.8.0.exe For your security, verify that your download hash matches the hash in the Decred releases manifest. For detailed instructions, read about Verifying Binaries . Run the dcrinstall executable file. You can either double click it or run it from the Command Prompt. The binaries for dcrd , dcrwallet , and dcrctl can now be found in the %HOMEPATH%\decred\ directory (usually %HOMEPATH% is C:\Users\<username>\ ). Before the dcrinstall process completes, you will be taken to the wallet creation prompt. Follow the steps within the Wallet Creation Walkthrough of the dcrwallet Setup guide to finish. Download the correct file for your computer: Architecture Filename FreeBSD amd64 dcrinstall-freebsd-amd64-v1.8.0 OpenBSD amd64 dcrinstall-openbsd-amd64-v1.8.0 For your security, verify that your download hash matches the hash in the Decred releases manifest. For detailed instructions, read about Verifying Binaries . Make the downloaded file an executable within your terminal and run it: Navigate to the directory where the dcrinstall file was downloaded using the cd command, run chmod with u+x mode on the dcrinstall file, and run the executable that is created. Below is an example of the commands (change directories or filename as needed): cd ~/Downloads/ chmod u+x dcrinstall-openbsd-amd64-v1.8.0 ./dcrinstall-openbsd-amd64-v1.8.0 The binaries for dcrd , dcrwallet , and dcrctl can now be found in the ~/decred/ directory. Before the dcrinstall process completes, you will be taken to the wallet creation prompt. Follow the steps within the Wallet Creation Walkthrough of the dcrwallet Setup guide to finish. ## /wallets/cli/os-differences Operating System Differences The purpose of this page is to explain the key differences for running the cross-platform command-line applications on Windows, Linux, and macOS. Launch Commands The first major difference in the command line applications ( dcrd , dcrwallet , dcrctl ) is how you launch them from the command line. This is not as much of an operating system as it is a difference in shells. Windows comes with Command Prompt and PowerShell installed. macOS uses Bash within the Terminal application, and many Linux distributions use Bash as well. Below are examples of the basic run commands for Bash and Command Prompt. Command Prompt: dcrd.exe , dcrwallet.exe , dcrctl.exe Bash: ./dcrd , ./dcrwallet , ./dcrctl Some of our guides might be OS-agnostic with the launch commands. If a guide says to run dcrctl --wallet getbalance , it’s referring to using dcrctl.exe --wallet getbalance for Command Prompt and ./dcrctl --wallet getbalance for Bash. Application Directory Locations The other way the command line clients differ is the location of each application directory (blocks, wallets, log files, configuration files are all stored within the data directory). Below is a table of the default application directories for each application. OS dcrd, dcrwallet, dcrctl App Directories Windows %LOCALAPPDATA%\Dcrd\ %LOCALAPPDATA%\Dcrwallet\ %LOCALAPPDATA%\Dcrctl\ macOS ~/Library/Application Support/Dcrd/ ~/Library/Application Support/Dcrwallet/ ~/Library/Application Support/Dcrctl/ Linux ~/.dcrd/ ~/.dcrwallet/ ~/.dcrctl/ ## /wallets/cli/startup-basics Startup Basics This guide applies to command-line application users. Decrediton users can safely ignore the use of config files - Decrediton handles basic configuration automatically. It is also worth noting that some of our guides show configuration file settings and other guides show startup command flags. Configuration File Locations All of the Decred software, when started, reads from a configuration file to determine which settings it should enable/disable/set during that initial load. All of the command line startup flags (e.g. dcrwallet --testnet) can be replaced by settings within the appropriate configuration file (e.g. dcrwallet --testnet could be replaced by testnet=1 in dcrwallet.conf) . These configuration files are located within the application home directory of the application. The location of these default home directories for Windows, macOS, and Linux are listed below: OS dcrd, dcrwallet, dcrctl App Directories Windows %LOCALAPPDATA%\Dcrd\ %LOCALAPPDATA%\Dcrwallet\ %LOCALAPPDATA%\Dcrctl\ macOS ~/Library/Application Support/Dcrd/ ~/Library/Application Support/Dcrwallet/ ~/Library/Application Support/Dcrctl/ Linux ~/.dcrd/ ~/.dcrwallet/ ~/.dcrctl/ Each of these folders is allowed its own .conf file, named after the individual application ( e.g. dcrd uses dcrd.conf ). Please also note that the Dcrd and Dcrwallet home directories are automatically created when each application is first launched. You will have to manually create a Dcrctl home directory to utilize a config file. The dcrinstall installation method automatically creates configuration files, with the minimum configuration settings already enabled. The Manual Installation method includes sample configuration files within the .zip/.tar.gz. It is recommended to copy these config files into the appropriate directory described above, and rename them to remove ‘sample-‘. These files have many settings commented out (comments are not read by the program during runtime) so all of these settings are effectively disabled. You can enable these pre-written settings by simply deleting the semi-colon before the line. Startup Command Flags A majority of the settings you are able to set via the configuration file can also be passed to the application as parameters during launch. For example, the following OS-specific commands would open dcrd for Testnet use, an alternative to using testnet=1 in your config file: Windows: dcrd.exe --testnet macOS: ./dcrd --testnet Linux: ./dcrd --testnet The above example would first look to the dcrd configuration file for settings and then look to the executable command to enable the testnet setting. Advanced Usage Full List of Options for Each Application ## /wallets/cli/dcrd-setup dcrd Setup Guide This guide is intended to help you setup the dcrd application using startup flags . Prerequisites: Use the latest dcrinstall to install dcrd . Additional steps will be required if another installation method was used. Review how the launch commands for the Command Prompt (Windows) and Bash (macOS/Linux) shells differ here . dcrd is the node daemon for Decred. A daemon is a program that works in the background that you do not interface with directly. dcrd maintains the entire past transactional ledger (or blockchain) of Decred and allows relaying of transactions to other Decred nodes across the world. You can think of it as your own personal Decred blockchain server. The blockchain is saved in the data folder within dcrd ’s home directory. Advanced Users: If you are running in headless mode via SSH, you will need to use a terminal multiplexer such as screen or tmux . Where you see the instruction to move to another shell, you’ll need to start a new window in screen or tmux . Connect to the Decred Network The first time launching dcrd , it will connect to the Decred network and begin downloading the blockchain. To allow dcrwallet and dcrctl to communicate with dcrd , the configuration files must have rpcuser and rpcpass settings enabled. Configure RPC Username and Password If you used dcrinstall , your configuration files are already setup with the RPC username/password for dcrd , dcrwallet , and dcrctl . If you did not use dcrinstall , you will need to enable the bare minimum settings in your configuration files. Follow this guide to do so. Start dcrd With the correctly set configuration files, open another shell window in your Decred directory (or use the last window if you have just created your wallet). Type the following command (review this guide’s Prerequisites to determine the right command for your OS/Shell application): dcrd Wait for dcrd to Sync to the Decred Blockchain When dcrd launches successfully, you should see your shell window begin to fill up with messages as the daemon connects to the network and starts processing blocks. Wait until it is completed - the entire blockchain is being downloaded into the dcrd data directory. You will see a line at the start like this: 22:58:04 2016-02-09 [INF] BMGR: Syncing to block height 617 from peer 104.236.167.133:9108 Then, as it continues to download blocks, you will see lines like this: 22:58:16 2016-02-09 [INF] BMGR: Processed 321 blocks in the last 10.03s (544 transactions, height 322, 2016-02-09 09:50:34 +1000 EST) The blockchain will be fully synced once the most recently processed block is the current block height. You can tell by either comparing the date and time in the log message or by comparing the height of the last block processed against the last block height on the official block explorer . Note that this connection will be used in the future. You must leave this dcrd instance running in order to use dcrwallet . Now that you’ve set up dcrd , visit the dcrwallet Setup guide. ## /wallets/cli/dcrwallet-setup dcrwallet Setup Guide This guide is intended to help you setup the dcrwallet application using startup flags . Prerequisites: Use the latest dcrinstall to install dcrwallet . Additional steps will be required if another installation method was used. Review how the launch commands differ for the Command Prompt (Windows) and Bash (macOS/Linux) shells, and how the home directories differ here . Setup dcrd and have it running in the background. dcrwallet is the daemon that handles Decred wallet functionality for a single user. It manages all of your accounts, addresses, and transactions; tracks balances across addresses; and allows stakeholders to participate in Proof-of-Stake voting. In order to run dcrwallet , a wallet.db must exist within dcrwallet ’s home directory. In order for that file to exist, you must create a new wallet. dcrinstall automatically starts the creation process. If you delete your wallet.db or used another installation process, you’ll have to run the manual wallet creation command . Critical Information During the creation process for your wallet, you will be given a sequence of 33 words known as a seed phrase. This seed phrase is essentially the private key for your wallet. You will be able to use this seed phrase to restore your private keys, transaction history, and balances using any Decred wallet on any computer. This ultimately means that anyone who knows your seed can use it to restore your private keys, transaction history, and balances to a Decred wallet on their computer without your knowledge. For this reason, it is of utmost importance to keep your seed phrase safe. Treat this seed the same way you would treat a physical key to a safe. If you lose your seed phrase, you permanently lose access to your wallet and all funds within it. It cannot be recovered by anyone, including the Decred developers. It is recommended you write it down on paper and store that somewhere secure. If you decide to keep it on your computer, it would be best to keep it in an encrypted document (do not forget the password) in case the file or your computer is stolen. Every seed phrase is also associated with a 64 character seed hex. The seed hex functions the same way as the seed phrase, so it is also important to keep your seed hex secure. DO NOT, UNDER ANY CIRCUMSTANCES, GIVE YOUR SEED OR THE ASSOCIATED HEX KEY TO ANYONE! NOT EVEN DECRED DEVELOPERS! Manual Wallet Creation Command If you do not already have a wallet.db file stored in dcrwallet ’s home directory, you must run the dcrwallet --create command. Steps for this can be found below. Open a new shell window (Bash/Command Prompt/etc,..). Navigate to the directory of the dcrwallet executable. Enter the command dcrwallet --create (review the Prerequisites above if you are unsure whether you should use ./dcrwallet or dcrwallet.exe for the previous command). Wallet Creation Walkthrough During this process, you’ll set a private passphrase, optionally set a public passphrase, and record your seed. To accomplish this, follow the steps below: Set Passphrases for Your Wallet If the dcrwallet --create command successfully executed, you should be greeted by the following text: Enter the private passphrase for your new wallet: This first passphrase, the private passphrase, is what you will use to unlock your wallet when creating transactions or voting with Proof-of-Stake. Please use a unique and strong password. This password also protects the private keys within your wallet file, securing it from theft. After you’ve verified your private passphrase, you should see the following prompt: Do you want to add an additional layer of encryption for public data? (n/no/y/yes) [no]: The public passphrase is optional. It is used to encrypt all of the public data (transactions and addresses) within your wallet file so if it is stolen, an adversary can’t link you to your transactions. Record Your Seed Before creating a new seed for your wallet, please review the Critical Information section above. After you’ve set your private passphrase and optional public passphrase, you’ll see the following prompt: Do you have an existing wallet seed you want to use? (n/no/y/yes) [no]: This guide assumes you do not have an existing seed, so continue by hitting Enter which will answer the prompt with the default [no] . NOTE: If you wish to restore your wallet by using your seed, you would simply enter [yes] here and follow the instructions on screen. After answering [no] , your seed phrase (wallet generation seed) and its hex will be displayed in the window. Please read through the IMPORTANT section displayed immediately after the hex. It cannot be stressed enough how important it is to save your seed phrase in a secure location, so if you haven’t committed this to memory, please review the Critical Information section above. Once you have written down the seed phrase and hex, type OK and press Enter . NOTE: if you did not write the phrase down before continuing, you should start this process over after deleting your wallet file After pressing Enter , you should see the following message: Creating the wallet... The wallet has been created successfully. The wallet will then be created. This might take a few minutes if you have a slow computer. Launching dcrwallet In order to launch dcrwallet , you first must have created your wallet and connected dcrd to the Decred network . Configure RPC Username and Password If you used dcrinstall , your configuration files are already setup with the RPC username/password for dcrd , dcrwallet , and dcrctl . If you did not use dcrinstall , you will need to enable the bare minimum settings in your configuration files. Follow this guide to do so. Start dcrwallet With the correctly set configuration files, open another shell window in your Decred directory (or use the last window if you have just created your wallet). Type the following command (review this gui
프로젝트로 돌아가기