A few (mostly trivial) updates (#54)

* Drop quorumMinMemberAge from LLMQ init phase

* Clarify that "hash" is "SHA256" in multiple cases

* Switch few quotes to apostrophes
This commit is contained in:
UdjinM6 2019-11-11 15:59:14 +03:00 committed by thephez
parent 5660fcdd27
commit 41fc2c9413
6 changed files with 27 additions and 28 deletions

View file

@ -51,7 +51,7 @@ The message hash must be supplied along with the requestId. For InstantSend, the
A signing request can only be initiated once and should never be performed multiple times by the same masternode. This in turn results in “one vote per member” on each individual signing request and makes it impossible to have conflicting recovered signatures for the same signing request.
As a result of a (non-conflicting) signing request, the member must create a threshold signature share. It does this by calculating `hash(quorumHash, requestId, messageHash)` and then signing the resulting hash with the members individual threshold secret key share. After signing, the signature share must be propagated to all LLMQ members (explained later).
As a result of a (non-conflicting) signing request, the member must create a threshold signature share. It does this by calculating `SHA256(quorumHash, requestId, messageHash)` and then signing the resulting hash with the members individual threshold secret key share. After signing, the signature share must be propagated to all LLMQ members (explained later).
## Signing session
@ -69,7 +69,7 @@ To calculate which LLMQ is responsible for a signing request, each masternode sh
1. Take the active LLMQ set from 8 blocks before the current chain tip. Active LLMQ sets are described in
[DIP6 - Long-Living Masternode Quorums](https://github.com/dashpay/dips/blob/master/dip-0004.md) section "Active LLMQ sets".
2. For each LLMQ of the active set, calculate `hash(quorumType, quorumHash, requestId)`
2. For each LLMQ of the active set, calculate `SHA256(quorumType, quorumHash, requestId)`
3. Sort the list of LLMQs based on the result of step 2 in ascending order.
4. Use the first entry of the sorted list as the LLMQ to perform the signing request
@ -77,7 +77,7 @@ After the responsible LLMQ is determined, the masternode should check if it is p
## Validating recovered threshold signatures
Each node (including regular nodes) must verify the recovered signatures for each signing session before accepting and relaying them. This can be done by validating the recovered signature and `hash(quorumHash, requestId, messageHash)` against the LLMQs quorum public key.
Each node (including regular nodes) must verify the recovered signatures for each signing session before accepting and relaying them. This can be done by validating the recovered signature and `SHA256(quorumHash, requestId, messageHash)` against the LLMQs quorum public key.
If this succeeds, the signing request is considered successful. In the InstantSend example, this would mean that a single input of the transaction has been locked.
@ -110,7 +110,7 @@ The internal Dash message name is `qbsigshares` and the format of the message is
|--|--|--|--|
| quorumHash | uint256 | 32 | The quorum identifier |
| id | uint256 | 32 | The signing request id |
| messageHash | uint256 | 32 | The message hash |
| messageHash | uint256 | 32 | The SHA256 hash of the message |
| shareCount | compactSize uint | 1-9 | The number of signature shares in this batch |
| shareMembers | uint32[] | 4 * shareCount | Member indexes of the shares in this batch |
| shareSigs | BLSSig[] | 96 * shareCount | The signature shares |
@ -124,7 +124,7 @@ If a valid recovered threshold signature was already received before enough shar
On receipt of a recovered signature, all nodes should perform the following verification:
1. The `quorumHash` should belong to an active LLMQ
2. The `thresholdSig` should validate against the LLMQs quorum public key and `hash(quorumHash, id, messageHash)`.
2. The `thresholdSig` should validate against the LLMQs quorum public key and `SHA256(quorumHash, id, messageHash)`.
Propagation of recovered signature shares utilizes the inventory system.
@ -134,7 +134,7 @@ The internal Dash message name is `qsigrec` and the format of the message is:
|--|--|--|--|
| quorumHash | uint256 | 32 | The quorum identifier |
| id | uint256 | 32 | The signing request id |
| messageHash | uint256 | 32 | The message hash |
| messageHash | uint256 | 32 | The SHA256 hash of the message |
| thresholdSig | BLSSig | 96 | The final recovered threshold signature |
## Internal high-level API