From bb6a6cdb4a76443dd9464cbf534932ad5bd30754 Mon Sep 17 00:00:00 2001 From: jbesraa Date: Fri, 13 Dec 2024 14:19:22 +0200 Subject: [PATCH] Update protocols/v2/subprotocols/mining/src/new_mining_job.rs Co-authored-by: plebhash <147345153+plebhash@users.noreply.github.com> --- .../subprotocols/mining/src/new_mining_job.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/protocols/v2/subprotocols/mining/src/new_mining_job.rs b/protocols/v2/subprotocols/mining/src/new_mining_job.rs index c0e493cda5..c8408a7fd1 100644 --- a/protocols/v2/subprotocols/mining/src/new_mining_job.rs +++ b/protocols/v2/subprotocols/mining/src/new_mining_job.rs @@ -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)]