title
stringclasses
28 values
heading
stringlengths
8
32
content
stringlengths
100
16.9k
tokens
int64
21
4.93k
Wallet Basics
OTS Key Index
When you create a new wallet you create an XMSS tree, which is comprised of many signatures to make a signature scheme. Every signature is referenced as your OTS index or One Time Signature key index. The OTS key index is limited. You can only use each key ONCE. When you’ve used your last key, you will no longer be able to sign transactions. This can not be stressed enough! NOTE With your last key you must empty your wallet. If you use all of your OTS Key Indexes with funds in the wallet, these funds will be lost FOREVER Best Wallet Practices Track all OTS Keys used in a spreadsheet (ledger) Store your private keys somewhere safe, in an encrypted manner
149
Wallet Basics
QRL Web Wallet
The easiest way to generate a QRL wallet is by using the online wallet found here: https://wallet.theqrl.org All secure XMSS operations are run in a web assembly compiled version of qrllib locally in your browser or desktop application. Keys stay in the memory space of the XMSS object, which is destroyed the moment you close the wallet, browser window, or desktop application.
84
Wallet Basics
Create a New Wallet
Enter a strong password into the password field. The password must be at least 8 characters in length, and must contain at least 1 number and 1 letter. Tree Height: This option allows you to create a wallet with varying tree size. In other words this controls the amount of signatures your wallet can use for transactions safely on the blockchain. By default an XMSS Tree height of 10 provides 1024 One Time Signatures. You may chose to create a wallet with more or less OTS keys used to sign transactions on the QRL network. The only disadvantage for creating a larger tree height is the time required to generate the additional keys. This can be configured only when a wallet is created. If needed you can create an additional slaves.json file with up to 100 slave OTS keys allowing for additional TX’s using the same QRL address. For more information please see the Slaves.json documentation. Hash Function: QRL can utilize multiple hash functions, depending on the setting used during the creation of the wallet. By default the wallet will utilize the shake128 hash function if no configuration options are given. Which hash function is better to use is debatable, and they all have pros and cons. Most importantly the default can be changed if there is later a vulnerability found in the core cryptography of the hash function. Create Wallet: After you have made your selections and entered a secure password, click the create wallet button and a new wallet will be generated. This will produce a sensitive screen once the address is created. This screen prints your public QRL address, your Mnemonic Phrase, and Hexseed directly to your screen. Write these down somewhere safe, they will recover your wallet. Important: Record Your Private Keys! Do Not Lose Them! It’s recommended to Save a Secure, encrypted wallet.json file. You will need your password to unlock this file anytime it is loaded into the wallet Don’t Forget This Password! Welcome to the Quantum Resistance!
399
Wallet Basics
Open QRL Wallet
By using the recovery method you have created, you can access your wallet to send or receive QRL. Enter your information into the “Wallet Seed / File” field. Make sure the drop down on the right matches the data you chose (Mnemonic, Hexphrase, or wallet file). Click “Unlock Wallet” and your QRL wallet will open allowing you to check balances and interact with the QRL network.
89
Wallet Basics
Send QRL
With the wallet unlocked, you can now send QRL. To send QRL there are four fields you need to fill in: Recipient Address: A valid QRL address. Amount: How much QRL to send. Fee: How much you are paying to make this transaction. OTS Key Index: Enter an unused OTS Key. Keep track of used OTS Keys! The web wallet will keep track of your OTS key index for you from the blockchain, but it is good practice to write this number down after each use. Make sure everything is correct and click the confirm button. The transaction will be propagated across the QRL network and deposited into the address you entered. Your screen will show the confirmation details as the transaction is sent.
152
Wallet Basics
Receive QRL
Simply give someone your QRL address and they can send you coins. You don’t need to have the wallet opened in order to receive QRL. Click the receive tab in the wallet and you will see your wallet address and QR code. Send this to whomever you are receiving coins from.
61
Wallet Basics
Check Wallet Balance
With the wallet opened you can see the balance in the main screen of the web wallet. You can also check your wallet balance without opening the wallet by browsing to the QRL Explorer and entering your address into the search field. You will see all of the transactions the address has as well as the balance of quanta and any tokens held by the wallet.
71
Wallet Basics
Find Remaining OTS Keys
If you need to find the remaining OTS keys for an address, you can see them in the meta tag in the Block Explorer. Search for your address in teh search bar and simply expand the meta tag at the bottom of the screen to see the used OTS keys. Once you have passed the OTS Bitfield of 4096 OTS keys you will need to use the keys in order, sequentially. If you skip a number you will not be able to go back and use it past the Bitfield.
104
Check Wallet Balance
Check Wallet Balance
To check the balance of a wallet browse to the QRL Explorer and enter your address into the search field.
22
Check Wallet Balance
Search Address
Enter the QRL address into the search bar in the top right of the Explorer. You can enter QRL addresses, transaction hashes, or block indexes into this field. This will show you the current balance and all transactions that have happened with this wallet.
51
Check Wallet Balance
Meta Info
At the bottom left there is a meta button. This will give fine grain details for the current wallet.
21
Check Wallet Balance
QRL Command Line
Using a terminal with qrl installed you can simply enter qrl wallet_ls to get the balance for more info on installing QRL see the doc: https://docs.theqrl.org/node/QRLnode
46
Ledger Nano S
Multi-Tree Support
This new feature adds the ability to store multiple XMSS trees on your Ledger Nano, Up to four (4) with the use of the new plausible deniability features. Each tree is limited still to 256 keys, however now you can sign up to 1024 combined transactions. This feature will allow you to store 2 QRL addresses with 256 available transactions each on your Ledger from each profile enabled (Up to 4 addresses between 2 profiles). When you reach the end of your first address OTS key pool, you have the opportunity to send all funds to the second address and continue using the Ledger. Once both trees have been consumed you will have to transfer funds into a new address, and re-initialize the Ledger to generate new keys. Don’t worry too much though, the web/desktop wallet will warn you when your keys are close to running out.
178
Ledger Nano S
Plausible Deniability
One of the most exciting features to roll out with this latest release is the ability to secure your funds from the “$5 wrench attack”. This new feature creates a secondary passphrase to open your Ledger device with. This second account space allows another 2 QRL XMSS trees or Addresses to be created on the Ledger. To access the new account space on your Ledger you will enter the new passphrase you setup when you first power up the Ledger. This will add an additional word to the 24 word mnemonic phrase, creating 2 word lists. The first being the typical 24 word Ledger recovery key, the second being the same 24 word phrase plus the additional word setup during configuration. To read more on the setup and configuration of the second account space see this article from the Ledger team: https://support.ledger.com/hc/en-us/articles/115005214529-Advanced-passphrase-security This feature is optional and there is no way to tell from the Ledger if you have configured this extra space. Plausibly deniable and fully recoverable secure funds! To setup the second address space, follow the official ledger guide: https://support.ledger.com/hc/en-us/articles/115005214529-Advanced-passphrase-security. After you have secured the additional mnemonic word for the second space follow this guide again to initialize the 3rd and 4th QRL addresses.
308
Ledger Nano S
Private Keys
The Ledger will not print your QRL private key. This is stored on the Ledgers secure element, and the basis of what makes this device so secure. You will be presented with a private key to restore your Ledger device during the initial setup. Any application secrets will be tied to this private key, and it is required to restore your wallet if ever needed. Store your Ledger Device seed (mnemonic) somewhere safe, in an encrypted manner if possible (Recommended you have this information stored in multiple physical locations) With the addition of plausible deniability there is an additional self-set mnemonic word that must be stored as well. This additional word can be up to 100 characters max and is case sensitive. This additional word is needed as much as your 24 word mnemonic to be able to restore your funds. You can think of it as an extra 25th word that you can choose. If you forget or lose your keys, nobody will be able to help you!
200
Ledger Nano S
OTS Key Index
When you create a new wallet you create an XMSS tree, which is comprised of many one time use signatures. Every signature is referenced as your OTS index or One Time Signature key index(https://docs.theqrl.org/developers/ots). The Ledger will now hold 2 XMSS trees (QRL Addresses) in it’s memory space. The OTS key index is limited. You can only use each key ONCE. When you’ve used your last key, you will no longer be able to sign transactions. This cannot be stressed enough! Your Ledger Nano S will keep track of OTS keys for you, however if you ever lose the device and need to reinstall on a new device, you will have to reset your XMSS index inside the QRL Web Wallet. You can rely on the state of the node you’re communicating with; however this will not keep track of failed transactions where a signature was broadcast to the network and subsequently failed. It is best to track all OTS key usage elsewhere to ensure you never reuse the same OTS key. NOTE With your last key you must empty your wallet. If you use all of your OTS Key Indexes with funds in the wallet, these funds will be lost FOREVER (Don’t worry, there are plenty of warnings along the way.) The QRL Web Wallet will provide ample warnings you are running low on OTS Keys (<=50) to ensure you have plenty of time to move your coins to a new address. It is up to you to move them, however!
331
Ledger Nano S
OTS Key Tracking
It’s recommended that you track all OTS Keys used in a spreadsheet or similar media. The Nano S will keep track of your OTS keys for you, however if you ever lose the device and need to reinstall on a new Ledger Nano S you will need to know which OTS keys have been consumed, The basic security of XMSS is based on using any key exactly one time. The QRL software has been developed in such a way to help users track their OTS keys, it is ultimately up to the user to track and insure they have not re-used any keys. Once you have restored your wallet on a new Ledger, manually set the XMSS OTS key index inside the QRL Web Wallet tools section. See https://docs.theqrl.org/wallet/ledger-nano-s/#manually-set-xmss-index to Manually Set XMSS Index You can rely on the state of the node you’re communicating with; however this will not keep track of failed transactions where a signature was broadcast to the network and subsequently failed. NOTE It is best to track all OTS key usage elsewhere to ensure you never reuse the same OTS key.
253
Ledger Nano S
Tokens and Messages
Currently the QRL Ledger Nano S app does not support the creation and sending of QR Tokens on the QRL Network. Only native Quanta (QRL) transfers and Message Transaction types and derivatives of are currently supported. A future release of the QRL Ledger Nano S app will support token creation, sending and slave transaction functionality. In the mean time you can setup another address following https://docs.theqrl.org/wallet/basics and use this for all on chain tool uses.
102
Ledger Nano S
Installing the QRL Application
Using the Ledger Live application, follow these instructions: Open the Manager in Ledger Live Connect and Unlock your Ledger Nano S Allow the Manager on your Ledger Nano S device by pressing the right button when asked Search the App catalog for QRL, and click the Install button next to the QRL app. An installation window will appear, and your device will display Processing… The QRL App installation has completed on your Ledger Nano S
89
Ledger Nano S
Initializing the QRL App
Before you can use the QRL Ledger Nano S App, it must first be initialized. The initialization process will generate an XMSS tree on your Ledger Nano S device, which is a unique aspect of the QRL Network’s signature scheme. This process only has to be completed once on your Ledger Nano S device. Please allow up to 45 minutes for this process to complete for each tree. To initialize your Ledger Nano S device for use with the QRL App, follow these instructions: Make sure your Ledger Nano S device is Connected and Unlocked. Open the QRL app on your Ledger Nano S Your Ledger Nano S device will show QRL (Tree 1) not ready. Scroll down and press both buttons on the Init Tree menu option. Your Ledger Nano S device will show QRL (Tree 1) keygen: 001/256. This will slowly progress until all 256 keys have been generated. When this process has completed, your Ledger Nano S device will show QRL (Tree 1) READY rem:256 - indicating your device has finished generating tree 1 OTS keys, and you have 256 OTS Keys remaining in this Tree. Scroll down in the menu and chose Switch Tree with both buttons. You will now see QRL (Tree 2) Not Ready Initialize Tree 2 following the same steps above. Again this process will take about 45 minuets to complete. Generating XMSS Tree 1 on the Ledger. This will take a while, have patience. Initializing Tree 1 Your Ledger Nano S device has been initialized for the QRL app, and contains 2 addresses (XMSS Trees) ready to deposit funds to. 2 addresses contain 256 OTS keys each which can be used to sign transactions on the QRL network.
368
Ledger Nano S
Accessing Wallet with Ledger
1. Make sure your Ledger Nano S device is Connected, Unlocked and the QRL App is Open. 2. Select the tree to open by scrolling to Switch Tree in the QRL menu. 3. Visit https://wallet.theqrl.org/ in your browser or open the QRL desktop wallet. 4. Click Open Wallet on the left hand menu. 5. On the right hand side, select Ledger Nano S in the drop down menu. 6. Click the Open Ledger Nano S button. Open QRL Ledger Nano S Wallet This will present you with the unlocked QRL wallet ready to send or receive as seen below. Opened QRL Ledger Nano S Wallet NOTE Ubuntu users may run into issues connecting to their Ledger devices. Please reference this article Fix-connection-issues from Ledger explaining the issue and solution. NOTE Chrome Users, there is a bug with chrome that will not allow the Ledger to work. Please use another application or download the qrl wallet NOTE If you are a Firefox user, ensure you have enabled u2f before proceeding. Enabling U2F support in Mozilla Firefox
232
Ledger Nano S
Receive QRL
You should always verify the address shown in the QRL Web Wallet matches the address shown on your Ledger Nano S device. To confirm your address, click the Click to Verify button on the receive tab of the wallet. Your QRL address will appear on your computer, and on your Ledger Nano S device. Address Verification Ledger Nano S Wallet: Once you’ve confirmed your address on both devices, you can send your QRL address to whomever you are receiving coins from. NOTE In the event you find the addresses do not match, you should immediately reach out to the QRL Team to report the issue @ security@theqrl.org This could occur in the event a malicious actor has taken control of the QRL Web Wallet.
153
Ledger Nano S
Send QRL
With the wallet unlocked, you can now send QRL. To send QRL there are four fields you need to fill in: Recipient Address (A valid QRL address), Amount (How much QRL to send), Fee(How much you are paying to make this transaction), OTS Key Index(Enter an unused OTS Key should auto-populate). Make sure everything is correct and click the confirm button. You will get another confirmation of your transaction details. If you are happy with the transaction details, click the Sign with Ledger Button. A window will appear prompting you to confirm the transaction details on your Ledger Nano S device. On your Ledger Nano S device, you can press View transaction to verify the From and To addresses, Amount(s) and Fee. When you’ve confirmed these details, proceed to press Sign transaction. Signing will take a few seconds. When complete, you will see the following back on the QRL Wallet. To complete the transaction into the QRL Network, click the Send transaction button. You will see a progress tracker while your transaction is mined into a block. When the transaction is confirmed in the network, your Transaction History will automatically update to reflect your transaction. You can validate this using the Block Explorer
256
Ledger Nano S
Check Wallet Balance
With the wallet opened you can see the balance in the main screen of the web wallet. You can also check your wallet balance without opening the wallet by browsing to the QRL Explorer and entering your address into the search field. You will see all of the transactions the address has as well as the balance of quanta and any tokens held by the wallet.
71
Ledger Nano S
Manually Set XMSS Index
In the event you lose your Ledger Nano S device, or simply need to initialize or maintain the state of a second Ledger Nano S device, you can manually set the XMSS Index state on your Ledger Nano S device. NOTE If you are a Firefox user, ensure you have enabled u2f before proceeding. Enabling U2F support in Mozilla Firefox Make sure your Ledger Nano S device is powered on, unlocked and the QRL App is open. Visit https://wallet.theqrl.org/ in your browser. Click Open Wallet on the left hand menu. On the right hand side, select Ledger Nano S in the drop down menu. Click the Open Ledger Nano S button. Click Tools on the left hand menu. Click Set XMSS Index. Carefully read the on screen instructions and completely the form accordingly. Click Save New XMSS Index. A confirmation window will appear, and your Ledger Nano S will ask you for confirmation. Your Ledger Nano S device will show WARNING Set XMSS Index New Value XX where XX is the XMSS Index you entered. Press the right button on your Ledger Nano S to confirm, or left button to reject the update.
249
Create QRL Mnemonic From Dice
Create QRL Mnemonic From Dice
For those who are completely paranoid about random number generation, it is possible to create entropy for a seed or mnemonic by rolling a dice. The more sides the dice has the more bits of entropy may be gathered with each roll, resulting in fewer rolls to complete a mnemonic. The functions work for any sided dice, but I would recommend a polyhedral dice (e.g. 100 sided) which allows 6 bits of entropy per roll to be harvested.
94
Create QRL Mnemonic From Dice
QRL Mnemonic Generation
For the QRL mnemonic (34 words, 12 bits per word, 408 bits required) this translates to 68 dice rolls to complete a mnemonic phrase. Usage: You will need a dice, a PC with python loaded and some time to roll the dice. Security First To securely generate a QRL mnemonic you will want to work in an offline, air gapped PC. Make sure you are not running on an infected piece of hardware. It is recommended to boot into a live USB running a Linux distribution. There are lots of options out there for distributions to use. The biggest thing here is the OS is brand new, and not previously compromised. Live USB Distribution options Tails Cubes Debian Ubuntu Always verify the hash of the file you grab to ensure the file is not tampered with. Dice.py You need to get the files hosted on github and save them to the PC. Clone the repository from github: git clone https://github.com/surg0r/dice.git To run the software use: python dice.py Follow the instructions rolling the dice the appropriate number of times and record the number rolled each time. This will create a truly random mnemonic phrase from the word-list found in the repository on github.
257
Mining QRL Quick Start
Mining QRL Quick Start
Note: Already have everything setup? For a list of pools. Head over to our Mining Pools page for more information. So you want to mine QRL? This is the place to start. This guide will cover the basics to mining while staying out of the weeds as they say. Anyone can get started mining, seriously it’s way too easy to set this up and make some coins with your existing hardware. You can mine QRL on most modern PC’s, servers, NAS devices, web browsers, heck even cell phones (Not very good ROI). Requirements There are not too many requirements for mining QRL. Most current processors will run some form of mining software. There are lots of choices for every operating system. Keep in mind that the power (energy) consumption makes most devices impractical to mine with, costing more to power than the rewards earned. PC that is turned on 24/7, or close to it Network connection Mining software for your PC’s operating system Note: It is not recommended to mine on a laptop. They are not made to run full capacity 100% of the time. There is not enough cooling and damage may occur. QRL Mining basics QRL uses the RandomX algorithm allowing QRL to take advantage of its ASIC resistant features and benefits. This is the same algorithm that Monero currently uses. Any software that pool mines for monero will work with QRL. You can find something that is compatible with your OS and setup following the guide found with the project you choose. Ask for help in the QRL Discord or in the Reddit forum if you need help. When configuring your software, set everything up to mine “rx/0”, instead of using a Monero address, enter your QRL address into the “Worker” or “Address” field in the mining software. QRL uses PQ secure encryption. No joke this stuff is the best there is right now. If you follow instructions, and don’t compromise your private keys in any way your funds are safe from current processors as well as advanced quantum computers that are on the horizon.
436
Mining QRL Quick Start
CPU Mining
CPU mining utilizes a users PC CPU(s) to calculate the cryptographic equation and compute a valid block. Unlike Bitcoin and other cryptocurrencies, QRL and it’s upstream cousin Monero are ASIC resistant There are two ways to get started mining on a CPU: Run a Full QRL Node on your computer Use randomx mining software and connect to a pool As a general rule, you will have a better chance at finding blocks using a pool. Solo mining strengthens the QRL network by running a synced node, verifying transactions on the network. Either way you decide to go, over time your block rewards should even out.
126
Mining QRL Quick Start
GPU Mining
Mining QRL using GPU’s is possible utilizing a community run pool server working with other miners to pool the hashrate submitted to find solutions. You will need randomx mining software compatible with the latest Monero fork that will use the GPU(s) of your mining rig to compute the hashing functions. There are a ton of options to choose from out there. Make sure the software will mine Monero if you are having any issues. Use a QRL address and point the miner to a community pool.
104
Mining QRL Quick Start
Pool Mining
To get started pool mining, you will need to have an application that will utilize the processor or GPU of your computer. Then you will connect to a community run mining pool.
35
Mining QRL Quick Start
Basic Principles
ASIC (Application Specific Integrated Circuit) An integrated circuit customized for a specific task, in our case hashing cryptographic signatures. Blockchain The public ledger of all transactions stored in a cryptographic way CPU Mining Using the CPU of a computer to mine with. Fork A piece of code that, at some point in the code history, made significant changes or changed direction and a new project is born from the first. Full Node The main project software running on a PC fully synced with a local copy of the blockchain. This helps to support the network. GPU Mining Using a Graphic Processing Unit(s) to mine with Hash Rate (HR/s) The amount of computational hashes a processor can process in a second. Mining The process that verifies transactions on the ledger or Blockchain, also the process in which new QRL are made and distributed into the world. Mining Software Software that is run on a local computer. Used to process hashes on the blockchain and stay in sync with current work. Pool Software Software that shares the work, and rewards from mining between all workers in the pool. Pool Worker The address or user name associated with the computer running the mining software. PoS (Proof of Stake) Proof Of Stake. A method of validating transactions on the network. PoW (Proof of Work) Proof Of Work. A Method of validating transactions on the network. Stratum Server Server using the stratum mining protocol to allow multiple miners to join together and increase hashrate.
297
QRL Mining Pools
Random Pool Selection
minergalaxy leafpool NewPool Cool GNTL Mining my2coins miningpool fun dxpool herominers Volt-Mine miningocean Pacificpool Project Quorletha fastpool
39
Mining With a QRL Node
Mining With a QRL Node
You can setup a QRL mining node on a PC or server. This will allow you to mine QRL while also running a node on the QRL network. You simply need to enable mining on the QRL node in a config file to begin mining QRL. Requirements QRL installed and fully synced QRL Wallet to send rewards to A little time to set it up Local or remote shell connection (ssh) This write-up assumes that you have a fully functioning QRL node running and fully synced with the blockchain. If you need to, see the guide at docs.theqrl.org/node/QRLnode While connected to the computer running qrl you can see the state of the node by entering qrl state into the command line. This will print out the blockheight of the local node as well as some other information. Check that this is the same height as the QRL explorer shows. Once fully synced you can start mining by editing the config file found in ~/.qrl/config.yml enabling mining.
213
Mining With a QRL Node
Configuration
To begin mining you will need to create and edit a file located in the default QRL directory ~/.qrl/config.yml. There are a ton of configurations and settings you can tweak, however for this guide we are only concerned with the mining settings. For a complete guide of the configuration settings, please see the QRL Node Configurations guide. Create the config file and add these settings to the file if not already created. nano ~/.qrl/config.yml # ====================================== # Mining Configuration # ====================================== # mining_enabled: False # mining_address: '' # mining_thread_count: 0 # 0 auto detect thread count based on number of processors # These are the default settings the node is currently using. Change the values and remove the # to begin mining. You need to enter a valid QRL address, change the False value to a True value, and set the thread count if you want to adjust. Once you have made your changes the file will look something like this. Note the QRL address shown needs to be replaced, unless you want to donate some quanta! # ====================================== # Mining Configuration # ====================================== mining_enabled: True mining_address: 'Q02090081f7e33cc535ca6ca54305f7d34cf2cd9620b1efcae657a76ca4c072902dfc4ed0f23a4a' mining_thread_count: 0 # 0 to auto detect thread count based on CPU/GPU number of processors # Restart QRL Restart the qrl node to begin mining with the new changes. start_qrl Once the node re-syncs with the network and catches up it will begin mining the current blocks on the chain You will see the rewards in the wallet you have specified in the configuration file. You can also enter the following to print the state of the node qrl state
396
Slaves.json
Slaves.json
The QRL wallet is an XMSS Merkle tree constructed using the private key to generate leaves of this tree. Each “leaf” can also generate a tree of OTS Slave keys that can be used to sign transactions. This allows further expansion of a QRL wallet extending the number of transactions you can process before needing to regenerate a new wallet. To create a slaves.json file you will need a QRL wallet.json file and a working installation of QRL. See the guide for creating a QRL Wallet CLI Currently the only way to generate a slaves.json file is by using the command line utility qrl. This can be installed by following the QRL Node Guide. You will need to have shell access and be logged into the computer running qrl.
159
Slaves.json
Create a Slaves.json
To generate a slaves.json file you will need to be connected to an active and synced node. This can be a local node, as well any of the peers shown in your nodes peer list. You also need a wallet to use for the slaves file. Assuming you have a synced node running on the local computer and a wallet.json file in the local directory you can simply enter: qrl slave_tx_generate You will be asked a few questions. You can generate a maximum 100 slaves with a single master OTS key, which is used to sign the slaves.json file onto the network validating the keys.
129
QRL Pool Setup
QRL Pool Setup
QRL uses the RandomX protocol and can be mined collectively using a centralized pool server and a collection of computers running mining software. This guide will walk through the steps required to get a pool up and running using Our GithHub Fork of the popular cryptonote-nodejs-pool software. This fork has been modified to run the QRL blockchain. You can use this as a basis for integrating QRL into your Pool or hosting your own private pool. It is assumed that the appropriate security measures have been taken to secure the server hosting this pool software. Please follow best practice and keep software up to date. Running a mining pool is not something that should be taken lightly. You need to have a good understanding of multiple complex administration and security practices. Requirements Hardware minimum 4GB RAM 2 Core CPU Support for AES-NI Support for avx2 64 bit Processor high bandwidth network connection Dedicated IP address Software and OS This guide uses Ubuntu 18.04LTS python 3.6 All required dependencies specified in the Pool software repo QRL Install Follow the instructions found docs.theqrl.org/node/QRLnode/ to get the node started. Start QRL and Sync Create a configuration file to give the QRL node instructions on how to run. By default the QRL node will look in ~/.qrl/ You may need to create this directory if you have not started the node. Note if you are running a testnet node you will find the active qrl configuration at ~/.qrl-testnet/config.yml Create a ~/.qrl/config.yml file and add these minimum configuration settings. mining_enabled: False enable_peer_discovery: True mining_api_enabled: True public_api_enabled: True Make sure to restart the node to pickup the changes. start_qrl Check the state of the qrl node with qrl state Verify the local node blockheight matches the block explorer. This may take some time. grpcProxy The QRL requires a bridge between the RPC and gRPC that QRL utilizes. The proxy handles the communication between the pool and the QRL node. To use the proxy you must have a slaves.json file named payment_slaves.json in your ~/.qrl/ directory. To generate this file first you need a QRL wallet. QRL CLI Wallet Generate a new QRL wallet using the QRL node CLI. With the node running enter: # Creates a QRL wallet qrl wallet_gen --height 12 --hash_function shake128 --encrypt The cli will ask for an encryption password to encrypt the file. This password will be required every time this wallet is needed typically to generate a new slave tree in the distant future. DO not lose this password There now is a wallet.json file in the local directory the command was issued in. Backup this file to a secure location for future use if needed. This is the new pool wallet. Now generate slave trees to use for sending payments through the pools automated system. QRL payment_slaves.json With the encrypted QRL Wallet.json file can create a slave tree file. This file contains a new set of One Time Signatures (OTS) generated from the main address that the pool will use to send transactions. See more on the XMSS slave trees in our Documentation To generate a slave file from the wallet run the following command. This will create the slaves tree and broadcast a signed transaction with the slave tree public keys onto the QRL network allowing the set of slaves to be used. qrl slave_tx_generate --src 0 --master '' --number_of_slaves 100 --access_type 0 --fee .001 This will create a new file called slaves.json in the same directory you are in sign the message and send onto the network. This transaction will require a small fee to broadcast to the network. Make sure you have enough funds to cover the fee. Move the slaves.json file to the ~/.qrl/ directory and rename to payment_slaves.json Start the QRL_gRPC_Proxy Run the proxy with the following: qrl_grpc_proxy Note: if you are running testnet start the proxy with --network-type testnet to use the default testnet directory ~/.qrl-testnet . You will need to move the payments.slaves.json file to this directory as well. Ports Check to see that you have open ports for the pool to communicate on using netstat netstat -tulnp This will print all of the open ports on the server. Ensure ports 18090 19007 19009 are open and available for the pool. Pool Install To install the pool follow the instructions in the GitHub Repository. This will guide you through the dependencies and various steps to getting the pool software installed. Please use the configuration found at the end of these docs to connect to the QRL node and wallet. this file lives at the root of the pool directory as config.json Install Web Server You will need a web server setup somewhere pointed at the pool API port. See the README.md in the pool Github for instructions on setting up the web front end. There is an additional configuration file needed to host the web server. Most importantly ensure the port is available to the web server and you can reach the address or IP externally. var api = http://pool.FQDN_OR_IP:8117"; Start The Pool With the QRL node fully synced and running slaves.json file in the correct place ~/.qrl/config.yml file correctly filled out and the qrl_grpc_proxy running you can start the pool. from the root pool directory run node init.js Enjoy. Pool Config File Copy the /config_examples/qrl.json file found in the repository to /config.json and overview each option. Change any to match your preferred setup however pay attention to the following few configurations as they are important."
1,240
QRL Testnet Pool Setup
QRL Testnet Pool Setup
QRL uses the RandomX protocol and can be mined collectively using a centralized pool server and a collection of computers running mining software. This guide will walk through the steps required to get a Testnet pool up and running using Our GithHub Fork of the popular cryptonote-nodejs-pool software. This fork has been modified to run the QRL blockchain. You can use this as a basis for integrating QRL into your Pool or hosting your own private pool. It is assumed that the appropriate security measures have been taken to secure the server hosting this pool software. Please follow best practice and keep software up to date. Running a mining pool is not something that should be taken lightly. You need to have a good understanding of multiple complex administration and security practices. Requirements Hardware minimum 4GB RAM 2 Core CPU Support for AES-NI Support for avx2 64 bit Processor high bandwidth network connection Dedicated IP address Software and OS This guide uses Ubuntu 18.04LTS python 3.6 All required dependencies specified in the Pool software repo QRL Install Follow the instructions found docs.theqrl.org/node/QRLnode/ to get the testnet node started. Make sure to issue the start_qrl --network-type testnet to start the testnet node. Start QRL and Sync Edit or create the configuration file to give the QRL testnet node instructions on how to run. By default the node will look in `` You may need to create this directory if you have not started the testnet node previously. The active qrl testnet configuration will be found at ~/.qrl-testnet/config.yml Ensure these minimum configuration settings are set along with the rest of the testnet configuration. mining_enabled: False enable_peer_discovery: True mining_api_enabled: True public_api_enabled: True In the end your configuration file should read something close to this. The peer details and heasderhash will change over time as the network is reset: peer_list: [ 18.130.83.207" "209.250.246.234" "136.244.104.146" "95.179.154.132" ] genesis_prev_headerhash: 'The Testnet Genesis' genesis_timestamp: 1530004179 genesis_difficulty: 5000 db_name: 'testnet-state' mining_enabled: False enable_peer_discovery: True mining_api_enabled: True public_api_enabled: True Make sure to restart the node to pickup the changes. start_qrl --network-type testnet Check the state of the qrl node with qrl state Verify the local node blockheight matches the testnet block explorer. This may take some time to sync fully. grpcProxy The QRL requires a bridge between the RPC and gRPC that QRL utilizes. The proxy handles the communication between the pool and the QRL node. To use the proxy you must have a slaves.json file named payment_slaves.json in your ~/.qrl-testnet directory. To generate this file first you need a QRL wallet. QRL CLI Wallet Generate a new QRL wallet using the QRL node CLI. With the node running enter: # Creates a QRL wallet qrl wallet_gen --height 12 --hash_function shake128 --encrypt The cli will ask for an encryption password to encrypt the file. This password will be required every time this wallet is needed typically to generate a new slave tree in the distant future. DO not lose this password There now is a wallet.json file in the local directory the command was issued in. Backup this file to a secure location for future use if needed. This is the new pool wallet. Now generate slave trees to use for sending payments through the pools automated system. QRL payment_slaves.json With the encrypted QRL Wallet.json file can create a slave tree file. This file contains a new set of One Time Signatures (OTS) generated from the main address that the pool will use to send transactions. See more on the XMSS slave trees in our Documentation To generate a slave file from the wallet we just created run the following command. This will create the slaves tree and broadcast a transaction onto the QRL network allowing the set of slaves to be used. qrl slave_tx_generate --src 0 --master '' --number_of_slaves 100 --access_type 0 --fee .001 This will create a new file called slaves.json in the same directory you are in sign the message and send onto the network. This transaction will require a small fee to broadcast to the network. Make sure you have enough funds to cover the fee. If needed visit the testnet faucet for funds to make this transaction. Move the slaves.json file to the ~/.qrl-testnet directory and rename to payment_slaves.json Start the QRL_gRPC_Proxy Run the proxy with the following: qrl_grpc_proxy --network-type=testnet Note: This wll use the default testnet directory ~/.qrl-testnet . Ports Check to see that you have open ports for the pool to communicate on using netstat netstat -tulnp This will print all of the open ports on the server. Ensure ports 18090 19007 19009 are open and available for the pool. Pool Install To install the pool follow the instructions in the GitHub Repository. This will guide you through the dependencies and various steps to getting the pool software installed. Please use the configuration found at the end of these docs to connect to the QRL node and wallet. this file lives at the root of the pool directory as config.json Install Web Server You will need a web server setup somewhere pointed at the pool API port. See the README.md in the pool Github for instructions on setting up the web front end. There is an additional configuration file needed to host the web server. Most importantly ensure the port is available to the web server and you can reach the address or IP externally. var api = "http://pool.FQDN_OR_IP:8117"; Pool Config File Copy the /config_examples/qrl.json file found in the repository to /config.json and overview each option. Change any to match your preferred setup however pay attention to the following few configurations as they are important. { "poolAddress": "Q01060019b0f4ce8ea82e71a5fc60851541db7e515d2585247c70533487cc89c50f6dddb8a4f386" "daemon": { "host": "127.0.0.1" "port": 18090 } "wallet": { "host": "127.0.0.1" "port": 18090 } } Start The Pool With the QRL node fully synced and running slaves.json file in the correct place ~/.qrl/config.yml file correctly filled out and the qrl_grpc_proxy running you can start the pool. from the root pool directory run node init.js Enjoy"
1,496
Create Wallet From CLI
Create Wallet From CLI
Create Wallet From CLI Interacting with the QRL network can be done utilizing the CLI interface. This will allow you to complete some more advanced tasks on the network. Using the CLI is easy and there is a great --help section to guide you along. Using the QRL command line utility we will show you how to: Create a new wallet Print your Mnemonic phrase and Hexseed Recover wallet from hexseed/mnemonic Sending QRL Adding and Removing addresses Advanced wallet functions Generate a slaves.json file Create QRT (Tokens) Send QRT’s It is recommended that you have a local working installation of QRL in order to use the CLI. It’s also possible to connect to a remote node that has allowed external connections. Use the --host {REMOTE_IP_ADDRESS} flag on the CLI to connect. Follow the guide to setup a QRL node if you haven’t already. This is much more secure and reliable way to interact with the QRL network. Create a Wallet To create a new wallet you need to open a terminal connected to a computer running the QRL node that is fully synced with the network. Once you are connected you will use the qrl function to create and modify the QRL wallet. There are some options that can be configured for the new wallet. The default wallet created is sufficient for most needs though for security you should encrypt the file at minimum. Default Wallet To simply create the QRL wallet unencrypted and with a default tree height of 10 you can enter the following command: qrl wallet_gen This will create an open wallet file in your current working directory called wallet.json. This is an unencrypted wallet file. Anyone with access can use this to get your funds. Protect this file with your life Upon creation the wallet address (Public Key) is printed to the CLI. Save it somewhere safe. This is not the recommended way of creating a wallet as the wallet is not encrypted. See below to add security to your wallet file. Encrypted Wallet To utilize the encryption features of the CLI wallet you need to pass the --encrypt flag to the above command to wrap some security around your wallet file. This will create an AES encrypted wallet file. qrl wallet_gen --encrypt This will prompt you for a password ensure the password is of sufficient length and complexity. Enter twice to confirm the password is correct and the wallet will be created. Alternatively if you have already created a wallet file in plain text you can encrypt it still using the qrl wallet_encrypt function. With an encrypted wallet file you will be prompted to enter your password anytime you interact with the wallet. XMSS Tree Height You may chose to create a wallet with more or less OTS keys used to sign transactions on the QRL network. The only disadvantage for creating a larger tree height is the time required to generate the additional keys. This can be configured only when a wallet is created. Tree Height Available Keys 8 256 10 1024 12 4096 14 16384 16 65536 18 262144 If needed a slaves.json file can be created with up to 100 slave OTS keys allowing for additional TX’s using the same QRL address. For more information please see the Slaves.json documentation Building on the example from above create an encrypted wallet with a tree height of 12 qrl wallet_gen --height 12 --encrypt This will create an AES encrypted wallet.json file with 4096 OTS keys available to use (2^12 OTS Keys) //example Unencrypted wallet file {addresses": [{"pk": null "hexseed": "0006007a70174ec1ec32abd66c2bc59ecc9a3eefe7ec14299903d2928ff01da8c0ecf8a6c46aa9ccffd4dbe2ee2d38e57c3e7a" "mnemonic": "aback grape latest ace ferry bucket creak safety hour russia parade site donor yeast tunnel dusty odd dirt mutual you brine might two mercy shady print smite wrap swan common coat modify leave tort" "height": 12 "hashFunction": "sha2_256" "signatureType": 0 "index": 0 "address": "Q000600f1afe2a5d8247779795f0eb0d5225e5fe7b91bcb38c614b5a62fa3df0f5cfe92e6355ace"}] "version": 1 "encrypted": false} //example Unencrypted wallet file {"encrypted": true "version": 1 "addresses": [{"pk": null "hexseed": "OkLqa1DMdDNesrOFfHqqOlOxp0s+dN4weKWnXlmHZLzyqnKSIsJlfSdAEmV20zEEWgr3OZ3b3dEdtLMhwzZG0y6phl5ObVqEVsWh/osgvPuEnxFNpHdWqhEnXsrvY+t9Hta+q5pAlJ8PlC8M4f9Y+D1Y6OTmdQ==" "mnemonic": "XydUoKtI0t0akPBf8Cn1XfAe3NC2Jeebf75UZvuAUOp22OlLTMq5ABzLAjgNXMFOXJ4+HqxLyOK4BryA031ivTdQ8VY3os5ikGgoJBYsUYOWpVOWJFTeOOPdb1pVa18XmBw6s3EjnoeYkyby0bEjVT/ohyEmEJrm1fA6McOzQzww4WaqJOBqAiydEziiJe3A1mOqZpXHKvI78Y4udEqxj3boyATjZg8dF1WaYPfGbcmHwXHTQfT63wLFYXHGfbaDU0Icx23l+7TTd3Wx2Crxtwui7zck" "height": 12 "hashFunction": "sha2_256" "signatureType": 0 "index": 0 "address": "Q000600f1afe2a5d8247779795f0eb0d5225e5fe7b91bcb38c614b5a62fa3df0f5cfe92e6355ace"}]} Hash Functions QRL can utilize multiple hash functions depending on the setting used during the creation of the wallet. By default the wallet will utilize the shake128 hash function if no configuration options are given. Hash Function Hash Algorithm Description shake128 SHA-3 Default used in the web wallet sha2_256 SHA-2 shake256 SHA-3 Which hash function is better to use is debatable and they all have pros and cons. Most importantly the default can be changed if there is later a vulnerability found in the core cryptography of the hash function. To select to a different hash function use the --hash_function option while generating a new wallet. The command below will create an encrypted wallet with a tree height of 10 using the shake256 hash function. qrl wallet_gen --hash_function shake256 --encrypt you can see the hash function of the wallet file by using the wallet_ls option with a -v verbose flag. It will be printed at the end of the command. qrl -v wallet_ls This will output something similar to this: Wallet at : /home/ubuntu/QRL_TEST Number Address Balance Hash ---------------------------------------------------------------------------------------------------------------- 0 Q000600f1afe2a5d8247779795f0eb0d5225e5fe7b91bcb38c614b5a62fa3df0f5cfe92e6355ace 0.00000000 sha2_256 This will also print the available qrl balance and the wallet address. Private Keys Now that you have an encrypted QRL wallet file lets get the private key and mnemonic phrase from the wallet. This section will cover: Printing the Private key information (secret) Recovering a wallet from a private key / mnemonic You will need to have a QRL wallet already generated and know the passphrase used to secure the wallet. In the same directory as your QRL wallet.json file enter the following command to print your private key information: qrl wallet_secret This will prompt you wallet idx [0]: this is asking which address to use in the wallet.json file. If you only have one address simply leave default and hit enter. If the wallet file is encrypted you will then be prompted for the passphrase used to set up the wallet. After successful decryption the private key information will be printed. Wallet Address : Q000600f1afe2a5d8247779795f0eb0d5225e5fe7b91bcb38c614b5a62fa3df0f5cfe92e6355ace Mnemonic : aback grape latest ace ferry bucket creak safety hour russia parade site donor yeast tunnel dusty odd dirt mutual you brine might two mercy shady print smite wrap swan common coat modify leave tort Hexseed : 0006007a70174ec1ec32abd66c2bc59ecc9a3eefe7ec14299903d2928ff01da8c0ecf8a6c46aa9ccffd4dbe2ee2d38e57c3e7a This information is needed to recover your wallet file. Anyone with the private key information can unlock the wallet. Treat this as very sensitive information. It is recommended that you store a copy of your private keys in at least 2 physical locations in case of catastrophe. If lost no one can help you. Recover Wallet In order the recover a wallet or load one onto a new computer you will need one of three things an encrypted wallet.json file the mnemonic phrase in the correct order or the hexseed. Without one of these it is impossible to recover the wallet. wallet.json file If you have the wallet.json file still simply copy it over to the new machine and use the qrl functions as needed. Hexseed To recover using the Mnemonic phrase use the wallet_recover command. By default the command will expect a hexseed: qrl wallet_recover You will be prompted for the hexseed you have saved. Ensure you enter it correctly. The wallet address will be printed and you will have a chance to save it. enter yes and your wallet will be recovered and saved into the directory you are currently in. This will save your file as an Unencrypted wallet.json file. Make sure you encrypt this file with a secure passphrase you will not lose. qrl wallet_encrypt Follow the prompt to encrypt the file. Mnemonic Phrase To recover using the Mnemonic phrase use the qrl wallet_recover --seed-type command: qrl wallet_recover --seed-type mnemonic You will be prompted for the mnemonic you have saved. Ensure you enter it correctly. The wallet address will be printed and you will have a chance to save it. enter yes and your wallet will be recovered and saved into the directory you are currently in. This will save your file as an Unencrypted wallet.json file. Make sure you encrypt this file with a secure passphrase you will not lose. qrl wallet_encrypt Follow the prompt to encrypt the file. Send QRL After you have a QRL address you can receive QRL to fund your wallet. Once you have a balance you can send the quanta to another address using the command line interface. You will need to be in the same directory as your wallet.json file or specify where the file is using the --wallet_dir option. Assuming you are in the same directory enter the following: qrl tx_transfer This command will prompt you for the following information: Options Data Format Description src TEXT signer QRL address master TEXT master QRL address (for slave tx) dst TEXT List of destination addresses amounts TEXT List of amounts to transfer (Quanta) fee DECIMAL fee in Quanta ots_key_index INTEGER OTS key Index You can enter these options either in the command or by answering the prompt. Here is an example qrl transaction sending 5.5QRL to another QRL address giving all of the relevant information to the command line. qrl tx_transfer --src 0 --dst Q010500317ce502123c0de6711fd4ea6833ea360e95cb40af71944eea38da90bfb5d83740d01e50 --amounts 5.25 --fee 0.01 --ots_key_index 1 If your wallet.json file is encrypted enter your passphrase when prompted. This will print something similar to below: The wallet is encrypted. Enter password: error_code: SUBMITTED tx_hash: "\206\024\244\025\215~\035\201\365\010k\304\'@\021c\0033\357(\3372\360\367r\271B\2009\337Po" Note the error_code: SUBMITTED is not an error. Submitted is a good thing this is saying the transaction is posted. After a little while the transaction will be propagated through the network and your quanta will be in another wallet. To confirm the transfer of quanta went through browse to explorer.theqrl.org and enter your address into the search field. You will see the recent transaction has confirmed and the quanta transfered. Add a QRL Address Sometimes it can be nice to have more than one address in your wallet. You can add new addresses to the wallet after the wallet file is created by using the wallet_add command. qrl wallet_add If your wallet is encrypted you will be prompted for your passphrase. This will increment the wallet_idx by one every time you enter this command. The default settings will create a wallet with tree height 10 and use hash function shake128. If you require other settings you can enter them in the command line. The command below will create a wallet with tree height 18 using shake256 hash function. qrl wallet_add --height 18 --hash_function shake256 The wallet is encrypted. Enter password: Wallet at : /home/ubuntu/.qrl Number Address Balance Hash ---------------------------------------------------------------------------------------------------------------- 0 Q000600f1afe2a5d8247779795f0eb0d5225e5fe7b91bcb38c614b5a62fa3df0f5cfe92e6355ace 239.98000000 sha2_256 1 Q010600898e7cc45431c95a1e5a415c0f3d223620332becd43db92727a4900472198650e1775e4b 0.00000000 shake128 2 Q0106006780bde5e3bbbfd8c59b5775fd0ac7fb3026027e9814b1d3062569146d1b52f349b86d53 0.00000000 shake128 3 Q02090081f7e33cc535ca6ca54305f7d34cf2cd9620b1efcae657a76ca4c072902dfc4ed0f23a4a 0.00000000 shake256 If the wallet file is encrypted your new address will also be encrypted using the same passphrase you setup originally. Remove a QRL Address If you need to remove an old address from your wallet you can use the wallet_rm command. This will permanently remove the address. Without the private keys from the address you will not be able to recover this address. If you are not sure print the private keys and write them down Before you remove the address. qrl wallet_secret --wallet-idx 2 To remove an address enter the following into the command line: qrl wallet_rm If you know the idx of the address you can specify by using the --wallet-idx option. You will be prompted for some information and the address will be removed from the wallet. qrl -v wallet_rm --wallet-idx 2 You are about to remove address [2]: Q0106006780bde5e3bbbfd8c59b5775fd0ac7fb3026027e9814b1d3062569146d1b52f349b86d53 from the wallet. Warning! By continuing you risk complete loss of access to this address if you do not have a recovery Mnemonic/Hexseed. Do you want to continue? [y/N]: y Wallet at : /home/ubuntu/.qrl Number Address Balance Hash ---------------------------------------------------------------------------------------------------------------- 0 Q000600f1afe2a5d8247779795f0eb0d5225e5fe7b91bcb38c614b5a62fa3df0f5cfe92e6355ace 239.98000000 sha2_256 1 Q010600898e7cc45431c95a1e5a415c0f3d223620332becd43db92727a4900472198650e1775e4b 0.00000000 shake128 2 Q02090081f7e33cc535ca6ca54305f7d34cf2cd9620b1efcae657a76ca4c072902dfc4ed0f23a4a 0.00000000 shake256 Transfer QRL Between Addresses The process of sending QRL between addresses in the same wallet is exactly the same as above you simply enter the second address. While the addresses may be in the same wallet they are independent XMSS trees and require a transaction to send between. qrl tx_transfer --src 0 --dst Q02090081f7e33cc535ca6ca54305f7d34cf2cd9620b1efcae657a76ca4c072902dfc4ed0f23a4a --amounts 5.25 --fee 0.01 --ots_key_index 2 After the transaction has propagated through the network you will see the balance in the newly created wallet with the qrl wallet_ls command. Print QRL Addresses To view all available addresses in the wallet index use: qrl wallet_ls Wallet at : /home/ubuntu/QRL_TEST Number Address Balance ----------------------------------------------------------------------------------------------------- 0 Q000600f1afe2a5d8247779795f0eb0d5225e5fe7b91bcb38c614b5a62fa3df0f5cfe92e6355ace 234.72000000 1 Q010600898e7cc45431c95a1e5a415c0f3d223620332becd43db92727a4900472198650e1775e4b 0.00000000 2 Q02090081f7e33cc535ca6ca54305f7d34cf2cd9620b1efcae657a76ca4c072902dfc4ed0f23a4a 5.25000000 The wallet_idx is the number to the left in the output of the terminal. CLI Help All command line options have a help file available to assist in the use of the command. Simply add the --help option to the end of any command to see the help. qrl --help Usage: qrl [OPTIONS] COMMAND [ARGS]... QRL Command Line Interface Options: -v --verbose verbose output whenever possible --host TEXT remote host address [127.0.0.1] --port_pub INTEGER remote port number (public api) [19009] --wallet_dir TEXT local wallet dir --json output in json --version Show the version and exit. --help Show this message and exit. Commands: slave_tx_generate Generates Slave Transaction for the wallet state Shows Information about a Node\'s State token_list Fetch the list of tokens owned by an address. tx_inspect Inspected a transaction blob tx_message Message Transaction tx_multi_sig_create Creates Multi Sig Create Transaction that... tx_multi_sig_spend Transfer coins from src to dsts tx_push Sends a signed transaction blob to a node tx_token Create Token Transaction that results into... tx_transfer Transfer coins from src to dsts tx_transfertoken Create Transfer Token Transaction which... wallet_add Adds an address or generates a new wallet... wallet_decrypt wallet_encrypt wallet_gen Generates a new wallet with one address wallet_ls Lists available wallets wallet_recover Recovers a wallet from a hexseed or mnemonic... wallet_rm Removes an address from the wallet using the... wallet_secret Provides the mnemonic/hexseed of the given... You can browse even further into sub commands like: qrl tx_transfer --help Usage: qrl tx_transfer [OPTIONS] Transfer coins from src to dsts Options: --src TEXT signer QRL address --master TEXT master QRL address --dsts TEXT List of destination addresses --amounts TEXT List of amounts to transfer (Quanta) --message_data TEXT Message (Optional) --fee DECIMAL fee in Quanta --ots_key_index INTEGER OTS key Index (1..XMSS num signatures) --help Show this message and exit."
4,932
QRL Wallet App
QRL Wallet App
This is the QRL wallet application developed by The QRL team, and hosted on wallet.theqrl.org It provides both web and desktop interfaces using Meteor, Semantic UI, NodeJS and Electron. All secure XMSS operations are run in a web assembly compiled version of qrllib locally in your browser or desktop application. Keys stay in the memory space of the XMSS object, which is destroyed the moment you close the wallet, browser window or desktop application. Development Dependencies The following dependencies are required for a functional local development environment. NodeJS v8.9.3 Meteor qrl-electrify chimp If you are using windows you will need to install a few extra packages. Windows Only Build Tools for Visual Studio 2017 node-gyp Install Required # Install qrl-electrify npm install -g qrl-electrify Chimp.js Instructions and information for chimp can be found over at the chimp github # Install chimp npm install -g chimp Install Windows Only Required Build Tools for Visual Studio 2017 Windows Only - node-gyp npm install -g node-gyp Install qrl-wallet git clone https://github.com/theQRL/qrl-wallet.git cd qrl-wallet meteor npm install --unsafe-perm cd .electify npm install cd .. Run Meteor meteor Run Tests Note: meteor must already be running for this to work! chimp --ddp=http://localhost:3000 --watch --path=tests Run Electron Client electrify Package Electron Client mkdir .electrify/.dist electrify package -o .electrify/.dist/
341
QRL Token Migration Guide
QRL Token Migration Guide
Preamble From June 26th, 2018 to June 15th, 2019 there was an automatic token migration guide where people were able to generate their own ERC20 burn address and send QRL (ERC20) to and have QRL (mainnet) arrive in their mainnet address in 24 to 72 hours. After June 15th, 2019, this automatic token migration is no longer possible. New token migration instructions Step 1: Email support@theqrl.org with a QRL mainnet address (QRL addresses that start with a Q). Step 2: Support (via support@theqrl.org) will evaluate whether to migrate and respond to the user with an ETH ERC20 burn address. Step 3: If applicable, send QRL ERC20s to the ETH burn address sent via email. Step 4: QRL mainnet address provided in the first email will be sent Quanta at a 1:1 ratio to ERC20s burnt. Step 5: User will now have 1 Quanta in their QRL address for every 1 ERC20 they sent to their burn address
249
QRL Integration Tests
QRL Integration Tests
This project periodically runs integration tests on a 6 node testnet How to run integration tests Clone this repo You will need at least python 3.5 Installing Docker CE / Docker compose Follow the corresponding instructions: OS Link Windows Docker for Windows Linux https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/ OSX https://docs.docker.com/docker-for-mac/install/   # Install docker compose bashpip3 install docker-compose Start Integration Tests INFO: Make sure you have PYTHONPATH set (e.g. export PYTHONPATH=$(pwd)) otherwise you could receive ModuleNotFoundError # Run pytest pytest # To run a specific scenario use -m flag pytest -s -m runfor10minutes" # To avoid running a scenario pytest -s -m "not runfor10minutes"` How it works (short explanation) qrlnet The qrlnet directory contains all the scripts to start a qrl network from scratch. qrlnet/start_net.sh is the main script. There are a few arguments that are particularly useful: REPO_XXX # allow for launching this local testnet using source code from a different repo/branch LOCAL_NET_ONLY # option indicates that nodes should be isolated and should not connect outside the integration test. INTEGRATION_TESTINPLACE # Indicates that source code should not be retrieved. This is used to run the integration tests locally. In particular as a submodule as it is done in https://github.com/theQRL/QRL When the script is executed it will launch several docker-compose nodes/containers. Each node will run qrlnet/node_scripts/start.sh This scripts prepares the container to run a qrl node (user permissions etc.) Finally each node will switch to testuser and start a node This local network could be used for any purposes. pytest At the moment a few example tests derive from TestLogParser. This base class starts a network and allows for monitoring the logfiles of the running nodes. A few very simple tests like checking that nodes sync or throw exceptions can be done. However this is not ideal and are just examples as a proof of concept. We expect to extend test to go through the grpc API use direct CLI interact directly with the network configuration etc. Example: Use something similar to qrlnet/nodes_scripts/docker_helper.py Using the Docker SDK it is possible to determine each node IP address based on their name and run commands or scripts directly inside the corresponding containers using exec_run https://docker-py.readthedocs.io/en/stable/containers.html This way it would be possible to test the CLI or node.js apps (wallet/explorer) from inside the container. More complex tests could confirm transfers by running CLI on more than one node. The Docker SDK could be also use to model network issues/errors. etc. Limitations The integration tests have been designed to run primarily in Travis/Ubuntu. We would like to move to CircleCI in near future. Docker for Mac has some limitations that result in problems when trying to connect from the host to the containers. https://docs.docker.com/docker-for-mac/networking/#known-limitations-use-cases-and-workarounds Typically in Linux you can route traffic between your host and each of the containers without trouble using a Bridge. This is unfortunately not possible in OSX."
753
Known Issues
Known Issues
Known Issues There are a few known issues we have come across due to the shared software ecosystem upstream of QRL. While we strive to overcome programmatically any issues, sometimes there are situations where limitations exist outside of the QRL scope. This document is intended to clear up any issues seen when installing and running The QRL software. Individual components of our open source work have issues tracked on Github, and those which are important enough to need a wider audience than the developer community are documented here. We strive to work through and provide secure, audited code in all of the official channels we operate. Ledger Nano The QRL has developed and integrated QRL’s XMSS address scheme into the Ledger Nano S and have successfully launched an app with the oversight of the Ledger developers. As with any evolving ecosystem, there are growing pains to be worked through. We are in the process of implementing updates to our Ledger Javascript library to make use of the updates recently released by Ledger to the software development kit. If you come across something not working as you would expect please report it to the team in a github issue. theQRL Ledger GitHub Known Issues Github Issue Number Issue Name Description Impact NONE U2F Timeout The browser will timeout with a “U2F Timeout” warning when attempting to transfer QRL from a Ledger, showing a consumed OTS key on the device. Sending funds will not succeed as expected, and the OTS counter on the Ledger will become out of sync U2F Timeout Ledger devices have been using the U2F protocol for easy and cryptographically secure second factor mechanism with the web browser since 2016. Lately, U2F timeouts have been enforced by browser applications more aggressively — which you may have noticed if you’ve ever experienced a “U2F timeout” warning. The Error - While attempting to transfer or sign a TX on the network, the browser will attempt unsuccessfully to sent the signed TX to the blockchain. This will eventually fail and show a failed message in the wallet screen. Additionally there will be an error message shown in the developer tools of the browser. indicating a “U2F Timeout” has occurred. Mitigation - Previously, we’ve recommended using another browser or playing browser bingo, switching to a browser that will still function with the U2F requirements of the Ledger. The new current recommended action is to use our desktop wallets, which can be found on the front page of our website and our github releases page. You can read more about the development of U2F tunnel transport for Ledger devices in their blog Windows 10 Update: Sunsetting U2F tunnel transport for Ledger devices. If you have attempted to send a TX with your ledger device connected to a Chrome, Brave, Opera, or Firefox browser and are showing and erroneous OTS key, you can reset the ledger device OTS key count. See the tools section of your opened wallet using the desktop application. Make Sure you have not used any keys successfully prior to resetting the ledger QRL Node - Python There are a few known issues that have been found in the QRL python node, mostly related to twisted. The chart below lists all of the known issues that have been reported to date. If you have come across something not working as you would expect please report it to the team in a github issue. theQRL GitHub Known Issues Github Issue Number Issue Name Description Impact 750 Segmentation fault Upon updating the QRL node issuing the pip3 install -U qrl command will throw a Segmentation Fault (Core Dumped) error None, the node continues to operate as expected, and does infact update to the latest code. 1611 Too many open files When the known_peers file grows too large, Linux throws an issue Minor - The node will continue through the issues keeping to the limits set and will take a bit longer to startup. Segmentation Fault Updating a QRL node, sometimes you run into this error upon python completing the command pip3 install -U qrl. The node does in fact update, however due to the Twisted module used throws this error. The Error - Segmentation fault (core dumped) You can immediately run start_qrl and you will find that the node has in fact been updated to the latest code.
894
QRL Command Line
QRL Command Line Commands
qrl-cli balance ADDRESS qrl-cli create-wallet qrl-cli generate-lattice-keys qrl-cli generate-shared-keys LATTICEPK LATTICESK [CYPHERTEXT] [SIGNEDMESSAGE] qrl-cli get-keys qrl-cli help [COMMAND] qrl-cli notarize DATAHASH qrl-cli ots ADDRESS qrl-cli receive ADDRESS qrl-cli search SEARCH qrl-cli send [QUANTITY] qrl-cli send-message qrl-cli sign-tx-offline QUANTITY OUTPUT qrl-cli status qrl-cli validate ADDRESS
154
QRL Private Network
QRL Private Network
Setting up a private QRL network allows a developer to test making QRL transactions without placing funds at risk or relying on external infrastructure. This is intended to help the development and advancement of external systems. This documentation assumes that you have already followed the QRL node installation instructions Configuring config.yml In order to run a private chain, you need to create ~/.qrl/config.yml with following content at minimum. See genesis_difficulty: 500 mining_enabled: True peer_list: [] Description: Parameter Type Description genesis_difficulty UInt64 Initial difficulty to mine the block. The lower the value the easier it will be to mine the first block. mining_enabled Boolean Enable or disables mining peer_list String[] List of strings containing “ip:port”. It overrides the default peer list. Note: If you previously ran QRL mainnet on the same node then you need to delete ~/.qrl/data/ Running QRL Node start_qrl --miningAddress Q010800dd14a340e6daf28d4dab9e42a534177db5bf06ef1bb300452f606a17331bacca9453aac1 --mockGetMeasurement 1000000000 Description: Parameter Type Description miningAddress String Any valid QRL address on which mining rewards will be credited. mockGetMeasurement Uint64 A higher mockGetMeasurement eases it for the hardware to mine the blocks. It simply makes the difficulty constant. The value 1000000000 is enough to mine using very low end hardware.
328
QRL Address Structure
QRL Address Structure
A QRL address is designed to be extensible and supports a wide range of formats. The first three bytes of any address (descriptor) encode information to describe the format type, signature scheme, etc. At the moment, only one address format is supported: SHA256_2X As an example, when using SHA2562X, a QRL address is composed of 39 _bytes. This is the internal format used by any API or module in the project. For representational purposes (i.e. user interface, debugging, logs), it is possible that the address is represented as a hexstring prefixed with Q (79 ascii characters). This is appropriate for user related purposes but will be rejected by the API. A typical account address should look similar to this when exposed to users: Q01070050d31c7f123995f097bc98209e9231d663dc26e06085df55dc2f6afe3c2cd62e8271a6bd The structure and address formats are explained in detail in the following sections/tables. Structure QRL addresses are structured in the following way: Name Bytes Count Description DESC 0 .. 2 3 Address Descriptor DATA 3 .. N ?? N will depend on the address format Descriptor The address descriptor determines the address format, signature scheme, hash function, etc. Name Bits Count Description HF 0 .. 3 4 Hash Function SIG 4 .. 7 4 Signature Scheme P1 8 .. 11 4 Parameters 1 (ie. height, etc.) P2 12 .. 15 4 Address Format P3 16 .. 23 8 Parameters 2 SIG - Signature Type Value Description 0 XMSS 1 .. 15 Reserved - Future expansion HF - Hash Function Value Description 0 SHA2-256 1 SHAKE-128 2 SHAKE-256 3 .. 15 Reserved - Future expansion AF - Address Format Value Description 0 SHA256_2X 1 .. 15 Reserved - Future expansion Address Formats Format: SHA256_2X Name Bytes Count Description DESC 0 .. 2 3 Address Descriptor HASH 3 .. 35 32 SHA2-256(DESC+PK) VERH 36 .. 40 4 SHA2-256(DESC+HASH) (only last 4 bytes) PK (64 bytes) is public key ePK (67 bytes) is the extended public key, i.e. DESC+PK SHA256(ePK) (32 bytes) is used as described in the table Important: Addresses are composed by 39 bytes. This is the internal format used in any API or module. For representational purposes (i.e. user interface, debugging, logs), it is possible that the address is represented as a hexstring prefixed with Q (79 ascii characters). This is appropriate for user related purposes but will be rejected by the API. It is recommended that where addresses are shown to users (block explorer, web-wallet and other components) they are displayed with the Q prefix for identification purposes. It is possible to determine valid addresses by checking the descriptor and VERH bytes. Signature Schemes XMSS In the case of using XMSS. The parameters are used as follows: Name Bits Count Description HF 0 .. 3 4 SHA2-256, SHAKE128, SHAKE256 SIG 4 .. 7 4 XMSS P1 8 .. 11 4 XMSS Height / 2 AF 12 .. 15 4 Address Format P2 16 .. 23 8 Not used Seed / Extended Seed Seed (48 bytes): Not presented to users. Users instead have access to the extended seed. Important: The seed is not enough to reconstruct an address because it does not include information about the signature scheme and corresponding parameters. Extended Seed (51 bytes): User typically have access to a composed seed that include the descriptor as a prefix. HexSeed (102 bytes): Extended seed represented as a hexadecimal number in ASCII characters. This is used for representational purposes and never used in the code or API. Mnemonic (34 words): Each word represents 12-bits. A mnemonic can be converted to an Extended Seed A npm module is available to perform validation of and extract descriptive data from QRL addresses: https://github.com/theQRL/validate-qrl-address
875
Explorer API
Explorer API and Methods
The QRL block explorer has been built with an API endpoint to enable an easy way for developers to grab data from the QRL blockchain. This endpoint is limited in scope and may change in future iterations of the explorer. The Explorer API queries the explorer node infrastructure and returns a response in either JSON or text. This is intended to simplify the process of developing tools for the QRL. The Explore endpoint is reached at explorer.theQRL.org. The API response can be either text or json depending on the developers needs. By default JSON is returned, simply append /text to the API query. Far an easy to read output use a browser add-on like Chrome’s jsonview and browse to the endpoint. Explorer API Methods Default response is in JSON format Append /text to the end of most requests to get a simple text response https://explorer.theqrl.org/api/{REQUEST}/text Method Name Endpoint Description Block /api/block/# Get data from a specific block number Transaction /api/tx/ Get data from a transaction by number Address /api/a/ Get data from an address Emission /api/emission Get the total emission of coins to date reward /api/reward Get the current payout reward value rewardshor /api/rewardshor Get the current reward in shor blockheight /api/blockheight Get the current blockheight status /api/status Get the status of the network
299
QRL Docker Node
QRL Docker Node
The QRL node is now easier than ever to run on most current hardware and operating systems using the Docker container system. CLI Running in a container simplifies the install process enabling the QRL node to be run from windows and mac in an easy way. Once docker is installed its basically a one step install. QRL Docker Install Follow the Official Docker Instructions to get setup and running with the Docker Engine. Once complete return here to install the QRL Node in a container and get started. Install Docker Install Docker Desktop on Windows Install Docker Desktop on Mac Linux Instructions Its recommended to configure Docker to start on boot to ensure docker is running after a system reboot. Instructions can be found on the docker documentation depending on your OS. Install qrl-node With a working Docker install pull the latest qrl-node from Docker Hub docker pull qrledger/qrl-docker:bionic Start qrl-node Now with the latest image loaded create the container and start the QRL node. docker run -d --restart always --name qrl-node qrledger/qrl-docker:bionic Explanation of these commands docker run -d Starts the container in a daemon process - -restart always This ensures the node will restart upon a reboot –name qrl-node gives the container a name to run that you will know qrledger/qrl-docker:bionic Defines the image to build the container from This should start a new container named qrl-node and begin the node syncing the blockchain. This process takes some time to become fully synced as the chain is downloaded from peer nodes. To check the progress of the node you can execute a command in the container with the docker command. docker exec -it qrl-node qrl --json state This will print out relevant information on the nodes status. Example from a syncing node { info": { "blockHeight": "258635" "blockLastHash": "ZDlgPculrG6GcC51+x/TpWRXe3IjO7vuBlzWwQAAAAA=" "networkId": "The sleeper must awaken" "numConnections": 4 "numKnownPeers": 3003 "state": "SYNCED" "uptime": "87805" "version": "1.1.15 python" } } Check with the QRL block explorer to see the current block height compared to your node. At time of writing this node was at "blockHeight": "258635" while the network is at blockheight 842349 still some syncing to do! Notable Commands Here is a short list of some available commands to help with the docker container and the QRL node. Install QRL Node and dependencies docker pull qrledger/qrl-docker:bionic Start the node in a container and restart on reboot docker run -d --restart always --name qrl-node qrledger/qrl-docker:bionic Enter the container in an interactive bash shell This will enter the qrl-node container allowing interaction with the node and container file system. docker exec -it qrl-node bash Get Node Stats This pulls the latest node state from the container. docker exec -i -t qrl-node qrl state QRL Node Commands To print a full list of available node commands docker exec -it qrl-node qrl Create a wallet Will create a new wallet file in the home directory of the default qrl user inside of the container. You will be prompted to enter an encryption passphrase. docker exec -i -t qrl-node qrl wallet_gen --encrypt For more information on running the QRL Node and various commands please see our Node Documentation. Windows users Use PowerShell and run as an Administrator before running the Docker CLI commands."
800
QRL Node Configuration
QRL Node Configuration
The QRL node can be configured in multiple ways to utilize various features in different ways. You may have some specific requirements for running behind a firewall or other edge cases. To accommodate this, QRL uses a configuration file found in the root qrl directory ~/.qrl/config.yml this file contains all of the directives available to the user. You will find these configuration options as the default settings, commented out. For a great guide on .yml file layouts see this YAML to JSON Cheat sheet Grab a copy of the file here https://docs.theqrl.org/node/config.yml. Also shown at the bottom of this page. Configuration Directives Below are all of the options, with explanations. You will find the config file has some comments, we explain in more detail here. Mining Configuration This section covers all of the required settings needed to setup and mine QRL on a local node. Mining Directive Default Value Description mining_enabled false Allows the QRL node to mine blocks on the network mining_address Address of the wallet to mine to (where mined coins wil go) mining_thread_count 0 0 to auto detect thread count based on CPU/GPU number of processors Ephemeral Configuration Ephemeral messaging configuration details are shown below. Ephemeral Directive Default Value Description accept_ephemeral true   outgoing_message_expiry 90   Cache Size Directive Default Value Description lru_state_cache_size 10   max_state_limit 10   P2P Configuration Directive Default Value Description enable_peer_discovery true Allows to discover new peers from the connected peers   p2p_local_port 19000 Locally binded port at which node will listen for connection p2p_public_port 19000 Public port forwarding connections to server peer_rate_limit 500 Max Number of messages per minute per peer ban_minutes 20 Allows to ban a peer’s IP who is breaking protocol monitor_connections_interval 30 Monitor connection every 30 seconds max_peers_limit 100 Number of allowed peers chain_state_timeout 180   chain_state_broadcast_period 180 must be less than ping_timeout transaction_pool_size 25000   pending_transaction_pool_size 75000 1% of the pending_transaction_pool will be reserved for moving stale txn stale_transaction_threshold 15 15 blocks peer_list: List of available peers with open public API ports 35.178.79.137 35.177.182.85 18.130.119.29 18.130.25.64 ntp_servers: List of NTP servers for the node to use pool.ntp.org ntp.ubuntu.com ADMIN API CONFIGURATION Directive Default Value Description admin_api_enabled false   admin_api_host 127.0.0.1   admin_api_port 19008   admin_api_threads 1   admin_api_max_concurrent_rpc   PUBLIC API CONFIGURATION Directive Default Value Description public_api_enabled true   public_api_host 0.0.0.0   public_api_port 19009   public_api_threads 1   public_api_max_concurrent_rpc   MINING API CONFIGURATION Directive Default Value Description mining_api_enabled false   mining_api_host 127.0.0.1   mining_api_port 19007   mining_api_threads 1   mining_api_max_concurrent_rpc 100   DEBUG API CONFIGURATION Directive Default Value Description debug_api_enabled false   debug_api_host 127.0.0.1   debug_api_port 52134   debug_api_threads 1   debug_api_max_concurrent_rpc 100   GRPC PROXY CONFIGURATION Directive Default Value Description grpc_proxy_host 127.0.0.1   grpc_proxy_port 18090   p2p_q_size 10000   outgoing_message_expiry 90 Outgoing message expires after 90 seconds WALLET DAEMON CONFIGURATION Directive Default Value Description public_api_server 127.0.0.1:19009   wallet_daemon_host 127.0.0.1   wallet_daemon_port 18091   WALLET API CONFIGURATION Directive Default Value Description wallet_api_host 127.0.0.1   wallet_api_port 19010   wallet_api_threads 1   wallet_api_max_concurrent_rpc 100
957
OTS Key Index
OTS Key Index
When you create a new wallet you create an XMSS tree, which is comprised of many public-private key pairs below a merkle tree to make a signature scheme. Every signature is referenced as your OTS index or One Time Signature key index. One-time signatures (OTS) are called one-time, because the accompanying security reductions only guarantee security under single-message attacks. The first post-quantum signature schemes considered for standardization are hash-based Merkle Signature Schemes. These schemes form the most confidence-inspiring post-quantum solution for digital signatures as their security only relies on some mild assumptions about properties of cryptographic hash-functions. The OTS key index is limited. Once this index is used you will no longer be able to sign transactions. This can not be stressed enough! If you use all of your OTS Key Indexes with funds in the wallet, these funds will be lost. Important OTS Info The OTS index or the One-Time Signature index is used when you sign a transaction onto the network. You are required to specify which OTS index to use from the wallet file you have created. Depending on the tree height you selected when setting up the wallet you will start with anywhere from 16 to 262,144 OTS indexes. You may not re-use any OTS key index. The QRL blockchain will reject any duplicated OTS key use automatically. This is done by design. If all OTS indexes are used, transactions cannot be signed. This means that if funds are in a wallet where all the one-time signatures have been used you will not be able to transfer out of the wallet and their contents will be lost. This applies for any tokens present in the wallet as well as Quanta It is recommended to track the use of the OTS key and transfer all remaining funds to a newly created wallet before all of the OTS keys are exhausted. XMSS Tree Height You may chose to create a address with more or less OTS keys. The only disadvantage for creating a larger tree height is the time required to generate the additional keys. This can be configured only when an address is created. Tree Height Available Keys 8 256 10 1,024 12 4,096 14 16,384 16 65,536 18 262,144 If needed you can create an additional slaves.json file with up to 100 slave OTS keys allowing for additional TX’s using the same QRL address. For more information please see the Slaves.json documentation OTS Bitfield Tracking To aid in keeping track of the OTS keys used, QRL utilizes OTS Bitfield tracking. This allows a way to keep track of the first 8192 OTS keys and can determine where you are in the merkle tree based on previously used keys. There are a few oddities with the OTS keys. First the OTS bitfield will only automatically track every OTS keys usage up to position 8192. The first 8192 keys can be used in any order, jumping around here is OK. Once you have advanced past the bitfield limit, you must use the keys in ascending order, as the last valid OTS position is recorded with a counter. Beyond the bitfield limit if you skip ahead and miss an OTS key position you will not be able to return back below that position and make a valid transaction. Keys Info 0 –> 8191 Bitfield tracks the use. May be used in any order 8192 –> Last OTS Must be used in ascending order - cannot return to sign below last OTS position Checking Used OTS The QRL Explorer provides a visual representation of the OTS Bitfield for any wallet. This can be found by looking up your address in the explorer, and browsing to the OTS Tracker tab. OTS Tracker Tab This tab will show all of the OTS keys that have been used in red and available keys in green. This is a visual representation of the bitfield that is tracked by the nodes and used by both the wallet and the explorer. OTS Tracker Tab Merkle tree signature schemes Whilst one-time signatures provide satisfactory cryptographic security for signing and verifying transactions they have a major drawback that they may only be used once safely. If a ledger address is based upon some transformation of the public key of a single OTS key pair then this would lead to an extremely restrictive blockchain ledger where all funds from a sending address would need to move with every single transaction performed - or those funds would be at risk of theft. A solution is to extend the signature scheme to incorporate more than one valid OTS signature for each ledger address allowing as many signatures as OTS key pairs are pre-generated. A binary hash tree known as a merkle tree is a logical way to achieve this. Merkle Tree Signature Scheme The general idea behind a merkle tree is an inverted tree composed of parent nodes computed by hashing the concatenation of child sibling nodes upwards in layers to the root. The existence of any node or leaf can be cryptographically proven by computing the root. A merkle tree is formed from n base leaves and has height to merkle root, h (n = 2h) - starting from the leaf hashes (layer 0) and counting upwards with each layer of nodes. Each leaf node is created in our hypothetical ledger use-case by hashing a randomly pre-generated OTS public key. From the image above it can be seen that the node above each pair of leaf hashes is itself formed by hashing a concatenation of the child hashes. This continues upwards through layers of the tree until confluence into the root hash of the tree, known as the merkle root. From the example tree in the diagram, taking the merkle root as the public key, four pre-computed OTS keypairs can be used to generate four cryptographically secure valid one-time signatures. The merkle root of the binary hash tree can be transformed into a ledger address (possibly by iterative hashing with an appended checksum). A full signature, S, of a message, M, for a given OTS keypair includes: the signature, s, the ots key number, n, and the merkle authentication path. i.e. for OTS keypair 0 (thus n = 0): S = s, n, OT S public key 0, H1, H2, H5, H6, root Given the OTS public key and leaf hash can be deduced from s, and parent nodes can be computed from their children in fact this may be shortened to: S = s, n, H2, H6, root Where S is valid by verifying the OTS public key from s and M, then checking the hashes from the merkle authentication path recreate a matching merkle root (public key). XMSS XMSS Construction The extended merkle signature scheme (XMSS) was first reported by Buchmann et al. in 2011 and was published as an IETF draft last year. It is provably forward secure and existentially unforgeable under chosen message attacks with minimal security requirements: a PRF and a second pre-image resistant hash function. The scheme allows extension of one-time signatures via a merkle tree with a major difference being the use of bitmask XOR of the child nodes prior to concatenation of the hashes into the parent node. The use of the bitmask XOR allows the collision resistant hash function family to be replaced. XMSS Tree Construction The leaves of the tree are also not OTS key pair hashes but the root of child L-trees which hold the OTS public keys with, l pieces forming the base leaves. Winternitz OTS+ is used for the one-time signatures (though 2011 variant was first described). References Oops, I did it again – Security of One-Time Signatures under Two-Message Attacks - Leon Groot Bruinderink and Andreas Hülsing QRL Whitepaper (PDF)
1,644
QRL Testnet Node
QRL Testnet Node
This guide will explain the installation and configuration of a Testnet node running on the latest QRL code base. Interacting with the QRL network while developing can present some complications especially when dealing with live currency. There are situations where having a Testnet to interact with is beneficial. The QRL testnet is exactly that. Our testnet network includes the latest code changes improvements and releases that are in testing and at times may be unstable. It is a testnet after all. Testnet will restart frequently as patches are made. Official postings will be made to alert users of these resets where achievable. Please join our Discord Server for announcements or to get in touch with the team. There is no value associated with the Testnet QRL It’s only used for testing and developing with the QRL. Never use a QRL address on both networks! OTS keys should never be re-used even on separate networks. Testnet Installation With the latest updates to the code it is even easier to run a testnet node. Simply pass a command flag when the node is started and all of the required configuration and setup happens automatically. This should lower the bar for anyone wanting to run our node. Additionally starting a node with the start_qrl --network-type testnet flag will create a new directory placing all of the testnet chain sate files and other data into a newly created directory ~/.qrl-testnet This simplifies migration from testnet to a Main-Net node on the same system as there is no longer the need to clear out any contents to switch between networks. Requirements The basic requirements for a QRL Testnet node are exactly the same as running a full node on Main-Net. These are requirements for the QRL node software to operate. Support for AES-NI Support for avx2 (Used by keccak library for hashing functions) HDD with enough storage for the blockchain as it grows Reliable network connection Python 3.6 64 bit processor Install QRL Below are abridged instructions for installing QRL on Ubuntu. These instructions are identical to the full node setup. Please refer to the QRL Node Install Doc for further information on installing the QRL Python Node. # Update and Upgrade packages sudo apt update && sudo apt upgrade -y # Install Required dependencies sudo apt-get -y install swig3.0 python3-dev python3-pip build-essential pkg-config libssl-dev libffi-dev libhwloc-dev libboost-dev cmake ## Install CMAKE version 3.10.3 manually cd /opt && sudo wget https://github.com/Kitware/CMake/releases/download/v3.10.3/cmake-3.10.3.tar.gz && sudo tar zxvf cmake-3.10.3.tar.gz && cd cmake-3.10.3/ && sudo ./configure && sudo make -j2 && echo -e '## Adding cmake version 3.10.3\nPATH=$PATH:/opt/cmake-3.10.3/bin' >> ~/.bashrc && source ~/.bashrc # Make sure setuptools is the latest pip3 install -U setuptools # Install QRL pip3 install -U qrl Once this is complete you can check the status of the QRL install by passing the qrl --version command. It should print the latest version that matches the Github Repo Start The QRL Node Now that we have QRL installed begin syncing the Testnet node. start_qrl --network-type testnet The Testnet node will sync the entire blockchain to your computer. after syncing the chain you will begin seeing blocks added. Config.yml File This file is automatically placed in the correct directory no longer requiring any user interaction. You will find this in the ~/.qrl-testnet directory after starting the Testnet node for the first time. The configuration file tells the node where to look for peers to connect to what to expect for network settings difficulty etc. Have a look at the Configuration Documentation for more information on other configuration options. Below is an example of what you will find in the configuration file after starting the Testnet node. The details may change as the node is developed and the network is reset over time. peer_list: [ 18.130.83.207" "35.176.41.49" "18.130.187.220" "35.176.33.242" ] genesis_prev_headerhash: 'The Testnet Genesis' genesis_timestamp: 1530004179 genesis_difficulty: 5000 db_name: 'testnet-state' Genesis.yml File This file is now created automatically when you start the Testnet node. Simply start the qrl node passing the new start_qrl --network-type testnet Updating Testnet Nodes If you are running a Testnet node you will need to keep up to date as we reset testnet periodically. Each time the network is updated you will need to refresh some files and restart the node. Look for messages from the QRL team in the chat on Discord for updates to testnet. Updating Is Simple Stop the node Update QRL pip3 install -U qrl Remove the ~/.qrl-testnet/data directory Remove the ~/.qrl-testnet/genesis.yml file Remove the ~/.qrl-testnet/config.yml file Restart the node using start_qrl --network-type testnet The last command will pull down and relocate the config.yml and genesis.yml files into the correct ~/.qrl-testnet directory with the latest Testnet configurations. This should start syncing the testnet network to your computer. Verify that the details match what you expect issuing the qrl state command. The blockheight and network_id should be updated with the latest details and match what is shown on the Testnet Explorer. Mining TestNet We encourage people to set their nodes on Testnet to allow mining. This is a great way to earn some test QRL and helps the small network validate transactions and propagate blocks more efficiently. Please note that most virtual private server providers dis-allow mining operations on shared resources. This may end up in a ban from the 3rd party system. There is no need for mining pools and GPU mining on the testnet save that hash power for the real network. Testnet QRL is not traded and is not worth any real value. This is only a test… Enable Mining To enable mining on your Testnet node simply add the following to the ~/.qrl/config.yml file and restart the node to pickup the changes. mining_enabled: True mining_address: 'TESTNET_QRL_ADDRESS_HERE' mining_thread_count: 0 If you are in need of some QRL for testing on the TestNet head over to the faucet and enter your Testnet address. You can find the link below. You will also find a link to the testnet wallet below in case you need one of those too. Testnet Links Some helpful links for the Testnet network. Since this is a completely separate blockchain we need to use the testnet wallet and block explorer. testnet-wallet.theqrl.org testnet-explorer.theqrl.org testnet-faucet.qrl.tips"
1,555
QRL Node
QRL Node
Running a QRL node strengthens the network supports the decentralization and further verifies transactions on the network. This is an essential function of the decentralized architecture QRL relies on. This allows you to run a private secure node to communicate with the QRL blockchain. You can use the node to connect the explorer wallet and ephemeral messaging features to the gRPC QRL functions. There are various options available for connecting to the API and setup options for the node can be configured through a user set configuration file. Requirements You can run QRL on most operating systems though Ubuntu 16.04 is recommended. Support for AES-NI Support for avx2 (Used by keccak library for hashing functions) HDD with enough storage for the blockchain as it grows Reliable network connection Python3.6 64 bit processor tl;dr Abridged instructions for installing QRL on Ubuntu: # Update and Upgrade packages sudo apt update && sudo apt upgrade -y # Install Required dependencies sudo apt-get -y install swig3.0 python3-dev python3-pip build-essential pkg-config libssl-dev libffi-dev libhwloc-dev libboost-dev cmake # Make sure setuptools is the latest pip3 install -U setuptools # Install QRL pip3 install -U qrl If things worked correctly you will now find the start_qrl package and the qrl package. Adding the --help flag to each will print the various function details. Getting Started Installing QRL is simple and is possible on most modern operating systems. The install relies on python3.5 or newer and the pip3 python package install system. Update and Dependencies You will need to start with a fully updated system. You will also need a few additional packages depending on your setup. See the correct section for your OS and install all of the requirements. Ubuntu Install Ubuntu Node Update your system ensuring you have the latest packages: # Issue the following command to update software sudo apt update && sudo apt upgrade -y Now install all the required dependencies: # Install the required packages for QRL sudo apt-get -y install swig3.0 python3-dev python3-pip build-essential pkg-config libssl-dev libffi-dev libhwloc-dev libboost-dev cmake pip3 install -U setuptools Start the QRL ndoe start_qrl Update Ubuntu Node First stop your node with ctrl+c. Then double check you have the required dependencies installed sudo apt-get -y install swig3.0 python3-dev python3-pip build-essential pkg-config libssl-dev libffi-dev libhwloc-dev libboost-dev cmake pip3 install -U setuptools After that update your node with pip3 pip3 install -U qrl When you’re done updating don’t forget to start your node again! start_qrl Redhat/fedora Update: # Update dnf update Dependencies: # Install required packages dnf install swig cmake gcc gcc-c++ redhat-rpm-config python3-devel python-devel hwloc-devel boost-devel MacOS To build in OSX Please install brew if you have not already. # Install brew with /usr/bin/ruby -e $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" This will prompt you through a few questions while it installs. Having Issues? Please follow the instructions found at the brew main page: https://brew.sh/ # Update brew brew update brew install python3 swig boost hwloc You will need to install cmake v3.10.3 manually. Please follow the guide from the cmake documantation Windows 10 Windows support in the current version is limited. An alternative is to install Ubuntu using the Linux Subsystem for Windows. Ubuntu on Linux Subsystem for Windows (WSL) You can run a full node in Windows utilizing the Windows Subsystem for Linux. There are a ton of guides out there on setting this up. Here are a few links to get you going. The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows alongside your traditional Windows desktop and modern store apps. You can follow these instructions to install Ubuntu using Linux Subsystem Links - Installing Ubuntu in Windows 10 Windows Subsystem for Linux Documentation Google Is Your Friend (install+ubuntu+in+windows+10) WSL Blog Install QRL Now that we have a freshly updated system the installation of QRL is a breeze QRL uses python3 to install. The install is the same for all operating systems after you have installed the requirements. Using the Python3 package installer pip3 we will install QRL. Before we install QRL make sure setupTools is the latest. pip3 install -U setupTools After this completes install QRL with: pip3 install -U qrl This will install the QRL package and any required dependencies. Start QRL Node Now that we have QRL installed we can start_qrl and begin syncing the node. This will begin the node in the foreground of the shell. If you would like to continue using the shell you can either pass the --quiet flag or run the command in a screen session ( you will need screen installed ). start_qrl This will print out the details of the running QRL processes. For a more verbose output you can pass the -l option with DEBUG INFOWARNINGERRORCRITICAL depending on the level of information you need. start_qrl -l DEBUG The node will sync the entire blockchain to your computer make sure you have enough space. after syncing the chain you will begin seeing blocks added. Congrats your QRL node is working. Help If you would like to see all of the options you can pass along the command line simply add --help to the end of the command above. start_qrl --help This will print all of the various options available. usage: start_qrl [-h] [--mining_thread_count MINING_THREAD_COUNT] [--quiet] [--qrldir QRL_DIR] [--no-colors] [-l {DEBUGINFOWARNINGERRORCRITICAL}] [--network-type {mainnettestnet}] [--miningAddress MINING_ADDRESS] [--mockGetMeasurement MEASUREMENT] [--debug] [--mocknet] QRL node optional arguments: -h --help show this help message and exit --mining_thread_count MINING_THREAD_COUNT -m MINING_THREAD_COUNT Number of threads for mining --quiet -q Avoid writing data to the console --qrldir QRL_DIR -d QRL_DIR Use a different directory for node data/configuration --no-colors Disables color output -l {DEBUGINFOWARNINGERRORCRITICAL} --loglevel {DEBUGINFOWARNINGERRORCRITICAL} Set the logging level --network-type {mainnettestnet} Runs QRL Testnet Node --miningAddress MINING_ADDRESS QRL Wallet address on which mining reward has to be credited. --mockGetMeasurement MEASUREMENT Warning: Only for integration test to mock get_measurement --debug Enables fault handler --mocknet Enables default mocknet settings Configuration By default when the node is started it will NOT mine any coins. You will have to enable using a configuration file in the ~/.qrl/ directory. The configuration file is where you will change any options you want QRL to observe. You can grab a copy of the file and details about all of the settings in our Configuration Guide The defaults can be used to run a QRL node though you may need to change some of the directives for your use. Mining QRL If you want to mine using a QRL node see the guide for Mining QRL Solo or the pool guide to get started. Requirements tl;dr Getting Started Ubuntu Install Ubuntu Node Update Ubuntu Node Redhat/fedora MacOS Windows 10 Install QRL Start QRL Node Configuration Mining QRL Still stuck? There's help over on Discord!"
1,769
Keybase
KeyBase Address Verification
Keybase Address Verification We’re big fans of what Keybase are doing here at the Quantum Resistant Ledger. Innovation and security are a big part of what we do and we are delighted to announce that you can add your QRL address to your Keybase identity. keybase.io logo Keybase Keybase is a catalog of connected identities that utilizes cryptographic Proofs to link profiles. Adding QRL address to Keybase To add your QRL address to your Keybase profile, in the Keybase app click on the Add more identities button, and enter your QRL address. When you click the Authorize button you’ll be presented with a page like this: keybase qrl authorize This contains your Signature Hash, a cryptographic Proof, that needs recording in the QRL blockchain using our message transaction type. The easiest way to achieve this is using the new Keybase tools section of the QRL web wallet at wallet.theqrl.org or the desktop version downloaded from https://theqrl.org or Github Tools Icon in the wallet Tools icon in the wallet sidebar Tools bar Add Keybase TX Enter your keybase username, paste the Keybase signature hash into the box, and click Create Keybase Transaction. When the transaction is complete, you’ll see confirmation: tools bar Looking on the Explorer you’ll see a record of your Keybase message transaction: tools bar Once this is visible in the Explorer, you’re good to go back to the QRL/Keybase link page and click Submit: tools bar Congrats, you have now linked your QRL address to your keybase.io profile cryptographically
337
QRL Message transaction encoding
QRL Message transaction encoding
List of supported encoding bytes for various services using QRL message transactions. Based upon QIP002. For an encoded message transaction to be valid, the first two bytes of the 80 byte message body must be (in hex), “0x0F0F”. The next two bytes of the message denote the encoding of the specific message type. i.e. where the encoding for specific message type is (in hex) “0x0000”, a valid hexstring message would be: 0F0F 0000 <remaining 76 bytes of message> Supported encoding bytes for specific message type (hex) 0000 - reserved 0001 - reserved 0002 - keybase 0003 - github QIP 002 A standard message encoding format to indicate encoded data in MessageTransaction transactions QIP: 002 Layer: 2 Title: MessageTransaction Encoded Message Standard Author: Scott Donald Comments-Summary: Comments-URI: https://github.com/theQRL/qips/pull/4 Status: Open Type: Proposal Created: 2018-11-03 Updated: 2018-11-12 Abstract The QRL network supports arbitrary messages up to 80 bytes in length to be stored on chain through the MessageTransaction transaction subtype. There is the capability for second layer clients to read and interpret the data contained within these message transactions, and format interfaces accordingly. This can be seen with the currently implemented Document Notarisation transaction type found on both the QRL Wallet and QRL Explorer applications, and further implemented in the explorer-helpers repository. Motivation This QIP aims to create a new base layer for a standard message encoding format such that other usecases have a framework to build within - for example the coinvote proposal mentioned by @surg0r. Specification The following will describe the base requirements to indicate a message contains encoded data, and provide further context on earlier usage as has been implemented in the Document Notarisation transaction type. There are a total of 80 bytes available in a MessageTransaction transaction that are usable. For the purposes of describing the format in this document, we will represent all data as HEX strings. It is worth noting however that the data is later converted to binary bytes for storage by a QRL node. To indicate a message is an encoded message, the first two bytes are reserved for the following HEX string: 0F0F The subsequent two bytes should indicate a unique encoded message transaction type. Each proposal to the community for a new encoded message type will be allocated a unique HEX string for these bytes for client implementations. Eg: 0001, AA01 etc. The remaining 76 bytes contain any data relevant to the encoded message, and should be proposed to the community through a QIP. If this QIP is accepted, a record of accepted message transaction sub type and their respective QIP should be kept updated on docs.theqrl.org such that client implementations have the technical detail available to implement with ease. A Github repository will be setup on https://github.com/theQRL/standard-message-encoding to allow community pull requests into this standard encoding format. Document Notarisation Specification The following describes the structure of the Document Notarisation message transaction sub type for historical purposes. There are approximately 25 transactions from early stages of the network that utilise this format. It is optional to implement for display purposes. First 2 Bytes: AFAF - Indicates encoded message. Subsequent Half Byte: A - Indicates this is a document notarisation message transaction sub type. Subsequent Half Byte: 1, 2, or 3 indicating which hash function has been used to notarise the document as per below: `1` - SHA1 (Now deprecated in user interfaces when notarising a document) `2` - SHA256 `3` - MD5 (Now deprecated in user interfaces when notarising a document) The remaining 77 bytes are reserved for both the hash of the document, and a variable amount of free form text depending which hash function was use. For each hash function above, the following describes the remaining 77 bytes utilisation. `1` - SHA1 - Subsequent 20 bytes store the SHA1 hash, with the remaining 57 bytes available for free form text. `2` - SHA256 - Subsequent 32 bytes store the SHA256 hash, with the remaining 45 bytes available for free form text. `3` - MD5 - Subsequent 16 bytes store the SHA1 hash, with the remaining 61 bytes available for free form text. Implementation No immediate implementation work is required for this QIP as it simply states a standard for encoding messages using the QRL networks MessageTransaction transaction type. Eventual work will be required in any client implementations that wish to adhere to the standard encoding format, such as the public QRL Wallet or Block Explorer
982
QRL Document Notarisation
QRL Document Notarisation
Using the Message Transactions function on the QRL network, you can now notarise a document, embedding the hash forever in the chain. This function is available in the wallet and takes any document of file you load, hashes the file using sha256, signs the message containing your hash and sends it into the chain. Now anytime you want to verify the integrity of the document, you simply pass it through the same hashing algorithm and verify the hash matches the one you have signed using your quantum resistant secure private keys. This function will not load the file to the blockchain, and is not a file storage service. Simply the sha256 hash is loaded, allowing future verification of the document to occur, proving it has not been modified in any way. Notarising a Document The process is simple to get started notarising documents. Using your QRL wallet, you will sign a message and broadcast the transaction onto the network. Create a Wallet Browse over to wallet.theqrl.org and create a new wallet. Once you have a QRL wallet established and funded, proceed to the tools section of the wallet. WalletToolImage Notarise a Document To notarise a document you simply need to load the document into the web browser. This will not load the file into any server, instead it generates a hash of the data the file contains. This hash is then shown in the browser and inserted into the signed transaction from your wallet. Load File With the notarise tool opened you will be presented with a few fields to fill out. First, select the file you wish to notarise by selecting “Choose File” and browsing to the local file. You may wish to enter some additional text for the message transaction, notarisation takes 32 bytes to store the SHA256 hash, with the remaining 45 bytes available for free form text. You may tweak the rest of the settings, however typically the default is just fine. Select Notarise Document at the bottom of the screen to proceed. NotariseScreen Confirm and Send Next, you are presented with a confirmation screen with all of the details of the transaction you just entered. NotariseScreen If everything looks good here, select Confirm Document Notarisation which will sign the transaction, and insert the document’s sha256 into the blockchain. Confirmation Once the transaction is broadcast to the network and mined into a block, you will receive confirmation that the hash is now signed by your wallet, and will forever contain an unchanged hash of the document exactly as it was when you uploaded. You will see a screen with the results of the transaction, and a link to check the hash on the QRL Explorer. Share this link to anyone that wishes to check the file has been uploaded and verify it is exactly the same. NotariseScreen Verify a File Once the file has been notarised, you may wish to validate the file has not been tampered with. To do this, simply browse to the transaction hash from the original transaction, upload the document and the explorer will tell you that the document is valid by comparing the hashes of the 2 files. You can find the tx hash in the confirmation screen during the initial notarisation, or in the wallet that notarised the document under the transaction list. Browse to the explorer and search the TX hash in the search bar. This will bring up a screen similar to below. Explorer Verification Screen Upload to Verify With the TX hash pulled up, browse to the file you wish to verify and click the “Verify Notarisation” button in the explorer. THis will rehash the document, and verify that they match. If they are the same you will see something similar to below. Explorer Verification Screen Example File For the example here, you can browse to my wallet, and verify the file loaded has not been tampered with, or modified. Grab and upload this file to the transaction used for this example to verify the image is still the same. Notarising a Document Create a Wallet Notarise a Document Verify a File Still stuck? There's help over on Discord!
839
Create Tokens
Create Tokens
The QRL supports QRT or Quantum Resistant Ledger Tokens. These tokens share the same encryption and QC resistance as the main QRL blockchain. You can create tokens either by using the qrl command line, or by browsing to the qrl web wallet application hosted at wallet.theqrl.org. Open your wallet, or create a new one to begin with this guide. QRL New Token Creating a new token is easy. Once you have all of the pertinent details entered and the fee paid, the network takes care of the rest. Token Creation To create a token you will need to provide the following information: The token creation owners QRL address The token symbol the token name The amount of decimals for your token Initial Token Holder Address Enter at least one QRL address and the amount of tokens to create and send to this address The “Initial Token Holders” field allows you to select the addresses that will receive the initial tokens. You can add as many addresses as you see fit. Below is an example showing the QRL fee for processing the transaction and the OTS key index we intend to use. Ensure this is an unused OTS Key. QRL token Create Once you have filled in all of the necessary details, click the create token button at the bottom of the form. This will broadcast the creation of your token across the QRL network and send the newly minted tokens to the addresses specified. You will get a confirmation page that shows the details of the transaction. Verify the information is correct and press “Confirm Token Creation” QRL Token Success The confirmation screen will print the details of the transaction. QRL Token Success Checking Token Balance You can check the balance of any tokens you have in your wallet by selecting the tokens tab in the top bar of the “Send and Receive” tab in the web wallet. QRL Token Success You can also see the recent transactions on the right of the balance screen. You can receive tokens at your main QRL address, no need for anything special to receive. Sending Tokens Using the web wallet we can send tokens to another QRL address. From the “Send and Receive” screen, select the drop down to the right of the “Amount” field. QRL Token Success Enter the details to send the tokens, and select “Confirm”. Progress through the following screens and wait for the confirmation.
493
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
3
Edit dataset card