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

From BiblePay Wiki
(Difference between pages)
Jump to: navigation, search
(Created page with "''' Upgrading to 1.5.0.7 - RandomX ''' On March 24th, 2020, BiblePay will be transitioning to the RandomX algorithm. This upgrade is a major release therefore we need to exp...")
 
(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 '''
  
On March 24th, 2020, BiblePay will be transitioning to the RandomX algorithm.  This 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.
 
  
 +
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.
  
''' Exchanges, Block Explorers and Self Compiling Full Nodes '''
 
  
The compilation instructions have slightly changed, due to integrating RandomX into our core crypto library.  Please refer to this document first:
+
<ul>
https://github.com/biblepay/biblepay/blob/master/BuildBiblePay.txt
+
<li>
Note the part about compiling RandomXThis is an easy step, and is only required onceIn 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.   
+
Step 1:
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).
+
<br>
 +
From the Controller Wallet, launch Biblepay QTGo to File | Receiving AddressesCreate 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 notepadCopy 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".
  
''' Memory '''
+
<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 file.  We 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>
  
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.
+
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.
  
''' Mining BiblePay with RandomX '''
+
<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.
  
Download XMRig-BBP:
+
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.
  
...
+
<li>Step 6:
(Coming Soon)
+
<br>
 
+
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.
Pool Configuration:
+
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
(Coming Soon)
+
Insert the following line
 +
<pre>masternodeblsprivkey=nnn</pre>
 +
Replace nnn with your actual bls_private_key (from notepad).
 +
Save the file.
 +
<li>Step 7:
 +
<br>
 +
Now we can start the sanctuary.
 +
Start the sanctuary, wait for it to sync, then type:
 +
<pre>masternode status</pre>
 +
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'.

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'.