Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pool Support: Correct handling of partial proofs #252

Closed
djdookie opened this issue Jul 5, 2021 · 25 comments
Closed

Pool Support: Correct handling of partial proofs #252

djdookie opened this issue Jul 5, 2021 · 25 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@djdookie
Copy link

djdookie commented Jul 5, 2021

When farming for a pool using the new pool protocol, chiadog triggers hundreds of "found proof" notifications per day, because your farmer finds proofs for partials (low difficulty solutions for a pool) all the time.
This gets you a lot of messages by a telegram bot for example. ;)

Suggestion: Teach chiadog to differentiate "normal" proofs from partial proofs and disable partial proof notifications. Daily notifications about partial proofs should be sufficient. Or just make proof notification deactivatale.

@rhernaus
Copy link

rhernaus commented Jul 8, 2021

We could perhaps monitor log for "farmed unfinished_block" instead of "found X proof"

@f7byu3e4jn
Copy link

I was so happy when i received this ‘ ℹ️ Chia HARVESTER
Found 1 proof(s)!’ message for the first time ever. Almost took my GF out to diner on the spot.

Too bad it was just a false positive, based on the 100’s of additional proof-found messages that came in afterwards 😃

@ZwaZo22
Copy link

ZwaZo22 commented Jul 9, 2021

+1 here - Chiadog used to be discreet but with the partial proof found notifications, it is barking so much that my Telegram bot is now spammed ;)

I believe that the partial proofs could be simply mentionned in the daily report.

@martomi
Copy link
Owner

martomi commented Jul 9, 2021

Until we have changed the default behaviour, you can comment / delete this line:

@djdookie
Copy link
Author

djdookie commented Jul 9, 2021

Thanks. This seems to work fine for a temporary solution.

@springjools
Copy link

I was thinking of just counting the partial proofs and report them daily. That shouldn't be hard to code

@kilbot
Copy link
Contributor

kilbot commented Jul 10, 2021

The very next log event after a partial proof should contain something like Submitting partial for XXX to https://pool.url. So additional checker will be needed for this.

Then a special exception needs to be put into the activity handler which waits to append the Proof event until the next line has been checked.

I believe @springjools has volunteered for the pull request 😜

@springjools
Copy link

I'll try, but it's 28 °C outside and inside so my brains works slowly

@kilbot
Copy link
Contributor

kilbot commented Jul 10, 2021

One thing: I'm not sure if the farmer submits a partial to the pool if the proof actually creates a new block. Unfortunately I would have to wait checks notes .. 1 year and 10 months before I could confirm that in my logs.

Perhaps someone can get hold of the logs for a block forming proof so we can compare?

@btbamman989
Copy link

btbamman989 commented Jul 11, 2021

The very next log event after a partial proof should contain something like Submitting partial for XXX to https://pool.url. So additional checker will be needed for this.

Then a special exception needs to be put into the activity handler which waits to append the Proof event until the next line has been checked.

I believe @springjools has volunteered for the pull request stuck_out_tongue_winking_eye

@kilbot One thing you may want to think about is that if a user is using DEBUG as their log level then the Submitting partial for XXX to https://pool.url would not be the next line after the found proof log entry. So that might change the logic you were going to use if you were going to just look at the next line for text.

@pieterhelsen
Copy link
Collaborator

pieterhelsen commented Jul 11, 2021

Could someone please post some log files with partials (preferably in debug mode as @btbamman989 suggested)

@kilbot
Copy link
Contributor

kilbot commented Jul 11, 2021

Logging level INFO is required for Chiadog to work at the moment.

@okkar
Copy link

okkar commented Jul 11, 2021

Harvester and farmer logs in INFO mode from the one minute with 3 partials
grep -E "2021-07-12T04:17:" mainnet/log/debug.log | grep -E "chia.harvester.harvester|chia.farmer.farmer"

2021-07-12T04:17:03.158 harvester chia.harvester.harvester: INFO     2 plots were eligible for farming a34de8c137... Found 0 proofs. Time: 0.35711 s. Total 570 plots
2021-07-12T04:17:12.054 harvester chia.harvester.harvester: INFO     2 plots were eligible for farming a34de8c137... Found 1 proofs. Time: 0.90075 s. Total 570 plots
2021-07-12T04:17:12.083 farmer chia.farmer.farmer         : INFO     Submitting partial for <<LAUNCHER_ID>> to https://asia1.pool.space
2021-07-12T04:17:12.617 farmer chia.farmer.farmer         : INFO     Pool response: {'new_difficulty': 1}
2021-07-12T04:17:22.544 harvester chia.harvester.harvester: INFO     2 plots were eligible for farming a34de8c137... Found 2 proofs. Time: 2.25946 s. Total 570 plots
2021-07-12T04:17:22.576 farmer chia.farmer.farmer         : INFO     Submitting partial for <<LAUNCHER_ID>> to https://asia1.pool.space
2021-07-12T04:17:22.592 farmer chia.farmer.farmer         : INFO     Submitting partial for <<LAUNCHER_ID>> to https://asia1.pool.space
2021-07-12T04:17:22.876 farmer chia.farmer.farmer         : INFO     Pool response: {'new_difficulty': 1}
2021-07-12T04:17:23.126 farmer chia.farmer.farmer         : INFO     Pool response: {'new_difficulty': 1}
2021-07-12T04:17:30.144 harvester chia.harvester.harvester: INFO     1 plots were eligible for farming a34de8c137... Found 0 proofs. Time: 0.16493 s. Total 570 plots
2021-07-12T04:17:41.789 harvester chia.harvester.harvester: INFO     0 plots were eligible for farming a34de8c137... Found 0 proofs. Time: 0.13492 s. Total 570 plots
2021-07-12T04:17:49.748 harvester chia.harvester.harvester: INFO     0 plots were eligible for farming a34de8c137... Found 0 proofs. Time: 0.14340 s. Total 570 plots
2021-07-12T04:17:58.439 harvester chia.harvester.harvester: INFO     1 plots were eligible for farming a34de8c137... Found 0 proofs. Time: 0.29906 s. Total 570 plots

@schui95
Copy link

schui95 commented Jul 11, 2021

The very next log event after a partial proof should contain something like Submitting partial for XXX to https://pool.url. So additional checker will be needed for this.
Then a special exception needs to be put into the activity handler which waits to append the Proof event until the next line has been checked.
I believe @springjools has volunteered for the pull request stuck_out_tongue_winking_eye

@kilbot One thing you may want to think about is that if a user is using DEBUG as their log level then the Submitting partial for XXX to https://pool.url would not be the next line after the found proof log entry. So that might change the logic you were going to use if you were going to just look at the next line for text.

Interesting option.. the logfile wouldn't get too verbose if using DEBUG mode?

@kilbot
Copy link
Contributor

kilbot commented Jul 12, 2021

Thanks for the log, @okkar, that's helpful. And I see what you are saying now, @btbamman989, scanning multiple lines is not going to work because it can be inconsistent. So, I'm changing my suggestion to:

  • create a checker for the string Submitting partial, this is a silent alert but totals are keep for daily reports
  • change 'found X proof' checker to silent, with a total proofs included in daily reports
  • create a checker for farmed unfinished_block as suggested by @rhernaus and this becomes the new alert

Is anyone lucky enough to have farmed a block for a pool so we can confirm that log message?

@springjools
Copy link

I agree with the above suggestions, it's better than what I was going to suggest, which was to make an own counter from scratch

@kanasite
Copy link
Contributor

I have a work-in-progress implementation with parsing Farmed block and submitting partial

https://github.com/kanasite/chiadog/tree/farming-log

@kanasite
Copy link
Contributor

I have a work-in-progress implementation with parsing Farmed block and submitting partial

https://github.com/kanasite/chiadog/tree/farming-log

the default behavior proof/partial notification will be disabled

@kanasite
Copy link
Contributor

example of daily stats:

ℹ️ Chia DAILY
Hello farmer! 👋 Here's what happened in the last 12 hours:

Received ☘️: 0.0000005 XCH
Proofs 🧾: 100 found!
Search 🔍:

  • average: 0.53s over 3694 searches
  • over 5s: 0 occasions (0.0%)
  • over 15s: 0 occasions (0.0%)
    Plots 🌱: 1524
    Eligible plots 🥇: 2.95 average
    Skipped SPs ⚠️: 2 (0.05%)
    Partials submitted 🧾: 100!
    Blocks 📦: None

@schui95
Copy link

schui95 commented Jul 13, 2021

example of daily stats:

Chia DAILY
Hello farmer! Here's what happened in the last 12 hours:

Received : 0.0000005 XCH
Proofs : 100 found!
Search :

  • average: 0.53s over 3694 searches
  • over 5s: 0 occasions (0.0%)
  • over 15s: 0 occasions (0.0%)
    Plots seedling: 1524
    Eligible plots 1st_place_medal: 2.95 average
    Skipped SPs warning: 2 (0.05%)
    Partials submitted receipt: 100!
    Blocks package: None

Is it ready to test it on a live environment?

@kanasite
Copy link
Contributor

I added for my own usage, then it came across make me thinking if Submitting partial is worth noting since it's not much different from a found proof.

@kilbot
Copy link
Contributor

kilbot commented Jul 13, 2021

Keep in mind that some people will be solo farming plus pool farming (possible to multiple pools). I agree that there is no point duplicating information, but we also want to make sure important debugging info is surfaced.

I'm still unsure how blocks created should be handled. This is something that I'm sure most farmers will want to know about the most, eg: if a block has been created and whether is it solo or submitted to the pool. It would be great to get some logs for these situations.

How about something like:

chia DAILY
Hello farmer! Here's what happened in the last 24 hours:

Received : 0.0000005 XCH
Proofs : 100 found!
     - 58 partials submitted to pool.url
     - 42 partials submitted to pool2.url
     - 0 blocks created
Search : 
     - average: 0.20s over 9332 searches
     - over 5s: 144 occasions (1.5%)
     - over 15s: 0 occasions (0.0%)
Plots : 1524
Eligible plots : 0.21 average
Skipped SPs : 11 (0.12%)

@martomi martomi changed the title Disable notifications for partial proofs Pool Support: Correct handling of partial proofs Jul 13, 2021
@martomi martomi added bug Something isn't working enhancement New feature or request labels Jul 14, 2021
@martomi
Copy link
Owner

martomi commented Jul 19, 2021

@kanasite did a great job on a first shot at implementing this. Please check out his PR here: #268

Further feedback and testing would be appreciated there.

@martomi
Copy link
Owner

martomi commented Jul 29, 2021

The release 0.7.0 including this change is now out!

@martomi martomi closed this as completed Jul 29, 2021
@ZwaZo22
Copy link

ZwaZo22 commented Jul 29, 2021

Great job! Thanks a lot!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests