Expand description
§Stratum V2 Template Distribution Protocol Messages Crate
template_distribution_sv2 is a Rust crate that implements a set of messages defined in the
Template Distribution Protocol of Stratum V2. The Template Distribution protocol can be used
to receive updates of the block templates to use in mining.
§Build Options
This crate can be built with the following features:
std: Enables support for standard library features.prop_test: Enables support for property testing.
For further information about the messages, please refer to Stratum V2 documentation - Job Distribution.
Structs§
- Coinbase
Output Constraints - Message used by a downstream to indicate the size of the additional bytes they will need in coinbase transaction outputs.
- NewTemplate
- Message used by an upstream(Template Provider) to provide a new template for downstream to mine on.
- Request
Transaction Data - Message used by a downstream to request data about all transactions in a block template.
- Request
Transaction Data Error - Message used by an upstream(Template Provider) to respond with an error to a
RequestTransactionDatamessage. - Request
Transaction Data Success - Message used by an upstream(Template Provider) to respond successfully to a
RequestTransactionDatamessage. - SetNew
Prev Hash - Message used by an upstream(Template Provider) to indicate the latest block header hash to mine on.
- Submit
Solution - Message used by a downstream to submit a successful solution to a previously provided template.
Constants§
- CHANNEL_
BIT_ COINBASE_ OUTPUT_ CONSTRAINTS - CHANNEL_
BIT_ NEW_ TEMPLATE - CHANNEL_
BIT_ REQUEST_ TRANSACTION_ DATA - CHANNEL_
BIT_ REQUEST_ TRANSACTION_ DATA_ ERROR - CHANNEL_
BIT_ REQUEST_ TRANSACTION_ DATA_ SUCCESS - CHANNEL_
BIT_ SET_ NEW_ PREV_ HASH - CHANNEL_
BIT_ SUBMIT_ SOLUTION - MESSAGE_
TYPE_ COINBASE_ OUTPUT_ CONSTRAINTS - MESSAGE_
TYPE_ NEW_ TEMPLATE - MESSAGE_
TYPE_ REQUEST_ TRANSACTION_ DATA - MESSAGE_
TYPE_ REQUEST_ TRANSACTION_ DATA_ ERROR - MESSAGE_
TYPE_ REQUEST_ TRANSACTION_ DATA_ SUCCESS - MESSAGE_
TYPE_ SET_ NEW_ PREV_ HASH - MESSAGE_
TYPE_ SUBMIT_ SOLUTION