4 ms·
Can someone explain briefly how this works? I was under the assumption that you need to download the blockchain to be able to mine. Or in-browser mining just ta
by samsonradu 9y ago
Can someone explain briefly how this works? I was under the assumption that you need to download the blockchain to be able to mine. Or in-browser mining just takes stabs in the dark?
- bradknowles 9y agoYou don’t need to download the whole block chain in order to do mining. You just need to know a reasonable starting point.
- sprash 9y agoYou only need currently open transactions, a hash from the last block and a nonce.
- eterm 9y agoMining is typically something like: Hash(nonce + Hash(chain[including with new transactions])) < value. So in some sense you need the chain but you can pass Hash(chain) to a client and let that just increase nonce and hash it. Without synchronisation the found block might be for a stale chain but if you're using someone else's power you don't care, and the nature of distribution here means it's likely to be fresh anyway in the unlikely chance something is found.
- dmurray 9y agoFor anyone who was thinking, like me, "If that formula is correct, couldn't you precompute hashes and then subtract Hash(chain) to get the desired nonce", it's more like Hash(nonce + 2^256 * Hash(chain[including with new transactions])) < value Still an oversimplification, of course.
- thinkloop 9y agoMining is just running a dumb hash algorithm over and over. The website would provide the package of data to hash, the browser would start hashing, which could even be done offline. If the browser solves the block, the client sends the solution back to the server. The orchestration and blockchain access is handled behind the scenes by the server.