Smart Nodes Archives - Document FSociety https://fsocietychain.com/docs/docs/smart-nodes/ Best Document for FSociety Wed, 05 Apr 2023 20:30:21 +0000 en-US hourly 1 https://wordpress.org/?v=6.2.2 Smartnode Manual Setup https://fsocietychain.com/docs/smartnode-manual-setup/ Fri, 31 Mar 2023 21:36:52 +0000 https://fsocietychain.com/docs/?p=34 Getting Started With Your VPS For the following part of the guide you need to be root. depending on your VPS provider they may have...

The post Smartnode Manual Setup appeared first on Document FSociety.

]]>
Getting Started With Your VPS

For the following part of the guide you need to be root. depending on your VPS provider they may have only provided you with a “sudo” user. You can change to root by doing:

Update Server

sudo su
apt update && apt upgrade -y
apt install unzip fail2ban -y

Add 4GB Swap
First check to make sure there is not already swap active:

free -h

If no swap it will return:

Swap: 0B 0B 0B

Create SWAP and Activate:

dd if=/dev/zero of=/swapfile bs=1k count=4096k
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap auto 0 0" | tee -a /etc/fstab
sysctl -w vm.swappiness=10
echo vm.swappiness = 10 | tee -a /etc/sysctl.conf

 

Note: swappiness = 10 tells system only to use swap if really needed.

 

Enable UFW & Open Ports

apt install ufw -y
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow 15277/tcp
ufw enable

 

Configure Fail2ban

Setup jail for bad guys hitting SSH, and set it to ban after three failed logins to SSH:

nano /etc/fail2ban/jail.local

Copy and paste the following into the file:

[sshd]
enabled = true
port = 22
filter = sshd
logpath = /var/log/auth.log
maxretry = 3

Save Configuration

ctrl +x y then enter

Reboot the server:

reboot

Add a system user to run fsocietyd:

adduser <username_here>

Note: Adjust wget command to match your Ubuntu version, example below is for Ubuntu 18.

wget https://github.com/fsocietychain/fsociety/releases/download/v0.0.1.02/fsociety-ubuntu20-v0.0.1.02.zip
unzip fsociety-ubuntu20-v0.0.1.02.zip
chmod +x ~/fsociety-build/fsocietyd
chmod +x ~/fsociety-build/fsociety-cli
chmod +x ~/fsociety-build/fsociety-tx
mkdir ~/.fsocietycore && touch ~/.fsocietycore/fsociety.conf
cd .fsocietycore
echo "daemon=1" >> ~/.fsocietycore/fsociety.conf
~/fsociety-build/./fsocietyd
echo all done!

You should see fsocietyd server starting. You can confirm it is running with:

top -c

It should be using a good amount of CPU. This shows you it is working, we will return to it later.

 

Local Setup

This part of the guide is to get your local wallet or control wallet setup. If you already have FSociety core wallet running you can skip to next section.

Download , Install & Sync Local Wallet :

Download latest FSociety wallet at https://github.com/fsocietychain/fsociety/releases

  • Start wallet and let it finish syncing.
  • Encrypt wallet (Settings > Encrypt Wallet)
  • Create new receiving address
  • Backup wallet.dat (File > Backup Wallet). Store in multiple locations.
  • Dump private key for receiving address (this should be printed and stored offline in multiple locations):
walletpassphrase password time (in seconds)
dumpprivkey "address" (address is the receiving address you sent the 1,100,000 FSC to)
  • Send 1,100,000 FSC to self (this is current collateral amount)
  • Wait to 2 confirmation

The private key only allows you to restore the matching receiving address. If you setup multiple nodes you should dump the private key for each collateral receiving address.

 

Build protx command for control wallet

Here is an example protx quick_setup command:

protx quick_setup "ne935d771668fa640c56grt56ry8688b0f039f7b684e715d92e4012369fea6" "1" "194.113.73.87:15277" "FQ6HwVC54Vzku47L2Loae4fdPkYXEyqm5y"

The structure from left to right is:

  • Transaction ID: In your wallet go to “Transactions” right click the one you sent yourself earlier and “Copy Transaction ID”. Replace the Transaction ID in example.
  • Collateral index: Tools > Debug console. Type smartnode outputs to check if 1 or 0. Adjust example command if needed.
  • Your smartnode server IP and port: Replace example IP with your Smartnode server IP, leave port as is.
  • Fee address: This is any address in your wallet which contains enough FSC to pay the fee. When you enter the protx quick_setup command it is a transaction and needs to be paid for. It is a very small amount 1/2 an FSC is more than enough. In Debug console do “listaddressbalances” to show all addresses with a balance, choose one and replace address in example command.

Enter the protx quick_setup command in Debug console. This will create a .conf file for that node in the same directory you ran the wallet from. Open it and copy the contents.

Finish Smartnode Configuration (VPS):

~./fsociety-cli stop
nano ~/.fsocietycore/fsociety.conf

Paste in what you copied from the .conf file made during the protx command, save and exit (ctrl+x, y, enter).

Start cointafd:

~/fsociety-build/./fsocietyd

Wait two minutes and do:

~/fsociety-build/./fsociety-cli smartnode status

This should return:

Ready Ready

Your Smartnode should now be running!

 

z

The post Smartnode Manual Setup appeared first on Document FSociety.

]]>
Smartnode Requirements https://fsocietychain.com/docs/smartnode-requirements/ Thu, 30 Mar 2023 20:48:37 +0000 https://fsocietychain.com/docs/?p=31 Smartnodes require a collateral of 1,100,000 FSC for block 8580. This number does not change. Your collateral stays in your wallet at all times, and...

The post Smartnode Requirements appeared first on Document FSociety.

]]>
Smartnodes require a collateral of 1,100,000 FSC for block 8580. This number does not change. Your collateral stays in your wallet at all times, and as long as locked your Smartnode is valid. You can unlock the collateral at anytime, you are in full control of your FSC.

Hardware
fsocietyd (fsocietycore daemon) is sensitive to performance issues, especially when it comes to CPU. It is recommended that the server you use for a FSociety Smartnode runs nothing else and has a minimum of two cores.

CPU: 2 cores .
RAM: 4GB .
SWAP: 4GB .
Storage: 25GB (SSD is strongly recommended).
Note: The FSociety blockchain grows continuously so the 25GB will also grow over time, make sure to check your servers available disk space occasionally. Additionally, once Smartnodes start being used for Smart Contracts hardware requirements will increase significantly.

Software
Recommended operating systems are Ubuntu 18.04, and Ubuntu 22.04. Other operating systems are possible but may result in unexpected behavior. You should always be using the latest mainnet release on your Smartnode.

Network
Network connection of 100/mbit is strongly recommended, uptime is very important. Interruptions will mean your Smartnode gets “PoSe Banned” and you will stop receiving rewards until it is fixed.

The post Smartnode Requirements appeared first on Document FSociety.

]]>