Bitcoin Forum
April 27, 2024, 06:34:18 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 [730] 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 ... 814 »
  Print  
Author Topic: [1500 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool  (Read 2591625 times)
smooth
Legendary
*
Offline Offline

Activity: 2968
Merit: 1198



View Profile
June 17, 2016, 11:23:27 PM
 #14581

No it doesn't. The probability that a block will be found on the next attempt (ignoring various constant scaling factors) is 1/D. It is independent of M.
By "on the next attempt" do you mean on the next share, or on the next level of the DAG, or something else? If you mean on the next share, then you need to multiply by M/N to correct for the expected number of shares per DAG level. According to PPLNS, your share only gets kicked off after a certain number of DAG levels, so you get multiple "attempts" per level.

Are all shares paid equally, or is this a scoring-based system?

I think if I am reading correctly, all shares are paid equally. That means during periods that M is higher due to random variation, the value of mining on the pool is lower. During periods that M is lower, the value of mining on the pool is higher. The steady-state average is not what matters here because the miner can choose to participate only during certain system states.

If you attempt to apply a score to correct for this, you can do that, but then you have the issue of how to score multiple shares at the same level. To do this fairly and unexploitably, you need an order. Back to square one.
1714199658
Hero Member
*
Offline Offline

Posts: 1714199658

View Profile Personal Message (Offline)

Ignore
1714199658
Reply with quote  #2

1714199658
Report to moderator
You can see the statistics of your reports to moderators on the "Report to moderator" pages.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
jtoomim
Hero Member
*****
Offline Offline

Activity: 818
Merit: 1006


View Profile WWW
June 18, 2016, 05:23:45 AM
 #14582

Are all shares paid equally, or is this a scoring-based system?
Shares are paid in proportion to their difficulty. You take the difficulty for a share, divide by the summed difficulty of all shares among the last M (or N for vanilla p2pool), and multiply by the block reward for that block (including fees), and that gives you the reward a share would receive for that block if it were found.

I think if I am reading correctly, all shares are paid equally. That means during periods that M is higher due to random variation, the value of mining on the pool is lower. During periods that M is lower, the value of mining on the pool is higher. The steady-state average is not what matters here because the miner can choose to participate only during certain system states.
In periods where M is higher due to random variation, the probability of a share getting rewarded by another share finding a block increases, but the payout size decreases. These effects cancel out.

For example, if M is 4 (and all shares are the same difficulty), then if I mine a share, it will have 4 chances of probability 1/D to earn 1/4 of a block. If M is 256, then my share will have 256 chances of probability 1/D to earn 1/256th of a block. In either case, the expected revenue is the same.

The problem comes not when M is higher or lower, but when M is rapidly changing.

A share will be payable for a considerable amount of time, and M might change during that time. For example, if N is 4, my share will have its potential reward calculated 4 different times as it travels through different levels of the DAG. Let's say that we start with 1 share per level in all 4 levels of the DAG when my share is mined (my own share being the top level). After this, 1 more level is mined with 1 share per level, and then a level with 5 shares is mined, followed by another two levels with 1 share. The first chance I have to get paid comes from my own share, where the DAG looks like this:

Round 0:
1*
1
1
1

I get one 1/D chance of getting a 1/4-block reward here. (The asterisk denotes my share.) Next round:

Round 1:
1
1*
1
1

1/D chance of getting a 1/4-block reward.

The next round is a bit tricky. Five shares are mined at once, but since they aren't yet aware of their siblings, each one sees the top level of the DAG as having only one share:

Rounds 2a-2e:
1
1
1*
1

Five 1/D chances of getting a 1/4-block reward. Finally:

Round 3:
1
5
1
1*

One 1/D chance of getting a 1/8-block reward.

Total expected reward = 2*(1/4D) + 1*(5/4D) + 1*(1/8D) = 15/8D blocks. The fair reward would be 1/D blocks.

The above was a rather contrived and extreme example. I wrote a script to simulate the rewards for a N=2016 PPLNS system with between 1 and 10 shares per level, and the typical revenue per share varies by less than 1%, with the maximum I've seen being 2.6%.

Again, you can't hop based on this, because it depends on events that happen after you mine a share, which can't be predicted. It's a selfish mining vulnerability, but not a hopping vulnerability.

And also again, this variation is completely eliminated by the PPLKD scheme I described earlier.

Hosting bitcoin miners for $65 to $80/kW/month on clean, cheap hydro power.
http://Toom.im
jtoomim
Hero Member
*****
Offline Offline

Activity: 818
Merit: 1006


View Profile WWW
June 18, 2016, 05:33:44 AM
Last edit: June 18, 2016, 06:51:06 AM by jtoomim
 #14583

If you attempt to apply a score to correct for this, you can do that, but then you have the issue of how to score multiple shares at the same level. To do this fairly and unexploitably, you need an order. Back to square one.
It's actually quite simple to fairly order shares within a level, as long as you don't care whether the ordering is chonological. For example, you can sort the shares by their hash -- lowest hash (closest to mining a block) comes first. Fair, simple, easy, and unnecessary.

It's also trivial to make a DAG with a constant M/N ratio. Instead of allowing shares to specify as many uncles as they want, you can force each share to specify exactly K parents, and create a rule where the parent with the lowest hash is the canonical parent, and only the canonical parent's parents are counted as grandparents. Fair, simple, easy, and unnecessary.

The best solution is just to make sure that the portion of the share chain that's used for calculating rewards always represents the same amount of work. This puts the fewest restrictions on the DAG structure, and ensures that the ratio of the numbers that actually matters -- the amount of work used to calculate the size of the payout, and the amount of work done by others that would have made the payout -- remains a constant 1.0. As in the PPLKD scheme I described earlier.

Hosting bitcoin miners for $65 to $80/kW/month on clean, cheap hydro power.
http://Toom.im
smooth
Legendary
*
Offline Offline

Activity: 2968
Merit: 1198



View Profile
June 18, 2016, 05:34:43 AM
 #14584

This reminds me very much of the arguments I used to have 5 years ago when people denied that pool hopping worked at all.

It was tedious then and it is tedious now. The problem is that logical falacies involving probability are subtle and difficult to explain convincingly if you lack a formal background.

I may return to the discussion later, or I may not. Either way, I'm pretty sure you are incorrect, but I'm not the one working on a project based on a faulty model, so its not really my problem. It may also be fixable without drastic changes (your later post that showed up while I was typing this may be sufficient, or close enough), but it will almost certainly be more complicated and probably still vulnerable to something. It is also possible, somewhat, that I'm still misreading what you are proposing. I don't think so though.

BTW, I was always assuming a constant difficulty for each share for simplicity of description, but that doesn't change anything in general.
jtoomim
Hero Member
*****
Offline Offline

Activity: 818
Merit: 1006


View Profile WWW
June 18, 2016, 06:23:54 AM
Last edit: June 18, 2016, 06:48:51 AM by jtoomim
 #14585

Either way, I'm pretty sure you are incorrect
If you can specify how you think the system is flawed, I'm all ears. However, simply stating that you think it's flawed without going into any detail or even demonstrating that you understand the system is not very helpful.

Hosting bitcoin miners for $65 to $80/kW/month on clean, cheap hydro power.
http://Toom.im
winterfresh7
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
June 19, 2016, 03:47:19 PM
 #14586

Recently got a warning that over 50% have voted for an upgrade to v16?
jtoomim
Hero Member
*****
Offline Offline

Activity: 818
Merit: 1006


View Profile WWW
June 19, 2016, 04:09:24 PM
 #14587

Recently got a warning that over 50% have voted for an upgrade to v16?
You should upgrade. Do a git pull.

I have not yet upgraded my nodes. Once I do, due to the size of my mining operation, almost all of the network hashrate will be on v16, and v15 shares will start to be rejected. It would be a good idea to upgrade before I do.

Hosting bitcoin miners for $65 to $80/kW/month on clean, cheap hydro power.
http://Toom.im
Meuh6879
Legendary
*
Offline Offline

Activity: 1512
Merit: 1011



View Profile
June 19, 2016, 08:30:37 PM
 #14588



 Cry binaries isn't here ... https://github.com/p2pool/p2pool/releases/tag/16.0
forrestv (OP)
Hero Member
*****
Offline Offline

Activity: 516
Merit: 643


View Profile
June 19, 2016, 09:25:02 PM
 #14589

P2Pool release 16.0 - commit hash: d3bbd6df33ccedfc15cf941e7ebc6baf49567f97

HARDFORK - Upgrade URGENTLY required in the next few days.

Windows binary: http://u.forre.st/u/wanckfqm/p2pool_win32_16.0.zip
Windows binary signature: http://u.forre.st/u/wqjnuihh/p2pool_win32_16.0.zip.sig
Source zipball: https://github.com/forrestv/p2pool/zipball/16.0
Source tarball: https://github.com/forrestv/p2pool/tarball/16.0

Changes:
* CSV compatibility
* Requires Bitcoin >=0.12.1

Several BIPs will take effect in the next few days and in order for P2Pool to continue working without producing invalid blocks, everyone needs to upgrade. At 50% of our hashrate upgrading, P2Pool instances will start displaying a warning saying that an upgrade is required. Reaching that point as quickly as possible is very important. And then, at 95%, users that have not upgraded will be excluded. If non-upgraded users aren't excluded before the Bitcoin changes takes effect, P2Pool users will be subject to paying other users for invalid work - effectively a withholding attack.

So, please upgrade to 16.0 now and also tell everyone else to.

1J1zegkNSbwX4smvTdoHSanUfwvXFeuV23
ziiip
Full Member
***
Offline Offline

Activity: 255
Merit: 102

uBlock.it Admin


View Profile WWW
June 20, 2016, 04:27:36 AM
 #14590

Which coin daemons are supported this release? Just core 0.12.1+?

Riecoin Pool http://uBlock.it/
forrestv (OP)
Hero Member
*****
Offline Offline

Activity: 516
Merit: 643


View Profile
June 20, 2016, 04:33:20 AM
 #14591

Which coin daemons are supported this release? Just core 0.12.1+?

For the Bitcoin network, yes. For other P2Pool networks, no requirements were changed.

1J1zegkNSbwX4smvTdoHSanUfwvXFeuV23
ziiip
Full Member
***
Offline Offline

Activity: 255
Merit: 102

uBlock.it Admin


View Profile WWW
June 20, 2016, 04:41:32 AM
 #14592

I see Classic 0.12.1 isn't supported. This just for BIP 9 compatibility or what?

Riecoin Pool http://uBlock.it/
ziiip
Full Member
***
Offline Offline

Activity: 255
Merit: 102

uBlock.it Admin


View Profile WWW
June 20, 2016, 05:20:58 AM
 #14593

I suppose i'll just dirty up the code a bit . . .

Riecoin Pool http://uBlock.it/
forrestv (OP)
Hero Member
*****
Offline Offline

Activity: 516
Merit: 643


View Profile
June 20, 2016, 06:04:35 AM
Last edit: June 20, 2016, 08:01:33 AM by forrestv
 #14594

I suppose i'll just dirty up the code a bit . . .

It should run fine with Bitcoin Classic...

EDIT: I don't really know. I assumed Classic would support and indicate that it provides support for the upcoming softforks, but I don't know.

1J1zegkNSbwX4smvTdoHSanUfwvXFeuV23
ziiip
Full Member
***
Offline Offline

Activity: 255
Merit: 102

uBlock.it Admin


View Profile WWW
June 20, 2016, 07:35:57 AM
 #14595

i'm running Classic 0.12.1 and i get
coin daemon too old! Upgrade!
unless i replace the helper.py from version 15.
Was this tested with Classic?
I don't believe Classic is signaling CSV or BIP 9, they just removed the upgrade warning from the code in 0.12.1.

Riecoin Pool http://uBlock.it/
veqtrus
Member
**
Offline Offline

Activity: 107
Merit: 10


View Profile WWW
June 20, 2016, 09:28:35 AM
 #14596

Classic isn't supported because it doesn't support the CSV softfork yet. Considering CSV will almost certainly reach 95% hashpower signaling before the difficulty retargets, CSV will be enforced from the start of the retargeting period after the next (in about two weeks). Unless Classic adopts CSV miners using it may have their blocks rejected.

Note that simply changing the share version to get them accepted by the P2Pool network is an attack after CSV is enforced.

P2Pool donation button | Bitrated user: veqtrus.
jtoomim
Hero Member
*****
Offline Offline

Activity: 818
Merit: 1006


View Profile WWW
June 20, 2016, 09:38:01 AM
 #14597

Unfortunately, Bitcoin Classic has not been updated to support CSV and BIP9 yet. Consequently, it will be inadvisable to mine with it after the CSV fork activates. If you try, you will probably have any blocks that you mine get orphaned. This will make other p2pool users unhappy, as you will basically be freeloading off the others in the pool. So please don't.

You can still vote for the Classic BIP109 2 MB hardfork without running Classic. You can do so quite easily in p2pool by editing the source code to bitwise OR the block version with 0x30000000. I will be doing this myself soon. Something like this should work:

    version=max(self.current_work.value['version'] | 0x30000000, 0x30000000),

If the BIP109 vote exceeds about 10-15% of the network hashrate, or if a large miner (e.g. Bitfury or Bitmain) asks me to, I will take a week and merge in CSV, BIP9, and whatever else needs merging into Classic, if Gavin and Zander haven't beaten me to it. In the mean time, I will keep voting for BIP109 but using Core, similar to what f2pool does.

Hosting bitcoin miners for $65 to $80/kW/month on clean, cheap hydro power.
http://Toom.im
windpath
Legendary
*
Offline Offline

Activity: 1258
Merit: 1027


View Profile WWW
June 20, 2016, 03:23:44 PM
 #14598

P2Pool release 16.0 - commit hash: d3bbd6df33ccedfc15cf941e7ebc6baf49567f97

HARDFORK - Upgrade URGENTLY required in the next few days.

Windows binary: http://u.forre.st/u/wanckfqm/p2pool_win32_16.0.zip
Windows binary signature: http://u.forre.st/u/wqjnuihh/p2pool_win32_16.0.zip.sig
Source zipball: https://github.com/forrestv/p2pool/zipball/16.0
Source tarball: https://github.com/forrestv/p2pool/tarball/16.0

Changes:
* CSV compatibility
* Requires Bitcoin >=0.12.1

Several BIPs will take effect in the next few days and in order for P2Pool to continue working without producing invalid blocks, everyone needs to upgrade. At 50% of our hashrate upgrading, P2Pool instances will start displaying a warning saying that an upgrade is required. Reaching that point as quickly as possible is very important. And then, at 95%, users that have not upgraded will be excluded. If non-upgraded users aren't excluded before the Bitcoin changes takes effect, P2Pool users will be subject to paying other users for invalid work - effectively a withholding attack.

So, please upgrade to 16.0 now and also tell everyone else to.

Thanks Forrest!

CoinCadence is now running P2Pool 16
ziiip
Full Member
***
Offline Offline

Activity: 255
Merit: 102

uBlock.it Admin


View Profile WWW
June 20, 2016, 03:55:12 PM
 #14599

Unfortunately, Bitcoin Classic has not been updated to support CSV and BIP9 yet. Consequently, it will be inadvisable to mine with it after the CSV fork activates. If you try, you will probably have any blocks that you mine get orphaned. This will make other p2pool users unhappy, as you will basically be freeloading off the others in the pool. So please don't.

You can still vote for the Classic BIP109 2 MB hardfork without running Classic. You can do so quite easily in p2pool by editing the source code to bitwise OR the block version with 0x30000000. I will be doing this myself soon. Something like this should work:

    version=max(self.current_work.value['version'] | 0x30000000, 0x30000000),

If the BIP109 vote exceeds about 10-15% of the network hashrate, or if a large miner (e.g. Bitfury or Bitmain) asks me to, I will take a week and merge in CSV, BIP9, and whatever else needs merging into Classic, if Gavin and Zander haven't beaten me to it. In the mean time, I will keep voting for BIP109 but using Core, similar to what f2pool does.

Makes sense, hopefully Classic will be updated soon. I wasn't looking forward to re-building bitcoind but looks like it's necessary.
Thanks!

Riecoin Pool http://uBlock.it/
sawa
Legendary
*
Offline Offline

Activity: 1308
Merit: 1011



View Profile
June 20, 2016, 05:53:50 PM
 #14600

Thanks Forrest!
In version 16.0 an issue #253 in work with pypy disappeared.
This version works correctly and has the fastest speed.

Pages: « 1 ... 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 [730] 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 ... 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!