Add RPCs for external RandomX mining#997
Merged
codeofalltrades merged 1 commit intoVeil-Project:masterfrom Apr 21, 2022
Merged
Conversation
WetOne
approved these changes
Apr 17, 2022
Collaborator
|
utACK 9974e54 |
codeofalltrades
approved these changes
Apr 21, 2022
Collaborator
codeofalltrades
left a comment
There was a problem hiding this comment.
ACK 9974e54
NIT - Please remove commented out code.
| result.pushKV("mining_disabled", (!CheckConsecutivePoW(*pblock , pindexPrev))? true : false ); | ||
|
|
||
| if (pblock->IsProgPow()) { | ||
| if constexpr (nPoWType == CBlockHeader::PROGPOW_BLOCK) { // if (pblock->IsProgPow()) { |
Collaborator
There was a problem hiding this comment.
Remove commented code.
| lastheader = pblock->GetProgPowHeaderHash().GetHex(); | ||
| } | ||
| } | ||
| if constexpr (nPoWType == CBlockHeader::RANDOMX_BLOCK) { // if (pblock->IsRandomX()) { |
Collaborator
There was a problem hiding this comment.
Remove commented code.
Contributor
Author
|
Now you merged it with the commented code still there? |
Collaborator
|
Yes, I wanted to get it merged. I need to update the copyrights before the release. I will clean this up then if it hasn't been already. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
getblocktemplateRPC uses for its blocks depends on the value the user selects for mining in the GUI of the wallet / in the config.Root Cause
Not implemented yet.
Solution
The solution was to:
algoparameter to thegetblocktemplateRPC which overrides any mining algorithm specified in the config / GUI.rxrpcsbfor submitting randomx blocks, analogous topprpcsb.This makes it possible to mine at the same time progpow, randomx and sha256d externally, independently of what you may additionally mine using the wallet.
Bounty PR
?
Bounty Payment Address
sv1qqpjsrc60t60jhaywj5krmwla52ska70twc7wun6qnee65guxhvtxegpqwhuxypra4jn3pq86s24ryltcw6g2ss4573hyqac9u4g23m9mvxpyqqqwny49kUnit Testing Results
Tested by mining at the same time progpow blocks with t-rex miner and randomx blocks with xmrig, where both found at least one block.