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

feat: Add keeper methods for historacle prices and medians #1548

Merged
merged 33 commits into from
Nov 10, 2022

Conversation

rbajollari
Copy link
Contributor

Description

closes: #1540


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • added appropriate labels to the PR
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@rbajollari rbajollari self-assigned this Nov 4, 2022
@rbajollari rbajollari changed the title Add keeper methods for historacle prices and medians feat: Add keeper methods for historacle prices and medians Nov 4, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2022

Codecov Report

Merging #1548 (fbb76be) into main (acad48b) will increase coverage by 0.59%.
The diff coverage is 75.53%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1548      +/-   ##
==========================================
+ Coverage   51.59%   52.18%   +0.59%     
==========================================
  Files          71       72       +1     
  Lines        6923     7111     +188     
==========================================
+ Hits         3572     3711     +139     
- Misses       3081     3126      +45     
- Partials      270      274       +4     
Impacted Files Coverage Δ
x/oracle/keeper/params.go 60.86% <0.00%> (-29.46%) ⬇️
x/oracle/types/keys.go 42.10% <0.00%> (-57.90%) ⬇️
x/oracle/keeper/historic_price.go 93.81% <93.81%> (ø)
x/oracle/types/params.go 97.40% <94.44%> (-2.60%) ⬇️

@rbajollari rbajollari marked this pull request as ready for review November 7, 2022 20:10
@rbajollari rbajollari requested a review from a team as a code owner November 7, 2022 20:10
Copy link
Collaborator

@adamewozniak adamewozniak left a comment

Choose a reason for hiding this comment

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

initial review - great job @rbajollari !!

Copy link
Member

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

Blocking because:

  • adding historical price is super inefficient (see comment)
  • have concerns about state bloat: how the state will be managed and cleaned?
  • why do we have one big median? Shouldn't we have median per "epoch"?

Is there any spec clarifying the pruning functionality? If not, I can help with that if needed.

rbajollari and others added 15 commits November 7, 2022 19:33
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com>
Co-authored-by: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com>
Co-authored-by: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
@rbajollari rbajollari requested a review from a team as a code owner November 9, 2022 22:10
@adamewozniak adamewozniak mentioned this pull request Nov 9, 2022
17 tasks
Copy link
Collaborator

@adamewozniak adamewozniak left a comment

Choose a reason for hiding this comment

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

this looks good to me, just a few comments.

I'd like to have a review from @zarazan , and maybe @toteki or @RafilxTenfen as well 🙏

rbajollari and others added 6 commits November 9, 2022 19:08
Co-authored-by: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com>
Co-authored-by: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com>
Co-authored-by: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com>
Co-authored-by: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com>
@adamewozniak adamewozniak dismissed robert-zaremba’s stale review November 10, 2022 15:53

dismissing in the interest of time - this lgtm, we still have to figure out how to separate this in the build process (in another PR)

@adamewozniak
Copy link
Collaborator

waiting for a review from @RafilxTenfen to merge 🙏

Copy link
Contributor

@RafilxTenfen RafilxTenfen left a comment

Choose a reason for hiding this comment

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

Just one comment
utACK 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add keeper getters and setters for historacle objects
5 participants