TON挖矿 stratum协议已经上线,
支持Miner:
挖矿服务:
stratum+tcp://ton.stratum.hashpool.site:9055
支持SSL协议
stratum+ssl://ton.stratum.hashpool.site:19055
lolMiner 挖矿配置如下:
lolMiner -a TON –pool stratum+tcp://ton.stratum.hashpool.site:9055 –user EQCO63C70cQlJmplvtZ7oWPosuYZdvnCO27xu-gSMOu9WRKA.worker1 –ton-mode 6
SSL协议使用如下命令:
lolMiner -a TON –pool stratum+ssl://ton.stratum.hashpool.site:19055 –user EQCO63C70cQlJmplvtZ7oWPosuYZdvnCO27xu-gSMOu9WRKA.worker1 –ton-mode 6
Gminer 挖矿配置如下:
miner.exe –algo ton –server ton.stratum.hashpool.site:9055 –user EQCO63C70cQlJmplvtZ7oWPosuYZdvnCO27xu-gSMOu9WRKA
SSL协议使用如下命令:
miner.exe –algo ton –server ton.stratum.hashpool.site:19055 –user EQCO63C70cQlJmplvtZ7oWPosuYZdvnCO27xu-gSMOu9WRKA –ssl 1
如果–user 使用交易所地址,并且交易所地址需要填写备注的情况, –user使用如下格式:
address:comment
例如 EQBfAN7LfaUYgXZNw5Wc7GBgkEX2yhuJ5ka95J1JJwXXf4a8:880593
如果您使用FPGA挖矿,可以使用以上兼容协议,也可以使用hashpool专属FPGA挖矿协议。
hashpool 专属FPGA挖矿协议
挖矿服务:
stratum+tcp://ton.stratum.hashpool.site:9044
支持SSL协议
stratum+ssl://ton.stratum.hashpool.site:19044
stratum挖矿协议如下:
mining.subscribe
- params: [“agent”, null]
- result: [null, “nonce prefix”, “nonce2 size”]
request:
{
"id": 1,
"method": "mining.subscribe",
"params": ["tonminer-v1.0.0", null]
}
response:
{
"id": 1,
"result": [null, "3e29d542", 28],
"error": null
}
nonce1 是 rdata1的前4个字节
rdata1长度为32字节. nonce2 为28个字节 len(nonce2) = 32 – len(nonce1) = 32 – 4 = 28 bytes.
mining.authorize
- params: [“username”, “password”]
- result: true
{
"id": 2,
"method": "mining.authorize",
"params": ["EQA3hKVrpll-jVAtA1KjfpaMJ7YGg44M6DQuBdBX9G5xWxOA", "x"]
}
{"id":2,"result":true,"error":null}
如果挖矿使用交易所地址,并且交易所地址需要填写备注的情况, username使用如下格式:
address:comment
例如 EQBfAN7LfaUYgXZNw5Wc7GBgkEX2yhuJ5ka95J1JJwXXf4a8:880593
mining.set_target
- params: [“32bytes target in hex”]
{
"id": null,
"method": "mining.set_target",
"params": ["0000020000000000000000000000000000000000000000000000000000000000"]
}
mining.notify
- params: [“jobId”, “prefix”, “GIVER_SEED”, “EXPIRED”, “WALLET_ADDRESS”, cleanJob]
{
"id": null,
"method": "mining.notify",
"params": ["17282f3f", “00f24d696e6500”, "955eaaaa2715ed593675efed082af5c2", "61f69880", "ebf5cca491c4760c1b4d9306e6aed35b17d773ab60650ed58974a84b2d0fb82c", true]
}
mining.submit
- params: [ “username”, “jobId”, “EXPIRED”, “nonce2” ]
- result: true / false
{
"id": 102,
"method": "mining.submit",
"params": ["EQA3hKVrpll-jVAtA1KjfpaMJ7YGg44M6DQuBdBX9G5xWxOA", "17282f3f", "61f69880", "eaf71970c0eaf71970c0eaf71970c0eaf71970c0eaf71970c0eaf719"]
}
{"id":102,"result":true,"error":null} // accepted share response
{"id":102,"result":false,"error":[21,"low difficulty",null]} // rejected share response
nonce2 是 rdata1第二部分.
rdata1 = nonce1 + nonce2
rdata2 = rdata1
参考:https://github.com/newton-blockchain/ton/blob/master/crypto/util/Miner.cpp
在这个例子中:
rdata1 = rdata2 = nonce1 + nonce2 = 3e29d542eaf71970c0eaf71970c0eaf71970c0eaf71970c0eaf71970c0eaf719
prefix = 00f24d696e6500
headerHash = prefix + expired + WALLET_ADDRESS + rdata1 + GIVER_SEED + rdata2
powHash = sha256(headerHash)