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§
- CNew
Template - C representation of
NewTemplate
. - CRequest
Transaction Data Error - C representation of
RequestTransactionDataError
. - CRequest
Transaction Data Success - C representation of
RequestTransactionDataSuccess
. - CSet
NewPrev Hash - C representation of
SetNewPrevHash
. - CSubmit
Solution - C representation of
SubmitSolution
. - 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
RequestTransactionData
message. - Request
Transaction Data Success - Message used by an upstream(Template Provider) to respond successfully to a
RequestTransactionData
message. - 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.
Functions§
- _c_
export_ coinbase_ out - Exports the
CoinbaseOutputConstraints
struct to C. - _c_
export_ req_ tx_ data - Exports the
RequestTransactionData
struct to C.