Bitcoin Forum
June 23, 2024, 10:59:27 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Cgminer clarification  (Read 692 times)
jenga (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
August 29, 2013, 09:32:23 AM
 #1

The process of bitcoin mining basically consists in repeatedly increasing the nonce of the block until a valid sha256d hash is found that breaks the difficulty level. That's what I got so far.

Now, suppose one has 2 different computers with cgminer running on the same pool and connected to the same exact worker.

I don't want a computer to check the same hashes as the other to not waste work. How can I be sure that the two machines are not generating the same hashes, given the above pool connection? Can I set cgminer in a way that avoids such collisions?

Same condition is explained here:
https://en.bitcoin.it/wiki/Block_hashing_algorithm
But I guess it applies to solo mining only.

Does this logic apply for pools that let you mine unregistered? So that you can set the same credentials and same address in both machines but avoiding wastes of work. Maybe by selecting a different password idk.
mjc
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500


Available on Kindle


View Profile WWW
August 29, 2013, 01:36:56 PM
 #2

The network doesn't want two computers working on the same problem either.  cgminer already manages that for you.

Kindle : Bitcoin Step by Step (2nd Ed) : http://www.amazon.com/Bitcoin-Step-by-ebook/dp/B00A1CUQQU
Kindle : Bitcoin Mining Step by Step : http://www.amazon.com/Bitcoin-Step-by-ebook/dp/B00A1CUQQU
Facebook :  https://www.facebook.com/BitcoinStepByStep     Twitter : @BitcoinSbS
jenga (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
August 29, 2013, 03:31:51 PM
 #3

The network doesn't want two computers working on the same problem either.  cgminer already manages that for you.

Welp may I ask how does cgminer avoid it?
milone
Sr. Member
****
Offline Offline

Activity: 434
Merit: 251


CGWatcher & CGRemote


View Profile WWW
August 29, 2013, 05:29:25 PM
 #4

The pool doesn't distribute work by worker. The pool provides work when cgminer requests it. The pool is responding to that request.

Workers are just to help you keep track of which miner is mining what, and to link your shares to your account. You can have 1 miner per worker, or 100 per worker. If you don't need individual stats for those 100, 1 worker is ok. Some pools may recommend creating 1 worker per miner, but it should not be a requirement.

CGWatcher, a GUI/monitor for CGMiner & BFGMiner: http://www.cgwatcher.com
CGRemote, a remote mining dashboard for all of your miners: http://www.minerremote.com
BTC: 12TAYjmSrdDHLNpmix2MG6y3R868SMM7Fx    LTC: LM6Un6hZvPzLBggJWiAVG6E6w2GfaHukXY
jenga (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
August 29, 2013, 06:00:00 PM
 #5

The pool doesn't distribute work by worker. The pool provides work when cgminer requests it. The pool is responding to that request.

Workers are just to help you keep track of which miner is mining what, and to link your shares to your account. You can have 1 miner per worker, or 100 per worker. If you don't need individual stats for those 100, 1 worker is ok. Some pools may recommend creating 1 worker per miner, but it should not be a requirement.

Makes sense to me. Thanks Smiley
mitty
Sr. Member
****
Offline Offline

Activity: 359
Merit: 250



View Profile
August 29, 2013, 06:15:41 PM
 #6

Blocks also have an "extraNonce" transaction which changes the merkle root and therefore the block's header.
extraNonce is required since it only takes seconds of fractions of a second for modern mining hardware to run through all possible header nonce values for a given block header.  Changing extraNonce generates a new block header and allows you to keep mining.

It's possible that pool servers simply generate different blocks by giving every worker a different starting extraNonce value or even by putting different transactions in the work it sends out to its miners.

It's usually in the pool's best interest to ensure its miners aren't doing duplicate work, both in the obvious case of PPS pools where the pool is paying per share, and simply because miners will tend to move away from pools that seem to permanently have bad luck.
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!