Use proTxHash instead of outpoint when calculating masternode scores#2440
Merged
Conversation
UdjinM6
approved these changes
Nov 13, 2018
UdjinM6
left a comment
There was a problem hiding this comment.
utACK, travis seems to be (relatively) happy as well
CryptoCentric
pushed a commit
to absolute-community/absolute
that referenced
this pull request
Jun 29, 2020
…ashpay#2440) * Track confirmedHash of masternodes * Also include confirmedHash in DIP4 * Implement CalculateQuorum and CalculateScores in CDeterministicMNList * Use new ProRegTx based scoring function in GetMasternodeScores * Update test vectors for simplifiedmns_merkleroots tests
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.
See individual commits.
Turned out that SPV clients are currently unable to calculate quorums on their own as the collateral outpoint was not part of DIP4. Instead of adding the outpoint to DIP4, we decided to use the proTxHash for these calculations.
This also required to reimplement the protection against hash grinding of collaterals (which would now be for proTxHash). This means, we track the
confirmedHash(+15 blocks after registration on mainnet) for each MN now and take this into the score calculation. TheconfirmedHashis also added to DIP4 so that SPV clients have all data necessary to calculate quorums.