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

fix(core/metrics): set target difficulty as single value #4902

Merged

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Nov 7, 2022

Description

base_node::blockchain::target_difficulty_sha and base_node::blockchain::target_difficulty_monero are now single values at any point in time rather than qualified by block height.

Motivation and Context

I was not able to find a way (many months ago) to produce a performant non-timeseries graph that used height as the x-axis. The way I found tended to produce a lot of data on the endpoint side and crash grafana. We used a timeseries graph with an aggregation, producing an average difficulty over a time period. This PR allows for the precise difficulty w.r.t real time which I feel is better.

How Has This Been Tested?

Not tested, code compiles and this is how a lot of metric values work.

@CjS77 CjS77 added the P-acks_required Process - Requires more ACKs or utACKs label Nov 7, 2022
@stringhandler stringhandler merged commit f625f73 into tari-project:development Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants