[Refactor] Introduce Consensus namespace#1328
Merged
furszy merged 1 commit intoPIVX-Project:masterfrom Feb 19, 2020
Merged
Conversation
furszy
added a commit
that referenced
this pull request
Feb 13, 2020
bf74c6f [Cleanup] Remove stale UNITTEST network (Fuzzbawls) Pull request description: This network is un-necessary as our unit test suite can simply be run with MainNet's parameters, which is basically what we already do. Minor conflict with #1328 due to that PR having already removed one of the unused methods. ACKs for top commit: random-zebra: utACK bf74c6f furszy: utACK bf74c6f and merging.. Tree-SHA512: 1b8c7b4178e2dc8d60fe89b4ce4d4ad476f433ced19d981e1d3e1043fd8468e269600fcbe30ee04f7954250a183f2bc34486ad9b37fd7d78aed828c47d662d77
|
Needs rebase. |
96d3b0f to
170fa63
Compare
170fa63 to
23c9b6c
Compare
Collaborator
Author
|
rebased |
furszy
reviewed
Feb 14, 2020
| consensus.BIP65Height = 1808634; // 82629b7a9978f5c7ea3f70a12db92633a7d2e436711500db28b97efd48b1e527 | ||
| consensus.powLimit = uint256S("00000ffff0000000000000000000000000000000000000000000000000000000"); | ||
| consensus.posLimitv1 = uint256S("000000ffff000000000000000000000000000000000000000000000000000000"); | ||
| consensus.posLimitv2 = uint256S("00000ffff0000000000000000000000000000000000000000000000000000000"); |
There was a problem hiding this comment.
Duplicated fields:
consensus.powLimit == bnProofOfWorkLimit
consensus.posLimitv1 == bnProofOfStakeLimit
consensus.posLimitv2 == bnProofOfStakeLimit_V2
| consensus.posLimitv2 = uint256S("00000ffff0000000000000000000000000000000000000000000000000000000"); | ||
| consensus.nCoinbaseMaturity = 100; | ||
| consensus.nTargetTimespan = 40 * 60; | ||
| consensus.nTargetSpacing = 1 * 60; |
There was a problem hiding this comment.
Same here, consensus.nTargetTimespan and consensus.nTargetSpacing are repeated too.
There was a problem hiding this comment.
Have begun migrating where these instances are referred to in https://github.com/barrystyle/PIVX/tree/022020-rebase-consensuscorrections.
The previous PR was intended to be for the interim - there will be doubleups.
1 task
random-zebra
approved these changes
Feb 18, 2020
furszy
approved these changes
Feb 19, 2020
furszy
added a commit
that referenced
this pull request
Feb 19, 2020
23c9b6c Swap to newer method for genesis calculation; introduce Consensus namespace.. (barrystyle) Pull request description: This is PR is the forth part of breaking up #1209 into individual narrow-focused PRs. Original commit(s) were cherry-picked from @barrystyle's initial pre-squashed branch and then re-squashed (reference branch is at https://github.com/Fuzzbawls/PIVX/commits/pr-1209) Input Commits: Fuzzbawls@041c9ee Fuzzbawls@5d7e61c Fuzzbawls@cf696e4 Fuzzbawls@18ab8ef Fuzzbawls@0a8338b Note: I didn't retain any transitional or "fixup" commits, so this PR is a single commit which takes the overall changeset of the above commits, along with some cleanup of unused/unneeded code that was in the original overall changeset (not-implemented BIP9 chain parameters, for example). ------------------- This PR does two things: 2. Establishes the `Consensus` namespace skeleton, with a minimum number of chain parameters moved into the new namespace. Additional PRs should be opened after this is merged that handle the moving of other consensus-specific chain parameters in a concise and narrow-focused manner. 2. Refactors the method for initializing the genesis block on each chain (Mainnet, Testnet, Regtest) to be a function call rather than an in-class manual crafting of the block. ACKs for top commit: random-zebra: ACK 23c9b6c furszy: ACK 23c9b6c Tree-SHA512: dae6e1d887ade18855c9f1d16f625ec6d6e1cab890fe50eb045835798bab5df55475cdb6ec2e41326e48c568649b13f5e13adc49d21cba097feda2193fd28970
Fuzzbawls
added a commit
that referenced
this pull request
Feb 22, 2020
64465b7 [Refactor] Consensus: Stake Modifier V2 (random-zebra) 8083725 [Refactor] Consensus: TimeProtocolV2 parameters (random-zebra) 4d1c696 [Refactor] Consensus: nStakeMinAge, nStakeMinDepth, nFutureTimeDrift (random-zebra) e69cee2 [Refactor] Consensus: restore nMaxMoneyOut as consensus param (random-zebra) 08a581d [Refactor] Consensus: fAllowMinDifficultyBlocks, fPowNoRetargeting (random-zebra) ca6ea3c [Refactor] Consensus: nTargetTimespan, nTargetSpacing, nTimeSlotLength (random-zebra) a281dee [Refactor] Consensus: remove unneeded getters. Rename BIP65Height (random-zebra) 284271c [Refactor] Consensus: bnProofOfWorkLimit / bnProofOfStakeLimit (v1-v2) (random-zebra) Pull request description: This PR builds on - [x] #1328 Populates the `consensus` struct with all relevant consensus parameters. Resets `nMaxMoneyOut` as chain param (with different value for TestNet). Cleans up several unneeded fields in ChainParams. EDIT: Current PR has been split in two. Second part is #1344 ACKs for top commit: furszy: good, utACK 64465b7. Fuzzbawls: utACK 64465b7 Tree-SHA512: d3e46bc8bb2ad9ee48abcbc4d4b1df2f59914360aaca72e93e19a5578248ecb95fd6a422477238e4736bc767d4e226f5b7f867174d96dcace73621946bf84df8
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.
This is PR is the forth part of breaking up #1209 into individual narrow-focused PRs. Original commit(s) were cherry-picked from @barrystyle's initial pre-squashed branch and then re-squashed (reference branch is at https://github.com/Fuzzbawls/PIVX/commits/pr-1209)
Input Commits:
Fuzzbawls@041c9ee
Fuzzbawls@5d7e61c
Fuzzbawls@cf696e4
Fuzzbawls@18ab8ef
Fuzzbawls@0a8338b
Note: I didn't retain any transitional or "fixup" commits, so this PR is a single commit which takes the overall changeset of the above commits, along with some cleanup of unused/unneeded code that was in the original overall changeset (not-implemented BIP9 chain parameters, for example).
This PR does two things:
2. Establishes the
Consensusnamespace skeleton, with a minimum number of chain parameters moved into the new namespace. Additional PRs should be opened after this is merged that handle the moving of other consensus-specific chain parameters in a concise and narrow-focused manner.2. Refactors the method for initializing the genesis block on each chain (Mainnet, Testnet, Regtest) to be a function call rather than an in-class manual crafting of the block.