├── images ├── .DS_Store ├── xdai-001.jpg ├── dashboard.jpg └── matemasj-xdai.jpg ├── rpc-height.sh ├── bin-install.sh ├── ant.yaml ├── LICENSE ├── one-docker.sh ├── README_EN.md └── README.md /images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espoir1989/sana-install/HEAD/images/.DS_Store -------------------------------------------------------------------------------- /images/xdai-001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espoir1989/sana-install/HEAD/images/xdai-001.jpg -------------------------------------------------------------------------------- /images/dashboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espoir1989/sana-install/HEAD/images/dashboard.jpg -------------------------------------------------------------------------------- /images/matemasj-xdai.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espoir1989/sana-install/HEAD/images/matemasj-xdai.jpg -------------------------------------------------------------------------------- /rpc-height.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | value=`curl -s --data '{"jsonrpc":"2.0", "method":"eth_blockNumber","params":[],"id":67}' -H "Content-Type: application/json" -X POST $1 | jq -r '.result'` 3 | var=`printf %d $value` 4 | echo 本地高度:$var 5 | 6 | value2=`curl -s --data '{"jsonrpc":"2.0", "method":"eth_blockNumber","params":[],"id":67}' -H "Content-Type: application/json" -X POST https://rpc.xdaichain.com | jq -r '.result'` 7 | var2=`printf %d $value2` 8 | echo 琏上高度:$var2 9 | 10 | -------------------------------------------------------------------------------- /bin-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | apt update 3 | apt install zip unzip curl wget nginx screen vim -y 4 | wget https://github.com/ethsana/sana/releases/download/v0.1.3/ant-linux-amd64 5 | wget https://github.com/ethsana/exportSanaKey/releases/download/v0.1.0/export-sana-key-linux-amd64 6 | mv ant-linux-amd64 /usr/bin/ant 7 | mv export-sana-key-linux-amd64 /usr/bin/ExportKey 8 | chmod -R 777 /usr/bin/ant /usr/bin/ExportKey 9 | mkdir /home/ant 10 | wget https://raw.githubusercontent.com/espoir1989/sana-install/main/ant.yaml 11 | wget https://github.com/ethsana/ant-dashboard/archive/refs/heads/online.zip 12 | unzip online.zip 13 | rm -rf /var/www/html/* 14 | cp -r ant-dashboard-online/* /var/www/html/ 15 | service nginx restart -------------------------------------------------------------------------------- /ant.yaml: -------------------------------------------------------------------------------- 1 | api-addr: :1633 2 | block-hash: "" 3 | block-time: "15" 4 | clef-signer-enable: false 5 | clef-signer-endpoint: "" 6 | config: /root/ant.yaml 7 | cors-allowed-origins: ["*"] 8 | data-dir: /home/ant 9 | db-block-cache-capacity: "33554432" 10 | db-disable-seeks-compaction: false 11 | db-open-files-limit: "1024" 12 | db-write-buffer-size: "33554432" 13 | debug-api-addr: :1635 14 | debug-api-enable: true 15 | full-node: true 16 | gateway-mode: false 17 | global-pinning-enable: false 18 | mainnet: true 19 | p2p-addr: :1634 20 | password: "钱包密码" 21 | password-file: "" 22 | postage-stamp-address: "" 23 | price-oracle-address: "" 24 | standalone: false 25 | swap-deployment-gas-price: "" 26 | swap-enable: true 27 | swap-endpoint: https://rpc.xdaichain.com/ 28 | swap-factory-address: "" 29 | swap-legacy-factory-addresses: [] 30 | tracing-enable: false 31 | tracing-endpoint: 127.0.0.1:6831 32 | tracing-service-name: ant 33 | transaction: "" 34 | verbosity: "5" 35 | warmup-time: 20m0s 36 | welcome-message: "" 37 | dashboard-authorization: "test1234" -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 espoir 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /one-docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $USER != 'root' ];then 4 | echo "请在root下运行!" 5 | exit 6 | fi 7 | 8 | read -p "请输入钱包密码:" password 9 | read -p "请输入面板授权码:" dashboard 10 | echo "####安装基础组件####" 11 | cd /root 12 | apt update 13 | apt install zip unzip curl wget nginx screen vim -y 14 | echo "####镜像拉取中####" 15 | docker pull expoir1989/sana:v0.1.1 16 | echo "####下载配置文件####" 17 | wget -P /root https://github.com/espoir1989/sana-install/raw/main/ant.yaml 18 | echo "修改配置文件" 19 | sed -i 's/钱包密码/'$password'/' /root/ant.yaml 20 | sed -i 's/test1234/'$dashboard'/' /root/ant.yaml 21 | echo "####启动容器####" 22 | mkdir /home/ant 23 | docker run -d --restart=always -p 1633:1633 -p 1634:1634 -p 1635:1635 -v /root/ant.yaml:/root/ant.yaml -v /home/ant:/home/ant --name sana expoir1989/sana:v0.1.3 ant start --verbosity 5 --full-node --config /root/ant.yaml --debug-api-enable 24 | echo "####安装面板####" 25 | wget https://github.com/ethsana/exportSanaKey/releases/download/v0.1.0/export-sana-key-linux-amd64 26 | mv export-sana-key-linux-amd64 /usr/bin/ExportKey 27 | chmod -R 777 /usr/bin/ExportKey 28 | wget https://github.com/ethsana/ant-dashboard/archive/refs/heads/online.zip 29 | unzip online.zip 30 | rm -rf /var/www/html/* 31 | cp -r ant-dashboard-online/* /var/www/html/ 32 | echo "####启动面板####" 33 | service nginx restart 34 | echo "####查看日志####" 35 | docker logs -f sana 36 | -------------------------------------------------------------------------------- /README_EN.md: -------------------------------------------------------------------------------- 1 | # SANA Mining Tutorial 2 | ## !Unofficial Tutorial ! 3 | ## Basic information 4 | ### Token contract address 5 | #### The ETH network :[0x87cdc02f0812f08cd50f946793706fad9c265e2d](https://etherscan.io/token/0x87cdc02f0812f08cd50f946793706fad9c265e2d) 6 | 7 | #### XDAI network:[0x20cfc7c76c446F889E3969BeDEF46a950a2111F5](https://blockscout.com/xdai/mainnet/tokens/0x20cfc7c76c446F889E3969BeDEF46a950a2111F5) 8 | 9 | #### SANA purchase 10 | 11 | [https://app.uniswap.org/](https://app.uniswap.org/) 12 | 13 | ### XDAI network 14 | #### RPC configuration 15 | |-------|----------------------------| 16 | |-------|----------------------------| 17 | | Network name | XDAI | 18 | | RPC Address | https://rpc.xdaichain.com/ | 19 | | ChainID | 100 | 20 | | symbol | Xdai | 21 | 22 | #### MateMask configuration 23 | ![](images/matemasj-xdai.jpg) 24 | 25 | 26 | #### Across the link address 27 | |-------|----------------------------------------------------------------| 28 | |-------|----------------------------------------------------------------| 29 | | DAI | [https://bridge.xdaichain.com/](https://bridge.xdaichain.com/) | 30 | | Token | [https://omni.xdaichain.com/bridge](https://omni.xdaichain.com/bridge) | 31 | 32 | #### RPC application 33 | Registered address 34 | ``` 35 | https://getblock.io/ 36 | ``` 37 | Once the registration is complete, fill in the key according to the address below, and then fill in the configuration file 38 | ``` 39 | https://stake.getblock.io/mainnet/?api_key=key 40 | ``` 41 | 42 | ## SGX Install the configuration 43 | SGX supports only Intel platforms, because Sana uses inte_SGx, which is not well supported at present. The deployment method is provided here, but the hardware solution is not provided. 44 | 45 | Turn on the SGX function 46 | ``` 47 | wget https://github.com/ethsana/sgx-tools/releases/download/0.1/sgx_enable 48 | sudo chmod +x sgx_enable 49 | sudo ./sgx_enable 50 | ``` 51 | Install the SGX driver 52 | ``` 53 | sudo wget https://download.01.org/intel-sgx/sgx-dcap/1.11/linux/distro/ubuntu18.04-server/sgx_linux_x64_driver_1.41.bin 54 | sudo chmod +x sgx_linux_x64_driver_1.41.bin 55 | sudo ./sgx_linux_x64_driver_1.41.bin 56 | ``` 57 | import module 58 | ``` 59 | /sbin/modprobe intel_sgx 60 | ``` 61 | If the following error occurs, the machine is not supported 62 | ``` 63 | modprobe: ERROR: could not insert 'intel_sgx': No such device 64 | ``` 65 | The kernel higher than 5.15 already supports SGX, so no additional driver installation is required. 66 | 67 | ## Binary deployment 68 | #### This bash only works in Ubuntu 69 | ```shell 70 | sudo wget https://raw.githubusercontent.com/espoir1989/sana-install/main/bin-install.sh 71 | sudo sh bin-install.sh 72 | ``` 73 | The script is installed. The Sana client Ant, Sana -dashboard, and ExportKey private key export tool are installed 74 | After the installation is complete, modify the configuration file 75 | ``` 76 | password: "wallet password" //wallet password 77 | swap-endpoint: https://rpc.xdaichain.com/ //rpc address 78 | dashboard-authorization: "test1234" //Panel Authorization password 79 | ``` 80 | Once the changes are complete, you can use Screen to run in the background 81 | Sana Start command 82 | ``` 83 | sudo ant start --verbosity 5 --full-node --config /root/ant.yaml --debug-api-enable 84 | ``` 85 | After the output, you need to transfer xDAI and Sana from the XDAI network 86 | ![](images/xdai-001.jpg) 87 | After the roll-in, the node starts to run 88 | 89 | ## Docker deployment 90 | The image used in this script is not built for health monitoring. Please add it by yourself. 91 | ``` 92 | docker pull expoir1989/sana:v0.1.3 93 | ``` 94 | Downloading a Configuration File 95 | ``` 96 | https://github.com/espoir1989/sana-install/raw/main/ant.yaml 97 | ``` 98 | Modifying a Configuration File 99 | ``` 100 | password: "wallet password" //wallet password 101 | swap-endpoint: https://rpc.xdaichain.com/ //rpc address 102 | dashboard-authorization: "test1234" //Panel Authorization password 103 | ``` 104 | Boot image 105 | ``` 106 | docker run -d --restart=always -p 1633:1633 -p 1634:1634 -p 1635:1635 -v /root/ant.yaml:/root/ant.yaml -v /home/ant:/home/ant --name sana expoir1989/sana:v0.1.3 ant start --verbosity 5 --full-node --config /root/ant.yaml --debug-api-enable 107 | ``` 108 | See the log 109 | ``` 110 | docker logs -f sana 111 | ``` 112 | Follow the prompts to transfer to XDAI and Sana 113 | 114 | ## K8s deployment 115 | Perfect... 116 | 117 | ## Dashboard 118 | The installation script has nginx installed and is accessible locally 119 | ``` 120 | http://localhost 121 | ``` 122 | Server or VPS deployment 123 | ``` 124 | http://IP 125 | ``` 126 | 127 | ## private key export 128 | ``` 129 | ExportKey Path walletpassword 130 | ``` 131 | 132 | ## donation 133 | 134 | ETH Address:0x1edBdb7828fb040bE54f8e1988b8E7a7f486B2e3 135 | 136 | XDAI Address:0x1edBdb7828fb040bE54f8e1988b8E7a7f486B2e3 137 | 138 | Thanks for donations, more one-click mining tutorials will be provided in the future. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # SANA挖矿教程 4 | ## !非官方教程,一键脚本仅适合未部署过的用户!取消国内加速,本教程不再维护更新,项目方不作为。 5 | ## 基础信息 6 | ### 代币合约地址 7 | #### ETH网络 :[0x87cdc02f0812f08cd50f946793706fad9c265e2d](https://etherscan.io/token/0x87cdc02f0812f08cd50f946793706fad9c265e2d) 8 | 9 | #### XDAI网络:[0x20cfc7c76c446F889E3969BeDEF46a950a2111F5](https://blockscout.com/xdai/mainnet/tokens/0x20cfc7c76c446F889E3969BeDEF46a950a2111F5) 10 | 11 | #### SANA购买地址 12 | 13 | [https://app.uniswap.org/](https://app.uniswap.org/) 14 | 15 | ### XDAI网络 16 | #### RPC配置 17 | |-------|----------------------------| 18 | |-------|----------------------------| 19 | | 网络名称 | XDAI | 20 | | RPC地址 | https://rpc.xdaichain.com/ | 21 | | 链ID | 100 | 22 | | 符号 | Xdai | 23 | 24 | #### MateMask配置 25 | ![](images/matemasj-xdai.jpg) 26 | 27 | 28 | #### 跨链地址 29 | |-------|----------------------------------------------------------------| 30 | |-------|----------------------------------------------------------------| 31 | | DAI跨链 | [https://bridge.xdaichain.com/](https://bridge.xdaichain.com/) | 32 | | 代币跨链 | [https://omni.xdaichain.com/bridge](https://omni.xdaichain.com/bridge) | 33 | 34 | #### RPC申请 35 | 注册网址 36 | ``` 37 | https://getblock.io/ 38 | ``` 39 | 注册完成后,根据下面的地址填充key,然后填入配置文件 40 | ``` 41 | https://stake.getblock.io/mainnet/?api_key=key 42 | ``` 43 | ## SEV 安装配置 44 | #### 需要 AMD Naples/Rome Epyc 系列的CPU,并在主板中打开sev与sem的开关 45 | ``` 46 | vim /etc/default/grub 47 | ``` 48 | 在GRUB_CMDLINE_LINUX_DEFAULT中增加 49 | ``` 50 | mem_encrypt=on kvm_amd.sev=1 51 | ``` 52 | 修改完成后重启服务器 53 | 54 | #### 验证,输出一下数据为开启成功 55 | ``` 56 | ubuntu@nsXXX:~# dmesg | grep SME 57 | [ 1.247928] AMD Secure Memory Encryption (SME) active 58 | ``` 59 | 60 | ``` 61 | ubuntu@nsXXX:~# dmesg | grep "SEV supported" 62 | [ 7.637219] SVM: SEV supported 63 | ``` 64 | ``` 65 | ubuntu@nsXXX:~# cat /sys/module/kvm_amd/parameters/sev 66 | 1 67 | ``` 68 | 69 | ## SGX 安装配置 70 | SGX仅支持intel平台,因为sana使用的inte_sgx,目前支持情况不佳,这里只提供部署方法,不提供硬件方案。 71 | 72 | 打开sgx功能 73 | ``` 74 | wget https://github.com/ethsana/sgx-tools/releases/download/0.1/sgx_enable 75 | sudo chmod +x sgx_enable 76 | sudo ./sgx_enable 77 | ``` 78 | 安装sgx驱动 79 | ``` 80 | sudo wget https://download.01.org/intel-sgx/sgx-dcap/1.11/linux/distro/ubuntu18.04-server/sgx_linux_x64_driver_1.41.bin 81 | sudo chmod +x sgx_linux_x64_driver_1.41.bin 82 | sudo ./sgx_linux_x64_driver_1.41.bin 83 | ``` 84 | 导入模块 85 | ``` 86 | /sbin/modprobe intel_sgx 87 | ``` 88 | 如果出现一下错误说明机器不支持 89 | ``` 90 | modprobe: ERROR: could not insert 'intel_sgx': No such device 91 | ``` 92 | 高于5.15的kernel已经支持sgx,不需要额外安装驱动。 93 | 94 | ## 二进制部署 95 | #### 该脚本仅支持ubuntu运行 96 | ```shell 97 | sudo wget https://raw.githubusercontent.com/espoir1989/sana-install/main/bin-install.sh 98 | sudo sh bin-install.sh 99 | ``` 100 | 脚本安装了,sana客户端ant,sana-dashboard,ExportKey私钥导出工具 101 | 安装完成后需要修改配置文件 102 | ``` 103 | password: "钱包密码" //钱包密码 104 | swap-endpoint: https://rpc.xdaichain.com/ //rpc地址 105 | dashboard-authorization: "test1234" //面板授权密码 106 | ``` 107 | 修改完成后,可以使用screen在后台运行 108 | sana启动命令 109 | ``` 110 | sudo ant start --verbosity 5 --full-node --config /root/ant.yaml --debug-api-enable 111 | ``` 112 | 输出一下信息后,需要将xdai网络中的xdai以及sana转入 113 | ![](images/xdai-001.jpg) 114 | 转入后节点开始运行 115 | 116 | ## Docker部署 117 | 本脚本使用的镜像,未构建健康监测,请自行增加。 118 | ``` 119 | docker pull expoir1989/sana:v0.1.3 120 | ``` 121 | 下载配置文件 122 | ``` 123 | https://github.com/espoir1989/sana-install/raw/main/ant.yaml 124 | ``` 125 | 修改配置文件 126 | ``` 127 | password: "钱包密码" //钱包密码 128 | swap-endpoint: https://rpc.xdaichain.com/ //rpc地址 129 | dashboard-authorization: "test1234" //面板授权密码 130 | ``` 131 | 启动镜像 132 | ``` 133 | docker run -d --restart=always -p 1633:1633 -p 1634:1634 -p 1635:1635 -v /root/ant.yaml:/root/ant.yaml -v /home/ant:/home/ant --name sana expoir1989/sana:v0.1.3 ant start --verbosity 5 --full-node --config /root/ant.yaml --debug-api-enable 134 | ``` 135 | 查看日志 136 | ``` 137 | docker logs -f sana 138 | ``` 139 | 根据提示转入xdai以及sana 140 | 141 | ## Docker一键部署部署 142 | #### 请自行安装docker运行环境 143 | docker 安装教程 144 | [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/) 145 | 146 | 一键部署请执行以下命令 147 | 148 | ``` 149 | wget https://raw.githubusercontent.com/espoir1989/sana-install/main/one-docker.sh 150 | 151 | /bin/bash one-docker.sh 152 | ``` 153 | 根据提示输入钱包密码与面板授权密码,该脚本会安装私钥导出程序以及面板。 154 | 155 | ## Docker 批量部署 156 | #### 请在root权限下运行 157 | ``` 158 | sudo su 159 | ``` 160 | #### 下载并修改配置文件 161 | ``` 162 | cd /root 163 | wget https://github.com/espoir1989/sana-install/raw/main/ant.yaml 164 | ``` 165 | ``` 166 | password: "钱包密码" 167 | dashboard-authorization: "api鉴权密码" 168 | ``` 169 | #### 开启容器 170 | ``` 171 | mkdir -p /data/001 /data/002 /data/003 /data/004 /data/005 172 | docker run -d --restart=always -p 1633:1633 -p 1634:1634 -p 1635:1635 -v /root/ant.yaml:/root/ant.yaml -v /data/001:/home/ant --name sana-001 expoir1989/sana:v0.1.3 ant start --verbosity 5 --full-node --config /root/ant.yaml --debug-api-enable 173 | docker run -d --restart=always -p 1643:1633 -p 1644:1634 -p 1645:1635 -v /root/ant.yaml:/root/ant.yaml -v /data/002:/home/ant --name sana-002 expoir1989/sana:v0.1.3 ant start --verbosity 5 --full-node --config /root/ant.yaml --debug-api-enable 174 | docker run -d --restart=always -p 1653:1633 -p 1654:1634 -p 1655:1635 -v /root/ant.yaml:/root/ant.yaml -v /data/003:/home/ant --name sana-003 expoir1989/sana:v0.1.3 ant start --verbosity 5 --full-node --config /root/ant.yaml --debug-api-enable 175 | docker run -d --restart=always -p 1663:1633 -p 1664:1634 -p 1665:1635 -v /root/ant.yaml:/root/ant.yaml -v /data/004:/home/ant --name sana-004 expoir1989/sana:v0.1.3 ant start --verbosity 5 --full-node --config /root/ant.yaml --debug-api-enable 176 | docker run -d --restart=always -p 1673:1633 -p 1674:1634 -p 1675:1635 -v /root/ant.yaml:/root/ant.yaml -v /data/005:/home/ant --name sana-005 expoir1989/sana:v0.1.3 ant start --verbosity 5 --full-node --config /root/ant.yaml --debug-api-enable 177 | ``` 178 | 依次查看log并质押代币 179 | ``` 180 | docker logs -f sana-001 181 | ``` 182 | ``` 183 | docker logs -f sana-002 184 | ``` 185 | ``` 186 | docker logs -f sana-003 187 | ``` 188 | ``` 189 | docker logs -f sana-004 190 | ``` 191 | ``` 192 | docker logs -f sana-005 193 | ``` 194 | 195 | ## K8s部署 196 | 完善中...... 197 | 198 | ## 官方Docker镜像 199 | ``` 200 | docker pull ethsana/ant:v0.1.3 201 | ``` 202 | 203 | ## Dashboard 204 | 安装脚本已经安装了nginx,本地直接访问 205 | ``` 206 | http://localhost 207 | ``` 208 | 服务器或者vps部署 209 | ``` 210 | http://IP地址 211 | ``` 212 | 213 | #### 独立安装dashboard 214 | 仅限未安装nginx,并且未使用一键安装的场景 215 | ``` 216 | apt install zip unzip curl wget nginx screen vim -y 217 | wget https://github.com/ethsana/ant-dashboard/archive/refs/heads/online.zip 218 | unzip online.zip 219 | rm -rf /var/www/html/* 220 | cp -r ant-dashboard-online/* /var/www/html/ 221 | service nginx restart 222 | ``` 223 | 224 | ## 群控面板 225 | 根据部分用户需求开发了一个本地化的群控面板 226 | ![](images/dashboard.jpg) 227 | 228 | ## 私钥导出 229 | #### 二进制导出 230 | ``` 231 | wget https://github.com/ethsana/exportSanaKey/releases/download/v0.1.0/export-sana-key-linux-amd64 232 | mv export-sana-key-linux-amd64 /usr/bin/ExportKey 233 | chmod -R 777 /usr/bin/ExportKey 234 | ExportKey keys文件夹路径 钱包密码 235 | ``` 236 | #### 源码执行,自行安装golang环境 237 | ``` 238 | git clone https://github.com/ethsana/exportSanaKey 239 | cd exportSanaKey/pkg 240 | go run main.go keys文件夹路径 钱包密码 241 | ``` 242 | 243 | ## API 244 | #### 节点状态 245 | 授权状态 246 | ``` 247 | curl -s localhost:1615/status -H 'Authorization: 授权码' 248 | ``` 249 | 非授权状态 250 | ``` 251 | curl -s localhost:1615/status 252 | ``` 253 | #### 挖矿状态查询 254 | 授权状态 255 | ``` 256 | curl -s localhost:1635/mine/status -H 'Authorization: 授权码' 257 | ``` 258 | 非授权状态 259 | ``` 260 | curl -s localhost:1635/mine/status 261 | ``` 262 | #### 提取收益 263 | 授权状态 264 | ``` 265 | curl -s -X POST http://localhost:1635/mine/withdraw -H 'Authorization: 授权码' 266 | ``` 267 | 非授权状态 268 | ``` 269 | curl -s -X POST http://localhost:1635/mine/withdraw 270 | ``` 271 | #### 提取质押币,提取后解锁需要7天,这7天无收益 272 | 授权状态 273 | ``` 274 | curl -s -X POST http://localhost:1635/mine/cashdeposit -H 'Authorization: 授权码' 275 | ``` 276 | 非授权状态 277 | ``` 278 | curl -s -X POST http://localhost:1635/mine/cashdeposit 279 | ``` 280 | 7天后执行提取 281 | ``` 282 | 待完善 283 | ``` 284 | 285 | ## 备份 286 | #### 请完整备份一下三个目录,缺一不可! 287 | ``` 288 | keys 289 | localstore 290 | statestore 291 | ``` 292 | 293 | ## 节点数据恢复 294 | #### 如果遇到重复质押,或者节点无法提取收益的情况,可以用修复工具进行修复 295 | ``` 296 | wget https://github.com/ethsana/repair-chequebook/releases/download/v0.1.0/repair-chequebook-linux-amd64 297 | mv repair-chequebook-linux-amd64 /usr/bin/repair-chequebook 298 | chmod +X /usr/bin/repair-chequebook 299 | ``` 300 | 新建一个文件夹,并且开始创建新数据 301 | ``` 302 | mkdir new 303 | repair-chequebook new/ 创建账本的hash rpc地址 304 | ``` 305 | 修复完成后核对账本地址,并将节点钱包的keys文件夹复制进来,使用该数据启动节点 306 | 307 | ## 节点db修复 308 | #### 遇到节点unwork,查询区块链浏览器后,发现异常pending的请求,请使用该工具修复 309 | 本版本为临时版本,旨在官方发布正式版本前,为db异常的用户,提供数据修复 310 | 正式运行请使用官方版本,介意的用户,请自行编译或者等待官方releases,本为不为该版本承担任何责任 311 | 312 | 请在执行前,先终止异常的节点 313 | 314 | md5sum 315 | 4fb22b84b5956d8c9a38e44e92eace56 316 | 317 | #### 使用教程,请在执行前备份数据 318 | ``` 319 | wget https://github.com/espoir1989/sana-install/releases/download/0.1.3-db-espoir1989/ant 320 | ./ant db resetnonce --data-dir 数据目录 321 | ``` 322 | 323 | #### 国内下载 324 | ``` 325 | wget https://github.com/espoir1989/sana-install/releases/download/0.1.3-db-espoir1989/ant 326 | ./ant db resetnonce --data-dir 数据目录 327 | ``` 328 | 329 | ## RPC-docker部署 330 | #### 预留60G以上的可用空间 331 | ``` 332 | mkdir /home/openethereum 333 | chmod -R 777 /home/openethereum 334 | docker run --restart=always -d --name xdai-node \ 335 | -v /home/openethereum:/home/openethereum/.local/share/io.parity.ethereum/ \ 336 | -p 8545:8545 -p 8546:8546 -p 30302:30303 \ 337 | -p 30302:30303/udp openethereum/openethereum:latest \ 338 | --jsonrpc-interface all --ws-interface all \ 339 | --max-peers 1000 --jsonrpc-threads=100 --jsonrpc-cors=all --jsonrpc-server-threads=16 --chain xdai 340 | ``` 341 | /home/openethereum 为数据存储目录,请根据本地磁盘情况修改。 342 | 国内同步区块需要3-7天,国外需要1-5天,带机量如果较大,请使用配置较高的机器。 343 | 最近比较忙,空下来会提供一份离线数据包,大约50G,可以加速区块同步。 344 | 345 | ## XDAI 手机钱包 346 | 347 | [TP钱包教程](https://www.chainnews.com/articles/691156556396.htm) 348 | 349 | ## 付费服务 350 | #### 节点搭建,tee搭建,群控面板,tee服务器租用,技术咨询 351 | #### 请联系[telegram](https://t.me/chouyan666) 352 | 353 | ## 捐赠 354 | 355 | ETH地址:0x1edBdb7828fb040bE54f8e1988b8E7a7f486B2e3 356 | 357 | XDAI地址:0x1edBdb7828fb040bE54f8e1988b8E7a7f486B2e3 358 | 359 | 感谢捐赠,未来会提供更多的一键挖矿教程。 --------------------------------------------------------------------------------