Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 27 additions & 29 deletions dip-0004.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,37 +151,35 @@ To request a full masternode list, a SPV client would set the “baseBlockHash

The `MNLISTDIFF` message contains a serialized object with the following structure:

| Field | Type | Size | Description |
| --- | --- | --- | --- |
| baseBlockHash | uint256 | 32 | Hash of the block on which this diff is based on |
| blockHash | uint256 | 32 | Hash of the block for which the masternode list diff is returned |
| totalTransactions | uint32_t | 4 | Number of total transactions in blockHash |
| merkleHashesCount | compactSize uint | 1-9 | Number of Merkle hashes |
| merkleHashes | uint256[] | variable | Merkle hashes in depth-first order |
| merkleFlagsCount | compactSize uint | 1-9 | Number of Merkle flag bytes |
| merkleFlags | uint8_t[] | variable | Merkle flag bits, packed per 8 in a byte, least significant bit first |
| cbTx | CTransaction | variable | The fully serialized coinbase transaction of blockHash |
| deletedMNsCount | compactSize uint | 1-9 | Number of ProRegTx hashes which were deleted after baseBlockHash |
| deletedMNs | uint256[] | variable | A list of ProRegTx hashes for masternode which were deleted after baseBlockHash |
| mnCount | compactSize uint | 1-9 | Number of SML entries which were added or updated since baseBlockHash |
| mnList | SMLEntry[] | variable | The list of SML entries which were added or updated since baseBlockHash |

Starting with protocol version 70214, the following fields are added to the `MNLISTDIFF` message.
| Field | Type | Size | Description | Minimum Protocol Version |
| --- | --- | --- | --- | --- |
| nVersion | uint16_t | 2 | Version of the `MNLISTDIFF` reply (For now, `nVersion` is always 1) | 70229 |
| baseBlockHash | uint256 | 32 | Hash of the block on which this diff is based on | --- |
| blockHash | uint256 | 32 | Hash of the block for which the masternode list diff is returned | --- |
| totalTransactions | uint32_t | 4 | Number of total transactions in blockHash | --- |
| merkleHashesCount | compactSize uint | 1-9 | Number of Merkle hashes | --- |
| merkleHashes | uint256[] | variable | Merkle hashes in depth-first order | --- |
| merkleFlagsCount | compactSize uint | 1-9 | Number of Merkle flag bytes | --- |
| merkleFlags | uint8_t[] | variable | Merkle flag bits, packed per 8 in a byte, least significant bit first | --- |
| cbTx | CTransaction | variable | The fully serialized coinbase transaction of blockHash | --- |
| deletedMNsCount | compactSize uint | 1-9 | Number of ProRegTx hashes which were deleted after baseBlockHash | --- |
| deletedMNs | uint256[] | variable | A list of ProRegTx hashes for masternode which were deleted after baseBlockHash | --- |
| mnCount | compactSize uint | 1-9 | Number of SML entries which were added or updated since baseBlockHash | --- |
| mnList | SMLEntry[] | variable | The list of SML entries which were added or updated since baseBlockHash | --- |
| deletedQuorumsCount | compactSize uint | 1-9 | Number of LLMQs which were deleted from the active set after baseBlockHash | --- |
| deletedQuorums | (uint8_t+uint256)[] | variable | A list of LLMQ type and quorum hashes for LLMQs which were deleted after baseBlockHash | --- |
| newQuorumsCount | compactSize uint | 1-9 | Number of new LLMQs which were added to the active set since baseBlockHash | --- |
| newQuorums | qfcommit[] | variable | The list of LLMQ commitments for the LLMQs which were added since baseBlockHash | --- |
| quorumsCLSigsCount | compactSize uint | 1-9 | Number of entries in quorumsCLSigs field | 70230 |
| quorumsCLSigs | quorumsCLSigsObject[] | variable | ChainLock signature used to calculate members per quorum indexes (in newQuorums) | 70230 |

The format of the `quorumsCLSigsObject` object introduced in the [DIP29 Randomness Beacon For LLMQ Selection](dip-0029.md#light-clients) is:

| Field | Type | Size | Description |
| --- | --- | --- | --- |
| deletedQuorumsCount | compactSize uint | 1-9 | Number of LLMQs which were deleted from the active set after baseBlockHash |
| deletedQuorums | (uint8_t+uint256)[] | variable | A list of LLMQ type and quorum hashes for LLMQs which were deleted after baseBlockHash |
| newQuorumsCount | compactSize uint | 1-9 | Number of new LLMQs which were added to the active set since baseBlockHash |
| newQuorums | qfcommit[] | variable | The list of LLMQ commitments for the LLMQs which were added since baseBlockHash |

Starting with protocol version 70225, the following field is added to the `MNLISTDIFF` message between `cbTx` and `deletedQuorumsCount`.

| Field | Type | Size | Description |
|---------------------| ---- | ---- |-----------------------------------|
| nVersion | uint16_t | 2 | Version of the `MNLISTDIFF` reply |

For now, `nVersion` is always 1.
|--|--|--|--|
| 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 indicating which newQuorums entries use this signature for their member calculation

## Tracking/Updating and verifying masternode lists based on MNLISTDIFF

Expand Down