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
      • VRF
    • 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
  • 1 Run with cess-nodeadm
  • 2 Run with source code
  • 3 Run with Container

Was this helpful?

Edit on GitHub
  1. References
  2. Node Operations

Running RPC Node

Last updated 20 days ago

Was this helpful?

RPC nodes do not directly participate in block production like consensus nodes. Instead, they are responsible for verifying transactions and facilitating communication between different nodes and between nodes and clients, promoting transaction verification and on-chain information retrieval.

1 Run with cess-nodeadm

  1. Check the latest version of cess-nodeadm Latest version of cess-nodeadm: ⚠️ Replace all occurrences of x.x.x in the following text with the latest version number. For example, if the latest version is v0.6.1, then replace x.x.x with 0.6.1.

  2. Check the installed version of cess-nodeadm Enter cess version in the console to check if the nodeadm version is the latest. If nodeadm is the latest version, you can skip step 3. If not, proceed to step 3 to install. If you do not see nodeadm version, it means cess-nodeadm is not installed, and you need to proceed to step 3 to install.

  3. Download and install the cess-nodeadm

    wget https://github.com/CESSProject/cess-nodeadm/archive/vx.x.x.tar.gz
    tar -xvf vx.x.x.tar.gz
    cd cess-nodeadm-x.x.x/
    ./install.sh
  4. Stop the RPC node service Enter the command: cess stop chain to stop the running RPC node service.

  5. Define script configuration parameters

The archive mode saves all blocks, which is suitable for full node operation, otherwise, you can set the number of blocks to be saved

Enter cess node mode from 'tee/storage/validator/rpcnode' (current: rpcnode, press enter to skip): rpcnode
Enter cess node name (current: cess, press enter to skip): local-chain
Enter cess chain pruning mode, 'archive' or number (current: archive, press enter to skip): archive  #number of blocks saved
  1. Start the RPC node

    cess start chain
  2. Check if the RPC node is synchronizing blocks normally

docker logs chain

An RPC node will also be started automatically when the user runs the storage node using nodeadm or mineradm, unless an external chain is specified.

2 Run with source code

  1. Environment Setup Requirements

    • OS required: Ubuntu 20+

    • Rust install:

      curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    • Dependencies install:

      apt update && apt install -y gcc llvm clang make git libssl-dev pkg-config wget unzip
    • ProtoBuf install (run as root):

      mkdir pb && cd pb \
        && wget --show-progress -q https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-x86_64.zip \
        && unzip protoc-25.2-linux-x86_64.zip \
        && cp bin/protoc /usr/local/bin/protoc \
        && chmod +x /usr/local/bin/protoc \
        && cp -r include/* /usr/local/include \
        && rm -rf ./* \
        && protoc --version
  2. You can get the latest version using one of the following methods:

    Method 1: Download and unzip the release (e.g., cess-0.7.9-venus as example):

    wget https://github.com/CESSProject/cess/archive/refs/tags/cess-v0.7.9-venus.tar.gz
    tar -zxvf cess-cess-v0.7.9-venus.tar.gz

    Method 2: Clone the repository with the latest tag:

    git clone https://github.com/CESSProject/cess.git
    cd cess
    git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
  3. Compile cess-node

    Enter the cess-node directory:

    cargo build --release --features only-attestation --features verify-cesealbin

    ⚠️ Note: The compilation may take approximately 25 minutes on an 8-core machine.

  4. Start the RPC service

    ./target/release/cess-node --base-path 【Your custom database path】 --chain cess-testnet --port 【Your custom p2p port】 --rpc-port 【Your custom rpc port】 --prometheus-external --unsafe-rpc-external --name 【Your custom name】 --rpc-cors all --rpc-max-connections 5000 --state-pruning archive --wasm-runtime-overrides ./scripts/wasm_overrides/testnet/

    Use the -h flag to view more command options.

    ⚠️ Special note for --wasm-runtime-overrides: Due to the online upgrade of SGX in the current testnet, it is necessary to specify special wasm files for overriding. For example, if the spec_100.wasm file is located at /opt/wasm/, the parameter should be filled in as --wasm-runtime-overrides /opt/wasm. You only need to specify the directory path, not the file path. Currently, we have placed the spec_100.wasm file in the /scripts/wasm_overrides/testnet/ path within the cess repository.

    If the node is printing block synchronization logs, it means it's running successfully.

    ⚠️ It is recommended to use systemd, screen or tmux commands to run cess-node(RPC) if you want to keep cess-node running.

3 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/testnet-rpc-data
    
    docker run -d \
    --name testnet-rpc \
    -v /opt/cess/testnet-rpc-data:/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 \
    --rpc-max-connections 65535 \
    --rpc-cors all \
    --prometheus-external \
    --wasm-runtime-overrides /opt/cess/wasms

    Execute docker run -it --rm --entrypoint /opt/cess/cess-node cesslab/cess-chain:testnet --help to get more information about the command options.

  3. Check if the RPC node is synchronizing blocks normally

       docker logs testnet-rpc

    The rpc node log is down below and start to synchronize blocks.

       2025-04-30 09:47:13 CESS Node
       2025-04-30 09:47:13 ✌️  version 0.9.0-9936f4e
       2025-04-30 09:47:13 ❀️  by CESS LAB, 2017-2025
       2025-04-30 09:47:13 πŸ“‹ Chain specification: cess-testnet
       2025-04-30 09:47:13 🏷  Node name: better-ink-0467
       2025-04-30 09:47:13 πŸ‘€ Role: FULL
       2025-04-30 09:47:13 πŸ’Ύ Database: RocksDb at /opt/cess/data/chains/cess-testnet/db/full
       2025-04-30 09:47:17 Found wasm override. version=cess-node-100 (cess-node-0.tx1.au1) file=/opt/cess/wasms/spec_100.wasm
       2025-04-30 09:47:17 Found wasm override. version=cess-node-100 (cess-node-0.tx1.au1) file=/opt/cess/wasms/spec_100.wasm
       2025-04-30 09:47:20 Using default protocol ID "sup" because none is configured in the chain specs
       2025-04-30 09:47:20 🏷  Local node identity is: 12D3KooWJJbr7xMCByzzHCUD8NXz52JDRC7pcXdf6otopvZCAreG
       2025-04-30 09:47:20 Running libp2p network backend
       2025-04-30 09:47:20 πŸ’» Operating system: linux
       2025-04-30 09:47:20 πŸ’» CPU architecture: x86_64
       2025-04-30 09:47:20 πŸ’» Target environment: gnu
       2025-04-30 09:47:20 πŸ’» CPU: Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
       2025-04-30 09:47:20 πŸ’» CPU cores: 40
       2025-04-30 09:47:20 πŸ’» Memory: 257412MB
       2025-04-30 09:47:20 πŸ’» Kernel: 6.8.0-51-generic
       2025-04-30 09:47:20 πŸ’» Linux distribution: Ubuntu 20.04.6 LTS
       2025-04-30 09:47:20 πŸ’» Virtual machine: no
       2025-04-30 09:47:20 πŸ“¦ Highest known block at #2370
       2025-04-30 09:47:20 Running JSON-RPC server: addr=0.0.0.0:9944,[::]:36421
       2025-04-30 09:47:20 🏁 CPU single core score: 760.78 MiBs, parallelism score: 734.78 MiBs with expected cores: 8
       2025-04-30 09:47:20 🏁 Memory score: 4.82 GiBs
       2025-04-30 09:47:20 🏁 Disk score (seq. writes): 768.54 MiBs
       2025-04-30 09:47:20 🏁 Disk score (rand. writes): 337.66 MiBs
       2025-04-30 09:47:20 〽️ Prometheus exporter started at 0.0.0.0:9615
       2025-04-30 09:47:20 discovered: 12D3KooWEpnboX55ceLkf2wqUQ6LBujEReiCqmvj5SLLdoJJP3oQ /ip4/172.17.0.1/tcp/30336/ws
       2025-04-30 09:47:20 πŸ” Discovered new external address for our node: /ip4/154.194.34.206/tcp/30336/ws/p2p/12D3KooWJJbr7xMCByzzHCUD8NXz52JDRC7pcXdf6otopvZCAreG
       2025-04-30 09:47:23 [#2469] πŸ—³  Starting phase Off, round 2.
       2025-04-30 09:47:23 [2469] πŸ’Έ new validator set of size 5 has been processed for era 1
       2025-04-30 09:47:25 βš™οΈ  Syncing, target=#3711019 (5 peers), best: #2939 (0x87db…8c38), finalized #2936 (0xa33a…c890), ⬇ 757.8kiB/s ⬆ 5.7kiB/s

Get the latest release version of cess-node

πŸ“š
πŸ“š
https://github.com/CESSProject/cess-nodeadm/tags
Check the latest version of cess-node