Difference between pages "Upgrade to RandomX" and "Create Sanctuary"

From BiblePay Wiki
(Difference between pages)
Jump to: navigation, search
 
(Created page with "''' How to create a deterministic Sanctuary ''' Ground Rules: You must have a controller wallet (this is your home wallet that is used to manage one or more sanctuaries). Th...")
 
Line 1: Line 1:
''' Upgrading to 1.5.0.7 - RandomX '''
+
''' How to create a deterministic Sanctuary '''
  
  
 +
Ground Rules:
 +
You must have a controller wallet (this is your home wallet that is used to manage one or more sanctuaries).
 +
The lines below marked with controller must be run by your home wallet.  The Sanctuary wallet is your VPS that runs the actual Sanctuary Software.
  
<html>
 
<video width="400" controls>
 
  <source src="https://san.biblepay.org/Media/BiblePay_2020_Commercial.mp4" type="video/mp4">
 
 
  Your browser does not support HTML5 video.
 
</video>
 
</html>
 
  
 +
<ul>
 +
<li>
 +
Step 1:
 +
<br>
 +
From the Controller Wallet, launch Biblepay QT.  Go to File | Receiving Addresses.  Create a new address for your sanctuary (by clicking new), then edit
 +
it and label it with a good name (for example, sanc1)  Write this sanctuary name down in notepad.  Copy that address to your clipboard. Close the dialog.
  
 +
<li>Step 2:
 +
<br>
 +
Now we will fund the sanctuary.  Go to Send.  Paste the Address of the Sanctuary (from the first step) in the To box.  Populate amount 4,500,001.
 +
Send.
 +
<li>
 +
Step 3:
 +
<br>
 +
Go to the Transaction List, and find the transaction that you sent.  Double click on it.  Copy the transaction ID to your clipboard.  Now we need to find out the TXID ordinal.  Launch Notepad, and paste the txid in notepad and label it Collateral TXID.
 +
Now go to Tools | Debug Console.  Type:
 +
<pre>getrawtransaction txid 1</pre>
 +
The command will show the details of the transaction you just sent. 
 +
Scan the output of this command for the leg of the transaction that has an amount of 4,500,001.  Once you find that leg, copy the "n" value of it.  Usually, this will be 0 or 1.  Copy that "n" value to notepad and label it "txid-ordinal".
  
On March 24th, 2020, at block 184675, BiblePay will be transitioning to the RandomX algorithmThis upgrade is a major release therefore we need to explain some finer technical details that may not be apparent so we can help you upgrade.
+
<li>Step 4:
 +
<br>
 +
Now we need to add an entry to the Controller wallets masternode.conf file.
 +
In mainnet, this file is located at ~/.biblepay/masternode.conf.  In TestNet, this is located at ~/.biblepay/testnet3/masternode.conf.  Note that on windows, you need to replace ~/.biblepay with %appdata%\biblepay.
 +
Nano this fileWe need to store a new entry in it like this:
 +
<pre>sanctuary_name sanctuary_vms_ip:sanctuary_port mnp collateral_txid collateral_txid_ordinal
 +
</pre>
  
 +
You should replace sanctuary_name with the name that you wrote in notepad.
 +
Replace vms_ip with the ip address of your sanctuary.
 +
Replace port with 40000 for mainnet, or 40001 for testnet.
 +
Leave mnp as is.
 +
Replace collateral_txid with the TXID in notepad.
 +
Replace txid_vout_ordinal with the TXID ordinal from notepad.
 +
Save the file.
 +
Exit nano.
  
 +
<li>Step 5:
 +
<br>
 +
Now we need to upgrade the sanctuary to deterministic from the Controller wallet.
 +
From the RPC console, type:
 +
<pre>upgradesanc sanc_name</pre>
 +
Note!  If the response says: 'unable to find funds at address nnn', this simply means you need a little BBP to cover maintenance.
 +
In this case send 1000 bbp from your controller wallet to the address on the screen (copy it to clipboard) and send to it, then wait 3 blocks then try again.
  
''' Exchanges, Block Explorers and Self Compiling Full Nodes '''
+
If the command is successfuly, it will emit about 10 lines of technical details about your new sanctuary.
 +
You are primary concerned with the BLS public and private keys.  Copy the BLS public and private keys to notepad and label them the same names.
  
The compilation instructions have slightly changed, due to integrating RandomX into our core crypto library.  Please refer to this document first:
+
<li>Step 6:
https://github.com/biblepay/biblepay/blob/master/BuildBiblePay.txt
+
<br>
Note the part about compiling RandomXThis is an easy step, and is only required once.  In general, a person compiling BiblePay will cd to the "depends" directory, compile depends as usual, then back out, cd to RandomX, compile randomX, then back out and compile the coin.   
+
Now we are ready to spin up the actual VMS sanctuary.   
Additionally, our github URL has changed to:  https://github.com/biblepay/biblepay    (however, we have integrated an automatic redirect in our old URL so as to not break any old scripts).
+
From the VMS Sanctuary, first install either biblepay-qt or biblepayd (the sanctuary will run from either one)Most people use biblepayd.
 
+
cd ~/.biblepay
 
+
From here, we need to enter the BLS_PRIVATE_KEY in the biblepay.conf file!
''' Location of the BiblePay wallet.dat and blockstore (blocks directory) has changed in this release '''
+
nano ~/.biblepay/biblepay.conf (this is for mainnet).  For Testnetnano ~/.biblepay/biblepaytest.conf
 
+
Insert the following line
To reduce confusion within our community we have moved our blockstore and wallet location back to its original location (~/.biblepay) from the old location (~/.biblepayevolution).  Please make a backup of your wallet before moving the data.  To move the whole unix directory, typemv ~/.biblepayevolution ~/.biblepay    . Note:  Be sure to save your deterministic.conf file and masternode.conf file(s), if you have sanctuaries (move it with the data) as this contains your sanctuary key information.  This directory also contains your biblepay.conf file. So it is advised to move the whole directory.  On windows, you should copy:
+
<pre>masternodeblsprivkey=nnn</pre>
%appdata%\biblepayevolution over to %appdata%\biblepay.
+
Replace nnn with your actual bls_private_key (from notepad).
       
+
Save the file.
 
+
<li>Step 7:
 
+
<br>
 
+
Now we can start the sanctuary.
''' Memory '''
+
Start the sanctuary, wait for it to sync, then type:
 
+
<pre>masternode status</pre>
For exchanges, and block explorers:  You will not be affected because our memory tuning selector is set to only use 256meg for full nodes by default if they are not miners.  However, for miners and those running sanctuaries, Since RandomX uses up 256Meg of memory per mining thread (or block checking thread), be wary about starting the solo miner.  Each solo mining thread will consume more RAM.  Therefore we advise you to start very small, for example:  setgenerate true 1, check the stability of your system, then move to setgenerate 2.  Know that it is never profitable to solo mine with the core wallet, due to the memory tuning constraint.  See Mining with XMRig below to mine bbp with randomx.
+
At this point if it says READY: you have a perfectly running sanctuary.
 
+
Now all you need to do is monitor the POSE status from the controller, and ensure it stays at 0.
 
+
If it goes up, you can always revive your sanctuary with 'exec revivesanc sancname'.
 
 
 
 
''' Mining BiblePay with RandomX '''
 
 
 
 
 
Download XMRig-BBP:
 
 
 
 
 
Linux-64-bit :  https://github.com/biblepay/xmrig/raw/master/binaries/xmrig-bbp-linux64
 
 
 
Windows-64-bit: https://github.com/biblepay/xmrig/raw/master/binaries/bbprig3.zip
 
 
 
Usage: (Extract the zip file to a folder on your machine, such as c:\mining\).  Run the miner from a batch file in that subdirectory (this allows the miner to use the dependencies).
 
 
 
Self Built Xmrig: https://github.com/biblepay/xmrig
 
 
 
Mac: http://www.biblepay.org/xmrig_mac.zip
 
 
 
 
 
 
 
 
 
''' How to Mine with XMRIG-BBP with BBP Dual Hash Mining '''
 
 
 
xmrig-bbp-win64.exe -o rx.biblepay.org:3008 -u your_biblepay_address -p your_monero_prod_address --threads nproc_count
 
 
 
(Where your bbp receive address for main-net receives Biblepay rewards, and your monero mainnet address receives prod rewards.
 
 
 
 
 
''' How to get a Monero Production Wallet (for dual-hash mining rewards) '''
 
 
 
To get a monero production wallet, without running the full monero client (this gives you an XMR address to mine to):
 
 
 
https://mymonero.com/
 
 
 
 
 
 
 
''' Pool Configuration: '''
 
 
 
Pool: http://rx.biblepay.org
 
Port: See pool configuration page for various port options that allow you to select your target difficulty
 

Revision as of 15:44, 13 April 2022

How to create a deterministic Sanctuary


Ground Rules: You must have a controller wallet (this is your home wallet that is used to manage one or more sanctuaries). The lines below marked with controller must be run by your home wallet. The Sanctuary wallet is your VPS that runs the actual Sanctuary Software.


  • Step 1:
    From the Controller Wallet, launch Biblepay QT. Go to File | Receiving Addresses. Create a new address for your sanctuary (by clicking new), then edit it and label it with a good name (for example, sanc1) Write this sanctuary name down in notepad. Copy that address to your clipboard. Close the dialog.
  • Step 2:
    Now we will fund the sanctuary. Go to Send. Paste the Address of the Sanctuary (from the first step) in the To box. Populate amount 4,500,001. Send.
  • Step 3:
    Go to the Transaction List, and find the transaction that you sent. Double click on it. Copy the transaction ID to your clipboard. Now we need to find out the TXID ordinal. Launch Notepad, and paste the txid in notepad and label it Collateral TXID. Now go to Tools | Debug Console. Type:
    getrawtransaction txid 1

    The command will show the details of the transaction you just sent. Scan the output of this command for the leg of the transaction that has an amount of 4,500,001. Once you find that leg, copy the "n" value of it. Usually, this will be 0 or 1. Copy that "n" value to notepad and label it "txid-ordinal".

  • Step 4:
    Now we need to add an entry to the Controller wallets masternode.conf file. In mainnet, this file is located at ~/.biblepay/masternode.conf. In TestNet, this is located at ~/.biblepay/testnet3/masternode.conf. Note that on windows, you need to replace ~/.biblepay with %appdata%\biblepay. Nano this file. We need to store a new entry in it like this:
    sanctuary_name sanctuary_vms_ip:sanctuary_port mnp collateral_txid collateral_txid_ordinal
    

    You should replace sanctuary_name with the name that you wrote in notepad. Replace vms_ip with the ip address of your sanctuary. Replace port with 40000 for mainnet, or 40001 for testnet. Leave mnp as is. Replace collateral_txid with the TXID in notepad. Replace txid_vout_ordinal with the TXID ordinal from notepad. Save the file. Exit nano.

  • Step 5:
    Now we need to upgrade the sanctuary to deterministic from the Controller wallet. From the RPC console, type:
    upgradesanc sanc_name

    Note! If the response says: 'unable to find funds at address nnn', this simply means you need a little BBP to cover maintenance. In this case send 1000 bbp from your controller wallet to the address on the screen (copy it to clipboard) and send to it, then wait 3 blocks then try again.

    If the command is successfuly, it will emit about 10 lines of technical details about your new sanctuary. You are primary concerned with the BLS public and private keys. Copy the BLS public and private keys to notepad and label them the same names.

  • Step 6:
    Now we are ready to spin up the actual VMS sanctuary. From the VMS Sanctuary, first install either biblepay-qt or biblepayd (the sanctuary will run from either one). Most people use biblepayd. cd ~/.biblepay From here, we need to enter the BLS_PRIVATE_KEY in the biblepay.conf file! nano ~/.biblepay/biblepay.conf (this is for mainnet). For Testnet: nano ~/.biblepay/biblepaytest.conf Insert the following line
    masternodeblsprivkey=nnn

    Replace nnn with your actual bls_private_key (from notepad). Save the file.

  • Step 7:
    Now we can start the sanctuary. Start the sanctuary, wait for it to sync, then type:
    masternode status

    At this point if it says READY: you have a perfectly running sanctuary. Now all you need to do is monitor the POSE status from the controller, and ensure it stays at 0. If it goes up, you can always revive your sanctuary with 'exec revivesanc sancname'.