Repository navigation
feat: Superblock creation (Sentinel elimination) - #5525
Conversation
|
Note:
needs rebase |
UdjinM6
left a comment
There was a problem hiding this comment.
pls see 97ec634628
NOTE: I'm not 100% sure about 97ec634628#diff-6787065e28efe13420b2f5e85125894595bec4c84b0b917d952dc86abd879033R534-R538 but we need a way to prevent mns from creating triggers all at the same time. Sentinel does this by introducing random delays. I don't think we can use delays in Core so limiting it to the current payee only is one possible solution that might work I think. This means it's only nSuperblockMaturityWindow MNs that could participate (1662 on mainnet). The chance all of them are broken/malicious and won't create any trigger is pretty low I think. But maybe there is a better idea.
|
This pull request has conflicts, please rebase. |
@UdjinM6 Well technically this means that most of the time, always the first payee during the |
|
LGTM but c5f6915aeef06f1eda517d2adb0ef8c2ecdd2cca should be dropped and instead this PR should be rebased after #5538 is merged. |
…l snapshot (#5538) ## Issue being fixed or feature implemented `-1` will only mean `not initialized` from now Should fix crashes like https://gitlab.com/dashpay/dash/-/jobs/4893359925 This fix applied on top of #5525 https://gitlab.com/UdjinM6/dash/-/pipelines/972154075 ## What was done? Introduce and use `m_initial_snapshot_index` instead of re-using `nHeight`. Added a couple of asserts to make sure: 1. we never create mn lists with `nHeight` set to `-1` _explicitly_ (but it's ok for ctor with no params to do so) 2. we never set `nHeight` to `-1` for an existing mn list 3. we never try to get a height for a non-initialized list 4. `GetListForBlockInternal` never returns non-initialized mn lists ## How Has This Been Tested? Run tests, run regtest/testnet wallets. ## Breaking Changes We never stored snapshots with `nHeight == -1`, should be no breaking changes I think. ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
|
@UdjinM6 Done |
|
pls see b25de6d |
UdjinM6
left a comment
There was a problem hiding this comment.
Looks good now I think. Sentinel does have some additional logic for picking "best" triggers and deleting ones with "worse" hashes. But that's only for triggers that had no our vote yet as far as I can tell which never actually happens now that we vote asap, so it should be safe to skip this part imo.
utACK
Co-Authored-By: PastaPastaPasta <[email protected]>
PastaPastaPasta
left a comment
There was a problem hiding this comment.
utACK for squash merge
…5552) ## Issue being fixed or feature implemented With #5525 , MNs shouldn't use Sentinel anymore. ## What was done? In order to force them to remove Sentinel: - `gobject submit` RPC won't accept triggers anymore. - `gobject vote-conf` RPC isn't available anymore. ## How Has This Been Tested? `feature_governance.py` and `feature_governance_object.py` ## Breaking Changes Normally, only Sentinel should be broken. ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ --------- Co-authored-by: UdjinM6 <[email protected]>
…et (#5560) ## Issue being fixed or feature implemented Since #5525, MNs during the maturity window, will propose new triggers. In `CGovernanceManager::CreateSuperblockCandidate`, SuperBlock creation is skipped when the bellow check is true: `if (nHeight % Params().GetConsensus().nSuperblockCycle < Params().GetConsensus().nSuperblockCycle - Params().GetConsensus().nSuperblockMaturityWindow) return std::nullopt; ` Hence, the value of `nSuperblockMaturityWindow` must be less than `nSuperblockCycle` and greater than 0. ## What was done? Changed `nSuperblockMaturityWindow` for devnet and Testnet chain parameters to the following values: `nSuperblockCycle` = 24 `nSuperblockMaturityWindow` = 8 ## How Has This Been Tested? ## Breaking Changes ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
## Issue being fixed or feature implemented ## What was done? Added release notes for #5525. ## How Has This Been Tested? ## Breaking Changes ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ --------- Co-authored-by: PastaPastaPasta <[email protected]> Co-authored-by: UdjinM6 <[email protected]>
Issue being fixed or feature implemented
Implementation of issue https://github.com/dashpay/dash-issues/issues/43
What was done?
Masternode will try to create, sign and submit a Superblock (GovTrigger) during the
nSuperblockMaturityWindow.How Has This Been Tested?
Breaking Changes
Checklist: