Bitcoin Forum
May 13, 2024, 12:10:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Avalon6 Nonce offset  (Read 351 times)
skymy (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
November 04, 2016, 09:54:45 PM
 #1

Hi,

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:

Code:
Hex: 0753484b2d303031040000002a6bf2990b6ed1a56ad8d6af7b659464800093e5816c55c9fb2bad0f000000000818857d88fffa0816c64d5b8e2831ca5f6b533757ccde6e0c6c0ed60e800374bed11c581d00ffff06c2e898
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:

Code:
Hex: 0753484b2d303031040000002a6bf2990b6ed1a56ad8d6af7b659464800093e5816c55c9fb2bad0f000000000818857d88fffa0816c64d5b8e2831ca5f6b533757ccde6e0c6c0ed60e80037406c2e898
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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!