Safex Full Node: Beginners Explanation

Understand what a Safex Full Node is and become a supporter of the Safex Network by running your own node.

Safex Full Node: Beginners Explanation

Running a Safex Full Node offers many benefits, both to the user themselves, and to the Safex network.

Why would you want to operate a Safex Full Node?

  • To maintain the highest level of security and privacy
  • To have the ability to independently verify transactions and send/receive SFT/SFX without relying on someone else’s node
  • To support the Safex Blockchain Network and contribute to its decentralization

From a network perspective, running a Safex full node adds to the security of the network and increases the strength of, and further decentralizes, the network, because it hosts and synchronises a full copy of the Safex blockchain.

But what is a node?

In the simplest of terms, a node is a piece of software that validates transactions and blocks within the blockchain network, and relays that information to other nodes on the network.

The Safex node (daemon) software performs all critical functions and is the ‘distributed brain’ of the blockchain:

1) It communicates with other nodes to synchronize the blockchain

  • a new safexd instance creates its copy of the blockchain by receiving every block from other nodes already operating anywhere around the world. This is known as Initial Block Download. (this is the very meaning of a decentralized ledger, as you create a new instance of the ledger at your local level)
  • there are 10 seed nodes operated by the Safex project team. More information of what seed nodes are can be found here.  
  • the other nodes on the network that your node communicates with are known as peers (there can be IN peers [they connected to you - these connections benefit others] and OUT peers [you connected to them - these connections only benefit you])
  • it is unlikely that any single node in the network is in communication with every other node on the network
  • nodes form a spider web of connections with each other, so that in totality, information is disseminated quickly to all nodes through their peer connections

2) It adds new transaction data to the transaction pool that it receives from a wallet, and transmits the new transaction information to its peers

3) It relays new transaction pool data from any peer to all peers (this is how unprocessed transaction data becomes known throughout the network.

4) It is part of the consensus mechanism for new blocks that are found, and if it happens to be the node that actually finds the next block in the ledger…

  • Writes the transactions processed on the found block to the ledger and generates the block reward and pays it to the wallet address of the miner who won the block
  • Disseminates the new block data to its peers (and then those nodes relay to all their peers, etc until all nodes have received the new block information and written it to their own copies of the ledger)

5) Although rare, there are instances where the same block is found at approximately the same time (close enough together that the found block data had not yet disseminated through the entire spider web of the network). When this happens, the nodes themselves decide which block becomes the actual won block through the consensus mechanism of the nodes communicating with each other. A digital ‘battle’ of sorts ensues, as the nodes figure out amongst themselves (find consensus) as to which block should be written to the ledger as THE block.

  • This is why all Advanced Transactions on the Safex Blockchain have a 10-block delay, before becoming active - it allows for any such block consensus issues to be completed.

All node peers get classified to either a Whitelist, Greylist, or Blacklist.

  • Whitelist: online and reachable
  • Greylist: offline or no longer reachable (the IP address of a previously whitelisted node may have been changed)
  • Blacklist: voided (often because the node is running an outdated version of the daemon software, or transmits known bad outputs)

6) While not a common occurrence (as most people choose to pool mine with additional software), it is actually possible to mine directly from within the safexd node software.


IMPORTANT!

Running a Node requires you staying updated with project development, and ensuring you perform software updates to the safexd software whenever new updates are released. If you fail to keep your node updated, you will no longer be supporting the network, and attempts to connect your wallet via your node will result in you not being able to perform transactions at the correct blockheight, as your node will have been ban/blacklisted by those nodes running the correct software version.

Even worse, if you happen to be solo mining from a node no longer on the correct software version, you’ll be wasting your time and electricity, as any blocks ‘found’ will not be on the consensus chain, and thus will be invalid.


1) Using Docker to Run a Node

2) Safex “Blue Box” Node Community Project

3) Building an RPi3 Node - (probably now easiest to use the Docker option above, rather than a custom compile of the safexcore code)

4) Running a Node on a VPS service (content possibly outdated)

5) As the safexd software is released for Windows, Mac and Linux, any PC can also run the safexd instance directly in a terminal window on their PC. Windows users will likely need to whitelist the software within any Antivirus software they have running, and also let it Run in Administrator Mode to function properly. Separate instructions have been done for each OS, as follows:

  • Link to Windows Node Setup - coming soon
  • Link to Linux Node Setup - coming soon
  • Link to Mac Node Setup - coming soon

If you have an Always On [dual core, or better] computer with spare hard drive space, a good internet connection and bandwidth limits, and want to help support the project, then running a Safex Node will be of benefit to both yourself, as a Safex blockchain user, and to the Network, so long as you stay up-to-date with safex development.

If you can't leave the node running 24/7, then you can still make use of the personal benefits a node offers, but will need to let the node resync to the current top block each time you start it, before you connect to it with your wallet.