Author

Topic: [1500 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool - page 280. (Read 2592023 times)

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Does anyone know if I change the COINBASE_NONCE_LENGTH (larger to make nonce2 larger) on a local p2pool whether shares will be rejected by the p2pool network? I'm trying to make it more suitable to using a ckproxy front end.

Con, I do not know the answer to your question, however can you expand a little on ckproxy?

Is it directly integrated into ckpool, or can it stand it stand alone? Might it be part of a solution to variance for smaller miners?

Thx!

Yes.

Yes and yes and no.

It's a massive project. Please read the announcement:
https://bitcointalksearch.org/topic/ckpool-open-source-poolproxypassthroughredirectorlibrary-in-c-for-linux-790323
legendary
Activity: 1258
Merit: 1027
Does anyone know if I change the COINBASE_NONCE_LENGTH (larger to make nonce2 larger) on a local p2pool whether shares will be rejected by the p2pool network? I'm trying to make it more suitable to using a ckproxy front end.

Con, I do not know the answer to your question, however can you expand a little on ckproxy?

Is it directly integrated into ckpool, or can it stand it stand alone? Might it be part of a solution to variance for smaller miners?

Thx!
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Does anyone know if I change the COINBASE_NONCE_LENGTH (larger to make nonce2 larger) on a local p2pool whether shares will be rejected by the p2pool network? I'm trying to make it more suitable to using a ckproxy front end.
sr. member
Activity: 312
Merit: 250


请使用正确的难度。
P2POOL,这15天效率很低,
原因:中国矿工约有1.5PH/S,使用了超大的难度(+5120或者更多),
我们及时的更改了错误,目前全部使用大约是难度比例1:1。
P2POOL这些天低效率,我们表示抱歉。
但是我们认识到了最好的难度选择是:选择和矿机算力相等的难度。
当前我们的蚂蚁S3+518(+512,S3不显示BestShare),
1TH/S+1028,

S3+518,平均5秒一个Accepted。

S3+5120,大部分计算都超时,被服务器拒绝,能挖到的Share,但是很难产生块。

希望这些数据能帮助到更多的P2POOL矿工,

使用正确的难度选择。

来自中国的P2POOL爱好者。

百度在线翻译

Please use the correct difficulty.
P2POOL, this 15 days the efficiency is very low,
Reason: the Chinese miners about 1.5PH/S, using the large difficulty (+5120 or more),
We amend the wrong, all currently used is about difficulty ratio 1:1.
P2POOL these days and low efficiency, we apologize.
But we recognize the difficulty of selecting the best: the selection and calculation of force is equal to the difficulty of mining machine.
Our current ant S3+518 (+512, S3 does not display the BestShare),
1TH/S+1028,
S3+518, an average of 5 seconds for a Accepted.
S3+5120, most computing timeout, was rejected by the server, can dig into Share, but it is difficult to produce block.
Hope that these data will help to more P2POOL miners,
The use of the difficulty of choosing the right.
From Chinese P2POOL lovers.
Baidu online translation

Thank you for the valuable information.
legendary
Activity: 1344
Merit: 1024
Mine at Jonny's Pool

So....

An easy way to explain it so anyone can understand is:
A share is valid, and paid if a block is found, for about 3 days.

The accurate way to explain it is:
The last 8,640 shares are paid when a block is found, the expected time to share is 30 seconds.

Hope this helps...
And
Code:
SPREAD = 3 # blocks
is not tell that max 3 blocks can be paid?
As far I understand, every share is valid 8640 shares of time but up to 3 blocks found in mean time.
So if we will found more than 1 block per day, and your power is not enough to get more than one share per 3 days you will not get payout from every block.

Just when you think you have got it figured out...

Thanks Rav3n, I'll dig into it this week and see if I can figure out an easy way to explain what SPREAD is doing.

I know there has been some talk about rewriting p2pool in C++, any one have any thoughts on a Ruby version?

Have not given it a lot of thought, but after seeing Toshi thought there might be some advantages...

http://blog.coinbase.com/post/97671295752/introducing-toshi-an-open-source-bitcoin-node-for


Check out my reply to both you and rav3n... I explained it there.
legendary
Activity: 1904
Merit: 1007
Code:
0d 1h 6m 17s	2014-09-20 16:48:58	0 	0000000000000000095574410c8b9d067829bba651e3a8941fa60ee5b78bc20d	25.14698169	314	b78bc20d	0.01%	

Is it me or there is weird stuff going on? First the 2 orphaned blocks, now this...
legendary
Activity: 1258
Merit: 1027

So....

An easy way to explain it so anyone can understand is:
A share is valid, and paid if a block is found, for about 3 days.

The accurate way to explain it is:
The last 8,640 shares are paid when a block is found, the expected time to share is 30 seconds.

Hope this helps...
And
Code:
SPREAD = 3 # blocks
is not tell that max 3 blocks can be paid?
As far I understand, every share is valid 8640 shares of time but up to 3 blocks found in mean time.
So if we will found more than 1 block per day, and your power is not enough to get more than one share per 3 days you will not get payout from every block.

Just when you think you have got it figured out...

Thanks Rav3n, I'll dig into it this week and see if I can figure out an easy way to explain what SPREAD is doing.

I know there has been some talk about rewriting p2pool in C++, any one have any thoughts on a Ruby version?

Have not given it a lot of thought, but after seeing Toshi thought there might be some advantages...

http://blog.coinbase.com/post/97671295752/introducing-toshi-an-open-source-bitcoin-node-for

hero member
Activity: 686
Merit: 500
WANTED: Active dev to fix & re-write p2pool in C
Hey guys,

I was thinking of renting some hash power for my node, so opened an account at miningrigrentals. I asked them via their ticket system if it was possible to make adjustments to the miner on the rented rig either via ssh or a web interface so as to adjust the -queue & diff settings, but they said this was not possible. Shame, as I don't want to rent a rig then watch 10-20% of the hash get wasted with DOA's etc.

I also inquired at Genesis Mining, but they don't allow for choosing which pool to point your hash at.

Does anyone know of a company that allows the renter to make these kind of adjustments and choices?

Thanks  Smiley
legendary
Activity: 1540
Merit: 1001
Maybe you can try a miner, let it find one share then stop it. I can guarantee its not valid not much more than 24 hours!!!

Or if thats too difficult see with your eyes - http://p2pool.servebeer.com:9332/static/sharetime.jpg  the last share in graps wasnt valid for a single block....

That's why I left p2pool.  I was squeezed out.  The one share I got rolled off within 36 hours before a block was found (it was one of those long streaks).

M
full member
Activity: 932
Merit: 100
arcs-chain.com
I'm having some questions about P2Pool mining, I'm mining on http://elizium.name node with 2 Antminer S3+'s, at about 920GH/s.
But I've been mining for 12+ hours now, and I still have nothing. I added after my payout address "+518" but still nothing.
Is this normal or...?

Because P2pool is PPLNS so it takes around 3 days to build up enough shares to start seeing payment. conversely when you stop mining you'll still receive payments for a few days. have a little patience, it'll come and when it does it'll be sweet. p2pool has been finding quite a few blocks lately.

I don't think the 3 day thing is true anymore.  I've watched my 1 share roll off in 36 hours or less.

Also, at 920 GH/s, your variance is going to be bad.  Be patient, and expect lots of time without shares.

M

This is covered in the "READ THIS FIRST" article here: http://p2pool.org/#learn-p2pool

But want to put it to bed once and for all...

The variable for determining how many shares to pay can be found here in the p2pool source code:
https://github.com/forrestv/p2pool/blob/master/p2pool/networks/bitcoin.py

This is an excerpt:

Code:
# CHAIN_LENGTH = number of shares back client keeps
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

PARENT = networks.nets['bitcoin']
SHARE_PERIOD = 30 # seconds
CHAIN_LENGTH = 24*60*60//10 # shares
REAL_CHAIN_LENGTH = 24*60*60//10 # shares

REAL_CHAIN_LENGTH sets the total number of previously found shares to include in the payout when a block is found.

It is a fixed number, it is constant and does not change without the consensus of the p2pool network (i.e. the majority of miners on p2pool all change it on their nodes at the same time). It has not been changed since I have been around.

Currently it is 24*60*60//10...

(24*60*60)/10 = 8,640 shares are paid when a block is found, this is a mathematical fact and not subject to interpretation.

SHARE_PERIOD is the length in seconds expected before a share is found.

Unlike Bitcoin which adjusts difficulty about every 2 weeks, p2pool adjusts difficulty dynamically so a share is expected to be found about every SHARE_PERIOD seconds, currently set to 30 seconds.

The SHARE_PERIOD is a target that p2pool attempts to hit for every share by dynamically adjusting the difficulty.

Actual SHARE_PERIOD is subject to variance/luck, so it is possible a share could be found in 1 second, or in 120 seconds, however the difficulty is constantly adjusted so the expected time is always 30 seconds based on the current pool hashrate.

So if we know 8,640 shares will be paid, and that a share is expected to be found every 30 seconds...

8,640 * 30 = 259,200 seconds
259,200 / 60 = 4,320 minutes
4,320 / 60 = 72 hours
72 / 24 = 3 days

So....

An easy way to explain it so anyone can understand is:
A share is valid, and paid if a block is found, for about 3 days.

The accurate way to explain it is:
The last 8,640 shares are paid when a block is found, the expected time to share is 30 seconds.

Hope this helps...
Maybe you can try a miner, let it find one share then stop it. I can guarantee its not valid not much more than 24 hours!!!

Or if thats too difficult see with your eyes - http://p2pool.servebeer.com:9332/static/sharetime.jpg  the last share in graps wasnt valid for a single block....
legendary
Activity: 1270
Merit: 1000
It also means as the pool hashrate increases, this value gets smaller and smaller.  Say we get to 2hrs per block.  That means 6 hours, it rolls off.  Ouch.

We could always fork to increase the spread if necessary  Smiley
legendary
Activity: 1540
Merit: 1001
And
Code:
SPREAD = 3 # blocks
is not tell that max 3 blocks can be paid?
As far I understand, every share is valid 8640 shares of time but up to 3 blocks found in mean time.
So if we will found more than 1 block per day, and your power is not enough to get more than one share per 3 days you will not get payout from every block.
No, it is not a hard limit of 3 blocks, it is 3 times the average work required to solve a block.  In other words, if the average time to block is 8 hours, then your shares will fall off the payout after 24 hours.  So, if p2pool happens to get lucky and solve 10 blocks in that 24 hour period, your share will be paid for all 10 blocks.

That explains why it dropped from 3 days to 1 to 1.5 days.  I know very well I saw my sole share fall off within 36 hours.

It also means as the pool hashrate increases, this value gets smaller and smaller.  Say we get to 2hrs per block.  That means 6 hours, it rolls off.  Ouch.

Thanks.

M
legendary
Activity: 1344
Merit: 1024
Mine at Jonny's Pool
And
Code:
SPREAD = 3 # blocks
is not tell that max 3 blocks can be paid?
As far I understand, every share is valid 8640 shares of time but up to 3 blocks found in mean time.
So if we will found more than 1 block per day, and your power is not enough to get more than one share per 3 days you will not get payout from every block.
No, it is not a hard limit of 3 blocks, it is 3 times the average work required to solve a block.  In other words, if the average time to block is 8 hours, then your shares will fall off the payout after 24 hours.  So, if p2pool happens to get lucky and solve 10 blocks in that 24 hour period, your share will be paid for all 10 blocks.
legendary
Activity: 1344
Merit: 1024
Mine at Jonny's Pool
See, there's this troubling little statement in the p2pool wiki about payouts:
Quote
Each share contains a generation transaction that pays to the previous n shares, where n is the number of shares whose total work is equal to 3 times the average work required to solve a block, or 8640 (= 24 hours of shares), whichever is smaller. Payouts are weighted based on the amount of work each share took to solve, which is proportional to the p2pool difficulty at that time.
Obviously the 24 hour thing is incorrect since the share time was adjusted from the initial 10 seconds to the current 30 seconds.  However, the bolded part is where I want to focus.  If this was strictly and always 8640 shares, then all I would have to do is a simple loop in my code to the effect of:
Code:
for each share from (current share height - 8640) to current share do:
  get payout address from share
  get share_payout from share
  look for payout address in known address map
  if payout address in map
    address_total_payout += share_payout
  else
    add address to map
    address_total_payout = share_payout
add map of addresses and payouts to coinbase
Unfortunately the payout code is a bit more complex than that.  Here's the beginning of the generate_transaction code from p2pool:
Code:
def generate_transaction(cls, tracker, share_data, block_target, desired_timestamp, desired_target, ref_merkle_link, desired_other_transaction_hashes_and_fees, net, known_txs=None, last_txout_nonce=0, base_subsidy=None):
        previous_share = tracker.items[share_data['previous_share_hash']] if share_data['previous_share_hash'] is not None else None

        height, last = tracker.get_height_and_last(share_data['previous_share_hash'])
        assert height >= net.REAL_CHAIN_LENGTH or last is None
        if height < net.TARGET_LOOKBEHIND:
            pre_target3 = net.MAX_TARGET
        else:
            attempts_per_second = get_pool_attempts_per_second(tracker, share_data['previous_share_hash'], net.TARGET_LOOKBEHIND, min_work=True, integer=True)
            pre_target = 2**256//(net.SHARE_PERIOD*attempts_per_second) - 1 if attempts_per_second else 2**256-1
            pre_target2 = math.clip(pre_target, (previous_share.max_target*9//10, previous_share.max_target*11//10))
            pre_target3 = math.clip(pre_target2, (net.MIN_TARGET, net.MAX_TARGET))
        max_bits = bitcoin_data.FloatingInteger.from_target_upper_bound(pre_target3)
        bits = bitcoin_data.FloatingInteger.from_target_upper_bound(math.clip(desired_target, (pre_target3//30, pre_target3)))
The real telling part of this method, however, is here:
Code:
weights, total_weight, donation_weight = tracker.get_cumulative_weights(previous_share.share_data['previous_share_hash'] if previous_share is not None else None,
            max(0, min(height, net.REAL_CHAIN_LENGTH) - 1),
            65535*net.SPREAD*bitcoin_data.target_to_average_attempts(block_target),
)
It certainly appears to support the statement in the wiki, that either 8640 shares, or the average work to solve 3 blocks worth of shares, are paid out (SPREAD = 3).

You know what would be exceptionally helpful?  Documented freaking code.  How freaking hard is it for developers to write comments in their code?  I yell at my developers all the time to comment their code.  In fact, the first thing you should be writing are the comments.  It just makes everything easier both for you as the developer to keep you focused, and for the people that later need to maintain it.
legendary
Activity: 1361
Merit: 1003
Don`t panic! Organize!

So....

An easy way to explain it so anyone can understand is:
A share is valid, and paid if a block is found, for about 3 days.

The accurate way to explain it is:
The last 8,640 shares are paid when a block is found, the expected time to share is 30 seconds.

Hope this helps...
And
Code:
SPREAD = 3 # blocks
is not tell that max 3 blocks can be paid?
As far I understand, every share is valid 8640 shares of time but up to 3 blocks found in mean time.
So if we will found more than 1 block per day, and your power is not enough to get more than one share per 3 days you will not get payout from every block.
legendary
Activity: 1258
Merit: 1027
I'm having some questions about P2Pool mining, I'm mining on http://elizium.name node with 2 Antminer S3+'s, at about 920GH/s.
But I've been mining for 12+ hours now, and I still have nothing. I added after my payout address "+518" but still nothing.
Is this normal or...?

Because P2pool is PPLNS so it takes around 3 days to build up enough shares to start seeing payment. conversely when you stop mining you'll still receive payments for a few days. have a little patience, it'll come and when it does it'll be sweet. p2pool has been finding quite a few blocks lately.

I don't think the 3 day thing is true anymore.  I've watched my 1 share roll off in 36 hours or less.

Also, at 920 GH/s, your variance is going to be bad.  Be patient, and expect lots of time without shares.

M

This is covered in the "READ THIS FIRST" article here: http://p2pool.org/#learn-p2pool

But want to put it to bed once and for all...

The variable for determining how many shares to pay can be found here in the p2pool source code:
https://github.com/forrestv/p2pool/blob/master/p2pool/networks/bitcoin.py

This is an excerpt:

Code:
# CHAIN_LENGTH = number of shares back client keeps
# REAL_CHAIN_LENGTH = maximum number of shares back client uses to compute payout
# REAL_CHAIN_LENGTH must always be <= CHAIN_LENGTH
# REAL_CHAIN_LENGTH must be changed in sync with all other clients
# changes can be done by changing one, then the other

PARENT = networks.nets['bitcoin']
SHARE_PERIOD = 30 # seconds
CHAIN_LENGTH = 24*60*60//10 # shares
REAL_CHAIN_LENGTH = 24*60*60//10 # shares

REAL_CHAIN_LENGTH sets the total number of previously found shares to include in the payout when a block is found.

It is a fixed number, it is constant and does not change without the consensus of the p2pool network (i.e. the majority of miners on p2pool all change it on their nodes at the same time). It has not been changed since I have been around.

Currently it is 24*60*60//10...

(24*60*60)/10 = 8,640 shares are paid when a block is found, this is a mathematical fact and not subject to interpretation.

SHARE_PERIOD is the length in seconds expected before a share is found.

Unlike Bitcoin which adjusts difficulty about every 2 weeks, p2pool adjusts difficulty dynamically so a share is expected to be found about every SHARE_PERIOD seconds, currently set to 30 seconds.

The SHARE_PERIOD is a target that p2pool attempts to hit for every share by dynamically adjusting the difficulty.

Actual SHARE_PERIOD is subject to variance/luck, so it is possible a share could be found in 1 second, or in 120 seconds, however the difficulty is constantly adjusted so the expected time is always 30 seconds based on the current pool hashrate.

So if we know 8,640 shares will be paid, and that a share is expected to be found every 30 seconds...

8,640 * 30 = 259,200 seconds
259,200 / 60 = 4,320 minutes
4,320 / 60 = 72 hours
72 / 24 = 3 days

So....

An easy way to explain it so anyone can understand is:
A share is valid, and paid if a block is found, for about 3 days.

The accurate way to explain it is:
The last 8,640 shares are paid when a block is found, the expected time to share is 30 seconds.

Hope this helps...
legendary
Activity: 1344
Merit: 1024
Mine at Jonny's Pool
Is the p2pool share difficulty node specific, or it's whole p2pool blockchain specific?

The pseudo share size is node specific.  The "alt chain" share size (currently at 12.3 million) is p2pool wide.

M

So smaller miners should join smaller nodes or are they working on the 12.3 million share too?
Everybody is trying to find a share of 12.3 million or higher so it can be added to the chain.  It doesn't matter on which node you're mining, everybody's facing the same difficulty.  You can manually set your own difficulty on your miners if you wish by appending / and + to your BTC address.  Using the "+" sets your pseudo share difficulty.  Using the "/" sets your actual share difficulty.  If you don't put either value, the node assigns them for you based upon its own total hash rate.  If you use "/" and set that value HIGHER than the actual share chain value, then when you do find a share, it will be weighted more than the default share.

For example, I do not bother setting difficulty because I mine on my own node.  Here are a couple examples from my node:
Code:
2014-09-19 10:07:52.415374 New work for worker! Difficulty: 891.314595 Share difficulty: 14340426.635364 Total block value: 25.024165 BTC including 145 transactions
Code:
2014-09-19 10:08:19.330168 New work for worker! Difficulty: 734.066695 Share difficulty: 14200589.602459 Total block value: 25.030165 BTC including 176 transactions
As you can see, the node is dynamically changing the values.  If I were to manually set the pseudo-share difficulty, I'd see something like this:
Code:
2014-09-18 15:08:41.804703 New work for worker! Difficulty: 256.000000 Share difficulty: 15823712.661332 Total block value: 25.179847 BTC including 1176 transactions
In this example, I've configured my miner as "ADDRESS+256".
If I were to do something like "ADDRESS/16000000+256" you'd see something like this:
Code:
2014-09-18 15:08:41.804703 New work for worker! Difficulty: 256.000000 Share difficulty: 16000000 Total block value: 25.179847 BTC including 1176 transactions
If I did something like "ADDRESS/1000+256", I'd see this:
Code:
2014-09-18 15:08:41.804703 New work for worker! Difficulty: 256.000000 Share difficulty: 15823712.661332 Total block value: 25.179847 BTC including 1176 transactions
As you can see, it's exactly the same as not using the "/" at all.  Why?  Because I set my difficulty to be less than the pool's minimum share difficulty, so the pool overrides my settings.

Hope this helps.
legendary
Activity: 1904
Merit: 1007
Is the p2pool share difficulty node specific, or it's whole p2pool blockchain specific?

The pseudo share size is node specific.  The "alt chain" share size (currently at 12.3 million) is p2pool wide.

M

So smaller miners should join smaller nodes or are they working on the 12.3 million share too?
legendary
Activity: 1540
Merit: 1001
Is the p2pool share difficulty node specific, or it's whole p2pool blockchain specific?

The pseudo share size is node specific.  The "alt chain" share size (currently at 12.3 million) is p2pool wide.

M
full member
Activity: 932
Merit: 100
arcs-chain.com
I'm having some questions about P2Pool mining, I'm mining on http://elizium.name node with 2 Antminer S3+'s, at about 920GH/s.
But I've been mining for 12+ hours now, and I still have nothing. I added after my payout address "+518" but still nothing.
Is this normal or...?

Because P2pool is PPLNS so it takes around 3 days to build up enough shares to start seeing payment. conversely when you stop mining you'll still receive payments for a few days. have a little patience, it'll come and when it does it'll be sweet. p2pool has been finding quite a few blocks lately.
Im not sure what you mean by 3 days, a share is nowdays valid ~24 hours....
Jump to: