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

Download history 15/week @ 2024-06-28 40/week @ 2024-07-05 100/week @ 2024-07-12 79/week @ 2024-07-19 46/week @ 2024-07-26 27/week @ 2024-08-02 276/week @ 2024-08-09 103/week @ 2024-08-16 105/week @ 2024-08-23 58/week @ 2024-08-30 21/week @ 2024-09-06 61/week @ 2024-09-13 91/week @ 2024-09-20 65/week @ 2024-09-27 27/week @ 2024-10-04 14/week @ 2024-10-11

203 downloads per month
Used in 8 crates (2 directly)

MIT license

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