通过 DATUM Gateway 在 DxPool 挖掘 XBT
Updated: 2026-09-22
本教程说明如何通过自建 DATUM Gateway 将兼容的 BLAKE2b 矿机接入 DxPool。Gateway 通过 RPC 从你的节点获取区块模板,并向矿机分发工作。不想自建的用户,也可以直接连接 DxPool 公共网关(见第 3 节)。
开始前准备
- 请使用兼容的 BLAKE2b 矿机;SHA256d 比特币矿机不能挖掘 XBT。
- 准备一台可长期运行的 Linux 服务器,以及有效的 XBT 收款地址(格式与比特币主网地址相同)。
- 节点需要高速磁盘、充足的存储空间和带宽。
1. 配置 Bitcoin Knots 节点
节点必须是支持 XBT 的 Bitcoin Knots 29.4.2 或更高版本。在 Ubuntu 上可执行:
sudo add-apt-repository ppa:luke-jr/bitcoinknots
sudo apt install bitcoind psmisc
在节点配置文件 ~/.bitcoin/bitcoin.conf 中加入:
server=1
rpcuser=datum
rpcpassword=设置一个强密码
maxmempool=1000
blockmaxweight=785000
blocknotify=killall -USR1 ratum-gateway
prune=10000
重启节点,等待完全同步后再进行下一步。
2. 安装并配置 Gateway
XBT 需要使用 RATUM Gateway,原版 datum_gateway 不支持 XBT。
编译
sudo apt install build-essential git curl
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
git clone https://github.com/iohzrd/ratum.git
cd ratum
git checkout cffaf47
cargo build --release -p ratum-gateway
请使用上面指定的版本,编译完成后程序位于 target/release/ratum-gateway。
配置
新建 gateway.json:
{
"bitcoind": {
"rpcuser": "datum",
"rpcpassword": "与 bitcoin.conf 中相同的密码",
"rpcurl": "http://127.0.0.1:8332"
},
"stratum": {
"listen_port": 23334,
"require_address_username": true
},
"mining": {
"pool_address": "你的 XBT 收款地址"
},
"api": {
"admin_password": "设置强密码",
"listen_port": 7152
},
"datum": {
"pool_host": "xbt.datum.dxpool.com:28915",
"pool_port": 28915,
"pool_pubkey": "13dceb1f532408e88661e613c017e88becf0f0e0f3c06fcbb457b49a5033fe427326610133e943af4d3d0fd083a5b18c93f4364c26e3d71472cfe7dbf0ee5514"
}
}
未列出的选项请保持默认。pool_host 只填域名,端口填在 pool_port。
安全提示: 请执行 chmod 600 gateway.json,不要将 7152 和 23334 端口暴露到公网。
启动
RUST_LOG=info ./target/release/ratum-gateway -c gateway.json
日志中出现 DATUM Server MOTD 表示已连接 DxPool。建议使用 systemd 等方式常驻运行。
3. 配置矿机
| 设置项 | 自建 Gateway | DxPool 公共网关 |
|---|---|---|
| 矿池 URL | stratum+tcp://你的_gateway_ip:23334 | stratum+tcp://xbt.public-gateway-01.dxpool.com:23334 |
| 用户名 | 你的 XBT 地址 或 你的 XBT 地址.矿工名 | 同左 |
| 密码 | x | x |
- 用户名必须使用 XBT 地址,不支持子账户名;地址填错将无法获得收益。
- 矿工名建议只使用数字和小写字母,不超过 64 个字符。
- Goldshell 矿机请去掉
stratum+tcp://前缀。 xbt.datum.dxpool.com:28915仅供 Gateway 连接,矿机不能直接连接。
4. 验证连接
- 浏览器打开
http://你的_gateway_ip:7152,确认 Current job 正常显示;登录后可在 Miners 中看到矿机和已接受的份额。 - 几分钟后,在 DxPool 官网的 XBT 矿池页面输入你的地址,查看算力和收益。
若未看到矿机,请检查 Gateway 的 IP、端口 23334、收款地址和矿机网络。
收益 说明
- 收益在出块时直接付到你的地址,无需提现。
- 按 XBT 规则,挖矿收益约 45 天后才能花费。
- 费率以 DxPool 官网公布为准。
相关信息
有关兼容设备的更多说明,请参阅 XBT 挖矿教程。