Skip to content

fix(oracle): power vote calculation#1852

Merged
robert-zaremba merged 14 commits intomainfrom
robert/fix-power-calc
Feb 20, 2023
Merged

fix(oracle): power vote calculation#1852
robert-zaremba merged 14 commits intomainfrom
robert/fix-power-calc

Conversation

@robert-zaremba
Copy link
Copy Markdown
Contributor

Description

Fixes power vote calculation in the oracle end blocker.
#1845 partially handles that, but in fact introduces a bug.

@robert-zaremba robert-zaremba added T:Bug A regression or bug in the Umee codebase. C:x/oracle labels Feb 18, 2023
@robert-zaremba robert-zaremba marked this pull request as ready for review February 20, 2023 21:03
@robert-zaremba robert-zaremba requested a review from a team as a code owner February 20, 2023 21:03
Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@toteki toteki left a comment

Choose a reason for hiding this comment

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

Pushed some changes:

  • fix simulations
  • updates some comments
  • combine two for loops with identical iterations

Looks good from my side as soon as test pass - might want to wait for another review from woz before resolving the final conversation

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 20, 2023

Codecov Report

Merging #1852 (befb8c2) into main (9ba9310) will decrease coverage by 0.04%.
The diff coverage is 77.77%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1852      +/-   ##
==========================================
- Coverage   56.95%   56.91%   -0.04%     
==========================================
  Files          93       93              
  Lines        8797     8803       +6     
==========================================
  Hits         5010     5010              
- Misses       3422     3428       +6     
  Partials      365      365              
Impacted Files Coverage Δ
x/oracle/keeper/params.go 71.92% <0.00%> (-8.47%) ⬇️
x/oracle/abci.go 83.01% <100.00%> (-0.16%) ⬇️
x/oracle/keeper/ballot.go 100.00% <100.00%> (ø)
x/oracle/types/params.go 100.00% <100.00%> (ø)

@robert-zaremba robert-zaremba added this pull request to the merge queue Feb 20, 2023
@robert-zaremba robert-zaremba removed this pull request from the merge queue due to a manual request Feb 20, 2023
@robert-zaremba robert-zaremba added this pull request to the merge queue Feb 20, 2023
Merged via the queue into main with commit 76fc6f1 Feb 20, 2023
@robert-zaremba robert-zaremba deleted the robert/fix-power-calc branch February 20, 2023 23:56
mergify bot pushed a commit that referenced this pull request Feb 20, 2023
* fix(oracle): power vote calculation

* finish test

* oracle: add SetVoteThreshold method

* more VoteThreshold tests

* lint

* cleanup

* Update x/oracle/types/params.go

Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>

* comment changes only (review)

* combine loops

* fix simulations

* fix error test

* fix sims?

* review

---------

Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
(cherry picked from commit 76fc6f1)
robert-zaremba added a commit that referenced this pull request Feb 21, 2023
* fix(oracle): power vote calculation

* finish test

* oracle: add SetVoteThreshold method

* more VoteThreshold tests

* lint

* cleanup

* Update x/oracle/types/params.go

Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>

* comment changes only (review)

* combine loops

* fix simulations

* fix error test

* fix sims?

* review

---------

Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
(cherry picked from commit 76fc6f1)

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C:x/oracle S:backport/v4.1.x T:Bug A regression or bug in the Umee codebase.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants