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(miner): add SHA P2Pool mining related configuration and changes #6370

Merged
merged 15 commits into from
Jul 4, 2024

Conversation

ksrichard
Copy link
Contributor

Description

There is a new decentralized P2Pool implementation in progress for SHA3 based mining on Tari.
To be able to connect and use this new implementation we need to have some new changes introduced in this PR.
Overall to make the usage of the new mining pool as easy as possible, I introduced a new configuration in the miner called sha_p2pool_enabled and if it's set to true and base_node_grpc_address config is set to the address of the p2pool node then the mining starts on the decentralized pool.

Motivation and Context

How Has This Been Tested?

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

Breaking Changes

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

async fn submit_block(
config: &MinerConfig,
base_node_client: &mut BaseNodeGrpcClient,
sha_p2pool_client: Arc<Mutex<Option<ShaP2PoolGrpcClient>>>,
Copy link
Member

Choose a reason for hiding this comment

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

I suspect you don't need a mutex.

Suggested change
sha_p2pool_client: Arc<Mutex<Option<ShaP2PoolGrpcClient>>>,
sha_p2pool_client: Option<&mut ShaP2PoolGrpcClient>,

Call with:

submit_block(base_node_client, sha_p2pool_client.as_mut(), ....)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay makes sense, just pushed

@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 Jun 25, 2024
Copy link

github-actions bot commented Jun 25, 2024

Test Results (CI)

    3 files    120 suites   35m 30s ⏱️
1 295 tests 1 295 ✅ 0 💤 0 ❌
3 877 runs  3 877 ✅ 0 💤 0 ❌

Results for commit 982c89a.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 25, 2024

Test Results (Integration tests)

 2 files  + 2  11 suites  +11   42m 48s ⏱️ + 42m 48s
35 tests +35  33 ✅ +33  0 💤 ±0  2 ❌ +2 
39 runs  +39  34 ✅ +34  0 💤 ±0  5 ❌ +5 

For more details on these failures, see this check.

Results for commit 982c89a. ± Comparison against base commit 43b76d9.

♻️ This comment has been updated with latest results.

@ksrichard ksrichard marked this pull request as ready for review June 27, 2024 11:52
@sdbondi sdbondi changed the title Add SHA P2Pool mining related configuration and changes feat(miner): add SHA P2Pool mining related configuration and changes Jun 28, 2024
Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

uACK

This looks good

Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

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

utACK

@SWvheerden SWvheerden merged commit cb1eb63 into tari-project:development Jul 4, 2024
14 of 16 checks passed
sdbondi added a commit to sdbondi/tari that referenced this pull request Jul 22, 2024
* development: (93 commits)
  chore: fix build and osp (tari-project#6415)
  chore: refactor key manager names (tari-project#6411)
  fix: panic in from_base58 fn (tari-project#6414)
  fix: branch keys (tari-project#6413)
  chore: remove dependancy on ledger for common types (tari-project#6412)
  feat: count unique keys (tari-project#6401)
  feat!: fix key manager use of keys (tari-project#6407)
  refactor: remove metadata sig and use difference key branch for offset (tari-project#6400)
  feat: update ledger instructions (tari-project#6406)
  feat: add file-based input and output to faucet commands (tari-project#6405)
  chore: new release v1.0.0-pre.16 (tari-project#6404)
  feat: simplify leader sig generation (tari-project#6399)
  ci(fix): include macOS universal assets in release (tari-project#6402)
  fix: script dependance on party order (tari-project#6398)
  fix: claim n of m faucet (tari-project#6389)
  feat: add ffi features (tari-project#6390)
  chore: fix unwraps in memory key manager (tari-project#6396)
  docs: update hasher documentation (tari-project#6392)
  chore: fix ci (tari-project#6391)
  feat(miner): add SHA P2Pool mining related configuration and changes (tari-project#6370)
  ...
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.

4 participants