8 releases (3 stable)
1.0.2 | Aug 9, 2024 |
---|---|
1.0.0 | Mar 22, 2024 |
0.1.6 | Feb 15, 2024 |
0.1.4 | Sep 2, 2021 |
0.1.0 | Jun 14, 2021 |
#1 in #coinbase
203 downloads per month
Used in 8 crates
(2 directly)
80KB
1.5K
SLoC
Template Distribution Protocol
The Template Distribution protocol is used to receive updates of the block template to use in
mining the next block. It effectively replaces BIPs [22] and [23] (getblocktemplate) and provides
a much more efficient API which allows Bitcoin Core (or some other full node software) to push
template updates at more appropriate times as well as provide a template which may be
mined on quickly for the block-after-next. While not recommended, the template update
protocol can be a remote server, and is thus authenticated and signed in the same way as all
other protocols ([using the same SetupConnection handshake]).
Like the [Job Declaration] and [Job Distribution] (sub)protocols, all Template Distribution messages
have the channel_msg bit unset, and there is no concept of channels. After the initial common
handshake, the client MUST immediately send a CoinbaseOutputDataSize
message to indicate
the space it requires for coinbase output addition, to which the server MUST immediately reply
with the current best block template it has available to the client. Thereafter, the server
SHOULD push new block templates to the client whenever the total fee in the current block
template increases materially, and MUST send updated block templates whenever it learns of
a new block.
Template Providers MUST attempt to broadcast blocks which are mined using work they
provided, and thus MUST track the work which they provided to clients.
Dependencies
~8MB
~103K SLoC