Skip to content

Fix/expected share reduction#90

Draft
Priceless-P wants to merge 2 commits into
dmnd-pool:masterfrom
Priceless-P:fix/expected-share-reduction
Draft

Fix/expected share reduction#90
Priceless-P wants to merge 2 commits into
dmnd-pool:masterfrom
Priceless-P:fix/expected-share-reduction

Conversation

@Priceless-P
Copy link
Copy Markdown
Collaborator

@Priceless-P Priceless-P commented Jun 23, 2025

The expected hash rate is ~30% lower than the -d value due to aggressive difficulty rounding. This change:

@Priceless-P Priceless-P force-pushed the fix/expected-share-reduction branch from e63536b to 97bd979 Compare June 23, 2025 12:58
@Priceless-P Priceless-P requested a review from jbesraa June 23, 2025 13:03
Copy link
Copy Markdown
Contributor

@jbesraa jbesraa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Priceless-P I checked to the branch locally and tested and this is what Iam seeing

2025-06-25T10:41:53.447480Z  INFO demand_cli::translator::downstream::accept_connection: Translator opening connection for ip 10.100.102.32
2025-06-25T10:41:53.447485Z  INFO demand_cli::translator::downstream::accept_connection: Translator initial hash rate for ip 10.100.102.32 is 1000000000000 H/s
2025-06-25T10:41:53.447488Z  INFO demand_cli::translator::downstream::accept_connection: Translator share per second for ip 10.100.102.32 is 0.16666667 shares/s
2025-06-25T10:41:53.447501Z  INFO demand_cli::translator::downstream::accept_connection: Translator initial difficulty for ip 10.100.102.32 is 1000
2025-06-25T10:41:53.447505Z  INFO demand_cli::translator::downstream::accept_connection: Translator expected hash rate for ip 10.100.102.32 is 715827900000 H/s

@jbesraa
Copy link
Copy Markdown
Contributor

jbesraa commented Jun 25, 2025

this is the initial set_difficulty the miner get:

₿ (16403) stratum_task: rx: {"method":"mining.set_difficulty","params":[1000.0]}

this seems correct and identical to what is printed above

@Priceless-P
Copy link
Copy Markdown
Collaborator Author

@jbesraa , please confirm if you are the correct branch.
this is what I get from my end with downstream_hashrate = "0.00001T"

2025-06-25T10:52:24.504477Z  INFO demand_cli::translator::downstream::accept_connection: Translator initial hash rate for ip 127.0.0.1 is 10000000 H/s
2025-06-25T10:52:24.504501Z  INFO demand_cli::translator::downstream::accept_connection: Translator share per second for ip 127.0.0.1 is 0.16666667 shares/s
2025-06-25T10:52:24.504523Z  INFO demand_cli::translator::downstream::accept_connection: Translator initial difficulty for ip 127.0.0.1 is 0.02
2025-06-25T10:52:24.504544Z  INFO demand_cli::translator::downstream::accept_connection: Translator expected hash rate for ip 127.0.0.1 is 14316558 H/s

@jbesraa
Copy link
Copy Markdown
Contributor

jbesraa commented Jun 25, 2025

here are last commits on the branch iam on

97bd979 (HEAD, prisca/fix/expected-share-reduction) add docs and fix CI checks
727f3f1 update `nearest_power_of_10`

I tried it another couple of times:

2025-06-25T11:28:28.007022Z  INFO demand_cli::translator::downstream::accept_connection: Translator opening connection for ip 10.100.102.32
2025-06-25T11:28:28.007027Z  INFO demand_cli::translator::downstream::accept_connection: Translator initial hash rate for ip 10.100.102.32 is 1000000000000 H/s
2025-06-25T11:28:28.007031Z  INFO demand_cli::translator::downstream::accept_connection: Translator share per second for ip 10.100.102.32 is 0.16666667 shares/s
2025-06-25T11:28:28.007043Z  INFO demand_cli::translator::downstream::accept_connection: Translator initial difficulty for ip 10.100.102.32 is 1000
2025-06-25T11:28:28.007046Z  INFO demand_cli::translator::downstream::accept_connection: Translator expected hash rate for ip 10.100.102.32 is 715827900000 H/s
2025-06-25T11:28:28.007050Z DEBUG demand_cli::translator::downstream::accept_connection: Bridge is ready, proceeding with connection
2025-06-25T11:28:28.007057Z  INFO demand_cli::translator::proxy::bridge: New extended channel opened with id 1
2025-06-25T11:28:28.007064Z  INFO demand_cli::translator::downstream::accept_connection: Translator opening

Try to add more tests to cover different larger numbers

@Priceless-P Priceless-P force-pushed the fix/expected-share-reduction branch 2 times, most recently from eeb29c0 to d6e1975 Compare June 25, 2025 13:40
@Priceless-P Priceless-P force-pushed the fix/expected-share-reduction branch from d6e1975 to 05c450c Compare June 28, 2025 14:21
@Priceless-P Priceless-P force-pushed the fix/expected-share-reduction branch from 05c450c to 6f30edb Compare June 28, 2025 14:27
@jbesraa jbesraa added the Priority: Low Nice-to-have label Jul 24, 2025
@jbesraa jbesraa marked this pull request as draft July 24, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Low Nice-to-have

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate why expected hashrate is almost 30% from specified in -d arg

3 participants