Skip to content

need to switch ShareAccounting work representation from f64 to u64 on channels_sv2 #2092

@plebhash

Description

@plebhash

when channels_sv2 was originally written, I took some inspiration from Braiins UI, which represents work as floating point numbers

I also remember contemplating the fact that strictly speaking, work is a unit of difficulty, and therefore it can (and should) be tracked as floating point numbers (like rust bitcoin does)

this is specially true when we're operating at diff ranges 0 < diff < 1, where we have no relevant data unless we're working with floating point numbers

but as we noted on #2090 (comment), this was kind of a failed attempt at retaining granular data, because SubmitSharesSuccess.new_shares_sum is U64, which forces everyone to truncate and makes an internal representation based on f64 pretty much useless

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In Progress 🏗️

Status

In Progress 🏗️

Relationships

None yet

Development

No branches or pull requests

Issue actions