From 2cd30414e7bdcb1222893510442b604860d4901d Mon Sep 17 00:00:00 2001 From: thephez Date: Tue, 16 Apr 2019 13:34:37 -0400 Subject: [PATCH] V0.14.0 DIP4 CbTx and mnlistdiff updates (#119) * P2P - Add quorum merkle root to CbTx - Update hexdump - Add table for version history * P2P - Add mnlistdiff quorum info * P2P - Update mnlistdiff hexdump (mocked) --- _includes/devdoc/ref_p2p_networking.md | 9 ++++++ _includes/devdoc/ref_transactions.md | 45 ++++++++++++++++---------- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/_includes/devdoc/ref_p2p_networking.md b/_includes/devdoc/ref_p2p_networking.md index ca524ae7..648af8e9 100644 --- a/_includes/devdoc/ref_p2p_networking.md +++ b/_includes/devdoc/ref_p2p_networking.md @@ -916,8 +916,13 @@ requested either a full masternode list or a diff for a range of blocks. | 1-9 | merkleFlagsCount | compactSize uint | Required | Number of Merkle flag bytes | variable | merkleFlags | vector | Required | Merkle flag bits, packed per 8 in a byte, least significant bit first | variable | cbTx | CTransaction | Required | The fully serialized coinbase transaction of `blockHash` +| 1-9 | deletedMNsCount | compactSize uint | Required | Number of ProRegTx hashes which were deleted after baseBlockHash | variable | deletedMNs | vector | Required | A list of ProRegTx hashes for masternode which were deleted after `baseBlockHash` | variable | mnList | vector | Required | The list of Simplified Masternode List (SML) entries which were added or updated since `baseBlockHash` +| 1-9 | deletedQuorumsCount | compactSize uint | Required | *Added in protocol version 70214*

Number of LLMQs which were deleted from the active set after `baseBlockHash` | +| variable | deletedQuorums | (uint8_t+uint256)[] | Required | *Added in protocol version 70214*

A list of LLMQ type and quorum hashes for LLMQs which were deleted after `baseBlockHash` | +| 1-9 | newQuorumsCount | compactSize uint | Required | *Added in protocol version 70214*

Number of new LLMQs which were added to the active set since `baseBlockHash` | +| variable | newQuorums | qfcommit[] | Required | *Added in protocol version 70214*

The list of LLMQ commitments for the LLMQs which were added since `baseBlockHash` | Simplified Masternode List (SML) Entry @@ -963,6 +968,10 @@ d12ad401c19089f0affcabd423deef67 ........... Merkle hash 3 02 ......................................... Masternode list entries: 2 +00 ......................................... Deleted quorums: 0 + +00 ......................................... New quorums: 0 + Masternode List | Masternode 1 | | 01040eb32f760490054543356cff4638 diff --git a/_includes/devdoc/ref_transactions.md b/_includes/devdoc/ref_transactions.md index d2a95deb..cca7a22b 100644 --- a/_includes/devdoc/ref_transactions.md +++ b/_includes/devdoc/ref_transactions.md @@ -908,10 +908,18 @@ payload consists of the following data: | 2 | version | uint_16 | CbTx version number. Currently set to 1. | 4 | height | uint32_t | Height of the block | 32 | merkleRootMNList | uint256 | Merkle root of the masternode list +| 32 | merkleRootQuorums | uint256 | *Added by CbTx version 2 in v0.14.0*

Merkle root of currently active LLMQs + +Version History + +| CbTx Version | First Supported Protocol Version | Dash Core Version | Notes | +| ---------- | ----------- | -------- | -------- | +| 1 | 70213 | 0.13.0 | Enabled by activation of DIP3 +| 2 | 70214 | 0.14.0 | Enabled by activation of DIP8 The following annotated hexdump shows a CbTx transaction. - + An itemized coinbase transaction: @@ -924,36 +932,39 @@ An itemized coinbase transaction: | 00000000000000000000000000000000 ......... Previous outpoint TXID | ffffffff ................................. Previous outpoint index | -| 05 ....................................... Bytes in coinbase: 5 +| 4c ....................................... Bytes in coinbase: 76 | | -| | 02 ..................................... Bytes in height -| | | 0608 ................................. Height: 2054 +| | 03 ..................................... Bytes in height +| | | 393d01 ............................... Height: 81209 | | -| | 0101 ................................... Arbitrary data -| ffffffff ................................. Sequence +| | 04b9...6d2f ............................ Arbitrary data (truncated) +| 00000000 ................................. Sequence 02 ......................................... Output count | Transaction Output 1 -| | 00902f5009000000 ....................... Duffs (400 DASH) -| | 2102c633b7022b4dab169c8a8459d83b7e0 -| | 6e0f8da0f89bf7e788ec98c8038107989ac .... Script +| | 40230e4300000000 ....................... Duffs (11.25 DASH) +| | 1976a914b7ce0ea9ce2010f58ba4aaa6 +| | caa76671c438e89088ac ................... Script | | Transaction Output 2 -| | 00e40b5402000000 ....................... Duffs (100 DASH) -| | 1976a914ebafa153cffbb5b37c30fb93 -| | 886f2fe0f1d549ed88ac ................... P2PKH script +| | 40230e4300000000 ....................... Duffs (11.25 DASH) +| | 1976a91405ea03a6c9dfa67e1837b3c1 +| | 4965ba3cb53bce7288ac ................... P2PKH script 00000000 ................................... Locktime -26 ......................................... Extra payload size (38) +46 ......................................... Extra payload size (38) Coinbase Transaction Payload -| 0100 ..................................... Version (1) +| 0200 ..................................... Version (2) | -| 06080000 ................................. Block height: 2054 +| 393d0100 ................................. Block height: 81209 | -| 69010fa8b729b53c78a1e209946c82e2 -| 3159439022ea4055aa60d4393fffba46 ......... MN List merkle root +| e2dd012c5b0b1753cef0e32f978917ef +| e7a484c5080b31b4e3f966ccc0e0f8dd ......... MN List merkle root +| +| 2ef709f55fa42cb53d29d75dad77d212 +| fb0bd72a47ecfe0e8aa6f660fb96396e ......... Active LLMQ merkle root {% endhighlight %} {% endautocrossref %}