represent share work as u64 (where appropriate)#2138
Draft
plebhash wants to merge 1 commit intostratum-mining:mainfrom
Draft
represent share work as u64 (where appropriate)#2138plebhash wants to merge 1 commit intostratum-mining:mainfrom
u64 (where appropriate)#2138plebhash wants to merge 1 commit intostratum-mining:mainfrom
Conversation
1541fc7 to
767d510
Compare
GitGab19
approved these changes
Apr 24, 2026
Member
Author
|
reverting back to draft, see: #2092 (comment) |
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.
close #2092
companion stratum-mining/sv2-apps#449
for the client side, everything is going to arrive over the wire as
u64, so there's no point in representing work asf64but on the server side, if we truncated every share's work into
u64before it was stored on memory, repeated truncation would cause the accumulated work accounting to drift away from its real value over timeso on the server side, it's sufficient to keep truncation limited to
get_last_batch_work_sum(which is the getter used for craftingSubmitSharesSuccess), while maintaingf64for in-memory representation of work