1
I'm trying to learn how litecoins work (and learn new programming language at same time by writing a crappy little miner).
I'm stuck with getdata. Here http://litecoin.info/wiki/Scrypt
it says that data is 160 characters long. But its not. Its quite a bit longer than that.
So my questions are:
- 1.) What is
nonceand how do I use it? - 2.) What is
bits? - 3.) What are all the 0's after the
bits.
EDIT: Ok, I think I have to use just first 160 characters of data and ignore the rest. Correct?
1It's also worth noting that nonce is a general term in cryptography, referring to any number or bit string used only once. The word "nonce" is still in use outside the U.S. as a simple English word meaning "time being." Of course in certain parts of the world it's also slang for a pedophile, so maybe it's better if we leave etymology out of this one... – David Perry – 2013-05-09T03:26:17.010
Okay, so when I try to resolve a block, I use first 160 hex chars from data in getdata and than have worker try to resolve it doing scrypt hashing of it. So my nonce starts with 1 and goes up by one till I rich the value specified in bits? I hash little endian version of previous block hash+merkleroot+timestamp+nonce? Correct me if Im wrong, Im just trying to figure out how this works. – if __name__ is None – 2013-05-09T05:31:35.077