diff --git a/SUMMARY.md b/SUMMARY.md index 10e5e82..3506c2b 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -12,6 +12,7 @@ * [Running MultiNodes](cess-miners/storage-miner/multi-miner.md) * [Acceleration Guide](cess-miners/storage-miner/teeworker.md) * [Node Troubleshooting](cess-miners/storage-miner/troubleshooting.md) + * [Storage Miner Upgrade Guide](cess-miners/storage-miner/sminer-upgrade.md) * [Consensus Nodes](cess-miners/consensus-miner/README.md) * [Running a Consensus Node](cess-miners/consensus-miner/running.md) * [Reward Mechanism](cess-miners/consensus-miner/reward.md) diff --git a/cess-miners/storage-miner/multi-miner.md b/cess-miners/storage-miner/multi-miner.md index d613cd5..ba2c616 100644 --- a/cess-miners/storage-miner/multi-miner.md +++ b/cess-miners/storage-miner/multi-miner.md @@ -170,12 +170,14 @@ After executing the above installation command, customize your own config file a - **UseSpace:** Storage capacity of the storage node, measured in GB. - **UseCpu:** Number of logical cores used by the storage node. -- **port:** storage node use that port to communicat with each other, the port of each storage node must be different and not occupied by other process +- **TeeList:** Use this list to specify the TEE Nodes first. +- **Timeout:** Default 12 second for transaction with chain. +- **port:** Storage node use that port to communicat with each other, the port of each storage node must be different and not occupied by other process +- **apiendpoint:** An external IP address or domain which can be accessed by internet, default value: `hostPublicIP:port`. - **diskPath:** Absolute system path where the storage node run, requiring a file system to be mounted at this path. - **earningsAcc:** Used to receive mining rewards. [Get earningsAcc and mnemonic](../../user/cess-account.md) - **mnemonic:** Account mnemonic, consisting of 12 words, with each storage node requiring a different mnemonic, set mnemonic as node's signatureAcc in /opt/cess/mineradm/config.yaml. - **stakingAcc:** Used to pay for staking TCESS. 4000 TCESS at least is required for stakingAcc([Get TCESS](https://cess.network/faucet.html)). SignatureAcc also can be a stakingAcc when delete property: stakingAcc or make it empty in /opt/cess/mineradm/config.yaml. -- **Storage Deposit:** To keep the storage node in honoring its service commitment, the storage node account will have its native tokens locked for the storage amount pledged to offer. Current in testnet, it is 4,000 TCESS per TB. The pledged space is **round up** to the closest TB unit and locked for that amount multiply with 4,000 TCESS. The minimum locked token is also 4,000 TCESS. - **chainWsUrl:** As an RPC node for blockchain synchronization. The priority of `miners[].chainWsUrl` is higher than `node.chainWsUrl` in /opt/cess/mineradm/config.yaml. - **backupChainWsUrls:** Backup RPC nodes that can be official RPC nodes or other RPC nodes you know. The priority of `miners[].backupChainWsUrls` is higher than `node.backupChainWsUrls` in /opt/cess/mineradm/config.yaml. diff --git a/cess-miners/storage-miner/sminer-upgrade.md b/cess-miners/storage-miner/sminer-upgrade.md new file mode 100644 index 0000000..52766e9 --- /dev/null +++ b/cess-miners/storage-miner/sminer-upgrade.md @@ -0,0 +1,98 @@ +# Introduction + +**For better data transmission, we need to upgrade our storage miner to latest version which is incompatible with the old version.** + +Add configuration: `apiendpoint` and `timeout` +- apiendpoint: An external `ip:port` or `domain` which can be accessed by public network, default value: `hostPublicIP:port` +- Timeout: Default `12` seconds for transaction with chain. + +Delete configuration: `Boot` + +## Old Configuration File Schema + +```yaml +Name: miner1 +Port: 15001 +EarningsAcc: cXxxx +StakingAcc: cXxxx +Mnemonic: expand left depict favorite busy marriage good curtain celery misery fly obscure +Rpc: + - 'ws://127.0.0.1:9944' + - 'wss://testnet-rpc.cess.network' +UseSpace: 1000 +Workspace: /opt/miner-disk +UseCpu: 2 +TeeList: + - '127.0.0.1:8080' + - '127.0.0.1:8081' +Boot: + - _dnsaddr.boot-miner-testnet.cess.network +``` + +## New Configuration File Schema +```yaml +app: + workspace: /opt/miner-disk + port: 15001 + maxusespace: 1000 + cores: 2 + apiendpoint: '1.1.1.1:15001' +chain: + mnemonic: expand left depict favorite busy marriage good curtain celery misery fly obscure + stakingacc: null + earningsacc: cXxxx + timeout: 12 + rpcs: + - 'ws://127.0.0.1:9944' + - 'wss://testnet-rpc.cess.network' + tees: + - '127.0.0.1:8080' + - '127.0.0.1:8081' +``` + + +# How to Upgrade +## For nodeadm user +```bash +# step 1: update nodeadm client +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 +sudo ./install.sh --skip-dep + +# step 2: update related images +$ sudo cess pullimg + +# step 3: update config file +$ sudo cess config set +# Start configuring the endpoint to access Storage-Miner from the internet +# Do you need to automatically detect extranet address as endpoint? (y/n) need_detect +# ... + +# step 4: restart service +$ sudo cess restart +``` + +## For mineradm user + +```bash +# step 1: update mineradm client +sudo wget https://github.com/CESSProject/cess-multiminer-admin/archive/latest.tar.gz -O /tmp/latest.tar.gz +sudo tar -xvf latest.tar.gz +cd cess-multiminer-admin-latest +sudo bash ./install.sh --no-rmi --retain-config --skip-dep --keep-running + +# step 2: update related images +$ sudo mineradm pullimg + +# step 3: update config file +method 1: edit /opt/cess/mineradm/config.yaml based on the old config file: /opt/cess/mineradm/.old_config.yaml +method 2: use default value of apiendpoint/Timeout: cat /opt/cess/mineradm/.old_config.yaml > /opt/cess/mineradm/config.yaml + +# step 4: generate new config file +$ sudo mineradm config generate + +# step 5: restart service +$ sudo mineradm restart +``` +