CESS BUILD BOOK
Search
K
Comment on page

Storage Miner

Section Brief:

Mining preparation

The OS requirement of the Storage server is as following:
Item
Parameter
Recommended OS and Version
Linux 64-bit Intel/AMD
CPU Core
≥ 4
Memory
≥ 8 GB
Bandwidth
≥ 5 M
Public network IP
required
Linux Kernel Version
5.11 or higher
The following commands are executed with root privileges, if the prompt Permission denied appears, you need to switch to root privileges, or add sudo at the top of these commands.

Firewall configuration

By default, cess-bucket uses port 4001 to listen for incoming connections, if your platform blocks the port by default, you may need to enable the access to the port.
ufw allow 4001

Disk mounting

Check the hard disk status using the df -h command:
df -h
The disk is not mounted If the hard drive for storage mining cannot be found. Use the command below to view unmounted hard disks:
fdisk -l
Disk /dev/vdb: 200 GiB, 214748364800 bytes, 419430400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x331195d1
The unmounted disk is /dev/vdb in the demonstration above. We will be using /dev/vdb to demonstrate the mounting operation.
Allocate the /dev/vdb disk:
fdisk /dev/vdb
Enter and press Enter:
n
p
1
2048
the value after default
w
Format the newly divided disk into ext4 format:
mkfs.ext4 /dev/vdb
Enter "y" to continue if the system asks to proceed:
Proceed anyway? (y,N) y
Create /cess directory to mount the disk. Using/cess as an example:
mkdir /cess
echo "/dev/vdb /cess ext4 defaults 0 0" >> /etc/fstab
replace /dev/vdb with your own disk name. /cess has to remain the same as created in the previous step. If you are not under root privileges, try :
echo "/dev/vdb /cess ext4 defaults 0 0" | sudo tee -a /etc/fstab
Mount /cess :
mount -a
Check the disk mounting status:
df -h
If the "/cess" appers, the disk has been successfully mounted.

Prepare CESS Account

Miners need to create two wallet accounts.
  • 🤑
    earning account: used for receiving rewards from mining.
  • 🏦
    staking account: used for staking and signing blockchain transactions.
Please make sure you have sufficient TCESS before you claim bucket space: Staking amount needed: 4000TCESS/ 1000 GB
Please refer to the CESS Account section above for creating a CESS account. Please go to the CESS faucet to get TCESS. Join CESS telegram to get our assistance.

Install cess-nodeadm

If you have previously deployed nodeadm on your machine, please jump to this and then go to the next section. If you are new, just ignore it.
wget https://github.com/CESSProject/cess-nodeadm/archive/v0.4.4.tar.gz
tar -xvf v0.4.4.tar.gz
cd cess-nodeadm-0.4.4/
./install.sh
Please make sure the cess-nodeadm version v0.4.4 is correct, check the most updated version.
If Install cess nodeadm success shows up, the installation is successful .
If the installation fails, please refer to Possible issues during installation

Set up Configuration

Set up bucket configuration
cess config set
# cess config set
Enter cess node mode from 'authority/storage/watcher' (current: authority, press enter to skip): storage
Enter cess storage listener port (current: 15001, press enter to skip): enter
Enter cess storage earnings account: cXiHsw32kT3Fzw6YeXDTECCfFNKjDVg85eg......
Enter cess storage staking signature phrase: shoe ...... creek metal avoid
Enter cess storage disk path (default: /opt/cess/storage/disk): /cess
Enter cess storage space, by GB unit (current: 300, press enter to skip): 1000
Set configurations successfully
Start bucket
cess start
The following should be seen:
[+] Running 3/0
✔ Container chain Running 0.0s
✔ Container bucket Running 0.0s
✔ Container watchtower Running 0.0s
If the Config process fails, please refer to Possible issues during Config

Check Chain Sync Status

View chain node log
docker logs chain
As shown in the figure below, if we see that the height of the block corresponding to "best" is about the latest height in CESS Explorer, it means the local chain node synchronization is completed.
Only when the chain synchronization is completed, you can operate other functions such as increase the staking, view the status of the node, etc.

Common Operations

View storage node log
docker logs bucket
As shown in the figure below, it is the log information when the storage node starts normally. It shows: the rpc address used by the storage node and the address of the boot node, the connection to the boot node, its own peer id, the chain network and the p2p network, the synchronization information of the currently used chain node, and the workspace.
The chain network must be consistent with the p2p network.
Do not delete or change files in the workspace.
View bucket status
cess bucket stat
An example of the returned results is shown below:
see specific explanation of the names above in Appendix

Increase the staking

cess bucket increase <deposit amount>

Withdraw staking

cess bucket withdraw
You need to exit first.

Query reward information

cess bucket reward

Claim reward

cess bucket claim

Update all service images

cess pullimg

Stop and remove all service

cess down

Update earnings account

cess bucket update earnings [earnings account]

Exit the CESS network

cess bucket exit
Please use this command carefully, once you exit, you cannot resume.

New version upgrade

Stop and remove all service
cess stop
cess down
Remove all program data
cess purge
Do not perform this operation unless the CESS network has been redeployed and it is confirmed that the data can be cleared.
Update the cess-nodeadm
wget https://github.com/CESSProject/cess-nodeadm/archive/v0.4.4.tar.gz
tar -xvf v0.4.4.tar.gz
cd cess-nodeadm-0.4.4/
./install.sh --skip-dep --retain-config
Please make sure the cess-nodeadm version v0.4.4 is correct, check the most updated version.
Pull images
cess pullimg

Appendix

peer id
The id for peer communication.
state
Positive: Working fine
Frozen: Out of staking
Exit: Quiting the network as a storage miners
Offline: Being kicked out of the network
staking amount
The amount of TCESS being staked.
validated space
The sapce validated to store user's data.
used space
The space used by storage users.
locked space
The space locked when waiting for users' data being uploaded.
staking account
The account to stake TCESS(>4000).
earnings account
The account to earn space reward.