Categories
Getting Started

Checking your Balance

You can check the balance of any wallet at any time by specifying the address on the command line.

Check the balance of your Validator Identity account

~/Safecoin/target/release/safecoin balance

Check the balance of a specific keypair

~/Safecoin/target/release/safecoin balance ~/ledger/validator-identity.json

Check the balance of any address

~/Safecoin/target/release/safecoin balance <ADDRESS>

Categories
Getting Started Staking

Staking with CLI

The safest method to delegate your stake is remotely to the validator. In this short guide I’ll show you how to create a local wallet, a stake account and how to delegate to your validator.

Make a note of your validator vote-account address as this is needed in order to delegate a stake-account to your chosen validator.

To complete this guide your will need to build/acquire the safecoin and the safecoin-keygen binaries. If you don’t have access to the binaries, you can build them as below.

You will need SSH/terminal access to an Ubuntu 20.04 system. Login to your system and build the binaries below.

Install dependencies, modules and build binaries

apt update upgrade -y

curl https://sh.rustup.rs -sSf | sh

source $HOME/.cargo/env

rustup component add rustfmt

rustup update

sudo apt-get install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang make git screen -y

git clone https://github.com/Fair-Exchange/Safecoin.git

cd Safecoin

cargo build --release

mkdir ~/ledger

You now have the binaries built in the ~/SAFE/target/release folder.

Creating a Local Wallet, a Stake-Account and Delegating

The steps below will create a local wallet keypair, a stake account and will delegate your stake-account to your desired validator vote account.

Create a keypair for your Local Wallet

# create local wallet

~/Safecoin/target/release/safecoin-keygen new -o ~/ledger/wallet.json

# set config to default to local wallet

~/Safecoin/target/release/safecoin config set --keypair ~/ledger/wallet.json

Make sure to keep a backup of your keypair seed and private key, which you can find in ~/ledger/wallet.json file.

Send funds to your Local Wallet

# send some funds to the local wallet address

~/Safecoin/target/release/safecoin address

# check the balance, are they there?

~/Safecoin/target/release/safecoin balance

Create a keypair for your Stake-Account

Make sure to keep a backup of your keypair seed and private key, which you can find in ~/ledger/stake-account.json file.

# create local stake keypair

~/Safecoin/target/release/safecoin-keygen new -o ~/ledger/stake-account.json

Create and Credit your Stake-Account

Ensure there are enough funds in your local wallet. If you want to stake 10,000 SAFE then sent 10,001 SAFE so that you have a little extra to cover the transaction fees.

# create and fund stake account 

~/Safecoin/target/release/safecoin create-stake-account ~/ledger/stake-account.json <AMOUNT> --from ~/ledger/wallet.json --stake-authority ~/ledger/wallet.json --withdraw-authority ~/ledger/wallet.json --fee-payer ~/ledger/wallet.json

Delegate your Stake-Account to a Validator

This final step commits your stake-account and begins activation. This is the point of no return.

# delegate to the vote account of your chosen validator

~/Safecoin/target/release/safecoin delegate-stake ~/ledger/stake-account.json <VOTE ADDRESS OF CHOSEN VALIDATOR> --fee-payer ~/ledger/wallet.json --stake-authority ~/ledger/wallet.json

At this point, you will be given a transaction id which confirms your stake is now delegated.

You can view your stake-account address on the SafeCoin explorer to see how much of your stake is active, and how much is activating.

You can also see the Validator commission fee.

Note: You cannot send coins to your stake-account once it is delegated. To stake more coins you need to create a new stake account. Simply repeat the process above with a new stake-account keypair and delegate to your desired validator.

Categories
Getting Started

What are Epochs?

An epoch in SafeCoin terms is 432,000 slots (blocks) each of which aim for 400ms each. It works out at just over 2 days as not all blocks will be 400ms, that is the optimium target.

432,000 slots x 0.4s = 172,800 seconds / 3600 = 48 hours

Epochs are important as they signify the reward periods. At the end of each epoch rewards are paid out and more activating stake becomes active.

To find information about the current epoch

$ ~/Safecoin/target/release/safecoin epoch-info

Block height: 7106491
Slot: 7124293
Epoch: 16
Transaction Count: 12952282
Epoch Slot Range: [6912000..7344000)
Epoch Completed Percent: 49.142%
Epoch Completed Slots: 212293/432000 (219707 remaining)
Epoch Completed Time: 23h 35m 17s 200ms/2days (1day 24m 42s 800ms remaining)

A Word on Epochs
Staking-related updates in SafeCoin happen at epoch boundaries. An epoch is the length of a certain amount of blocks (in SafeCoin: “slots”) in which the validator schedule of SafeCoin’s consensus algorithm is defined.

To stakers this means that beginning and stopping to stake, as well as reward distribution, always happen when epochs switch over. An epoch is 432,000 slots, each of which should at a minimum take 400ms. Since block times are variable this means epochs effectively last somewhere between 2–3 days.

Categories
Getting Started Installation Recovery

Hardware Requirements

For your new SafeCoin Validator you will need a VPS or Dedicated Server that is running Ubuntu 20.04.

Minimum Specification

  • 4 CPU Cores
  • 8,192Mb RAM
  • Ubuntu 20.04

The storage requirement differs according to your intention to run either a Pruned Node (contains a partial segment of the ledger) or a Full History Node which contains a copy of the entire ledger.

Pruned Node

  • 20Gb SSD

Full History Node

  • 2Tb SSD (per annum)

Ready to install? Proceed to Installation Guide

Categories
Getting Started

What is a Validator?

Running a SafeCoin Validator Node offers a unique opportunity to get involved in the ecosystem development and adoption.

Validators are crucial guarantors for maintaining the stability and security of the SafeCoin network.

Visit Official Website: https://www.safecoin.org

# print a list of validators

$ ~/Safecoin/target/release/safecoin validators