Crypto-Expert / stratum-mining

AIO Stratum mining server for various coins
Other
365 stars 348 forks source link

51% prevention #315

Closed gaby64 closed 10 years ago

gaby64 commented 10 years ago

we need something that can temporarily disconnect workers to reach a target maximum hashrate on every difficulty adjustment.

pseudo code

target = 0.35 poolnethashperc = poolhashrate / networkhashrate if poolnethashperc > target { if poolnethashperc > 0.50 { while poolnethashperc > target { randnum = rand disconnect(worker[randnum]) disable(worker[randnum], 10) //minutes poolnethashperc = poolhashrate / networkhashrate } } else { newpoolnethashperc = poolnethashperc * 0.9 while poolnethashperc > newpoolnethashperc && poolnethashperc > target { randnum = rand disconnect(worker[randnum]) disable(worker[randnum], 5) //minutes poolnethashperc = poolhashrate / networkhashrate } } }

vodkadrunkinski commented 10 years ago

I think this is a bad idea. It will do nothing if a pool has nefarious intent; but it will cause problems with new coins which have a low initial hash rate. On Mar 16, 2014 4:07 AM, "gaby64" notifications@github.com wrote:

we need something that can temporarily disconnect workers to reach a target maximum hashrate on every difficulty adjustment.

Reply to this email directly or view it on GitHubhttps://github.com/Crypto-Expert/stratum-mining/issues/315 .

azilber commented 10 years ago

I agree, not a good idea.

gaby64 commented 10 years ago

make it optional, i know it doesnt solve the problem of nefarious pools, it would solve the problem of damaging a coins image by a non-nefarious pool hitting >51% too often.

to solve the problem of nefarious pools we need this implemented in miner software aswell

ahmedbodi commented 10 years ago

not adding. stratum is a server software. it should have 0 responsability with a 51% of hashrates. it is up to the OP to disable registrations on the frontend.

gaby64 commented 10 years ago

going over 51% can happen quickly with low block time coins and disabling registration does not do much quick enough. I dont see why not have this option.

azilber commented 10 years ago

Not sure why going over 51% is even an issue. 51% attack? Then it's a nefarious pool that will disable that option anyway. Otherwise, even if a pool goes over 51% it's only a potential issue. I agree that it should be solved either in the daemon or the front-end.

On Mon, Mar 17, 2014 at 8:42 AM, gaby64 notifications@github.com wrote:

going over 51% can happen quickly with low block time coins and disabling registration does not do much quick enough. I dont see why not have this option.

Reply to this email directly or view it on GitHubhttps://github.com/Crypto-Expert/stratum-mining/issues/315#issuecomment-37777306 .

gaby64 commented 10 years ago

the issue is with the fear of 51%, pool operators go posting on coin threads saying to switch, no action is taken. it would be great to have an automatic option.

azilber commented 10 years ago

The automatic option is p2pool.

On Mon, Mar 17, 2014 at 10:35 AM, gaby64 notifications@github.com wrote:

the issue is with the fear of 51%, pool operators go posting on coin threads saying to switch, no action is taken. it would be great to have an automatic option.

Reply to this email directly or view it on GitHubhttps://github.com/Crypto-Expert/stratum-mining/issues/315#issuecomment-37780802 .

gaby64 commented 10 years ago

im not talking about an option for miners, this is an option for pool operators to manage the fear around 51%, some pool operators would like to never hit above 40% because that can damage the image for a coin or cause panic around that potential

we all wish miners would work in the interest of the coin they mine, but thats not actually the case, multipools and miners looking for quick profit dont pay attention to pool network hashrate percentage. all it takes is a multiple to switch over to a different coin and all of a sudden a pool of the previous coin finds itself with >50%

ahmedbodi commented 10 years ago

im sorry but this is a feature i refuse to add. a bad pool op will disable it anyway. and secondly it would cause constant disconnects for users so they wouldnt be happy