vh, I was wondering if these 2pac checks against difficulty ? Datasheet says 4 bytes from byte position 36 to 39 set as ticket mask for difficulty.
But gekko driver code seems only setting ticket_mask at 39th byte position. What extactly is this ticket_mask?
I tried setting Network difficulty as below and seemed it work but later found its not always returning true nonce for every sample worked example I was using.
I think these chips keep iterating from 0 to max nonce and return every nonce which result in hash with first 4 bytes with 0. Is that true ?
...
Appreciate if you could help me here. Thanks !!!
For a valid ticket mask, think of network mask and CIDR notation.
When visualizing a CIDR in bit form, a mask with 0's scattered between 1's is not valid.
Starting at 4GHs, every time the hash rate double(s) its worth tacking a bit onto the mask.
If the 2Pac ever push past 1TH(s), then I'll add a todo to check if the other bytes do what they are suppose to.
--
The chip iterates 2^32 nonces instead of 0 to max nonce.
To experiment with SNO you probably need to pair it with HCN.
Thanks, appreciate for your explanation. for 100mhz, ticket mask is set as 31 (0x1f)
So..
Ticket mask tells number of bits to use for validating all 0's ?
Or
Ticket mask is only 4 bytes whereas hash is 32 byte,
So does that means this device only masking last 4 bytes and will return any nonce that results in last 4 bytes with 0's ?
Or
I'm no expert when it comes to binary operations, but if we ignore the fact of hashrate this device produce and above statement is not true, my understanding below is correct ?
take example of this current target
0000000000000000-0000000000000000-
00000000f8e96100-0000000000000000and its binary conversion of last 16 bytes:
0000000000000000000000000000000011111000111010010110000100000000-0000000000000000000000000000000000000000000000000000000000000000
If I have to create mask to satisfy current target, it should be like this ?
0000000000000000000000000000000000000000000000000000000111111111-1111111111111111111111111111111111111111111111111111111111111111
How to represent this in 4 bytes of ticket mask ? or each byte represent each 8 byte chunk if hash ?