Show pending SV2 shares on the dashboard#1735
Open
warioishere wants to merge 3 commits into
Open
Conversation
Collaborator
|
Try to limit comments, they're overly verbose. |
SV2 pools can batch/buffer share acks, leaving submitted shares with no visual feedback until the ack arrives — it looks like they're ignored. Track resolved_shares per connection and derive pending = submitted - resolved (sharesPending in the API, 0 for SV1). The dashboard shows a small "+N pending" badge next to accepted shares that clears once the pool catches up.
2433977 to
1bd08e7
Compare
Contributor
Author
|
Done — dropped the comments from |
mutatrum
reviewed
Jun 3, 2026
| </span> | ||
| <div class="text-900 font-medium text-2xl"> | ||
| {{info.sharesAccepted | number: '1.0-0'}} | ||
| <span *ngIf="(info.sharesPending ?? 0) > 0" class="text-base font-medium text-yellow-500 ml-2" pTooltip="Shares submitted to the pool but not yet acknowledged. The pool may batch acks, so this clears once it catches up." tooltipPosition="top">+{{ info.sharesPending }} pending</span> |
Collaborator
There was a problem hiding this comment.
Drop the '+'. Just the number. It's cleaner.
<justin-timberlake-meme.gif>
mutatrum
reviewed
Jun 3, 2026
| if (len < 0) return -1; | ||
|
|
||
| stratum_v2_record_submit_time(sequence_number); | ||
| stratum_v2_update_pending_shares(GLOBAL_STATE); |
Collaborator
There was a problem hiding this comment.
These two functions can be combined, they're always called together.
…reset - badge shows just the number - record_submit_time + update_pending_shares merged into track_submit - pending no longer reset by hand; derived from the two conn counters (memset zeroes both, then update_pending_shares)
Contributor
Author
|
Pushed a commit addressing all three:
Let me know if that's clean enough. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1728.
On SV2 the pool can batch its share acks, so submitted shares get no feedback until the ack comes in — it looks like they're being ignored. This adds a small "+N pending" badge next to the accepted shares that counts up while shares are waiting and clears once the pool acknowledges them.
Pending is computed in the backend (submitted minus resolved shares, tracked per connection) and exposed as
sharesPendingin the API. SV1 always reports 0, so the badge only shows on SV2 and only if the pool does batch acks shares..Tested on hardware against a live SRI reference pool which batch acks 10 shares..