You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it's not clear what the `new_shares_sum` field of `SubmitShares.Success` really means
after reaching out to @jakubtrnka , he described the following:
> `new_submits_accepted_count` is number of submits.
> `new_shares_sum` is "integral" over difficulty of work to be confirmed by this success msg
this commit clarifies both `SubmitShares.Success` and `SubmitShares.Error` with detailed descriptions and new visual diagrams.
Copy file name to clipboardExpand all lines: 05-Mining-Protocol.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -359,17 +359,21 @@ Because it is a common case that shares submission is successful, this response
359
359
| channel_id | U32 | Channel identification |
360
360
| last_sequence_number | U32 | Most recent sequence number with a correct result |
361
361
| new_submits_accepted_count | U32 | Count of new submits acknowledged within this batch |
362
-
| new_shares_sum | U64 | Sum of shares acknowledged within this batch |
362
+
| new_shares_sum | U64 | Sum of difficulty of shares acknowledged within this batch |
363
363
364
364
The server does not have to double check that the sequence numbers sent by a client are actually increasing.
365
365
It can simply use the last one received when sending a response.
366
366
It is the client’s responsibility to keep the sequence numbers correct/useful.
367
367
368
+
The illustration below assumes a mining server that acknowledges every 10 successful submissions, and that a `SetTarget` message was sent to increase the difficulty from `Da` to `Db` in the middle of the batch submission.
An error is immediately submitted for every incorrect submit attempt.
371
375
In case the server is not able to immediately validate the submission, the error is sent as soon as the result is known.
372
-
This delayed validation can occur when a miner gets faster updates about a new prevhash than the server does (see `NewPrevHash` message for details).
376
+
This delayed validation can occur when a miner gets faster updates about a new prevhash than the server does (see `SetNewPrevHash` message for details).
The illustration below also assumes a mining server that acknowledges every 10 successful submissions.
392
+
393
+
<imgwidth="800"src="img/submit_shares_error.png">
394
+
387
395
### 5.3.15 `NewMiningJob` (Server -> Client)
388
396
389
397
The server provides an updated mining job to the client through a standard channel. This MUST be the first message after the channel has been successfully opened. This first message will have min_ntime unset (future job).
0 commit comments