Crate mining_sv2

Source
Expand description

§Stratum V2 Mining Protocol Messages Crate

mining_sv2 is a Rust crate that implements a set of messages defined in the Mining protocol of Stratum V2.

The Mining protocol enables the distribution of work to mining devices and the submission of proof-of-work results.

For further information about the messages, please refer to Stratum V2 documentation - Mining.

§Build Options

This crate can be built with the following features:

§Usage

To include this crate in your project, run:

$ cargo add mining_sv2

For further information about the mining protocol, please refer to Stratum V2 documentation - Mining Protocol.

Structs§

CloseChannel
Message used by a downstream to close a mining channel.
ExtendedExtranonce
Downstream and upstream are relative to user P. In simple terms, upstream is the part of the protocol that a user P sees when looking above, and downstream is what they see when looking below.
Extranonce
Extranonce bytes which need to be added to the coinbase to form a fully valid submission.
NewExtendedMiningJob
Message used by an upstream to provide an updated mining job to the downstream through Extended or Group Channel only.
NewMiningJob
Message used by an upstream to provide an updated mining job to downstream.
OpenExtendedMiningChannel
Message used by a downstream to request opening an Extended Channel with an upstream role.
OpenExtendedMiningChannelSuccess
Message used by upstream to accept [OpenExtendedMiningChannel request from downstream.
OpenMiningChannelError
Message used by upstream to reject OpenExtendedMiningChannel or [OpenStandardMiningchannel] request from downstream.
OpenStandardMiningChannel
Message used by a downstream to request opening a Standard Channel.
OpenStandardMiningChannelSuccess
Message used by upstream to accept OpenStandardMiningChannel request from downstream.
SetCustomMiningJob
Message used by downstream role to set a custom job to an upstream (Pool).
SetCustomMiningJobError
Message used by upstream to reject SetCustomMiningJob request.
SetCustomMiningJobSuccess
Message used by upstream to accept SetCustomMiningJob request.
SetExtranoncePrefix
Message used by upstream to change downstream node’s extranonce prefix.
SetGroupChannel
Message used by upstream to associate a set of Standard Channel(s) to a Group Channel.
SetNewPrevHash
Message used by upstream to share or distribute the latest block hash.
SetTarget
Message used by upstream to control the downstream submission rate by adjusting the difficulty target on a specified channel.
SubmitSharesError
Message used by upstream to reject SubmitSharesStandard or SubmitSharesExtended.
SubmitSharesExtended
Message used by downstream to send result of its hashing work to an upstream.
SubmitSharesStandard
Message used by downstream to send result of its hashing work to an upstream.
SubmitSharesSuccess
Message used by upstream to accept SubmitSharesStandard or SubmitSharesExtended.
Target
Target is a 256-bit unsigned integer in little-endian
UpdateChannel
Message used by downstream to notify an upstream about changes on a specified channel.
UpdateChannelError
Message used by upstream to notify downstream about an error in the UpdateChannel message.

Enums§

ExtendedExtranonceError
Error type for ExtendedExtranonce operations