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(p2pool-randomx-support): added pow algo to GetNewBlockRequest in p2pool proto #6509

Conversation

ksrichard
Copy link
Contributor

@ksrichard ksrichard commented Aug 30, 2024

Description

Added PoW algo to p2pool client request, so clients can get a SHA-3 or Random-X block to mine on.

Breaking Changes

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

Copy link

github-actions bot commented Aug 30, 2024

Test Results (CI)

    3 files    129 suites   36m 50s ⏱️
1 308 tests 1 308 ✅ 0 💤 0 ❌
3 910 runs  3 910 ✅ 0 💤 0 ❌

Results for commit d979afc.

♻️ This comment has been updated with latest results.

@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 Aug 30, 2024
Copy link

github-actions bot commented Aug 30, 2024

Test Results (Integration tests)

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

Results for commit d979afc.

♻️ This comment has been updated with latest results.

@ksrichard ksrichard marked this pull request as ready for review September 3, 2024 10:13
@@ -455,8 +457,10 @@ async fn get_new_block_base_node(
async fn get_new_block_p2pool_node(
sha_p2pool_client: &mut ShaP2PoolGrpcClient,
) -> Result<GetNewBlockResponse, MinerError> {
let mut pow_algo = PowAlgo::default();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

why not just declare immediately with he correct value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because it is simpler to do this as I did not see any method or something that would use PowAlgos type to have the right pow algo.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Feels like there is a way, but this is fine for now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I did not find any better yet, since there is no method for that to initialize a PowAlgo from PowAlgos enum (it is the enum which contains i32 value for PowAlgo), so not sure.

@@ -455,8 +457,10 @@ async fn get_new_block_base_node(
async fn get_new_block_p2pool_node(
sha_p2pool_client: &mut ShaP2PoolGrpcClient,
) -> Result<GetNewBlockResponse, MinerError> {
let mut pow_algo = PowAlgo::default();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Feels like there is a way, but this is fine for now

@stringhandler stringhandler merged commit 125b49c into tari-project:development Sep 3, 2024
19 checks passed
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