Update dip-0006.md#109
Conversation
|
|
||
| 1. Retrieve the deterministic masternode list which is valid at quorumHeight | ||
| 2. Calculate `SHA256(proTxHash, quorumHash)` for each entry in the list | ||
| 2. Calculate `SHA256(proTxHash, quorumHash, llmqType)` for each entry in the list |
There was a problem hiding this comment.
Hmmm.... I think it's a bit more complicated actually...
First, you calculate confirmedHashWithProRegTxHash = SHA256(proTxHash, confirmedHash) where
confirmedHash | uint256 | 32 | The hash of the block at which the masternode got confirmed
https://github.com/dashpay/dips/blob/master/dip-0004.md#sml-simplified-masternode-list-entry
https://github.com/dashpay/dash/blob/master/src/evo/deterministicmns.h#L122-L129
dashpay/dash#2440
(note: we do this beforehand for each MN)
When you need to determine quorums you calculate so called modifier = SHA256(llmqType, quorumHash)
https://github.com/dashpay/dash/blob/master/src/llmq/quorums_utils.cpp#L42.
You then use it to calculate "scores" (hashes that are used to sort masternodes) like that
SHA256(confirmedHashWithProRegTxHash, modifier)
https://github.com/dashpay/dash/blob/master/src/evo/deterministicmns.cpp#L274-L298
dashpay/dash#2477
There was a problem hiding this comment.
how do the documentation even end up being that far from what's actually implemented?
There was a problem hiding this comment.
(thanks for pointing it out btw)
|
@UdjinM6 Looks like |
Missing a `SHA256` per #109 (comment)
Missing a `SHA256` per #109 (comment)
a llmqType was forgotten in the hash, now it reflects the codebase