Expand description
§Stratum V2 Common Messages Crate.
This crate defines a set of shared messages used across all Stratum V2 subprotocols.
§Build Options
This crate can be built with the following features:
std: Enables support for standard library features.quickcheck: Enables support for property-based testing using QuickCheck.
For further information about the messages, please refer to Stratum V2 documentation - Common Messages.
Structs§
- Channel
Endpoint Changed - Message used by an upstream role for announcing a mining channel endpoint change.
- Reconnect
- Message used by upstream to redirect downstream connection(s) to a new host.
- Setup
Connection - Used by downstream to initiate a Stratum V2 connection with an upstream role.
- Setup
Connection Error - Message used by an upstream role to reject a connection setup request from a downstream role.
- Setup
Connection Success - Message used by an upstream role to accept a connection setup request from a downstream role.
Enums§
- Protocol
- This enum has a list of the different Stratum V2 subprotocols.
Constants§
- CHANNEL_
BIT_ CHANNEL_ ENDPOINT_ CHANGED - CHANNEL_
BIT_ SETUP_ CONNECTION - CHANNEL_
BIT_ SETUP_ CONNECTION_ ERROR - CHANNEL_
BIT_ SETUP_ CONNECTION_ SUCCESS - MESSAGE_
TYPE_ CHANNEL_ ENDPOINT_ CHANGED - MESSAGE_
TYPE_ RECONNECT - MESSAGE_
TYPE_ SETUP_ CONNECTION - MESSAGE_
TYPE_ SETUP_ CONNECTION_ ERROR - MESSAGE_
TYPE_ SETUP_ CONNECTION_ SUCCESS - SV2_
JOB_ DECLARATION_ PROTOCOL_ DISCRIMINANT - SV2_
MINING_ PROTOCOL_ DISCRIMINANT - SV2_
TEMPLATE_ DISTRIBUTION_ PROTOCOL_ DISCRIMINANT
Functions§
- has_
requires_ std_ job - Helper function to check if
REQUIRES_STANDARD_JOBSbit flag present. - has_
version_ rolling - Helper function to check if
REQUIRES_VERSION_ROLLINGbit flag present. - has_
work_ selection - Helper function to check if
REQUIRES_WORK_SELECTIONbit flag present.