Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mining] Clear the calculated hash speed at mining start. #966

Merged
merged 1 commit into from
Oct 17, 2021

Conversation

Zannick
Copy link
Collaborator

@Zannick Zannick commented Sep 19, 2021

This avoids having the hash speed affected by a gap in mining
or a change in the number of mining threads, without requiring
users to call setminingalgo on the same algorithm.

This avoids having the hash speed affected by a gap in mining
or a change in the number of mining threads, without requiring
users to call `setminingalgo` on the same algorithm.
@Zannick Zannick added Tag: PoW Related to Proof of Work consensus Component: Miner Both PoW and PoS block creation Tag: Waiting For Code Review Waiting for code review from a core developer labels Sep 19, 2021
@Zannick Zannick self-assigned this Sep 19, 2021
@CaveSpectre11 CaveSpectre11 requested review from WetOne and removed request for blondfrogs September 20, 2021 10:41
@CaveSpectre11 CaveSpectre11 added Code Review: Passed Tag: Waiting For QA A pull review is waiting for QA to test the pull request and removed Tag: Waiting For Code Review Waiting for code review from a core developer labels Sep 25, 2021
Copy link
Collaborator

@CaveSpectre11 CaveSpectre11 left a comment

Choose a reason for hiding this comment

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

utACK 55c60f8

@WetOne
Copy link
Collaborator

WetOne commented Sep 26, 2021

utACK 55c60f8

@seanPhill
Copy link
Collaborator

seanPhill commented Sep 30, 2021

I've got this on startup (after a power outage) on #966 and #967.

On the first one,

dbus[1146]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!

It's a different dbus number on the second one.

Not sure if this happened when I started them up yesterday. (Possibly.)

I don't remember seeing this previously, but I don't see anything relevant to it in the code changes.

... 6-year old post related to Qt, may be relevant. ...
https://interest.qt-project.narkive.com/ysj13dIo/dynamic-session-lookup-supported-but-failed

This does not prevent the Qt wallet starting up, though.

Come to think of it, I think this is unrelated to this PR, so I will put it in a new issue, if I don't find the same already there.

@CaveSpectre11 CaveSpectre11 merged commit 73e8fce into Veil-Project:master Oct 17, 2021
CaveSpectre11 added a commit that referenced this pull request Oct 17, 2021
79102e2 [Mining] Track a recent mining hashrate. (Zannick)

Pull request description:

  ### Issue

  In `getmininginfo`, it isn't clear that it computes the `hashspeed` by counting all hashes made since the start of hashing and dividing by the elapsed time, which tends to smooth out fluctuations but also (prior to #966) can include periods of time when the miner is off or the number of threads different.

  ### Solution

  This adds a field to `getmininginfo` called `hashspeed_recent` which is a sum of each thread's most recent round of hashing (where a round is either a fixed number of hashes or ends with a new block).

  ### Tested

  On regtest chain with sha256d and randomx.

Tree-SHA512: e2d73e32d50ca201c7ac4240c7cfd0a6892b34620cdde9c3b23036810c9dc539d402cacb14f221de99b26ba2738fb412903c932431b4b5ece6cad0a80d0c695b
@Zannick Zannick deleted the mining branch October 22, 2021 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Review: Passed Component: Miner Both PoW and PoS block creation Tag: PoW Related to Proof of Work consensus Tag: Waiting For QA A pull review is waiting for QA to test the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants