Bitcoin mining proxy
This is the official documentation of the Stratum mining protocol for Sia developed by SiaMining.
If you're looking for mining software compatibility, please go to the .
Motivation
Previous attempts at adapting the Stratum protocol so that it could be used for mining cryptocurrencies which, like Sia, show significant differences from Bitcoin took an approach that could be described as “getwork over Stratum”, or “getwork over TCP”. What this means is that they sent the same header data that would be sent by the old getwork-style protocol, only packed inside the fields of the original Stratum protocol, which were meant to carry different data. Such an approach retains of course the advantage of removing the overhead of HTTP, but has also clear downsides when compared to the original Stratum protocol:
- It is not scalable. The original Stratum design enables pools and large mining operations to easily handle large numbers of miners, as there is no need for servers to remember about each and every work unit they hand out. Less load on servers also means that servers can be faster and more responsive.
- It is not future-proof, as it does not extend the nonce space. Even if Sia has a larger header nonce than Bitcoin, providing additional variable-length nonce space is the only way for a mining protocol to be truly future-proof. One immediate benefit of this is that mining proxies can be used to optimize the efficiency of mining networks.
For the above reasons, SiaMining.com decided to develop a true Stratum protocol for Sia.
One of the main objectives was to stay as close as possible to the original Stratum protocol. This makes the implementation easier and allows for better software compatibility.
Encoding
All hexadecimally-encoded data is serialized as specified by the Sia protocol. No endianness conversion is performed.
Notifications
Differences:
- The 6th parameter (version) is unused, and should be empty.
- The 7th parameter (nbits) is not required for mining, but is provided to inform the miner of the current network difficulty. It must be the 32-bit compact representation of the current network target.
- The 8th parameter (ntime) must be 16 hex characters long (64 bits).
Example:
{ "params": [ "bf", "00052714f51ebea73d6310dbc5802e42508ea2486717", "4e6f6e00", "000000", [ "356464cda3f7a83a350aeb3ae5101ff56799cd68ad41540876bd31", "9cb176ec5b06898ef40f0e73242e0b0ff9d34ece67a241d529f2c3" ], , "1a08645a", "000000", false ], "id": null, "method": "mining.notify" }