SmartNodes Update v1.2.4 Please note v1.1 nodes are no longer eligible for block rewards.

Setup your SmartNode

SmartNode Setup Guides

SmartNode Setup Guides for a particular VPS provider

SmartNode Bash Scripts

SmartNode Monitoring

Hardening your SmartNode

BE CAREFUL: Please do only apply changes illustrated below if you know what you are doing.
Also make sure you have done a backup/snapshot of your VPS first, so that you are able to recover in case of an error.
Most of the following changes are already covered by SmartNode Bash Scripts.
The steps described in this section have been written to the advantage that they all can be applied separately.

Security Change your SSH port

Think of a number you want to use instead of the default SSH port number (22).
In this example we have chosen port number 15735. (But please make up your own!)

  1. Whitelist your custom ssh port with your VPS provider. The procedure depends on which service you are using. You have to basically login to your VPS web front-end, navigate to network security rules (or similar) and add a Custom TCP Rule which allows inbound connections to this specific port.
  2. Connect to your VPS with root credentials and add the custom ssh port to your firewall:

    ufw disable

    ufw allow 15735/tcp

    ufw limit 15735/tcp

    ufw logging on

    ufw enable

    If you used the SmartNode Setup Guide to begin with, this step is crucial.

  3. Change the default port number to the custom one in the SSH daemon:

    pico /etc/ssh/sshd_config

    Change the line Port 22 to your custom port, in this example Port 15735 and save.

  4. Recheck with ufw status and pico /etc/ssh/sshd_config if your custom port changes have been applied.
  5. Reboot your server.
  6. Now connect to your VPS using your custom SSH port. If everything went fine, you can remove the default SSH port entrys from your firewall now:
  7. ufw delete allow 22/tcp

    ufw delete limit 22/tcp

  8. Reboot your server once again.
  9. Finally login to the web front-end of your VPS provider and remove the default SSH port 22 from the list of open ports (list where you added your custom port in step 1).

Stability Setup cronjobs to keep SmartNode always running

  1. Connect to your VPS with root credentials and create a directory for the cronjob scripts:

    mkdir smartnode

    cd ~/smartnode/

  2. Download the appropriate scripts (taken from the SmartNode Bash installer by msg768):

    wget https://raw.githubusercontent.com/SmartCash/smartnode/master/makerun.sh

    wget https://raw.githubusercontent.com/SmartCash/smartnode/master/checkdaemon.sh

  3. Give execute permission to the cron scripts:

    chmod 0700 ./makerun.sh

    chmod 0700 ./checkdaemon.sh

  4. Open crontabs with crontab -e and add the following lines to it:

    @reboot smartcashd

    */5 * * * * ~/smartnode/makerun.sh

    */30 * * * * ~/smartnode/checkdaemon.sh

  5. Apply the cronjobs by reloading them with /etc/init.d/cron reload or service cron reload

Stability Setup cronjob to clear debug.log

This step is to prevent the debug.log from getting too large.

  1. Connect to your VPS with root credentials and create a directory for the cronjob script (if it not already exists):

    mkdir smartnode

    cd ~/smartnode/

  2. Download the appropriate script (taken from the SmartNode Bash installer by msg768):

    wget https://raw.githubusercontent.com/SmartCash/smartnode/master/clearlog.sh

  3. Give execute permission to the cron script:

    chmod 0700 ./clearlog.sh

  4. Open crontabs with crontab -e and add the following line to it:

    0 0 */2 * * ~/smartnode/clearlog.sh

  5. Apply the cronjob by reloading with /etc/init.d/cron reload or service cron reload

Stability Set a Connection Limit

  1. Connect to your VPS with your smartadmin user and stop your SmartNode: smartcash-cli stop
  2. Open your smartcash.conf with pico ~/.smartcash/smartcash.conf and add the following line:

    maxconnections=64

  3. Restart your SmartNode: smartcashd

Stability Allocating a Swap File

This step is especially recommended to those who run a VPS with less than 2 GB RAM. It virtually enhances your RAM using a swap file.

  1. Make you sure you have about 4 GB additional space to spare on your VPS.
  2. Connect to your VPS with root credentials and run the following commands:

    fallocate -l 4G /swapfile

    chmod 600 /swapfile

    mkswap /swapfile

    swapon /swapfile

  3. Open pico /etc/fstab and add the following line at the end of the file (press tab to separate each word/number):

    /swapfile none swap sw 0 0

  4. Finally reboot your server, a 4 GB sized swap file should have been created.

SmartNode Hardening Guide written and maintained by nflaw. (Last updated: 2018-01-30)

SmartNode Basic Commands

Note: If you didn't install via PPA, put ./ in front of the command.
Description Command
Start smartcash client smartcashd
Display smartcash client info smartcash-cli getinfo
Print number of all known smartnodes
(optional: 'ps', 'enabled', 'all', 'qualify')
smartcash-cli smartnode count
Print info on current smartnode winner to be paid the next block
(calculated locally)
smartcash-cli smartnode current
Generate new smartnodeprivkey smartcash-cli smartnode genkey
Start smartnode smartcash-cli smartnode start
Stop smartnode smartcash-cli stop
Print smartnode status information smartcash-cli smartnode status
Print list of all known smartnodes
(see smartnodelist for more info)
smartcash-cli smartnode list
Print info on next smartnode winner to vote for smartcash-cli smartnode winner
Print list of smartnode winners smartcash-cli smartnode winners
Get a list of smartnodes in different modes smartcash-cli smartnodelist
Print number of seconds smartnode recognized by the network as enabled
(since latest issued "smartnode start/start-many/start-alias")
smartcash-cli smartnodelist activeseconds <collateral txid>
Print ip address associated with a smartnode
(can be additionally filtered, partial match)
smartcash-cli smartnodelist addr <collateral txid>
Print info in format
'status protocol payee lastseen activeseconds lastpaidtime lastpaidblock IP'
(can be additionally filtered, partial match)
smartcash-cli smartnodelist full
Print the last block height a node was paid on the network smartcash-cli smartnodelist lastpaidblock <collateral txid>
Print the last time a node was paid on the network smartcash-cli smartnodelist lastpaidtime <collateral txid>
Print timestamp of when a smartnode was last seen on the network smartcash-cli smartnodelist lastseen <collateral txid>
Print Smartcash address associated with a smartnode
(can be additionally filtered, partial match)
smartcash-cli smartnodelist payee <collateral txid>
Print protocol of a smartnode
(can be additionally filtered, exact match)
smartcash-cli smartnodelist protocol <collateral txid>
Print rank of a smartnode based on current block smartcash-cli smartnodelist rank <collateral txid>
Print smartnode status:
PRE_ENABLED / ENABLED /
EXPIRED / WATCHDOG_EXPIRED /
NEW_START_REQUIRED / UPDATE_REQUIRED /
POSE_BAN / OUTPOINT_SPENT
(can be additionally filtered, partial match)
smartcash-cli smartnodelist status <status>
Force reindex of blockchain data smartcashd -reindex-chainstate

SmartNode FAQ

What are the requirements to run a SmartNode?

How can I speed up the blockchain syncing for my SmartNode?

Please refer to the bootstrap download below.

If you are working with the SmartNode Setup Guide, you should apply the bootstrap within Section 8 after creating the smartcash.conf and before running smartcashd, type:

wget https://smartcash.cc/txindexstrap.zip

unzip txindexstrap.zip

mv blocks ~/.smartcash

mv chainstate ~/.smartcash

rm txindexstrap.zip

Is there a install script for SmartNodes?

Yes, there is a bash installer for SmartNodes on Ubuntu. It comes with cronjobs to make sure that your node is always running and up-to-date as well as secure against DDoS attacks.

Please not that this installer is only suitable for a dedicated VPS. The anti-DDoS script in this installer will disable all ports including the HTTP, HTTPS and DNS ports. It will only leave the SmartNode port open as well as a custom port for SSH.

There are also several other custom SmartNode bash scripts provided by members of the SmartCash Community.

How long does it take for my SmartNode to change it's status from PRE_ENABLED to ENABLED?

It should take about 10 to 20 minutes or less. If it takes longer than that you can run smartcash-cli smartnode status and it will show you why it can't proceed.

If it turns to EXPIRED you have to check if there's something wrong with your setup.

Do I have to have the desktop wallet always on when running a SmartNode?

No, as soon as the SmartNode reached it's ENABLED status, you basically just have to make sure that you VPS keeps running. The software wallet enables you to monitor and re-enable your node.

When did SmartNode reward payments start?

SmartNode rewards were activated at block height 300,000 on Jan 31, 2018 5:25:00 AM UTC.

How are SmartNode reward payments determined?

SmartNode payments in SmartCash wallet version 1.1.0 are determined using a decentralised deterministic queue with probability driven selection.

SmartCash version 1.2.2 and later change the payment system to be faster.

"SmartNodes will now get paid more frequently. Starting with Block 545005, SmartNodes will be paid at a rate of 10 nodes every even block. SmartNode payments will be fully validated and agreed on by the network, and properly removed from the payment queue upon payment. The share of block rewards paid to nodes will not change, and each node payment will be approximately 2% of the block reward based on the faster payment cycle."

Every SmartNode appears in the global list. Their position in this list is determined by the time from the last payment. New SmartNodes and SmartNodes that received a payment are placed at the end of the list. It is recommended to only use the command ‘start-missing' to start SmartNodes since it will only start nodes that need to be started. You can also use ‘start-alias’ and specify the specific node you want to start. The start-all command will reset the payment queue on any active nodes.

As SmartNodes are moved to the end of the global list, the remaining SmartNodes slowly migrate towards the top of the list. Once a SmartNode reaches the top 10% of the global list, it is eligible for selection from the selection pool. As an example, if there are 8000 active SmartNodes, the top 800 SmartNodes in the global list are eligible for selection.

Once in the selection pool, selection for payment is determined by the block hash and transaction ID which is used to randomly select the next node in the pool to pay.

How are the SmartNode reward payment intervals calculated?

To calculate the average days between payment intervals (after the first payment), we can use this formula:

SmartNode Payment Interval in days = (Total Global Enabled SmartNodes) / 1571

This represents the average days between payments. Payments vary widely based on the random selection parameters. Some payments can be 11 days and some 1 day. You should not expect a payment before 5 days from starting a node with a new 10,000 SmartCash transaction.

At 8000 total enabled nodes a payment interval would be about 5 days with a range of 1-11 days.

How to ensure my SmartNode is eligible for reward payments?

Note: There is a delay for first payment after the initial 10,000 smart collateral transaction. This delay is calculated by (2.6 minutes) * (number of enabled nodes). After the first payment, the rewards are calculated as stated above. Example: If I make my 10,000 smart collateral transactions to a new address for a fresh node with the current 8000 node count, it will take up to 14 days for the first reward. (Thanks to allemeister for pointing this out.)

Node status error "Not capable smartnode: Smartnode not in smartnode list"

You most likely haven't applied the steps described in Section 9 of the Setup Guide correctly. The final steps after setting up the VPS are that you move to your desktop computer once again, edit the smartnode.conf there and finally start the node from your software wallet (SmartNodes tab).

Node status error "Not capable smartnode: Can't detect valid external address ...

Your hosting provider most likely doesn't support automatically assignation of the external IP or IPv4. This issue has been reported with AWS (Amazon Web Services), among others. It can be solved by adding the following line to smartcash.conf on your VPS: externalip=PUT_EXTERNAL_IP_OF_YOUR_NODE_HERE

Where do I get further support regarding SmartNodes?

Please visit #smartnodes on Discord, you can also post to the dedicated category on SmartCash Community Forums, follow SmartCash support on Twitter or consult our SmartCash support platform.


Frequently asked questions and answers on SmartNodes compiled from Discord by nflaw. (Last updated: 2018-02-11)

SmartCash Blockchain Download

To assist in speeding up the syncing of your SmartNode, you can download a bootstrap of the blockchain here. But make sure you set txindex=1 in smartcash.conf first.

Download » zip https://smartcash.cc/txindexstrap.zip

Bootstrap is updated on a regular basis.

This download is kindly provided by SmartCash