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

Testnet hard fork: Allium PoW algorithm #39

Merged
merged 8 commits into from
Feb 12, 2018
Merged

Testnet hard fork: Allium PoW algorithm #39

merged 8 commits into from
Feb 12, 2018

Conversation

ryan-shaw
Copy link
Collaborator

@ryan-shaw ryan-shaw commented Feb 11, 2018

In light of ASICs being able to mine on Scrypt-N a new proof of work algorithm is needed to remove these unwanted guest on the network. Allium is a custom variant of the Lyra2 proof of algorithm that is already tested greatly in other coins.

Because of the custom nature of the PoW algorithm a fork of miners and pool software is needed:
Pool software:

TODO:

  • Release testnet binaries to allow pool operators and miners to test

@ryan-shaw ryan-shaw changed the title Hard fork: Allium PoW algorithm Testnet hard fork: Allium PoW algorithm Feb 11, 2018
@@ -78,6 +78,17 @@ class CChainParams
const CCheckpointData& Checkpoints() const { return checkpointData; }
const ChainTxData& TxData() const { return chainTxData; }
void UpdateVersionBitsParameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout);
int SwitchAllium(int nHeight) const {
Copy link

Choose a reason for hiding this comment

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

For readability sake, function could be reduced down to:

return strNetworkID == CBaseChainParams::TESTNET && nHeight > 10

Copy link
Member

Choose a reason for hiding this comment

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

I'd rather suggest changing this to a "GetPoWAlgo" with fall through cases. Just for future-proofing. Also, rather than returning int's, you could define a global int-based enum. Would make it easier to read any comparisons in the rest of the code.

@@ -78,6 +78,17 @@ class CChainParams
const CCheckpointData& Checkpoints() const { return checkpointData; }
const ChainTxData& TxData() const { return chainTxData; }
void UpdateVersionBitsParameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout);
int SwitchAllium(int nHeight) const {
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather suggest changing this to a "GetPoWAlgo" with fall through cases. Just for future-proofing. Also, rather than returning int's, you could define a global int-based enum. Would make it easier to read any comparisons in the rest of the code.

// hash[i], hash[i+1], hash[i+2], hash[i+3]);
// }
// return buf;
// }
Copy link
Member

Choose a reason for hiding this comment

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

Commented debug should be removed. (it's taken from utils either way)

@ryan-shaw
Copy link
Collaborator Author

Refactored algo selection method

@ryan-shaw ryan-shaw self-assigned this Feb 12, 2018
@aaruel aaruel merged commit 5cc3f05 into GarlicoinOrg:master Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants