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.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.
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.
1.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
1.4 Stop the RPC node service
Enter the command: cess stop chain to stop the running RPC node service.
1.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.6 Start the RPC node
cess start chain
1.7 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
2.1 Environment Setup Requirements
OS required: Ubuntu 20+
Rust install:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
⚠️ 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.