mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
494b5c744c
## Issue being fixed or feature implemented Implementation of Randomness Beacon Part 3. Starting from v20 activation fork, members for quorums are sorted using (if available) the best CL signature found in Coinbase. If no CL signature is present yet, then the usual way is used (By using Blockhash instead) The actual new way to shuffle is already implemented in https://github.com/dashpay/dash/pull/5366. SPV clients also need to calculate members, but they only know block headers. Since Coinbase is in the actual block, then they lack the required information to correctly calculate quorum members. ## What was done? - Message `MNLISTIDFF` is enriched with a new field `quorumsCLSigs`. This field holds the Chainlock Signature required for each set of indexes corresponding to quorums in field `newQuorums`. - Protocol version has been bumped to `70230`. - Clients with protocol version greater or equal to `70230` will receive the new field `quorumsCLSigs`. - The same field is returned in `protx diff` RPC. Note: - Field `quorumsCLSigs` will populated only after v20 activation - If for one or more quorums, no non-null CL sig was found in CbTx then a null signature is returned in `quorumsCLSigs`. ## How Has This Been Tested? - Functional test mininode's protocol version was bumped to `70230`. - `feature_llmq_rotation.py` checks that `quorumsCLSigs` match in both P2P and RPC messages. ## Breaking Changes No ## Checklist: - [x] I have performed a self-review of my own code - [x] 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: thephez <thephez@users.noreply.github.com> Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com> Co-authored-by: pasta <pasta@dashboost.org>
1.7 KiB
1.7 KiB
Updated RPCs
protx diff
RPC returns a new fieldquorumsCLSigs
. This field is a list containing: a ChainLock signature and the list of corresponding quorum indexes innewQuorums
.
MNLISTDIFF
P2P message
Starting with protocol version 70230
, the following fields are added to the MNLISTDIFF
after newQuorums
.
Field | Type | Size | Description |
---|---|---|---|
quorumsCLSigsCount | compactSize uint | 1-9 | Number of quorumsCLSigs elements |
quorumsCLSigs | quorumsCLSigsObject[] | variable | CL Sig used to calculate members per quorum indexes (in newQuorums) |
The content of quorumsCLSigsObject
:
Field | Type | Size | Description |
---|---|---|---|
signature | BLSSig | 96 | ChainLock signature |
indexSetCount | compactSize uint | 1-9 | Number of quorum indexes using the same signature for their member calculation |
indexSet | uint16_t[] | variable | Quorum indexes corresponding in newQuorums using signature for their member calculation |
Note: The quorumsCLSigs
field in both RPC and P2P will only be populated after the v20 activation.