Bitcoin Forum
March 19, 2024, 10:35:14 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 [58] 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ... 814 »
  Print  
Author Topic: [1500 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool  (Read 2591571 times)
Krak
Hero Member
*****
Offline Offline

Activity: 591
Merit: 500



View Profile WWW
March 06, 2012, 06:39:01 AM
 #1141

He did say the miners' username, not the node's username, which makes me think it's set at the miner level.

BTC: 1KrakenLFEFg33A4f6xpwgv3UUoxrLPuGn
"I'm sure that in 20 years there will either be very large transaction volume or no volume." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1710844514
Hero Member
*
Offline Offline

Posts: 1710844514

View Profile Personal Message (Offline)

Ignore
1710844514
Reply with quote  #2

1710844514
Report to moderator
1710844514
Hero Member
*
Offline Offline

Posts: 1710844514

View Profile Personal Message (Offline)

Ignore
1710844514
Reply with quote  #2

1710844514
Report to moderator
1710844514
Hero Member
*
Offline Offline

Posts: 1710844514

View Profile Personal Message (Offline)

Ignore
1710844514
Reply with quote  #2

1710844514
Report to moderator
broken
Newbie
*
Offline Offline

Activity: 55
Merit: 0


View Profile
March 06, 2012, 08:54:11 AM
 #1142

Can someone explain, how the new "miners can volunteer to raise their share difficulty"-protocol change works? I don't understand how cheating is prevented.

Can't you just mine in secret and for example find a difficulty 1000 share, and then connect to the p2pool network and send: "hey, my address is 1abcsomething and I'm mining difficulty 1000 and here is a share"? And then afterwards mine in secret a difficulty 650 share and connect to the p2pool network and send: "My address is 1xyzsomethingdifferent and I'm mining difficulty 650 and here is a share"?

How can you define a difficulty in advance, if you can simply reconnect with a new identity?

I'm sure I'm missing something here. Please enlighten me Smiley
Ente
Legendary
*
Offline Offline

Activity: 2126
Merit: 1001



View Profile
March 06, 2012, 10:21:11 AM
 #1143

He did say the miners' username, not the node's username, which makes me think it's set at the miner level.

I hope the custom share difficulty can be set at node level (too)!
What would be sweet would be an option to change it at node level, as well as set a relative difficulty.
With a 10gh/s node, you could for example set the difficulty to "global + 30%", so it adjusts by itself whenever the share difficulty changes.

Now.. What would be the best difficulty for any node? For example 10 share-blocks per bitcoinblock?

If the node adjusts even to that (calculating from own hashing power in relation to whole p2pool as well as p2pool hashing power in relation to whole bitcoin), we would have a working solution for that whole variance problem?

Ente
nelisky
Legendary
*
Offline Offline

Activity: 1540
Merit: 1001


View Profile
March 06, 2012, 11:17:03 AM
 #1144

Can someone explain, how the new "miners can volunteer to raise their share difficulty"-protocol change works? I don't understand how cheating is prevented.

Can't you just mine in secret and for example find a difficulty 1000 share, and then connect to the p2pool network and send: "hey, my address is 1abcsomething and I'm mining difficulty 1000 and here is a share"? And then afterwards mine in secret a difficulty 650 share and connect to the p2pool network and send: "My address is 1xyzsomethingdifferent and I'm mining difficulty 650 and here is a share"?

How can you define a difficulty in advance, if you can simply reconnect with a new identity?

I'm sure I'm missing something here. Please enlighten me Smiley

How would that be different from connecting as 1abcsomething, saying "I'm mining at difficulty 1" and then submitting the diff=650 and diff=1000 shares? Doesn't p2pool take the actual share difficulty into account when calculating payouts?
broken
Newbie
*
Offline Offline

Activity: 55
Merit: 0


View Profile
March 06, 2012, 12:08:39 PM
 #1145

How would that be different from connecting as 1abcsomething, saying "I'm mining at difficulty 1" and then submitting the diff=650 and diff=1000 shares? Doesn't p2pool take the actual share difficulty into account when calculating payouts?

Lets assume a diff=650 is worth something like ~0.002 BTC

Person A has default settings (diff~650) and starts hashing.
Person A finds 10 shares with diff > 650 (eg. 9x ~650 and one share ~13000) in 24h
There is one block found just now.
Person A get a payout of 0.02 BTC.

Person B sets diffuculty to 6500 and has same hasrate as person A
Person B found 1 shares > 6500 (eg. ~13000 ) in 24h
Person B gets a payout of ~0.02BTC

Person C is cheating and starts hashing.
Person C finds a share with difficulty 13000.
Person C connects and sets difficulty to 13000 and submits share.
Person C starts hashing with a new address.
Person C finds a share with difficulty 650.
Person C connects and sets difficulty to 650 and submits share.
Person C starts hashing with a new address.
Person C finds 8 more diff 650 shares in the same way.
Person C gets payed out to 10 different addresses 9x ~0.002 BTC and 1x ~0.04 BTC.

Only solution that comes to my mind is, that a user (identified by address) needs a history of maybe 12h before he can change his difficulty.
nelisky
Legendary
*
Offline Offline

Activity: 1540
Merit: 1001


View Profile
March 06, 2012, 12:14:23 PM
 #1146


Lets assume a diff=650 is worth something like ~0.002 BTC

Person A has default settings (diff~650) and starts hashing.
Person A finds 10 shares with diff > 650 (eg. 9x ~650 and one share ~13000) in 24h
There is one block found just now.
Person A get a payout of 0.02 BTC.


9*650 + 1x130000 = 18850
18850 / 650 = 29
29 * 0.002 = 0.058

Why does Person A get 0.02?
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
March 06, 2012, 12:15:26 PM
 #1147

This was just discussed at length.  Go back a page or two, or skip right to the conclusion.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
nelisky
Legendary
*
Offline Offline

Activity: 1540
Merit: 1001


View Profile
March 06, 2012, 12:24:09 PM
 #1148

This was just discussed at length.  Go back a page or two, or skip right to the conclusion.

I had read it, but apparently misunderstood it. Sorry.

So basically 9x650 + 1x13000 == 10x650 if you have diff set at 650, got it.
Ente
Legendary
*
Offline Offline

Activity: 2126
Merit: 1001



View Profile
March 06, 2012, 01:24:02 PM
 #1149

Still, you could have 10 miners, which all mine with 10MH/s and requesting different difficulty work. Like 600, 700, 1000, 10000 etc. These 10 miners would together have 100MH/s hashing power.
Besides those 10, you have one big miner (or farm) which hashes with big hashing power. When a block is found, the block is forwarded to one of the 10 miners, depending on which target was solved. If the solved block has a 1150 difficulty, it is forwarded to the "I requested 1000 difficulty"-miner, who receives the payout.

So, I believe the stated solution works only for people who use one miner only.

Ente
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
March 06, 2012, 01:30:26 PM
 #1150

Still, you could have 10 miners, which all mine with 10MH/s and requesting different difficulty work. Like 600, 700, 1000, 10000 etc. These 10 miners would together have 100MH/s hashing power.
Besides those 10, you have one big miner (or farm) which hashes with big hashing power. When a block is found, the block is forwarded to one of the 10 miners, depending on which target was solved. If the solved block has a 1150 difficulty, it is forwarded to the "I requested 1000 difficulty"-miner, who receives the payout.

So, I believe the stated solution works only for people who use one miner only.

Ente

The target difficulty is apparently encoded in the coinbase to stop people from doing that.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1063


Gerald Davis


View Profile
March 06, 2012, 01:32:53 PM
Last edit: March 06, 2012, 02:30:15 PM by DeathAndTaxes
 #1151

Still, you could have 10 miners, which all mine with 10MH/s and requesting different difficulty work. Like 600, 700, 1000, 10000 etc. These 10 miners would together have 100MH/s hashing power.
Besides those 10, you have one big miner (or farm) which hashes with big hashing power. When a block is found, the block is forwarded to one of the 10 miners, depending on which target was solved. If the solved block has a 1150 difficulty, it is forwarded to the "I requested 1000 difficulty"-miner, who receives the payout.

So, I believe the stated solution works only for people who use one miner only.

Ente

Once again since it seems difficult point (bolder part is the most important).

When you request a difficulty X p2pool doesn't trust you at all.  It assumes you likely will try to cheat (as it should in an untrusted environment).  So p2pool PUTS THE REQUESTED SHARE DIFFICULTY INTO THE COINBASE.  Thus the difficulty you requested becomes part of the hash and part of the share when found.  Once found a share is ONLY useful at that difficulty.  If you increased the difficulty then the coinbase changes and thus the merkle root and thus the block header.  So the nonce you found doesn't produce a valid share.

p2pool nodes assume every other node is cheating.  They don't trust anything another node says until they verify it. Yet that means for every single share found every single other node "rebuilds" the share from scratch (just like a conventional pool does) to ensure the share is valid.  If you alter the coinbase after the fact then the share is invalid and it gets rejected by every node.

One thing I would add is that this protection HAS ALWAYS EXISTED IN p2pool.  Remember p2pool difficulty is consantly varying and each share can have different difficulty anyways.  The only valid method to protect the network is for each node to rebuild and verify the shares submitted. 
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1063


Gerald Davis


View Profile
March 06, 2012, 01:37:06 PM
Last edit: March 06, 2012, 02:26:17 PM by DeathAndTaxes
 #1152

Can someone explain, how the new "miners can volunteer to raise their share difficulty"-protocol change works? I don't understand how cheating is prevented.

Can't you just mine in secret and for example find a difficulty 1000 share, and then connect to the p2pool network and send: "hey, my address is 1abcsomething and I'm mining difficulty 1000 and here is a share"?

No because the process is this
1) your miner tells p2pool daemon what difficulty share it would like to look for (it must be min diff or higher)
2) p2pool PUTS THE DESIRED SHARE TARGET DIFFICULTY INTO THE COINBASE.
3) p2pool creates the block header (which contains a merkle root hash and thus coinbase hash and thus the coinbase values including the desired difficulty
4) miner hashes nonces using values from #3 and finds a share (say it happens to be a difficulty 80,000 share).
5) miner can only submit it ias the difficulty requested in #1 because every other node verifies the work done by every node.
6) if miner "cheats" and alters the share difficulty then the hash is invalid.  Changing the coinbase changes the block header and the new block header combined w/ nonce doesn't produce a valid share hash.

One thing to add: only step #1 is new.  Steps #2 to #6 have always existed and must exist to prevent cheating as a client could always hack the code.  Proper difficulty reporting can never be based on the client.
ancow
Full Member
***
Offline Offline

Activity: 373
Merit: 100


View Profile WWW
March 06, 2012, 01:40:04 PM
 #1153

I think he means the username sent by the miner. i.e. in cgminer instead of a username "user" you would use a username of "user /1300" to request 1300 difficulty work from p2pool.

I guess we need a clarification for this ^^ ...

Actually, you can just try it or read the following commit message:
added desired pseudoshare target to user string, now ADDRESS[/SHARE_DIFF][+PSEUDOSHARE_DIFF]


A little bug in connection with that: in the graphs I now have two entries for my miner, one "minername" and one "minername+10".

BTC: 1GAHTMdBN4Yw3PU66sAmUBKSXy2qaq2SF4
broken
Newbie
*
Offline Offline

Activity: 55
Merit: 0


View Profile
March 06, 2012, 02:23:11 PM
 #1154

Thank you very much, DeathAndTaxes edit: and kjj.
I understand it now and set my miners to /1000
Ente
Legendary
*
Offline Offline

Activity: 2126
Merit: 1001



View Profile
March 06, 2012, 02:49:35 PM
 #1155

..Now I got it, I didnt understand the point about coinbase.
Thanks for explaining!

So, any clever calculations about which difficulty you should use, depending on your hasing power?
..And is that /1000 really miner-declared, not node-declared? Hmm..

Ente
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
March 06, 2012, 03:07:53 PM
 #1156

..Now I got it, I didnt understand the point about coinbase.
Thanks for explaining!

So, any clever calculations about which difficulty you should use, depending on your hasing power?
..And is that /1000 really miner-declared, not node-declared? Hmm..

Ente

I had the same question, which value is best for what hashing power Wink.

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1063


Gerald Davis


View Profile
March 06, 2012, 03:16:04 PM
Last edit: March 06, 2012, 09:05:27 PM by DeathAndTaxes
 #1157

Well from a purely EV standpoint there is no difference.  In the long run you will always get 100% PPS (minus any donations plus any subsidies).

From a selfish standpoint lower target = lower variance.  However if everyone runs min diff then for a given hashrate, diff will be higher and smaller miners get no "slack".   Using higher diff doesn't give any revenue to miners it just lowers the min diff and that reduces variance (but not long term revenue) for smaller miners.

Obviously the higher you go the more you increase your variance (possibly by insignificant amounts) and lower variance of smaller miners.
I decided to start at a 1000.  Maybe someone like meni could point us towards the math involved to get us something like with 10GH/s x% increase in diff is y% increase in payout variance over 24 hour period, 7 day period, 30 day period.
forrestv (OP)
Hero Member
*****
Offline Offline

Activity: 516
Merit: 643


View Profile
March 06, 2012, 04:33:44 PM
 #1158

Hi!

 Since day 27 feb 2012, the patron_sendmany stops working for me... Just now I take notice of it...

Thiago, change the URL from http://192.168.10.1:9332/patron_sendmany?total=2.0 to http://192.168.10.1:9332/patron_sendmany/2.0 . Sorry for not posting about this... I changed the way web api calls like this work.

EDIT: DeathAndTaxes, thanks for clarifying the difficulty-cheating issue! Smiley

1J1zegkNSbwX4smvTdoHSanUfwvXFeuV23
Red Emerald
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500



View Profile WWW
March 06, 2012, 06:51:37 PM
 #1159

Hi!

 Since day 27 feb 2012, the patron_sendmany stops working for me... Just now I take notice of it...

 Look:

$ wget -O- http://192.168.10.1:9332/patron_sendmany?total=2.0 | more
--2012-03-06 02:08:05--  http://192.168.1.235:9332/patron_sendmany?total=200
Connecting to 192.168.1.235:9332... connected.
HTTP request sent, awaiting response... 200 OK
Length: 50 [text/plain]
Saving to: `STDOUT'

100%[===============================================================================================================================>] 50          --.-K/s   in 0s     

2012-03-06 02:08:05 (4.23 MB/s) - written to stdout [50/50]

need total argument. go to patron_sendmany/<TOTAL>


 For both Bitcoin 9332 and Litecoin 9327 I got this...

 Any tip!?

Thanks!
Thiago

Do what it says.  "patron_sendmany/<TOTAL>" not "patron_sendmany?total=200"

DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1063


Gerald Davis


View Profile
March 06, 2012, 09:07:49 PM
 #1160

does p2pool daemon show anything in output when it is using higher share difficulty.  I tired /1000 and it doesn't seem to have any effect.
Pages: « 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 [58] 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ... 814 »
  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!