Skip to content

Commit

Permalink
Update protocols/v2/subprotocols/mining/src/new_mining_job.rs
Browse files Browse the repository at this point in the history
Co-authored-by: plebhash <[email protected]>
  • Loading branch information
jbesraa and plebhash authored Dec 13, 2024
1 parent c0ce734 commit bb6a6cd
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions protocols/v2/subprotocols/mining/src/new_mining_job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,17 @@ impl<'d> NewMiningJob<'d> {
/// so that they can implement various advanced use cases such as: translation between Sv1 and Sv2
/// protocols, difficulty aggregation and search space splitting.
///
/// In the Extended Channel scenario, the full coinbase transaction can be constructed as of the
/// following: `extranonce_prefix + extranonce`, which should equal the negotiated extranonce space
/// for the channel [`extranonce_size`].
///
/// In the Group Channel scenario, the full coinbase can then be constructed as the following:
/// [`NewExtendedMiningJob::coinbase_tx_prefix`] + `extranonce_prefix` + `extranonce` +
/// [`NewExtendedMiningJob::coinbase_tx_suffix`].
/// In the Extended Channel scenario, the full coinbase transaction is reconstructed as:
/// - `NewExtendedMiningJob::coinbase_tx_prefix`
/// - `OpenExtendedMiningChannel.Success::extranonce_size`
/// - `SubmitSharesExtended::extranonce`
/// - `NewExtendedMiningJob::coinbase_tx_suffix`
///
/// In the Group Channel scenario, the full coinbase transaction is reconstructed as:
/// - `NewExtendedMiningJob::coinbase_tx_prefix`
/// - `OpenStandardMiningChannel.Success::extranonce_size` (unique per Standard Channel)
/// - `SubmitSharesExtended::extranonce`
/// - `NewExtendedMiningJob::coinbase_tx_suffix`
///
/// [`extranonce_size`]: crate::OpenExtendedMiningChannelSuccess::extranonce_size
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
Expand Down

0 comments on commit bb6a6cd

Please sign in to comment.