Jump to content
Sign in to follow this  
CCGLLC

Understanding Sia's stratum protocol

Rate this topic

Recommended Posts

Sia's protocol is a variation on Blake2B.  They have made a few key changes per the official doc:

 

A)  ntime and nounce are both extended from 4 bytes to 8 bytes

B)  Difficulty has been redefined (admittedly to something that makes more sense)

 

For any coin trying to fork and utilize the "Sia Asic" (modified Blake2b, like the Innosilicon S11) it appears the wallet will either need to be modified to accept these changes or the information received back from the miner will need to reformatted into the default Bitcoin format.

 

I am currently working on a project that I'm a primary developer that and I'd REALLY like to do that later, rather than the former.  The former would require a lot of duplicate code and conditional executions be added to the coin, the later would allow for a relatively simple stratum fix in the pool code.  On a Yiimp based pool I've already started work making such a change, basically duplicating existing Blake2b code and creating a new algo I've penned as "SiaAsic".  Most things are working fine, up until a block needs to be submitted to the wallet.  Since there are formatting difference, the wallet is naturally rejecting those blocks right now.

 

Here is a sample of the params being submitted via the rpc "submitblock" protocol to the wallet:

 

[0000002076158bf95cee90a8a48fc58f4a0aabde3e25c8f04e8f31ac345c8faf4952deba4139569145e743c90515db62549a3244b0d96547d4cd22c4946fbc7c8ece6f8ef48aaf5cc387061d12aade040102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff180350520404f48aaf5c088100001b133a00007969696d700000000000010065cd1d000000001976a914fa7f14bc5d55a73ce114869bc9394f19b0089ece88ac00000000]

 

Does anyone now how to map these fields out?  With a map I could parse out the ntime, nounce, and difficulty, reformat them, and put it back together in a format the Bitcoin based wallet is expecting.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using BLOCKCHAINTALK.ORG, you agree to our Terms of Use.