jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 135
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Mar 28, 2018 7:35 am

jtoomimnet BCH block 523299 found:

https://blockchair.com/bitcoin-cash/blo ... 94d53b6010

Looks like we had a fly-by Nicehash renter dump 80 PH/s onto p2pool for 6 hours. If anybody else is thinking of doing something similar, may I make a suggestion? Don't do it for only 6 hours. The PPLNS algorithm will result in lower expected revenue for someone who mines in a short burst like that compared to someone who mines the same number of hashes over a longer period of time (e.g. 3 days or more). Short bursty hashers will have most of their hashpower go to paying long-term consistent hashers.

ikolu
Posts: 8
Joined: Thu Mar 22, 2018 7:33 pm
Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Mar 28, 2018 10:29 am

jtoomim,
Curiosity..
I checked out the feechecking branch and was trying to make my p2pool node to “solo mine”

I changes the network file with new Identifier and Prefix hex and persist to False.

It loads and it doesn’t download shares as expected. But if I try to connect a worker it throws this error:

Squelched JSON error:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
result = g.send(result)
File "/home/ialmeida/p2poolSolo/p2pool/util/jsonrpc.py", line 85, in _handle
result = yield method_meth(*list(preargs) + list(params))
File "/home/ialmeida/p2poolSolo/p2pool/bitcoin/worker_interface.py", line 20, in rpc_getwork
return self.parent._getwork(request, data, long_poll=self.long_poll)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1532, in unwindGenerator
return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
result = g.send(result)
File "/home/ialmeida/p2poolSolo/p2pool/bitcoin/worker_interface.py", line 84, in _getwork
x, handler = self.worker_bridge.get_work(*self.worker_bridge.preprocess_request(request.getUser() if request.getUser() is not None else ''))
File "/home/ialmeida/p2poolSolo/p2pool/bitcoin/worker_interface.py", line 129, in get_work
x, handler = self._inner.get_work(*args)
File "/home/ialmeida/p2poolSolo/p2pool/work.py", line 339, in get_work
base_subsidy=self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['height']),
File "/home/ialmeida/p2poolSolo/p2pool/data.py", line 260, in generate_transaction
raise ValueError('segwit transaction included before activation')
exceptions.ValueError: segwit transaction included before activation

What I'm trying to do is to setup p2pool to mine another SCRYPT coins and I was trying to make it work as a solo mining for LTC first as it would be the same idea for the other coins. If I get the LTC right, I know if problems show up when trying different coins will be probably the new coin and not the p2pool code.

Could you help me out?

Thank you,

User avatar
k0gen
Posts: 6
Joined: Sat Mar 24, 2018 9:21 am

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Mar 28, 2018 10:34 am

I have never seen the "exceptions.KeyError: 'incoming_peers'" error before. Are you using a custom web UI?
YES: I am using https://github.com/justino/p2pool-ui-punchy

CryptoKirk1
Posts: 1
Joined: Wed Mar 28, 2018 1:05 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Mar 28, 2018 1:43 pm

The best repo to use is mine.
I'm not sure that's entirely true if you are a single miner. Right now if a single miner joins a node running your ver of P2Pool for LTC at least (and there are a ton of single miners scattered throughout the world) the diff rate is through the roof (18K +) and it makes it almost impossible to get a share. It means a miner gets on and basically gives up after 10+ hours when nothing effectively happens. I'v seen share times up to 48 Hours. Unless they join a discussion group or have a friend on P2Pool who can explain what's going on they just give up entirely on P2Pool as a viable mining option.

Im not sure (read I know) what type of message that sends to new miners and their first mining experience on the platform. I would have thought trying to retain single miners was as important as trying to retain big farms. It all adds to the big picture. 30 nodes each with 30 single miners is a ton of miners that could be adding hash power to the platform. I am making those figures up but I can only imagine how many miners are coming to the platform and quickly leaving with a goal of never to return. It just isn't good PR.

That's my 2cents anyway. Terrible 1st post but I thought I'd get it out there. Now I feel better :D

CK

Crypt0damus
Posts: 1
Joined: Thu Mar 08, 2018 5:21 pm

Donate BTC of your choice to 33btcGnF9hNeWhvpjoUaKbYDLPP7zwMMd7

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Mar 28, 2018 2:51 pm

The best repo to use is mine.
I'm not sure that's entirely true if you are a single miner. Right now if a single miner joins a node running your ver of P2Pool for LTC at least (and there are a ton of single miners scattered throughout the world) the diff rate is through the roof (18K +) and it makes it almost impossible to get a share. It means a miner gets on and basically gives up after 10+ hours when nothing effectively happens. I'v seen share times up to 48 Hours. Unless they join a discussion group or have a friend on P2Pool who can explain what's going on they just give up entirely on P2Pool as a viable mining option.

Im not sure (read I know) what type of message that sends to new miners and their first mining experience on the platform. I would have thought trying to retain single miners was as important as trying to retain big farms. It all adds to the big picture. 30 nodes each with 30 single miners is a ton of miners that could be adding hash power to the platform. I am making those figures up but I can only imagine how many miners are coming to the platform and quickly leaving with a goal of never to return. It just isn't good PR.

That's my 2cents anyway. Terrible 1st post but I thought I'd get it out there. Now I feel better :D

CK
jtoomim, I speak for several miners who have fallen off the block chain with single L3's. I understand there may be a difficulty fix in the work, but I want to put something very important into perspective.

Bitmain shipped 3 large batches of L3+ miners in march. These miners want to partake in the whole decentralized effort of mining. They are complaining to us, strong proponents of P2Pool, why can we not get a predicted payout? These users are coming to us and leaving in droves because the share difficulty is too high. Some are lucky, some are not.

Here, look at this
wtf.png
He is almost off the share chain.

Were trying to get individuals interested in P2Pool but its hard to when the fact is they fall off the share chain and the only answer we have is "your on the sh*t end of the math luck my friend".

We cannot disenfranchise these new miners who want to partake in the future of the world. Each of these miners with one L3+ is as deserving of a fix as people with a 50PH farm on bitcoin. It makes no difference. Infact you should be focusing on the little guy....that is how P2pool will grow, getting people interested in droves. Little guys.

sawa
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 20
Joined: Sat Feb 17, 2018 10:15 am

Donate BTC of your choice to 17Vq6qwfE1epzsgEfSw81pQX3gXo9ZN4ET

Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Mar 28, 2018 10:38 pm

I did p2pool for DGB http://github.com/ilsawa/p2pool-dgb-sha256
Here are all the nodes of this p2pool http://p2pool.top/scanner/dgb-sha256d/
Initially, I did not check the algorithm (there are 5 algorithms), and one of the nodes started generating orphans. This node connects from IP 69.138.110.229 and digs to the address DMxWuNAfLn9zTHM1H5UMRsKELbKpNB2FF6

The problem is that the owner of the node does not have an algorithm in the configuration of the daemon, and its node generates orphan blocks

I tried to contact the owner, but he did not answer.

I made the latest patches, where I changed the IDs and added an algorithm check https://github.com/ilsawa/p2pool-dgb-sh ... yte.py#L14
Within two days, the mining was without orpans

However, today the owner of an orphan generating site probably used identifiers, but removed the algorithm check and continued to generate orphaned blocks

Most likely, he does it on purpose.

I do not know how to deal with this.

jtoomim, can you help?

doingit77
Posts: 3
Joined: Tue Mar 27, 2018 1:39 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Mar 29, 2018 5:50 am

Hi Jtoomin,

I have a node up 18.88.32.157:9327 on your latest release. 15.0.100 I noticed that the message for the imminent upgrade is running in the background on the console, Which i thought was what I did. But it goes on an on about punishing descendant and grandchildren for naughty whatever, does not seem to getting new work. Is this malicious ?

I stood up the version that I thought was the correct and latest 15.100 but it give me different output from .094

I have introduced P2Pool to a small user base of about 30gh/s and do believe that you should be rewarded as well, which is why I left the dev fee on.

Is it just bad luck, I blocked 5 times in a day a few weeks ago, now its crickets with over 12 hours to block for over 24hrs.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 135
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Mar 29, 2018 8:44 am

exceptions.ValueError: segwit transaction included before activation

... trying to make it work as a solo mining for LTC
I have merged the feechecking branch into 1mb_segwit and added a commit to 1mb_segwit that should address your issue. The issue is that v16 shares do not support Segwit transactions on Litecoin, but v17 shares do, and the code was set up to start with v16 shares on new sharechains.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 135
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Mar 29, 2018 9:05 am

To the people complaining of high variance for small miners on LTC:

P2pool cannot solve all problems simultaneously. It cannot have low reward variance, high fairness, high expected reward, and low hardware requirements all at the same time.

The p2pool share chain contains 8640 shares. The LTC p2pool has approximately 1500 L3+s on it. This means that the average L3+ would have about 6 shares in the share chain at any given time. That's not a very large number, and variance can easily make that go to 0 sometimes or up to 20 at other times.

If the share chain is made to be longer, then variance goes down, but people have to mine for a longer amount of time before their payouts reach the expected value, and also p2pool's CPU and RAM requirements go up and fairness goes slightly down. If the time per share is reduced, fairness goes way down.

This is a problem that cannot readily be fixed. It can be improved somewhat, but not fixed.

You're right, it is a PR issue, just not in the way that you're thinking. When onboarding new users onto p2pool, you need to make sure that they're aware that they are aware that mining with p2pool will result in higher variance than mining with a centralized pool, and that this variance comes in two forms: share variance, and block variance. If they cannot tolerate moderate reward variance, then they should not use p2pool.

Also, please do not treat me as if I were obligated to fix your problems. Doing so is a good way to make me unhappy about my work on p2pool and give up on it entirely. I do not want my hobby to turn into something that causes other people to complain to me.

I am just a user of p2pool who is volunteering some of my free time to fix issues with p2pool. I do not have enough time to fix every problem with p2pool, and I should probably spend less time on p2pool than I do. Given my limited time, I focus on the issues that affect MY use case, not yours. If you have a problem with p2pool, the best thing to do is to try to fix it yourself, and then submit your changes as a pull request. If you are unable to do that, you can mention the problem in the forum and hope that someone else fixes it for you.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 135
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Mar 29, 2018 9:15 am

The problem is that the owner of the node does not have an algorithm in the configuration of the daemon, and its node generates orphan blocks

jtoomim, can you help?
I don't have enough time to help, sorry. I addressed a similar issue for Litecoin because I was mining on LItecoin, but that took about 30 hours of work to solve.

The fastest way to address this issue would probably be to start a new share chain using a different network ID so you can get away from the naughty miner.

The more correct way to address this issue would be to somehow check the shares/blocks themselves to see which mining algorithm they're supposed to use.

AndreyNag
Posts: 1
Joined: Thu Mar 29, 2018 9:48 am
Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Mar 29, 2018 9:51 am

Hi.
I own several BTC, DGB, DASH and LTC nodes that use your code.
The events of recent days have shown that the network p2pool to any coin can to discredit and complicate her work in the flesh in the extreme. Fundamental changes in the code are needed to protect against unfair competition.
Miners really hope for you.
Thank you for listening.
Last edited by AndreyNag on Thu Mar 29, 2018 10:09 am, edited 1 time in total.

ikolu
Posts: 8
Joined: Thu Mar 22, 2018 7:33 pm
Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Mar 29, 2018 9:52 am

exceptions.ValueError: segwit transaction included before activation

... trying to make it work as a solo mining for LTC
I have merged the feechecking branch into 1mb_segwit and added a commit to 1mb_segwit that should address your issue. The issue is that v16 shares do not support Segwit transactions on Litecoin, but v17 shares do, and the code was set up to start with v16 shares on new sharechains.
Thank you so much for helping! But i couldn't see any commit on the 1mb_segwit. The last one was 3 days ago.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 135
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Mar 29, 2018 10:21 am

Forgot to push to github, sorry. Check again.

ikolu
Posts: 8
Joined: Thu Mar 22, 2018 7:33 pm
Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Mar 29, 2018 11:03 am

Forgot to push to github, sorry. Check again.
Thank you!
Now I get this:

Code: Select all

Share check failed: bfadcebc2e0a9c47c0ceecf77386a6251a66f6fcd1db4b1dc6c416fc3a91b18d -> 0000000000000000000000000000000000000000000000000000000000000000 Traceback (most recent call last): File "/home/ialmeida/p2poolSolo/p2pool/bitcoin/worker_interface.py", line 136, in <lambda> lambda header, user, coinbase_nonce: handler(header, user, pack.IntType(self._my_bits).pack(nonce) + coinbase_nonce), File "/home/ialmeida/p2poolSolo/p2pool/work.py", line 485, in got_response self.node.set_best_share() File "/home/ialmeida/p2poolSolo/p2pool/node.py", line 300, in set_best_share best, desired, decorated_heads, bad_peer_addresses, self.punish= self.tracker.think(self.get_height_rel_highest, self.get_height, self.bitcoind_work.value['previous_block'], self.bitcoind_work.value['bits'], self.known_txs_var.value, self.feecache) File "/home/ialmeida/p2poolSolo/p2pool/data.py", line 652, in think if self.attempt_verify(share, block_abs_height_func, known_txs, feecache): --- <exception caught here> --- File "/home/ialmeida/p2poolSolo/p2pool/data.py", line 630, in attempt_verify share.check(self, known_txs, block_abs_height_func=block_abs_height_func, feecache=feecache) File "/home/ialmeida/p2poolSolo/p2pool/data.py", line 483, in check if tracker.items[self.share_data['previous_share_hash']].naughty: exceptions.KeyError: None
Last edited by ikolu on Thu Mar 29, 2018 11:32 am, edited 1 time in total.

ikolu
Posts: 8
Joined: Thu Mar 22, 2018 7:33 pm
Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Mar 29, 2018 11:09 am

Ok... So I commented out the lines where it was giving the error so I could get some share in... Then I uncommented them and fired it up again and now the shares are coming in.

Don't know if you want to fix it for good, but it is working here!

Thank you,

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 135
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Mar 29, 2018 5:32 pm

Thanks for the bug report. Was it just line 483 or was another line also responsible for errors? I fixed the error with line 483 and pushed the changes to 1mb_segwit. If there was another error, could you find it in your data/litecoin/log (or whatevevr) file and post it here so I can fix that one too?

ikolu
Posts: 8
Joined: Thu Mar 22, 2018 7:33 pm
Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Mar 29, 2018 9:49 pm

jtoomim,
It is still giving the error about the key.

Code: Select all

2018-03-29 12:26:04.589426 GOT SHARE! ikolu.1 5878eeec prev xxxxxxxx age 110.86s 2018-03-29 12:26:04.591264 > Share check failed: 36dc4f8946784eb7126bc68b40990f9c6f614d9e65a8a9bd245e2bf55878eeec -> 0000000000000000000000000000000000000000000000000000000000000000 2018-03-29 12:26:04.591513 > Traceback (most recent call last): 2018-03-29 12:26:04.591733 > File "/root/p2pool/p2pool/bitcoin/worker_interface.py", line 136, in <lambda> 2018-03-29 12:26:04.591898 > lambda header, user, coinbase_nonce: handler(header, user, pack.IntType(self._my_bits).pack(nonce) + coinbase_nonce), 2018-03-29 12:26:04.592081 > File "/root/p2pool/p2pool/work.py", line 485, in got_response 2018-03-29 12:26:04.592231 > self.node.set_best_share() 2018-03-29 12:26:04.592385 > File "/root/p2pool/p2pool/node.py", line 300, in set_best_share 2018-03-29 12:26:04.592543 > best, desired, decorated_heads, bad_peer_addresses, self.punish= self.tracker.think(self.get_height_rel_highest, self.get_height, self.bitcoind_work.value['previous_block'], self.bitcoind_work.value['bits'], self.known_txs_var.value, self.feecache) 2018-03-29 12:26:04.592714 > File "/root/p2pool/p2pool/data.py", line 652, in think 2018-03-29 12:26:04.592875 > if self.attempt_verify(share, block_abs_height_func, known_txs, feecache): 2018-03-29 12:26:04.593053 > --- <exception caught here> --- 2018-03-29 12:26:04.593163 > File "/root/p2pool/p2pool/data.py", line 630, in attempt_verify 2018-03-29 12:26:04.593267 > share.check(self, known_txs, block_abs_height_func=block_abs_height_func, feecache=feecache) 2018-03-29 12:26:04.593396 > File "/root/p2pool/p2pool/data.py", line 483, in check 2018-03-29 12:26:04.593499 > if tracker.items[self.share_data['previous_share_hash']] and tracker.items[self.share_data['previous_share_hash']].naughty: 2018-03-29 12:26:04.593612 > exceptions.KeyError: None
;)

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 135
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Mar 30, 2018 2:01 pm

ikolu: can you try changing that line from

Code: Select all

if tracker.items[self.share_data['previous_share_hash']] and tracker.items[self.share_data['previous_share_hash']].naughty:
to

Code: Select all

if self.share_data['previous_share_hash'] and tracker.items[self.share_data['previous_share_hash']].naughty:
and tell me if it works? In retrospect, I think I misjudged what part of it was evaluating to "None", but I don't have time to set up a test environment for that bug right now.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 135
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Mar 30, 2018 2:08 pm

Yet another block (515828) found by jtoomimnet BTC p2pool:

https://blockchain.info/block/000000000 ... 6ba117562d

765 kB, mined about 2 minutes after a 697 kB AntPool block.

User avatar
k0gen
Posts: 6
Joined: Sat Mar 24, 2018 9:21 am

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Mar 30, 2018 3:27 pm

I have never seen the "exceptions.KeyError: 'incoming_peers'" error before. Are you using a custom web UI?
YES: I am using https://github.com/justino/p2pool-ui-punchy
I've found out what was causing the problem. I also have the https://github.com/hardcpp/P2PoolExtendedFrontEnd in subdirectory that my friend uses sometimes. The error is generated when you use the Graph tab (graphs.html)

And it expects : outgoing_peers, incoming_peers:

Code: Select all

plot_later(d3.select("#peers"), "", null, [ {"url": "/web/graph_data/outgoing_peers/last_" + lowerperiod, "color": "#FF0000", "label": "Outgoing"}, {"url": "/web/graph_data/incoming_peers/last_" + lowerperiod, "color": "#0000FF", "label": "Incoming"} ], true);
And local_share_hash_rate:

Code: Select all

plot_later(d3.select("#local_shares"), "H/s", "H", [ {"url": "/web/graph_data/local_share_hash_rate/last_" + lowerperiod, "color": "#0000FF", "label": "Total"}, //{"url": getData("/web/graph_data/local_dead_share_hash_rate/last_" + lowerperiod, "color": "#FF0000", "label": "Dead"} ]);
but as I understand this is no longer available in new p2pool /web/graph_data syntax?

ikolu
Posts: 8
Joined: Thu Mar 22, 2018 7:33 pm
Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Mar 30, 2018 6:17 pm

ikolu: can you try changing that line from

Code: Select all

if tracker.items[self.share_data['previous_share_hash']] and tracker.items[self.share_data['previous_share_hash']].naughty:
to

Code: Select all

if self.share_data['previous_share_hash'] and tracker.items[self.share_data['previous_share_hash']].naughty:
and tell me if it works? In retrospect, I think I misjudged what part of it was evaluating to "None", but I don't have time to set up a test environment for that bug right now.
That did the trick!

Thank you so much man. Your help is very appreciated by the community. I wish I could do something to help you out on the p2pool development.

Peace.

Kiefff
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 18
Joined: Sun Feb 18, 2018 8:13 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sat Mar 31, 2018 2:41 am

Seems after the 95% threshold of v17 protocol shares, the LTC p2pool network split in two?

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 135
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sat Mar 31, 2018 9:01 am

Oops, I forgot to add in the code to my node to make it vote for v17 again. Oh well, it looks like at most 5% of the LTC hashrate had failed to upgrade to jtoomimnet, so no more than 5% was forked off.

The fork triggered a bug in one of my nodes, which I had hacked to disallow the v17-v33 transition, so all of its shares were being orphaned, resulting in a large apparent hashrate loss for the pool. In reality, though it was just a large hashrate loss for me. If that node had mined a block, it still would have paid out to all other LTC p2pool users mostly normally. Fixed.

Cryptonomist
Posts: 1
Joined: Wed Apr 04, 2018 11:28 am

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Apr 04, 2018 12:11 pm

Hello,

I have a question related to the calculation of the global stale rate in the 1mb segwit version.

p2pool/p2pool/web.py, lines 94-102:

Code: Select all

stale_prop = p2pool_data.get_average_stale_prop(node.tracker, node.best_share_var.value, lookbehind)
So to calculate the stale_prop the function "get_average_stale_prop" from p2pool/p2pool/data.py (lines 893-895) is called. This function looks as follows:

Code: Select all

def get_average_stale_prop(tracker, share_hash, lookbehind): stales = sum(1 for share in tracker.get_chain(share_hash, lookbehind) if share.share_data['stale_info'] is not None) return stales/(lookbehind + stales)
So "stales" is the sum of indicator functions which are 1 every time a share in the "subchain" between the best share and a share 120 shares back (unless the height of the best share is smaller than 120), has a value related to the key 'stale_info' that is different from None. This looks fine.

However, in the next line the average stale prop is calculated by dividing "stales" by the sum of the "lookbehind" (which is 120) and again the "stales". It is odd in my opinion that "stales" is added to the "lookbehind" in the denominator. Should it not be just stales/lookbehind? Because the "lookbehind" contains the shares that are stales. The calculation as it is now underestimates the stales proportion. Or am I mistaken? Or missing something?

Thank you.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 135
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Apr 05, 2018 10:44 am

You want to know what percentage of all work performed is missing from the share chain. The total work performed is the work in the share chain plus the work not in the share chain. The method tracker.get_chain only() gives us the shares in the share chain. Thus, the denominator should be the stales+lookbehind.

> This looks fine.

Maybe to you, but to me it looks kinda wrong. Two reasons. First, it assumes there is either zero or one stale/orphan shares at any given height. What happens if there are two orphan shares at that height? Second, not all shares have the same difficulty. A more accurate calculation would be to factor in the difficulty (work performed) of each share, including both the stale and non-stale shares. These issues aren't too severe, though, so it might not be worth fixing them.

A lookbehind of only 120 shares sounds way too short. I would think a number around 1200 would be more reasonable.

sawa
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 20
Joined: Sat Feb 17, 2018 10:15 am

Donate BTC of your choice to 17Vq6qwfE1epzsgEfSw81pQX3gXo9ZN4ET

Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Apr 06, 2018 3:01 am

Something happened to BTC p2pool.
Workers continue to mine, but the hashrate fell sharply on all the nodes.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 135
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Apr 06, 2018 6:39 am

Restarting your BTC nodes will get rid of the problem. If anybody can afford to leave their node online and in a buggy state, I could use it for debugging and analysis, so it would be appreciated if you could leave one online and send me the IP address. I'm about to hop on a 12-hour flight, but I'll look into what's going on when I get back.

Edit: No, restarting your nodes will not get rid of the problem.
Last edited by jtoomim on Sat Apr 07, 2018 11:45 am, edited 1 time in total.

Staim
Posts: 3
Joined: Mon Mar 05, 2018 7:56 am

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Apr 06, 2018 9:10 am

Restarting your BTC nodes will get rid of the problem. If anybody can afford to leave their node online and in a buggy state, I could use it for debugging and analysis, so it would be appreciated if you could leave one online and send me the IP address. I'm about to hop on a 12-hour flight, but I'll look into what's going on when I get back.
Hi! My node without restarting.
http://p2pool.net.ua:9334/static/

upd.
restart does not help.
Last edited by Staim on Fri Apr 06, 2018 3:26 pm, edited 1 time in total.

sawa
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 20
Joined: Sat Feb 17, 2018 10:15 am

Donate BTC of your choice to 17Vq6qwfE1epzsgEfSw81pQX3gXo9ZN4ET

Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Apr 06, 2018 12:12 pm

If anybody can afford to leave their node online and in a buggy state, I could use it for debugging and analysis,...
http://ml.toom.im:9334/static/graphs.html?Day

sawa
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 20
Joined: Sat Feb 17, 2018 10:15 am

Donate BTC of your choice to 17Vq6qwfE1epzsgEfSw81pQX3gXo9ZN4ET

Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Apr 06, 2018 3:46 pm

An incomprehensible problem.
It's like a syn flood attack.

And in the console a lot of messages
...
exceptions.AttributeError: 'NoneType' object has no attribute 'expire'

Return to “Pools”

Who is online

Users browsing this forum: No registered users and 14 guests