Adds a BIP for SENDTEMPLATE, GETTEMPLATE, TEMPLATE p2p messages. Discussion links:
https://delvingbitcoin.org/t/sharing-block-templates/1906
https://gnusha.org/pi/bitcoindev/aJvZwR_bPeT4LaH6@erisian.com.au/T/#u
Adds a BIP for SENDTEMPLATE, GETTEMPLATE, TEMPLATE p2p messages. Discussion links:
https://delvingbitcoin.org/t/sharing-block-templates/1906
https://gnusha.org/pi/bitcoindev/aJvZwR_bPeT4LaH6@erisian.com.au/T/#u
Post to bitcoindev group hasn’t made it through
fixed, published
11+ License: BSD-3-Clause
12+```
13+
14+## Abstract
15+
16+This BIP describes the use of [BIP-152 compact blocks][BIP-152] enccoding
0This BIP describes the use of [BIP-152 compact blocks][BIP-152] encoding
69+and should be the hash of a block made up of those transactions.
70+4. The transactions making up the payload of the template should be valid
71+as a block -- for example all unconfirmed parents of a transaction should be
72+included before the transaction, and consensus limits should be respected.
73+5. A block containing the transactions making up the payload must not
74+exceed four million weight units as defined in [BIP-141][BIP-141].
See discussion in the delving thread.
I think having two blocks of txs could make sense, but in adversarial situations it doubles the potential memory usage and it’s not immediately clear what would be a sensible way of addressing that.
My thought is that deploying a simple design and getting some real-world data to iterate on makes sense. You could update the specification to announce “SENDTEMPLATE 2” indicating you support v2, which indicates to your peers they can send you a “GETTEMPLATE 2” message requesting a 2MvB template rather than a 1MvB template, eg.
Likewise sending set differences through could make sense (and wouldn’t need the complexity of minisketch since the sender knows their own previous templates), but there’s still a lot of design space left, so getting real-world data also seems useful for resolving that. (Likewise an updated spec could allow SENDTEMPLATE 2D
to indicate deltas are supported, and GETTEMPLATE 2 $hash
could request a 2MvB template encoded as a delta against the previous template with hash $hash
)
47+3. If a node implements this BIP, it must send the `sendtemplate`
48+message after `version` and before `verack`.
49+
50+### `gettemplate`
51+
52+1. The `gettemplate` message is defined as a message with `pchCommand ==
Any reason to not also allocate a message ID from the range specific in BIP 324?
The guidelines specify that if a message is sent more than once per connection then a number you be allocated (IIUC both this and the template
message):
We recommend reserving 1-byte type IDs for message types that are sent more than once per direction per connection.
58+3. A `gettemplate` message must not be sent if a `sendtemplate` message
59+was not already received.
60+4. Upon receipt of a `gettemplate` message, a node may reply with a
61+`template` message.
62+
63+### `template`
blocktemplate
instead? Otherwise, at a glance the semantics of the message are ambiguous.
30+and (b) provides a way for transactions that may have dropped out of
31+nodes' mempools to be rebroadcast across the network by third parties,
32+potentially providing better privacy than if only the nodes directly
33+involved in the transaction would rebroadcast it.
34+
35+## Specification
Ah yeah I meant service flag 😅.
The service flag would also allow for peers to find other supporting peers via DNS queries.
ajtowns
jonatack
murchandamus
Roasbeef
Labels
New BIP