-
Notifications
You must be signed in to change notification settings - Fork 25
Aion Stratum Protocol
In order to support the Aion PoW algorithm the stratum protocol definition has been modified to fit Aion. This document describes protocol version 1 which will be the first stratum standard supported by Aion.
A handshake occurs after a TCP connection is established from a miner to the pool. Miner start the handshake with the following :
{
"id": 1,
"method": "mining.subscribe",
"params": [
“MinerName/Version, “ProtocolVersion”
]
}
The server may choose to drop client at this point if it does not support the given protocol version.
Server replies back with the session ID and extranonce value:
{
“id”: 1,
“result”: [
“sessionId”,
“extraNonce”
]
“extraNonce”
}
The miner must then authorize with the following message:
{
“id”: 2,
“mining.authorize”,
“params”:[
“workerName”
“password” (Optional)
]
}
Once validation a miners subscription request a server may reply with a set_difficulty message if the server supports varDiff mining, otherwise the server may reply immediately with a mining.notify message.
{
“id”: null,
“method”: “mining.notify”,
“params” : [
“jobId”,
“true”,
“target”,
“headerHash”
]
}
Parameters:
- Job ID in hex
- clean job, may be set to false to allow miners currently mining this block to continue without interuption. If ture, instructs miners to drop the current job and begin work on the new job.
- 64 character hex string target for the current job.
- Hash of the header, used as input to the Equi2109 algorithm as well as block identification in the Aion kernel.
Clients submit jobs by sending:
{
“id”: “messageId”
“method”: “mining.submit”,
“params”: [
“workerId”,
“jobId”,
“nTime”,
“extraNonce2”
“solution”
]
}
Parameters:
- Worker Id to which to assign share
- Original job ID
- Submit timestamp
- Client generated extraNonce value
- Calculated Equihash solution