Skip to content

add stable_hashrate flag to channels_sv2::server#2152

Open
plebhash wants to merge 1 commit into
stratum-mining:mainfrom
plebhash:2026-05-12-stable-hashrate-bool
Open

add stable_hashrate flag to channels_sv2::server#2152
plebhash wants to merge 1 commit into
stratum-mining:mainfrom
plebhash:2026-05-12-stable-hashrate-bool

Conversation

@plebhash
Copy link
Copy Markdown
Member

@plebhash plebhash commented May 12, 2026

@plebhash plebhash force-pushed the 2026-05-12-stable-hashrate-bool branch from 793b918 to 782ef9a Compare May 12, 2026 21:00
@plebhash plebhash changed the title add stable_hashrate flag to channels_sv2 add stable_hashrate flag to channels_sv2::server May 12, 2026
@plebhash plebhash force-pushed the 2026-05-12-stable-hashrate-bool branch from 782ef9a to 9edcc5f Compare May 12, 2026 21:41
@plebhash plebhash marked this pull request as ready for review May 12, 2026 21:51
Copy link
Copy Markdown
Member

@GitGab19 GitGab19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed we need to add the new stable_hashrate field in the channels docs.

Comment thread sv2/channels-sv2/src/server/extended.rs
Comment thread sv2/channels-sv2/src/server/standard.rs
@plebhash plebhash force-pushed the 2026-05-12-stable-hashrate-bool branch from 9edcc5f to b703546 Compare May 13, 2026 11:57
@plebhash plebhash force-pushed the 2026-05-12-stable-hashrate-bool branch from b703546 to 3da394f Compare May 13, 2026 21:42
Copy link
Copy Markdown
Member

@Shourya742 Shourya742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some other thoughts on the implementation here. I don't think stable_hashrate is the right abstraction to represent vardiff stability. I think associating an Instant with the nominal hashrate would be a better way to convey the idea. For example, it could show how long the current hashrate has remained stable, something like “stable since xx minutes.”

It should also be very easy to track through the update_channel method, where we already update the nominal hashrate, without requiring any additional changes related to stability tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

channels_sv2::server should expose whether vardiff has converged (via stable_hashrate: bool statevar)

3 participants