Difference between revisions of "Building A Temple"

From BiblePay Wiki
Jump to: navigation, search
Line 87: Line 87:
 
In this section simply expose :
 
In this section simply expose :
  
  sudo ufw allow 10002-10010
+
  sudo ufw allow 10002
 +
sudo ufw allow 10003
 +
sudo ufw allow 10004
 +
sudo ufw allow 10005
 +
sudo ufw allow 10006
 +
sudo ufw allow 10007
 +
sudo ufw allow 10008
 +
sudo ufw allow 10009
 +
sudo ufw allow 10010
 
  sudo ufw allow 40000
 
  sudo ufw allow 40000
  

Revision as of 19:08, 8 July 2023

A Temple is a collection of 10 Sanctuaries. The first 12 Temples that we Christen will be named after a Tribe of Israel and will receive a special Seal.


When you run a temple you are not only helping the BiblePay network by providing a cluster of Ten Sanctuaries (helping the users sync blocks and conduct instant send transactions), but you also act as a CockroachDB database node within the BiblePay Cockroach Cluster. Your node is entrusted to hold our active Orphan Sponsorship list, orphan expenses, orphan revenue records, Gospel Articles and Content, Gospel Wiki Content, Images hosted on our web site (Unchained.biblepay.org), our Wells project, the active Proposals and Voting records, Phone call transactions, and other database transactions.


Note that Temples are rewarded at the same rate as other sanctuaries so the Temple operator is not earning more rewards than the average sanctuary owner, it is more of a community service position.


Step 1 - Build a Single BiblePay Node

For clarity, please build your temple as the root user, and build the temple in the folder "/biblepay".

Rent an Unbuntu 20 VMS from your favorite VMS provider with a minimum of 6 cores, 600gb hard drive and 16gb of ram (these requirements ensure that the temple will not slow down the cockroachdb cluster and will be able to service the ten sanctuary instances, and most importantly will allow the temple to handle future Video traffic and cache storage for our gospel videos feature and upcoming social media features such as Deliverance Rooms ) .

Follow these instructions to build biblebay: https://github.com/biblepay/biblepay/blob/master/BuildBiblePay.txt

If you built biblepay in the /biblepay directory, you should find your biblepayd dameon here: /biblepay/biblepay/src/biblepayd If not, you can download the binary from the biblepay web site and copy it here, this way the rest of this guide will match.

Step 2 - Set up 10 Sanctuaries to become a Potential Temple

To be a temple, you will need to override the biblepayd settings with special values that will allow it to write to custom data folders and read custom configuration settings. For easy maintenance, in this guide I put all of your biblepay block data in /data and all of your biblepay configurations in /configs. First create configs directories:

cd /
mkdir /configs
mkdir /data
mkdir /data/biblepay1
mkdir /data/biblepay2
mkdir /data/biblepay3
mkdir /data/biblepay4
mkdir /data/biblepay5
mkdir /data/biblepay6
mkdir /data/biblepay7
mkdir /data/biblepay8
mkdir /data/biblepay9
mkdir /data/biblepay10
cd /configs


nano biblepay1.conf
shrinkdebugfile=1
datadir=/data/biblepay1
masternodeblsprivkey=your_bls_privkey
port=40000
rpcport=20000


Save the file (ctrl-x, shift-Y, enter)


Copy this biblepay1.conf file 10 times to: biblepay1.conf, biblepay2.conf ... biblepay10.conf (IE type:

cp biblepay1.conf biblepay2.conf
cp biblepay1.conf biblepay3.conf
 ... 

)

Edit each file by using nano, and set the following values:

For biblepay1.conf, ensure the port=40000 and the rpcport=20001

For biblepay2.conf, ensure the port=10002 and the rpcport=20002

... (Continue this pattern for files 3 through 9).

For biblepay10.conf, ensure the port=10010 and the rpcport=20010


Edit the your_bls_privkey with the privkey of the sanctuary that you set up in "EasySanc".

The general rule for the "port" is your first sanc (biblepay1) must have a port of 40000 (this allows outside nodes to find you), but, each successive sanc from sanc2-sanc10 must have a port of 10002-10010 (as other sancs will pose ban you otherwise. )

The rule for "rpcport" is they should be unique, starting with 20001 and working up to 20010 (they must be unique, otherwise the node will not start).


Firewall Changes:

In this section simply expose :

sudo ufw allow 10002
sudo ufw allow 10003
sudo ufw allow 10004
sudo ufw allow 10005
sudo ufw allow 10006
sudo ufw allow 10007
sudo ufw allow 10008
sudo ufw allow 10009
sudo ufw allow 10010
sudo ufw allow 40000


Start the Nodes and verify each one syncs and acts as a Sanctuary

Write a script to launch your nodes so you dont need to manually launch each node in the case of a reboot etc:

cd /configs nano startbiblepayd.sh

/biblepay/biblepay/src/biblepayd -conf=/configs/biblepay1.conf /biblepay/biblepay/src/biblepayd -conf=/configs/biblepay2.conf /biblepay/biblepay/src/biblepayd -conf=/configs/biblepay3.conf /biblepay/biblepay/src/biblepayd -conf=/configs/biblepay4.conf /biblepay/biblepay/src/biblepayd -conf=/configs/biblepay5.conf /biblepay/biblepay/src/biblepayd -conf=/configs/biblepay6.conf /biblepay/biblepay/src/biblepayd -conf=/configs/biblepay7.conf /biblepay/biblepay/src/biblepayd -conf=/configs/biblepay8.conf /biblepay/biblepay/src/biblepayd -conf=/configs/biblepay9.conf /biblepay/biblepay/src/biblepayd -conf=/configs/biblepay10.conf

ctrl-X, Shift-Y <enter> chmod 777 startbiblepayd.sh


Check if BiblePay is synced

cd /biblepay/biblepay/src
biblepay-cli -conf=/configs/biblepay1.conf getblockchaininfo
This should respond with the synced number of blocks
biblepay-cli -conf=/configs/biblepay1.conf masternode status

This should respond with outpoint info if masternode is running.