-
Notifications
You must be signed in to change notification settings - Fork 62
Oracle Outlier Detection Refactor #1107
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
base: develop
Are you sure you want to change the base?
Conversation
b26a2ed to
51be2da
Compare
| // Stop considering this reporter for any future calculation. | ||
| // This is symbol independant. | ||
| voterInfo[_outlier].reportAvailable = false; | ||
| voterInfo[_outlier].performance = 0; |
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.
This doesn't make much sense to me. We are already withholding their performance increment for this report on line 614.
This change would mean that when a report is an outlier for a single symbol, we remove their rewards for all symbols, which doesn't seem fair.
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.
I kinda agree but I think it also relates to both fairness and consistency issue #1110. Right now it seems to me inconsistent when the outlier is rewarded but also getting slashed.
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.
I agree that the current implementation is dependent on symbol order, and this would at least set rewards to zero regardless of the symbol order, however, I do think that the eventual correct implementation will be to only withhold rewards for symbols where the oracle was an outlier, rather than withhold rewards for all reports in the round where an oracle posted at least one outlier report.
I don't think we are moving forward with merging this PR at the moment, so I'm not requesting changes now, but I do think it's interesting to keep these options in the discussion.
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.
I do think that the eventual correct implementation will be to only withhold rewards for symbols where the oracle was an outlier, rather than withhold rewards for all reports in the round where an oracle posted at least one outlier report.
Yeah I kinda agree.
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.
Removed this line. Now outliers can get rewards.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## oracle-no-reveal-penalty #1107 +/- ##
============================================================
- Coverage 74.98% 74.91% -0.06%
============================================================
Files 30 30
Lines 4644 4644
============================================================
- Hits 3482 3479 -3
- Misses 857 858 +1
- Partials 305 307 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
51be2da to
8519476
Compare
8519476 to
a813705
Compare
a813705 to
c72c86a
Compare
1459ba5 to
3a2e46e
Compare
c72c86a to
359587a
Compare
67b21a3 to
a9156b4
Compare
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.
The overall looks good to me, just left two questions on the failure of the remove() function.
| address _voter = penalizedVoters.at(0); | ||
| // don't consider past reports from the penalized voters | ||
| voterInfo[_voter].reportAvailable = false; | ||
| require(penalizedVoters.remove(_voter), "voter not removed"); |
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.
Just curious, if this remove() returns false, the finalize of the block will be failed, leading a chain on-holding. When will the remove() be failed?
| address _voter = outliers.at(0); | ||
| // don't consider past reports from the outliers | ||
| voterInfo[_voter].reportAvailable = false; | ||
| require(outliers.remove(_voter), "voter not removed"); |
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.
Same question here.
861bbde to
ea110a2
Compare
d5acce6 to
2d9af1f
Compare
Outlier detection process is refactored so that
closes #1110, closes #1121
Consensus breaking with piccadilly testnet