content - p2p - Compact Block messages

- Start adding `blocktxn`, `cmpctblock`, `getblocktxn`, and `sendcmpct`
messages
  - blocktxn and getblocktxn description and format added
  - Placeholders for cmpctblock and sendcmpct
This commit is contained in:
thephez 2018-04-19 10:29:01 -04:00
parent 008c2b550d
commit a02a8244bf
No known key found for this signature in database
GPG key ID: BBC8A06DBE236099
3 changed files with 90 additions and 1 deletions

View file

@ -20,7 +20,11 @@ bitcoin QR codes: URI QR code
bitcoinj:
'`block` message': block message
'`block` messages': block message
'`blocktxn` message': blocktxn message
'`blocktxn` messages': blocktxn message
certificate chain:
'`cmpctblock` message': cmpctblock message
'`cmpctblock` messages': cmpctblock message
DER:
DER format: der
DER-formatted: der
@ -57,6 +61,8 @@ fiat:
'`filterload` messages': filterload message
'`getblocks` message': getblocks message
'`getblocks` messages': getblocks message
'`getblocktxn` message': getblocktxn message
'`getblocktxn` messages': getblocktxn message
'`getdata` message': getdata message
'`getdata` messages': getdata message
'`getheaders` message': getheaders message
@ -172,6 +178,8 @@ RPC:
RPCs: rpc
'`script`': DO NOT AUTOCROSSREF
secp256k1:
'`sendcmpct` message': sendcmpct message
'`sendcmpct` messages': sendcmpct message
'`spork` message': spork message
'`spork` messages': spork message
'`ssc` message': ssc message

View file

@ -203,6 +203,42 @@ different reasons:
{% endautocrossref %}
#### Blocktxn
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70209 of Dash Core.*
The `blocktxn` message sends requested block transactions to a node which
previously requested them with a `getblocktxn` message.
| Bytes | Name | Data Type | Encoding | Description|
|----------|----------------------|----------------------|----------|------|
| 32 | blockhash | Binary blob | The output from a double-SHA256 of the block header, as used elsewhere | The blockhash of the block which the transactions being provided are in
| 1 or 3 | transactions_length | CompactSize | As used to encode array lengths elsewhere | The number of transactions provided
| variable | transactions | List of transactions | As encoded in `tx` messages in response to `getdata MSG_TX` | The transactions provided
The following annotated hexdump shows a `blocktxn` message. (The
message header has been omitted.)
{% highlight text %}
**ADD HEXDUMP HERE**
{% endhighlight %}
{% endautocrossref %}
#### CmpctBlock
{% include helpers/subhead-links.md %}
{% autocrossref %}
The `cmpctblock` message transmits a single serialized compact block.
**ADD DESCRIPTION, FORMAT, AND HEXDUMP**
{% endautocrossref %}
#### GetBlocks
{% include helpers/subhead-links.md %}
@ -255,6 +291,31 @@ d39f608a7775b537729884d4e6633bb2
{% endautocrossref %}
#### GetBlockTxn
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70209 of Dash Core.*
The `getblocktxn` message requests a `blocktxn` message for any transactions
that it has not seen after a compact block is received.
| Bytes | Name | Data Type | Encoding | Description|
|----------|-----------------|----------------------|----------|------|
| 32 | blockhash | Binary blob | The output from a double-SHA256 of the block header, as used elsewhere | The blockhash of the block which the transactions being requested are in
| 1 or 3 | indexes_length | CompactSize | As used to encode array lengths elsewhere | The number of transactions requested
| (1 or 3) * `indexes_length` | indexes | List of CompactSizes | Differentially encoded | The indexes of the transactions being requested in the block
The following annotated hexdump shows a `getblocktxn` message. (The
message header has been omitted.)
{% highlight text %}
**ADD HEXDUMP HERE**
{% endhighlight %}
{% endautocrossref %}
#### GetData
{% include helpers/subhead-links.md %}
@ -1290,6 +1351,23 @@ header has been omitted.)
{% endautocrossref %}
#### SendCmpct
{% include helpers/subhead-links.md %}
{% autocrossref %}
The `sendcmpct` message tells the receiving peer to send new block
announcements using a `cmpctblock` message rather than an `inv` message.
<!--
There is no payload in a `sendheaders` message. See the [message header
section][section message header] for an example of a message without a payload.
-->
**ADD FORMAT AND HEXDUMP**
{% endautocrossref %}
#### SendHeaders
{% include helpers/subhead-links.md %}
@ -1303,7 +1381,6 @@ section][section message header] for an example of a message without a payload.
{% endautocrossref %}
#### Spork
{% include helpers/subhead-links.md %}

View file

@ -206,6 +206,8 @@ http://opensource.org/licenses/MIT.
[addr message]: /en/developer-reference#addr "The P2P network message which relays IP addresses and port numbers of active nodes to other nodes and clients, allowing decentralized peer discovery."
[alert message]: /en/developer-reference#alert "The P2P network message which sends alerts in case of major software problems."
[block message]: /en/developer-reference#block "The P2P network message which sends a serialized block"
[blocktxn message]: /en/developer-reference#blocktxn "The P2P network message which sends a list of requested transactions from a compact block"
[cmpctblock message]: /en/developer-reference#cmpctblock "The P2P network message which sends a serialized compact block"
[dsa message]: /en/developer-reference#dsa "A P2P network message used to join a mixing pool"
[dsc message]: /en/developer-reference#dsc "A P2P network message used to indicates a PrivateSend mixing session is complete"
[dsf message]: /en/developer-reference#dsf "A P2P network message sent as the final mixing transaction in a session asking users to sign the final mixing TX messages"
@ -221,6 +223,7 @@ http://opensource.org/licenses/MIT.
[filterload message]: /en/developer-reference#filterclear "A P2P protocol message used to send a filter to a remote peer, requesting that they only send transactions which match the filter."
[getaddr message]: /en/developer-reference#getaddr "A P2P protool message used to request an addr message containing connection information for other nodes"
[getblocks message]: /en/developer-reference#getblocks "A P2P protocol message used to request an inv message containing a range of block header hashes"
[getblocktxn message]: /en/developer-reference#getblocktxn "A P2P protocol message used to request transactions from a compact block"
[getdata message]: /en/developer-reference#getdata "A P2P protocol message used to request one or more transactions, blocks, or merkle blocks"
[getheaders message]: /en/developer-reference#getheaders "A P2P protocol message used to request a range of block headers"
[getsporks message]: /en/developer-reference#getsporks "A P2P network message used to request the status of sporks"
@ -241,6 +244,7 @@ http://opensource.org/licenses/MIT.
[ping message]: /en/developer-reference#ping "A P2P network message used to see if the remote host is still connected"
[pong message]: /en/developer-reference#pong "A P2P network message used to reply to a P2P network ping message"
[reject message]: /en/developer-reference#reject "A P2P network message used to indicate a previously-received message was rejected for some reason"
[sendcmpct message]: /en/developer-reference#sendcmpct "A P2P network message used to request new blocks be announced as compact blocks"
[sendheaders message]: /en/developer-reference#sendheaders "A P2P network message used to request new blocks be announced through headers messages rather than inv messages"
[spork message]: /en/developer-reference#spork "A P2P network message used to send the activation status of a spork"
[ssc message]: /en/developer-reference#ssc "A P2P network message used to track the sync status of masternode objects ()"