Crate template_distribution_sv2

Source
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§

CNewTemplate
C representation of NewTemplate.
CRequestTransactionDataError
C representation of RequestTransactionDataError.
CRequestTransactionDataSuccess
C representation of RequestTransactionDataSuccess.
CSetNewPrevHash
C representation of SetNewPrevHash.
CSubmitSolution
C representation of SubmitSolution.
CoinbaseOutputConstraints
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.
RequestTransactionData
Message used by a downstream to request data about all transactions in a block template.
RequestTransactionDataError
Message used by an upstream(Template Provider) to respond with an error to a RequestTransactionData message.
RequestTransactionDataSuccess
Message used by an upstream(Template Provider) to respond successfully to a RequestTransactionData message.
SetNewPrevHash
Message used by an upstream(Template Provider) to indicate the latest block header hash to mine on.
SubmitSolution
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.