-
Notifications
You must be signed in to change notification settings - Fork 267
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
Adding min and max ranges to check the value provided by the Oracle's #2922
base: master
Are you sure you want to change the base?
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! I have a few comments though, let me know what you think.
rskj-core/src/main/java/co/rsk/config/mining/StableMinGasPriceSystemConfig.java
Outdated
Show resolved
Hide resolved
rskj-core/src/main/java/co/rsk/mine/gas/provider/StableMinGasPriceProvider.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for have followed the suggestions. 🙂
LGTM! |
Description
This pull request introduces a configurable valid range (minValidPrice and maxValidPrice) for the BTC price retrieved from the oracle. The system will validate the price against this range before updating it. If the price is outside the range, it will not be updated, and a warning will be logged.
Motivation and Context
The motivation behind this change is to improve the robustness of the system by preventing updates with incorrect or extreme BTC prices. By enforcing a valid range, we can ensure that only reliable and expected values are used, minimizing potential risks and maintaining system integrity.
How Has This Been Tested?
Types of changes
Checklist: