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
@@ -356,17 +356,21 @@ Because it is a common case that shares submission is successful, this response
356
356
| channel_id | U32 | Channel identification |
357
357
| last_sequence_number | U32 | Most recent sequence number with a correct result |
358
358
| new_submits_accepted_count | U32 | Count of new submits acknowledged within this batch |
359
-
| new_shares_sum | U64 | Sum of shares acknowledged within this batch |
359
+
| new_shares_sum | U64 | Sum of difficulty of shares acknowledged within this batch |
360
360
361
361
The server does not have to double check that the sequence numbers sent by a client are actually increasing.
362
362
It can simply use the last one received when sending a response.
363
363
It is the client’s responsibility to keep the sequence numbers correct/useful.
364
364
365
+
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.
368
372
In case the server is not able to immediately validate the submission, the error is sent as soon as the result is known.
369
-
This delayed validation can occur when a miner gets faster updates about a new prevhash than the server does (see `NewPrevHash` message for details).
373
+
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.
389
+
390
+
<imgwidth="800"src="img/submit_shares_error.png">
391
+
384
392
### 5.3.15 `NewMiningJob` (Server -> Client)
385
393
386
394
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