forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 715
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
Dash backport #2947
Draft
Duddino
wants to merge
14
commits into
PIVX-Project:master
Choose a base branch
from
Duddino:duddino-backports
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Dash backport #2947
+322
−320
Conversation
This file contains 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
When ProcessMessageBatchedSigShares returns false, it's interpreted as if an invalid/malicious message was received, causing a ban. So, we should return "!ban" instead of just "ban".
The local node might be the bad one actually as it might not have catched up with the chain. In that case, LLMQs might be different for the sending and receiving node.
Don't pass CEvoDB to CDKGSessionHandler and CDKGSession Was never used. Introduce global llmq::llmqDb instance of CDBWrapper This DB is for LLMQ related data that is not part of on-chain consensus. This for example included LLMQ secret key shares and recovered signatures. Don't use CEvoDB in CDKGSessionManager and instead use llmqDb Contributions are not part of on-chain consensus and shouldn't be stored in CEvoDB. Use llmqDb for CRecoveredSigsDb Instead of creating its own CDBWrapper internally. Add key prefix to "rs_" for CRecoveredSigsDb keys This avoids future conflicts with other data stored in llmqDb Add HasVotedOnId/GetVoteForId to CSigningManager These just pass through to CRecoveredSigsDb Use unordered_lru_cache in CRecoveredSigsDb
* use AssertLockHeld(cs) instead of relying on comments * actually use `clsig` in `EnforceBestChainLock()` * fix log output in `EnforceBestChainLock()` * drop comments
* Move ChainLock signing into TrySignChainTip and call it periodically * Cheaper/Faster bailout from TrySignChainTip when already signed before
* Print which DKG type aborted * Don't directly call EnforceBestChainLock and instead schedule the call Calling EnforceBestChainLock might result in switching chains, which in turn might end up calling signals, so we get into a recursive call chain. Better to call EnforceBestChainLock from the scheduler. * Regularly call EnforceBestChainLock and reset error flags on locked chain * Don't invalidate blocks from CChainLocksHandler::TrySignChainTip As the name of this method implies, it's trying to sign something and not enforce/invalidate chains. Invalidating blocks is the job of EnforceBestChainLock. * Only call ActivateBestChain when tip != best CL tip * Fix unprotected access of bestChainLockBlockIndex and bail out if its null * Fix ChainLocks tests after changes in enforcement handling * Only invoke NotifyChainLock signal from EnforceBestChainLock This ensures that NotifyChainLock is not prematurely called before the block is fully connected. * Use a mutex to ensure that only one thread executes ActivateBestChain It might happen that 2 threads enter ActivateBestChain at the same time start processing block by block, while randomly switching between threads so that sometimes one thread processed the block and then another one processes it. A mutex protects ActivateBestChain now against this race. * Rename local copy of bestChainLockBlockIndex to currentBestChainLockBlockIndex * Don't call ActivateBestChain when best CL is part of the main chain
* Add support for log category to CBatchedLogger * Use "llmq" logging category in LLMQ code * Use "chainlocks" logging category in ChainLocks code * Log errors without logging category
… be sent (PIVX-Project#2783) * Introduce "qsendrecsigs" to indicate that plain recovered sigs should be sent Full nodes, including masternodes, will send this message automatically. Other node implementations (e.g. SPV) are usually not interested and would not send this message. * Use std::atomic<bool> instead of std::atomic_bool Not related to this PR, but a small enough change to include it here as well.
…UTH peers (PIVX-Project#2798) * Pass CNode* to IsMasternodeQuorumNode and let it also check verifiedProRegTxHash This makes IsMasternodeQuorumNode return true on incoming peer connections as well. * Let GetMasternodeQuorumNodes also take verifiedProRegTxHash into account This makes it return NodeIds for incoming peer connections as well. * Remove AddParticipatingNode and the need for it This was needed in the past when we were unable to identify incoming connections from other quorum members. Now that we have MNAUTH, we can easily identify all connected members. * Don't track interestedIn quorums in CSigSharesNodeState anymore Same as with the previous commit, we're now able to easily identify which nodes to announce sig shares to. * Remove unused CConnman::GetMasternodeQuorumAddresses
Implement quorum merkle roots for DIP4 coinbases and add quorums to MNLISTDIFF
Depends on #2946 |
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.
No description provided.