8000 Index difficulty adjustments by nymkappa · Pull Request #1925 · mempool/mempool · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Index difficulty adjustments #1925

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

Merged
merged 2 commits into from
Jul 5, 2022

Conversation

nymkappa
Copy link
Member
@nymkappa nymkappa commented Jun 25, 2022

Fixes #1924

This PR adds:

  • a new difficulty_adjustments index in the database for Bitcoin networks.
  • a new API endpoint (warm cached) at /api/v1/mining/difficulty-adjustments/:interval -> Returns a JSON array to avoid field name spam in the response
  • fix the rounding issue between the adjustment widget showing -2.35 % and the difficulty adjustment table showing -2.4%

Note: This PR does not fix the resolution issue with the hashrate chart (create very fat API response on testnet). A following PR will fix that.

Self testing

  • ✅ Bitcoin (mainnet / testnet)
  • ✅ Liquid testnet
  • ⁉️ Bisq

@nymkappa nymkappa requested a review from wiz June 25, 2022 09:22
@cla-bot cla-bot bot added the cla-signed label Jun 25, 2022
@nymkappa nymkappa force-pushed the feature/nymkappa/index-difficulty-adjustments branch 3 times, most recently from cb445f8 to 1b9ea7d Compare June 25, 2022 10:14
@nymkappa nymkappa marked this pull request as ready for review June 25, 2022 14:25
@nymkappa nymkappa force-pushed the feature/nymkappa/index-difficulty-adjustments branch from 1b9ea7d to e424567 Compare June 25, 2022 14:32
@nymkappa
Copy link
Member Author

Will conflict with #1940 because the database migration

@nymkappa nymkappa force-pushed the feature/nymkappa/index-difficulty-adjustments branch from 5e1520d to acfdc81 Compare July 5, 2022 14:53
Copy link
Member
@wiz wiz left a comment

Choose a reason for hiding this comment

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

Tested ACK @ v2.4.1-dev [7424c654]

The graphs are different because the javascript floating point noise is now filtered out

@wiz wiz merged commit a74dace into master Jul 5, 2022
@wiz wiz deleted the feature/nymkappa/index-difficulty-adjustments branch July 5, 2022 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Index difficulty adjustment to get rid of that monster query
2 participants
0