LogoLogo
HomeExplorerGitHub
  • 🗂️Introduction
    • 🧐5Ws-1H about CESS
    • ✨Technical Highlight
    • 🔨Use Cases
    • 📜Whitepaper
    • 💬Contact & Social Media
  • ⛏️CESS Nodes
    • Consensus Nodes
      • Running a Consensus Node
      • Reward Mechanism
    • Storage Nodes
      • Running a Storage Node
      • Running MultiNodes
      • Node Troubleshooting
      • Storage Miner Upgrade Guide
    • CDN Nodes
      • Running a Cacher
      • Running a Retriever
    • TEE Nodes
      • What is TEE Node
      • Running a TEE Node
  • 🌏Community Members
    • Ambassador Program
    • Community Governance
  • 🔥CESS User Guide
    • CESS Account
    • Testnet Faucet
    • Territory Operation
  • 💻Developers
    • CESS SDK
      • Golang SDK
        • Preface
        • Install
        • Initialization
        • Properties
        • Data Process
        • Object/File
          • StoreFile
          • StoreObject
          • RetrieveFile
          • RetrieveObject
          • StoreFileToMiners
          • RetrieveFileFromMiners
        • Chain Related
          • Audit
            • QueryChallengeSnapShot
            • QueryCountedClear
            • QueryCountedServiceFailed
            • SubmitIdleProof
            • SubmitServiceProof
            • SubmitVerifyIdleResult
            • SubmitVerifyServiceResult
          • Babe
            • QueryAuthorities
          • Balances
            • QueryInactiveIssuance
            • QueryTotalIssuance
            • TransferToken
          • CessTreasury
            • QueryCurrencyReward
            • QueryEraReward
            • QueryReserveReward
            • QueryRoundReward
          • DeOSS
            • Authorize
            • CancelAuthorize
            • DestroyOss
            • QueryAllOss
            • QueryAuthorityList
            • QueryOss
            • RegisterOss
            • UpdateOss
          • FileBank
            • QueryAllRestoralOrder
            • QueryUserHoldFileList
            • QueryUserFidList
            • QueryDealMap
            • QueryFile
            • QueryRestoralOrder
            • CalculateReport
            • CertIdleSpace
            • ClaimRestoralNoExistOrder
            • ClaimRestoralOrder
            • DeleteFile
            • GenerateRestoralOrder
            • PlaceStorageOrder
            • ReplaceIdleSpace
            • RestoralOrderComplete
            • TransferReport
            • UploadDeclaration
            • TerritoryFileDelivery
          • SchedulerCredit
            • QueryCurrentCounters
          • Session
            • QueryValidators
          • Sminer
            • IncreaseCollateral
            • IncreaseDeclarationSpace
            • MinerExitPrep
            • MinerWithdraw
            • QueryAllMiner
            • QueryAllRestoralTarget
            • QueryCompleteSnapShot
            • QueryCounterForMinerItems
            • QueryExpenders
            • QueryMinerItems
            • QueryPendingReplacements
            • QueryRestoralTarget
            • QueryRewardMap
            • QueryStakingStartBlock
            • ReceiveReward
            • RegisterPoisKey
            • RegnstkAssignStaking
            • RegnstkSminer
            • UpdateBeneficiary
            • UpdateSminerEndPoint
          • Staking
            • QueryAllBonded
            • QueryAllNominators
            • QueryCounterForValidators
            • QueryCurrentEra
            • QueryEraValidatorReward
            • QueryErasRewardPoints
            • QueryErasTotalStake
            • QueryLedger
            • QueryNominatorCount
            • QueryValidatorCommission
            • QueryValidatorsCount
            • QueryeErasStakers
            • QueryeNominators
          • StorageHandler
            • QueryPurchasedSpace
            • QueryTotalIdleSpace
            • QueryTotalServiceSpace
            • QueryUnitPrice
            • QueryTerritory
            • QueryConsignment
            • MintTerritory
            • ExpandingTerritory
            • RenewalTerritory
            • ReactivateTerritory
            • TerritoryConsignment
            • CancelConsignment
            • BuyConsignment
            • CancelPurchaseAction
          • System
            • QueryAccountInfo
            • QueryAccountInfoByAccountID
            • QueryBlockNumber
          • Tee
            • QueryAllWorkers
            • QueryEndpoints
            • QueryMasterPubKey
            • QueryWorkerAddedAt
            • QueryWorkers
          • RPC Calls
            • ChainGetBlock
            • ChainGetBlockHash
            • ChainGetFinalizedHead
            • NetListening
            • SystemChain
            • SystemProperties
            • SystemSyncState
            • SystemVersion
        • Toolset
      • Javascript SDK
      • Rust SDK
        • Preface
        • chain
          • Audit
            • Challenge Snapshot
            • Counted Clear
            • Counted Service Failed
            • Submit Idle Space Proof
            • Submit Service Proof
            • Submit Verify Idle Result
            • Submit Verify Service Result
          • File Bank
            • Bucket
            • Clear User List
            • deal Map
            • File
            • Restoral Order
            • User Bucket List
            • User Hold File List
            • Calculate Report
            • Certify Idle Space
            • Claim Restoral Noexist Order
            • Claim Restoral Order
            • Create Bucket
            • Delete Bucket
            • Delete File
            • Generate Restoral Order
            • Replace Idle Space
            • Restoral Order Complete
            • Territory File Delivery
            • Transfer Report
            • Upload Declaration
          • Oss
            • Authority List
            • Oss
            • Authorize
            • Cancel Authorize
            • Destroy
            • Register
            • Update
          • Storage Handler
            • Consignment
            • Pay Order
            • Purchased Space
            • Territory Expired
            • Territory Frozen Counter
            • Territory Frozen
            • Territory
            • Territory Key
            • Total Power
            • Total Space
            • Unit Price
            • Buy Consignment
            • Cancel Consignment
            • Cancel Purchase Action
            • Create Order
            • Expand Territory
            • Mint Territory
            • Reactivate Territory
            • Renew Territory
            • Territory Consignment
            • Territory Grants
            • Territory Rename
    • Smart Contract
      • Issue ERC20
      • Deploy an ink! Smart Contract
      • Deploy a Solidity Smart Contract
      • Build a Proof of Existence dApp (ink!)
      • Build a NFT Marketplace (ink!)
      • Build a Proof of Existence dApp (Solidity)
    • Advanced Guides
      • Substrate and EVM Address Conversion
      • Commonly Used Libs
      • CESS Code Overview
  • 📱CESS Products
    • DeOSS
      • Introduction
      • Technical Highlights
      • Architecture
      • Data Access Process
      • API Description
        • Prerequisites
        • Identity Signature
        • Upload File/Object
        • Range Upload
        • Download File
        • Preview File
        • Delete File
        • View File Metadata
        • View Version
  • 📚References
    • 📚Node Operations
      • Running RPC Node
    • 📚In-depth Technical Features
      • R²S
      • RRC
      • LBSS
    • Data Lifecycle
      • Data Upload
      • Data Download
      • Data Deletion
      • Data Restore
      • Data Audit
    • Distributed Storage
      • Identification
      • Consistency Guarantee
      • Node Discovery
      • Message Protocol
      • Storage Method
    • DePIN
      • The DePIN Portrait
    • AI
      • CESS: The Future of Decentralized Data Infrastructure for the AI-Driven World
      • Decentralized Solutions for AI: How CESS is Shaping a Trusted Future
      • CESS in CES: Insights from Jensen Huang’s CES 2025 Speech and CESS Network’s Role in the AI Era
      • CESS AI Agent Hub: The Intelligent Portal of the AI Times
  • 📖Glossary
Powered by GitBook
On this page
  • System Requirement
  • Prepare Stash Account
  • Binding Funds to Stash Account
  • Run a chain node
  • Run with nodeadm
  • Run with container
  • Run with systemd
  • Become a Validator
  • Redeeming Rewards
  • Exiting Consensus from Validation
  • Redeeming Stake
  • Upgrade CESS Nodeadm Client
  • Stop and Remove All Services
  • Remove All Chain Data
  • Update cess-nodeadm
  • Pull Images

Was this helpful?

Edit on GitHub
  1. CESS Nodes
  2. Consensus Nodes

Running a Consensus Node

Last updated 2 days ago

Was this helpful?

System Requirement

If you're planning to run a consensus miner, it's important to make sure your system meets the recommended requirements to ensure that your miner performs at its best.

Resource
Specification

Recommended OS

Ubuntu_x64 20.04 or higher

CPU Processor Num

≥ 4

Memory

≥ 16 GB

Bandwidth

≥ 5 Mbps

Public Network IP

required

Linux Kernel Version

5.11 or higher

Prepare Stash Account

  • Stash Account: This is the account where you keep all the funds you want to stake. This account requires at least 3,000,000 TCESS for staking it can be either from the node owner itself or delegated by other users.

You can also refer to the page for creating a CESS account.

You can either use to get TCESS, or to receive TCESS tokens for staking.

Binding Funds to Stash Account

Open and Select Network > Staking > Accounts > Stash

Select the appropriate stash account from the drop-down menu and enter at least 3,000,000 TCESS in value bounded field. In payment destination, select Stash Account as the reward receiving account (do not increase the amount at stake), which means that mining income will not be automatically added to the stake.

Click Bond -> Sign and Submit to link the Stash Account.

Fund is bonded successfully!

Run a chain node

Run with nodeadm

Install nodeadm

Please purge all of previous data before running a CESS consensus node on machine if an old version consensus node was installed.

    cess purge
    cess uninstall

The cess-nodeadm is a CESS node deployment and management tool. It helps to deploy and manage storage nodes, consensus nodes, and rpc node, simplifying the devOps for all CESS miners.

wget https://github.com/CESSProject/cess-nodeadm/archive/refs/tags/v0.6.1.tar.gz
tar -xvf v0.6.1.tar.gz
cd cess-nodeadm-0.6.1
sudo ./install.sh

On successful installation of cess-nodeadm you will see Install cess nodeadm success message.

Configure nodeadm

Please run the following command to configure nodeadm.

  • set mode with validator

  • set a custom node name cess or any other name of your choice.

$ cess config set

Enter cess node mode from 'tee/storage/validator/rpcnode' (current: validator, press enter to skip): validator
Enter cess node name (current: cess, press enter to skip): cess
Set configurations successfully
Start generate configurations and docker compose file
debug: Loading config file: config.yaml
info: Generating configurations done
info: Generating docker compose file done
e9e3df60a011799587e59f73e22db60d95c2ec7eebfe3058c358ed2d7c6d04a0
Configurations generated at: /opt/cess/nodeadm/build

$ cess start
[+] Running 3/3
 ✔ Container chain       Started
 ✔ Container miner       Started
 ✔ Container watchtower  Started

Run with container

  1. Environment Setup Requirements

    curl -fsSL https://get.docker.com | bash
    docker --version
    docker pull cesslab/cess-chain:testnet
  2. Running Command

    Make sure that port 30336 and 9944 are not occupied by other processes.

    mkdir -p /opt/cess/validator
    
    docker run --rm -v /opt/cess/validator:/opt/cess/data cesslab/cess-chain:testnet key generate-node-key --base-path /opt/cess/data --chain cess-testnet >/dev/null 2>&1
    
    docker run -d \
    --name testnet-rpc \
    -v /opt/cess/validator:/opt/cess/data \
    -p 30336:30336 \
    -p 9944:9944 \
    cesslab/cess-chain:testnet \
    --base-path /opt/cess/data \
    --chain cess-testnet \
    --port 30336 \
    --rpc-port 9944 \
    --rpc-external \
    --execution WASM \
    --wasm-execution compiled \
    --in-peers 75 \
    --out-peers 75 \
    --state-pruning archive \
    --validator \
    --max-runtime-instances 32 \
    --rpc-cors all \
    --prometheus-external \
    --wasm-runtime-overrides /opt/cess/wasms \
    --rpc-methods unsafe

Run with systemd

Download source files

mkidr -p /opt/cess/validator
cd /opt/cess/validator
wget https://github.com/CESSProject/cess/releases/download/cess-v0.7.9-venus/cess-node-v0.9.0-Ubuntu -O cess-node
wget https://github.com/CESSProject/cess/releases/download/cess-v0.7.9-venus/wasm_overrides.tar -O wasm_overrides.tar
tar -xvf wasm_overrides.tar
mv .wasm_overrides/testnet/ ./wasms
mv ./wasms /opt/cess/

Get the source files from a local container

rm -rf /opt/cess/chain-tmp && mkdir -p /opt/cess/chain-tmp
docker pull cesslab/cess-chain:testnet
docker run -d --name chain-tmp -p 30337:30336 -p 9945:9944 -v /opt/cess/chain-tmp:/opt/cess/data cesslab/cess-chain:testnet --base-path /opt/cess/data --chain cess-testnet --port 30336 --name cess --rpc-port 9944 --rpc-external --execution WASM --wasm-execution compiled --in-peers 75 --out-peers 75 --state-pruning archive --rpc-cors all --prometheus-external --wasm-runtime-overrides /opt/cess/wasms

docker cp chain-tmp:/opt/cess/cess-node /opt/cess/validator/cess-node
docker cp chain-tmp:/opt/cess/.wasm_overrides/testnet /opt/cess/wasms
docker stop chain-tmp && docker rm chain-tmp

Run as systemd service

mkdir -p /opt/cess/validator

/opt/cess/validator/cess-node key generate-node-key --base-path /opt/cess/validator --chain cess-testnet >/dev/null 2>&1

cat > /lib/systemd/system/validator.service << EOF
[Unit]
Description=CESS-TESTNET-Validator
After=network.target
[Service]
Type=simple
User=root
ExecStart=/opt/cess/validator/cess-node --base-path /opt/cess/validator --chain cess-testnet --port 30336 --rpc-port 9944 --prometheus-external --name cess-testnet --validator --max-runtime-instances 32 --state-pruning archive --wasm-runtime-overrides /opt/cess/wasms --rpc-methods unsafe 
WorkingDirectory=/opt/cess/validator
StandardOutput=append:/opt/cess/validator/validator.log
StandardError=append:/opt/cess/validator/validator.log
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF

systemctl enable logrotate.timer
systemctl restart logrotate.timer

cat > /etc/logrotate.d/validator << EOF
/opt/cess/validator/validator.log {
    daily
    rotate 7
    missingok
    notifempty
    compress
    delaycompress
    copytruncate
    create 0644 root root
}
EOF

sudo logrotate -d /opt/cess/validator/validator.log

systemctl enable validator
systemctl restart validator
systemctl status validator
tail -f /opt/cess/validator/validator.log

consensus node(validator) is one of the most important part in cess network, it is recommended to set alert for consensus node to ensure that the service is always online.

Become a Validator

  1. Start the chain node

Make sure that the chain node is running normally before proceeding.

$ ps -efww | grep cess-node
  1. Generate a session key

    # generate by nodeadm
    cess tools rotate-keys
    
    # generate by docker
    docker exec chain curl -H 'Content-Type: application/json' -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944 2>/dev/null
    
    # generate by http request
    curl -H 'Content-Type: application/json' -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944 2>/dev/null
  2. Set up a session key

    Fill in the Session Key in the red box

    Click Sign and Submit

  3. Becoming a validator

    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.

    You should see that the node has already appeared on the candidate node list.

Redeeming Rewards

Navigate to CESS Explorer: Network > Staking > Payouts > Payout.

In Payouts, click Payout to initiate a payment. Any account can initiate a payment.

Please claim the reward within 84 era (each era of the test network is 6 hours), which is 21 days. Those who hasn't claimed the reward in this period will not be able to claim it.

Exiting Consensus from Validation

  1. Stop the Consensus

  2. Clear Session Keys

    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.

    Click Submit Transaction button to clear session keys

Redeeming Stake

  1. Unbond fund

  2. Stop the CESS client

    cess stop

Upgrade CESS Nodeadm 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/refs/tags/<new-version>.tar.gz
tar -xvf <new-version>.tar.gz
cd cess-nodeadm-<new-version>
./install.sh --skip-dep --retain-config  --no-rmi

Pull Images

cess pullimg

You can verify that you are running the latest version of .

If the installation fails, please check the .

Get the latest release and wasms from

Navigate to , choose Network > Staking > Accounts > Session Key

Navigate to , click Network > Staking > Accounts > Validate

After completing the steps above, open the and click Network > Staking > Waiting.

In , navigate to: Network > Staking > Account Actions > Stop.

In , navigate to: Developer -> Submission

After 28 eras (each era of the test network is 6 hours), goto , navigate to: Network > Staking > Account Actions > Unbond Funds.

⛏️
cess-nodeadm here
troubleshooting procedures
Github
CESS Explorer
CESS Explorer
CESS Explorer
CESS Explorer
CESS Explorer
CESS Explorer
Creating CESS Accounts
CESS testnet faucet
contact us
CESS Explorer
Add a Stash
Bond Fund
Sign and Submit
Bonded Fund Successfully
rotate-keys Output Example
Session Key 01
Session Key 02
Session Key 03
Validator 01
Validator 02
Validator 03
Validator 04
Redemption: First Step
Redemption: Second Step
Exiting-01
Exiting-02
Exiting-03
Exiting-04
Staking 01