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

refactor: Update historic medians query #1651

Merged
merged 16 commits into from
Dec 15, 2022
Merged

Conversation

rbajollari
Copy link
Contributor


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 Dec 9, 2022
@rbajollari rbajollari marked this pull request as ready for review December 9, 2022 00:36
@rbajollari rbajollari requested review from a team as code owners December 9, 2022 00:36
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.

Where and why there was a decision to expose the aggregate methods outside? These can be expensive and should not be exposed by default.

proto/umee/oracle/v1/query.proto Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2022

Codecov Report

Merging #1651 (3e198b4) into main (2782a97) will increase coverage by 0.04%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1651      +/-   ##
==========================================
+ Coverage   55.29%   55.34%   +0.04%     
==========================================
  Files          73       73              
  Lines        7503     7511       +8     
==========================================
+ Hits         4149     4157       +8     
+ Misses       3034     3033       -1     
- Partials      320      321       +1     
Impacted Files Coverage Δ
x/oracle/keeper/grpc_query.go 92.38% <80.00%> (-1.27%) ⬇️
x/oracle/keeper/params.go 80.39% <0.00%> (+5.88%) ⬆️

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 lgtm! we should rename the title of this PR though

x/oracle/keeper/grpc_query.go Outdated Show resolved Hide resolved
@rbajollari rbajollari changed the title feat: Add queries for new historacle methods feat: Update historic medians query Dec 10, 2022
@rbajollari rbajollari changed the title feat: Update historic medians query refactor: Update historic medians query Dec 10, 2022
rbajollari and others added 2 commits December 9, 2022 20:32
Co-authored-by: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com>
Copy link
Collaborator

@gsk967 gsk967 left a comment

Choose a reason for hiding this comment

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

Can you add min or max limit for numStamps params , and can do make proto-all

Copy link
Collaborator

@gsk967 gsk967 left a comment

Choose a reason for hiding this comment

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

LGTM

@adamewozniak
Copy link
Collaborator

@robert-zaremba please re-review

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.

  • regenerate proto based on updated types
  • in ValidateBasic check that numStamps > 0 and add a test

proto/umee/oracle/v1/query.proto Outdated Show resolved Hide resolved
proto/umee/oracle/v1/query.proto Outdated Show resolved Hide resolved
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.

Clicked too quickly, see my previous review.

x/oracle/abci_test.go Show resolved Hide resolved
x/oracle/keeper/grpc_query.go Outdated Show resolved Hide resolved
x/oracle/keeper/grpc_query_test.go Outdated Show resolved Hide resolved
@adamewozniak
Copy link
Collaborator

cc @rbajollari

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
@adamewozniak
Copy link
Collaborator

@robert-zaremba is there any reason to block this? let's get this merged in

@robert-zaremba
Copy link
Member

@adamewozniak yes, see my review. Especially the first one. Few important things were missing. going to do second review now.

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.

utACK

@rbajollari rbajollari merged commit 58a49b6 into main Dec 15, 2022
@rbajollari rbajollari deleted the ryan/historacle-grpc-query branch December 15, 2022 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants