English
Ask or search…
K
Links
Comment on page

Running a Consensus Node

Server Requirement

The recommended requirement of a consensus server:
Resource
Specification
Recommended OS
Ubuntu_x64 20.04 or higher
# of CPU Cores
≥ 4
Intel SGX Enabled
required
Memory (SGX encrypted memory)
≥ 64 GB
Bandwidth
≥ 5 Mbps
Public Network IP
required
Linux Kernel Version
5.11 or higher

SGX Enabled

The CPU must support Intel Software Guard Extensions (Intel SGX) technology and Flexible Launch Control (FLC). The BIOS must support Intel SGX, and must enable the Intel SGX option. Please refer to the server manufacturer's BIOS guide to enable SGX functionality. Check out CPU models that support SGX. They can be either Intel ME, Intel SPS, or both Intel SPS and Intel ME.

Fixed Public IP

The machine must use a fixed public network IP. The traffic exit must be in the same network segment as the IP. Execute the following command to confirm they are in the same network segment.
curl ifconfig.co

Prepare CESS Account

Running storage validator needs two accounts.
  • Stash Account: Requires at least staking 300,000 TCESS, either from the node owner or delegated by other users, to run a consensus validator.
  • Controller Account: Requires at least 100 TCESS for paying gas fee.
Please refer to the artcle Creating CESS Accounts for creating a CESS account, goto CESS testnet faucet to get TCESS, or contact us to receive TCESS tokens for staking.
After the wallet account is created, navigate to CESS Explorer.

Bond Fund for Stash

Choose Network, click Staking > Accounts > Stash
Add a Stash
Select both Stash Account and Controller Account.
Value bonded: 300,000 TCESS is recommended. In payment destination, select the second option Stash Account as the reward receiving account (do not increase the amount at stake), which means that mining income will not automatically added to staking.
Bond Fund
Click Bond -> Sign and Submit to link Stash Account and Controller Account
Sign and Submit
Fund is bonded successfully!
Bonded Fund Successfully

Install CESS Client

The cess-nodeadm is a CESS node deployment and management program. It helps deploying and managing storage nodes, consensus nodes, and full nodes, simplifying the devOps for all CESS miners.
wget https://github.com/CESSProject/cess-nodeadm/archive/v0.5.1.tar.gz
tar -xvf v0.5.1.tar.gz
cd cess-nodeadm-0.5.1
sudo ./install.sh
Check that you are using the most updated version of cess-nodeadm. Currently it is v0.5.1.
If a message Install cess nodeadm success shows up, the installation is successful.
If the installation fails, please check the troubleshooting procedures.

Config CESS Client

Run:
cess config set
You should see output similar to the following:
Enter cess node mode from 'authority/storage/watcher' (current: authority, press enter to skip):
Enter cess node name (current: cess, press enter to skip):
Enter external ip for the machine (current: xxx.., press enter to skip):
Enter cess chain ws url (current:ws://172.18.0.9:9944, press enter to skip):
Enter cess scheduler stash account (current: xxx.., press enter to skip):
Enter cess scheduler controller phrase (current: xxx.., press enter to skip):
Start configuring the endpoint to access kaleido from the Internet
Try to get your external IP ...
Enter the kaleido endpoint (current: http://221.122.79.3:10010, press enter to skip):
Set configurations successfully
Intel SGX is already enabled on this system
Start generate configurations and docker compose file
debug: Loading config file: config.yaml
info: Generating configurations done
info: Generating docker compose file done
57ea8c914461c3184ddb......
Configurations generated at: /opt/cess/nodeadm/build
try pull images, node mode: authority
download image: cesslab/cess-chain:latest
latest: Pulling from cesslab/cess-chain
3b65ec22a9e9: Already exists
6e4a9a61f489: Pull complete
Digest: sha256:5652dce2bd28796......
Status: Downloaded newer image for cesslab/cess-chain:latest
docker.io/cesslab/cess-chain:latest
download image: cesslab/kaleido:latest
latest: Pulling from cesslab/kaleido
Digest: sha256:49899acaafd11982......
Status: Image is up to date for cesslab/kaleido:latest
docker.io/cesslab/kaleido:latest
download image: cesslab/kaleido-rotator:latest
latest: Pulling from cesslab/kaleido-rotator
Digest: sha256:42535077af6bf......
Status: Image is up to date for cesslab/kaleido-rotator:latest
docker.io/cesslab/kaleido-rotator:latest
download image: cesslab/kaleido-kafka:latest
latest: Pulling from cesslab/kaleido-kafka
Digest: sha256:29ed986ea......
Status: Image is up to date for cesslab/kaleido-kafka:latest
docker.io/cesslab/kaleido-kafka:latest
pull images finished
Please fill in your TEE Worker server address while you configure the endpoint. The default is the address from the local server. If you do not know TEE Worker yet, please refer to the node role introduction.
If the configuration process fails, please refer to the troubleshooting guideline.

Manage Validator Life Cycle

Becoming a Validator

  1. 1.
    Start the consensus node
    cess start
  2. 2.
    Generate a session key
    cess tools rotate-keys
    rotate-keys Output Example
    The field in the quotation marks after "result" is the Session Key, which will be used in subsequent operations. "localhost:9933" is the default port.
  3. 3.
    Setup a session key
    Navigate to CESS Explorer, choose Network > Staking > Accounts > Session Key
    Session Key 01
    Fill in the Session Key in the red box
    Session Key 02
    Click Sign and Submit
    Session Key 03
  4. 4.
    Becoming a validator
    Navigate to CESS Explorer, click Network > Staking > Accounts > Validate
    Validator 01
    Validator 02
    Enter 100 in reward commission percentage, indicating that the reward will not be distributed to others.
    Select No, block all nominations in allows new nominations dropdown, indicating that no nominations will be accepted.
    Again, click Sign and Submit.
    Validator 03
    After completing the steps above, open the CESS Explorer and click Network > Staking > Waiting.
    Validator 04
    You should see that the node has already appeared on the candidate node list.

Redeeming Rewards

Navigate to CESS Explorer: Network > Staking > Payouts > Payout.
Redemption: First Step
In Payouts, click Payout to initiate a payment. Any account can initiate a payment.
Redemption: Second Step
Please claim the reward within 84 era (each era of the test network is 24 hours), which is 84 days. Those who hasn't claimed the reward in this period will not be able to claim it.

Exiting Consensus Validation

  1. 1.
    Stop the Consensus
    In CESS Explorer, navigate to: Network > Staking > Account Actions > Stop.
    Exiting-01
  2. 2.
    Clear Session Keys
    In CESS Explorer, navigate to: Developer -> Submission
    Exiting-02
    Enter controller account in using the selected account controller. Then in submit the following extrinsic, enter session and choose purgeKeys() in the box next to it.
    Exiting-03
    Click Submit Transaction button to clear session keys
    Exiting-04

Redeeming the Stake

  1. 1.
    Unbond fund
    After 28 eras (each era of the test network is 24 hours), goto CESS Explorer, navigate to: Network > Staking > Account Actions > Unbond Funds.
    Staking 01
  2. 2.
    Stop the CESS client
    cess stop

Common Operations

Start Consensus Node

cess start

Query Miner Status

$ cess status
-----------------------------------------
NAMES STATUS
kld-agent Up 2 minutes
kld-sgx Up 2 minutes
kaleido-kafka Up 2 minutes
chain Up 2 minutes
watchtower Up 2 minutes
-----------------------------------------

Examine Config Information

cess config show

Stop and Remove All Services

cess down

Upgrade CESS Client

Stop and Remove All Services

cess stop
cess down

Remove All Chain Data

Do not perform this operation unless the CESS network has been redeployed and it is confirmed that the data can be cleared.
cess purge

Update cess-nodeadm

wget https://github.com/CESSProject/cess-nodeadm/archive/<new-version>.tar.gz
tar -xvf <new-version>.tar.gz
cd cess-nodeadm-<new-version>
./install.sh --skip-dep
Currently the most updated version is v0.5.1.

Pull Images

cess pullimg