I'm playing with the avalon 6 and cgminer.
For a little personal project I try to add a string into the header of the blocks.
It's actually working very well, but I want cgminer to manage my avalon6 with this same string into the block headers.
So I changed the cgminer code and created a custom pool, everything is working right.
The more difficult part is when I try to tell to my avalon miner, that the place of the nonce has to be a little bit more to the right (8 bytes).
I checked everything into the driver-avalon4.c, and saw a lot of settings, but nothing about the nonce offset.
I changed the merkle root offset so it's at the right place again.
After a lot of testes I could ask cgminer to mine my header which gives my the following swapped hexadecimal header:
Hash: 088d7351fddd08bfdee8bf9cdd7d399c4526ea025b2c4ed39d393d33cb4d183d
Like you can see we added 16 hexadecimals at the begging of the line.
The double hash of this one is wrong (088d7351fddd08bfdee8bf9cdd7d399c4526ea025b2c4ed39d393d33cb4d183d)
Because avalon tries to find the nonce at a fixed place we have to move the nonce a little bit more to the left. So we lose our time and bits value.
This gives us the following result:
Hash: 00000000e648746305e4398a0fd91fd422095968f3034e59a8b127bf5e35ed5d
Like you can see this one is correct.
I checked the header that has been send to the avalon and the header contains everything at the right place.
So my question is, how can I tell to Avalon to change the offset place of the nonce in order to find the correct one ?
Thank you