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 55/week @ 2024-07-22 42/week @ 2024-07-29 214/week @ 2024-08-05 98/week @ 2024-08-12 111/week @ 2024-08-19 114/week @ 2024-08-26 28/week @ 2024-09-02 23/week @ 2024-09-09 64/week @ 2024-09-16 92/week @ 2024-09-23 67/week @ 2024-09-30 9/week @ 2024-10-07 48/week @ 2024-10-14 49/week @ 2024-10-21 34/week @ 2024-10-28 19/week @ 2024-11-04

150 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
~105K SLoC