added SPV and network extension message pages.

This commit is contained in:
Christopher-Zeng
2020-10-27 16:27:35 -04:00
parent 6ef1880cfa
commit 9eaeadcd7f
7 changed files with 69 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
# Request: GET_XBLOCKTX
This message is sent to remote peer to request the transations still needed to reconstruct the block from the mempool after receipt of the previous [`XTHINBLOCK`](xthinblock) or [`THINBLOCK`](thinblock) message. This message should start with the hash of the block that is intended to be reconstructed, followed by a list of short hashes of the transactions still needed.
## Format
| Field | Length | Format | Description |
|--|--|--|--|
| Block hash | 32 Bytes | Bytes | The hash of the block being reconstructed. |
| Short transaction hashes | # of transactions * 8 bytes | vector | The 64-bit hashes of the transactions still needed for block reconstruction. |
+10
View File
@@ -0,0 +1,10 @@
# Request: GET_XTHIN
Request the [`XTHINBLOCK`](xthinblock) from the peer that was anoounced via the previous [`INV`](..\network\messages\inv) message. The message should start with an inventory message that indicates the `XTHINBLOCK` requested, followed by the Bloom filter generated from the mempool. Upon receipt of this request, the peer should loads the attached Bloom filter, creates and responds with `XTHINBLOCK`. If the `XTHINBLOCK` cannot be created without hash collisions, the peer may repond with `THINBLOCK` or full blocks.
## Format
| Field | Length | Format | Description |
|--|--|--|--|
| inventory message | variable | inventory message | An inventory message of type MSG_XTHINBLOCK. |
| Bloom filter | varaible | serialized object | A serialized Bloom filter seeded with contents of the mempool.|
View File
+11
View File
@@ -0,0 +1,11 @@
# Response: THINBLOCK
This message delivers an `THINBLOCK` to the remote peer. The `THINBLOCK` starts with the block header, followed by the hashes of all the transactions in the block. The transaction hashes are in the same order as they are in the actual block. All the transactions that are in the block, but not matched by the Bloom filter inlcuded in the previous [`GET_XTHIN`](get_xthin) mesaage should be appended, which should include at least the coinbase transaction.
## Format
| Field | Length | Format | Description |
|--|--|--|--|
| Block header | 80 bytes | [block header](..\blockchain\block\block-header) | The header of the block transmitted. |
| Transaction hashes | # of tx * 32 bytes | vector | The truncated hashes of all the transactions included in the block. |
| Missing transactions | variable | vector | Transactions that are included in the blocks but are not matched by the Bloom filter. |
+10
View File
@@ -0,0 +1,10 @@
# Response: XBLOCKTX
This message delivers the transactions specified in the previous [`GET_XBLOCKTX`](get_xblocktx) message to the remote peer. This message starts with the hash of the block being reconstructed, followed by a list of transactions requested.
## Format
| Field | Length | Format | Description |
|--|--|--|--|
| Block hash | 32 Bytes | Bytes | The hash of the block being reconstructed. |
| Transactions | variable | vector | The transactions still needed for block reconstruction. |
+11
View File
@@ -0,0 +1,11 @@
# Response: XTHINBLOCK
This message delivers an `XTHINBLOCK` to the remote peer. The `XTHINBLOCK` starts with the block header, followed by the truncated hashes of all the transactions in the block. The transaction hashes are truncated to the first 64 bits and are in the same order as they are in the actual block. All the transactions that are in the block, but not matched by the Bloom filter inlcuded in the previous [`GET_XTHIN`](get_xthin) mesaage should be appended, which should include at least the coinbase transaction.
## Format
| Field | Length | Format | Description |
|--|--|--|--|
| Block header | 80 bytes | [block header](..\blockchain\block\block-header) | The header of the block transmitted. |
| Transaction hashes | # of tx * 8 bytes | vector | The truncated hashes of all the transactions included in the block. |
| Missing transactions | variable | vector | Transactions that are included in the blocks but are not matched by the Bloom filter. |