-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat!: 4k collateral high performance masternode implementation #5039
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
Conversation
|
This pull request has conflicts, please rebase. |
|
This pull request has conflicts, please rebase. |
|
This pull request has conflicts, please rebase. |
|
@PastaPastaPasta @UdjinM6 We need to make sure this doesn't create any issues with sentinel. Please consider that when reviewing. @nmarley You may know best about that. |
|
This pull request has conflicts, please rebase. |
|
This pull request has conflicts, please rebase. |
it was picking the wrong DMN as a payee...
Co-Authored-By: PastaPastaPasta <[email protected]>
|
@PastaPastaPasta @UdjinM6 Applied suggestions (+fixed tests). |
src/rpc/evo.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
Co-authored-by: PastaPastaPasta <[email protected]>
PastaPastaPasta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK for squash merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nits only. Not a blocker to merge! Can be done never or as spare PR someday.
| uint256 proTxHash; | ||
| COutPoint collateralOutpoint; | ||
| uint16_t nOperatorReward{0}; | ||
| uint16_t nType{MnType::Regular.index}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why index is uint8_t but here is uint16_t? btw, better to use enum class here as more error prune (see other related comment)
| class CDeterministicMNType | ||
| { | ||
| public: | ||
| uint8_t index; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be change uint8_t index to enum class MNType : uint8_t ?
Pros:
Firstly, switch inside GetMnType() and any similar code will show a compiler warning if any type is missing.
Secondly, instead "MnType::HighPerformance.index" you can write MnType::HighPerformance
Thirdly, you can remove .index from MnType
Cons:
Instead (nType == MnType::HighPerformance.index) need to write nType == static_cast<int16_t>(MnType::HighPerformance)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #5200
| if (dmn->nType == MnType::HighPerformance.index) { | ||
| if (!UpdateUniqueProperty(*dmn, oldState->platformNodeID, dmn->pdmnState->platformNodeID)) { | ||
| mnUniquePropertyMap = mnUniquePropertyMapSaved; | ||
| throw(std::runtime_error(strprintf("%s: Can't update a masternode %s with a duplicate platformNodeID=%s", __func__, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though that () is not needed after throw.
If remove them, the line will be more beautiful because no "))))" at the end of line but only ")))"
Sure. Can be applied in a separate PR. Thanks @knst ! |
|
pls see https://github.com/UdjinM6/dash/commits/pr5039. also, I think expressions like |
Co-Authored-By: UdjinM6 <[email protected]>
Co-Authored-By: Konstantin Akimov <[email protected]>
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
PastaPastaPasta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-utACK for squash merge
…b upgrade logic 39f76c8 chore: drop legacy `CDeterministicMNState` formats, evodb upgrade logic (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * `CDeterministicMNState_`{`Oldformat`, `mntype_format`} was introduced in [dash#5039](#5039) and [dash#5403](#5403), included in Dash Core v19 and v20 respectively. The above change has been in the codebase for more than two major releases and does not concern databases with a long shelf life (like wallets), this pull request removes them entirely. ## Breaking Changes Users upgrading from these versions are now expected to `-reindex`. ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)** - [x] I have made corresponding changes to the documentation **(note: N/A)** - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 39f76c8 knst: utACK 39f76c8 Tree-SHA512: 3fabe0aeb7f3d01a858b0b19d49a22523f462157597a1ade93181288e4ba7b133a5ee9272a8abe41e40cff177c0ddf94123274f0427693db6fdb90c4b8e613fa
Issue being fixed or feature implemented
What was done?
Implementation of 4k collateral HPMN.
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only