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

feat!: add pool and tari difficulties to sha3 miner and merge mining proxy #6585

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

hansieodendaal
Copy link
Contributor

@hansieodendaal hansieodendaal commented Sep 25, 2024

Description

  • Added pool and tari difficulties to the p2pool request.
  • In p2pool mode, the SHA3 miner and the merge mining proxy will submit the block to the base node if the achieved difficulty equals or exceeds the Tari target difficulty.
  • Since the SHA3 miner and the merge mining proxy (the latter only if enabled in config) always calculate the achieved difficulty; it is now included in the SubmitBlockRequest as an option so that the local p2pool node does not have to recalculate it if provided.

Edit

  • For the merge mining proxy, evaluate the best block hash to decide if a new tari template must be requested. In re-orgs where the height will be the same as before the re-org, only checking height is insufficient.
  • Added pertinent information to proxy log messages.

Motivation and Context

When implemented fully in sha-p2pool:

  • Improved efficiency overall in submitting blocks to the base node.
  • Improved efficiency for the p2pool node internally when evaluating local blocks.

Edit

  • Many orphans were observed in the Tari blockchain when doing merged mining with sha-p2pool.

How Has This Been Tested?

Currently, all unit and cucumber tests pass as those run without p2pool mode. A combined system-level test is required when this is implemented.

What process can a PR reviewer use to test or verify this change?

Code review.

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

BREAKING CHANGE: gRPC SubmitBlockRequest interface change that will impact sha-p2pool.

@hansieodendaal hansieodendaal changed the title Add pool and tari difficulties feat: add pool and tari difficulties to sha3 miner and merge mining proxy Sep 25, 2024
@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Sep 25, 2024
Copy link

github-actions bot commented Sep 25, 2024

Test Results (CI)

    3 files    129 suites   38m 7s ⏱️
1 323 tests 1 323 ✅ 0 💤 0 ❌
3 967 runs  3 967 ✅ 0 💤 0 ❌

Results for commit e0ff54d.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Sep 25, 2024

Test Results (Integration tests)

36 tests   36 ✅  15m 3s ⏱️
11 suites   0 💤
 2 files     0 ❌

Results for commit e0ff54d.

♻️ This comment has been updated with latest results.

@SWvheerden SWvheerden changed the title feat: add pool and tari difficulties to sha3 miner and merge mining proxy feat!: add pool and tari difficulties to sha3 miner and merge mining proxy Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants