wiki commit

This commit is contained in:
qr8ruwyx0u7fqeyu5n49t2paw0ghhp8xsgmffesqzs
2020-02-06 13:08:26 -05:00
committed by buwiki
parent d60f0abd11
commit 24de826eb0
3 changed files with 19 additions and 21 deletions
+6 -8
View File
@@ -39,26 +39,24 @@ Secp256k1 — Public Key — Private Key — ECDSA signatures — Schnorr signat
**Announcement messages** **Announcement messages**
filteradd — filterclear — filterload — inv [filteradd](/protocol/network/messages/filteradd.md) — [filterclear](/protocol/network/messages/filterclear.md) — [filterload](/protocol/network/messages/filterload.md) — [inv](/protocol/network/messages/inv.md)
**Request messages** **Request messages**
feefilter — getaddr — getblocks — getdata — getheaders — [ping](/protocol/network/messages/ping) — feefilter — getaddr — [getblocks](/protocol/network/messages/getblocks.md) — [getdata](/protocol/network/messages/getdata.md) — [getheaders](/protocol/network/messages/getheaders.md) — [ping](/protocol/network/messages/ping.md) —
sendheaders — [version](/protocol/network/messages/version) sendheaders — [version](/protocol/network/messages/version.md)
**Response messages** **Response messages**
addr — block — headers — notfound — merkleblock — [pong](/protocol/network/messages/pong) — [addr](/protocol/network/messages/addr.md) — block — headers — notfound — [merkleblock](/protocol/network/messages/merkleblock.md) — [pong](/protocol/network/messages/pong.md) —
reject — tx — [verack](/protocol/network/messages/verack) [reject](/protocol/network/messages/reject.md) — tx — [verack](/protocol/network/messages/verack.md)
**Other messages (extensions)** **Other messages (extensions)**
sendcmpct — get_xthin — xthinblock — thinblock — get_xblocktx — xblocktx sendcmpct — get_xthin — xthinblock — thinblock — get_xblocktx — xblocktx —(xverack)[/protocol/network/messages/xverack.md) — (xversion)[/protocol/network/messages/xversion.md)
### Simple Payment Verification (SPV) ### Simple Payment Verification (SPV)
[Bloom Filters](/objects/bloom__filter) [Bloom Filters](/objects/bloom__filter)
### Simple Ledger Protocol ### Simple Ledger Protocol
### Miscellaneous ### Miscellaneous
[Endian](/protocol/misc/endian) — [Little endian](/protocol/misc/endian/little) — [Big endian](/protocol/misc/endian/big) [Endian](/protocol/misc/endian) — [Little endian](/protocol/misc/endian/little) — [Big endian](/protocol/misc/endian/big)
+7 -7
View File
@@ -1,6 +1,6 @@
<div class="cwikmeta">{ <div class="cwikmeta">{
"title":"INV", "title":"FILTERLOAD",
"related":["/protocol","/protocol/p2p/filterclear", "/protocol/p2p/inv", "/protocol/p2p/MERKLEBLOCK"] "related":["/protocol","/protocol/network/messages/filterclear.md", "/protocol/network/messages/inv.md", "/protocol/network/messages/merkleblock.md"]
}</div> }</div>
@@ -8,21 +8,21 @@
| up to 36000 bytes | | up to 36000 bytes |
|-------------------| |-------------------|
| [bloom filter](objects/bloom_filter) | | [bloom filter](/objects/bloom_filter.md) |
### Effect on Transactions ### Effect on Transactions
This message installs a bloom filter into the peer. Subsequent INV notifications and MERKLEBLOCK messages only provide transactions that in match this bloom filter in some manner. The following items in a transaction are checked against the bloom filter: This message installs a bloom filter into the peer. Subsequent INV notifications and MERKLEBLOCK messages only provide transactions that in match this bloom filter in some manner. The following items in a transaction are checked against the bloom filter:
- The transaction hash - The transaction hash
- Each data field in every [output script](glossary/output__script) in the transaction - Each data field in every [output script](/glossary/output__script.md) in the transaction
- Most importantly, this allows public keys and public key hashes (essentially bitcoin addresses) to be added to the bloom filter, allowing a wallet to detect an incoming transfer. - Most importantly, this allows public keys and public key hashes (essentially bitcoin addresses) to be added to the bloom filter, allowing a wallet to detect an incoming transfer.
- Each [previous output](glossary/previous__output) in the transaction - Each [previous output](/glossary/previous__output.md) in the transaction
- This allows a wallet to detect that a different wallet has spent funds that are co-controlled - This allows a wallet to detect that a different wallet has spent funds that are co-controlled
- Each data field in every [input script](glossary/input__script) in the transaction. - Each data field in every [input script](/glossary/input__script.md) in the transaction.
See [CBloomFilter::MatchAndInsertOutputs](https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/bucash1.7.0.0/src/bloom.cpp#L186), and [CBloomFilter::MatchInputs](https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/eb264e627e231f7219e60eef41b4e37cc52d6d9d/src/bloom.cpp#L234) See [CBloomFilter::MatchAndInsertOutputs](https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/bucash1.7.0.0/src/bloom.cpp#L186), and [CBloomFilter::MatchInputs](https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/eb264e627e231f7219e60eef41b4e37cc52d6d9d/src/bloom.cpp#L234)
### Effect on Merkle Blocks ### Effect on Merkle Blocks
If a [filtered block](https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/bucash1.7.0.0/src/protocol.h#L483) is requested via in [INV](/protocols/p2p/inv) message, the installed bloom filter is used to choose which transactions are included in the response using the same matching algorithm as described above for transaction INVs. If a [filtered block](https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/bucash1.7.0.0/src/protocol.h#L483) is requested via in [INV](/protocol/network/messages/inv.md) message, the installed bloom filter is used to choose which transactions are included in the response using the same matching algorithm as described above for transaction INVs.
+5 -5
View File
@@ -1,16 +1,16 @@
<div class="cwikmeta">{ <div class="cwikmeta">{
"title":"INV", "title":"INV",
"related":["/protocol","/protocol/p2p/getdata","/protocol/p2p/filterload","/protocol/p2p/filterclear"] "related":["/protocol","/protocol/network/messages/getdata.md","/protocol/network/messages/filterload.md","/protocol/network/messages/filterclear.md"]
}</div> }</div>
*Notifies peers about the existence of some information (block or transaction)* *Notifies peers about the existence of some information (block or transaction)*
Based on selected services in the [VERSION]("/protocol/p2p/version") message, INV messages may not be sent. Based on selected services in the [VERSION](/protocol/network/messages/version.md) message, INV messages may not be sent.
If a bloom filter has been sent to this node via [FILTERLOAD](/protocol/p2p/filterload), transaction INVs will only be sent if they match the bloom filter. If a bloom filter has been sent to this node via [FILTERLOAD](/protocol/network/messages/filterload.md), transaction INVs will only be sent if they match the bloom filter.
| compact int | 4 bytes | 32 bytes |... | 4 bytes | 32 bytes | | compact int | 4 bytes | 32 bytes |... | 4 bytes | 32 bytes |
|----------|---------|----------|---|---------|----------| |----------|---------|----------|---|---------|----------|
|[vector](/protocol/p2p/vector) size N of| type 1 | hash 1 | | type N | hash N |[vector](/protocol/p2p/vector.md) size N of| type 1 | hash 1 | | type N | hash N
NOTE: Since a block header is a relatively small data structure, and block propagation speed is an important network metric, a peer may send HEADER messages in place of INV messages when a block arrives. NOTE: Since a block header is a relatively small data structure, and block propagation speed is an important network metric, a peer may send HEADER messages in place of INV messages when a block arrives.
@@ -29,4 +29,4 @@ The type of the object that is available.
Implementations: [C++](https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/eb264e627e231f7219e60eef41b4e37cc52d6d9d/src/protocol.h#L477) Implementations: [C++](https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/eb264e627e231f7219e60eef41b4e37cc52d6d9d/src/protocol.h#L477)
##### Hash ##### Hash
The [hash identifier](/glossary/hash__identifier) of the available object. The [hash identifier](/glossary/hash__identifier.md) of the available object.