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(osmomath): replace Power with PowerInteger #3712

Merged
merged 5 commits into from
Dec 14, 2022
Merged

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Dec 14, 2022

Progress towards: #3540

What is the purpose of the change

I missed the existence of Power when adding PowerInteger. As a result, these functions are identical.

I propose removing the old Power and replace all calls with PowerInteger since I am adding a new Power function that takes a decimal exponent.

Note:

  • The removed Power is identical with PowerInteger
  • The existing PowerInteger tests include and cover all removed test cases.

@p0mvn p0mvn added V:state/breaking State machine breaking PR F: geometric-twap labels Dec 14, 2022
@ValarDragon
Copy link
Member

This LGTM, but it should be state compatible and backportable?

@p0mvn
Copy link
Member Author

p0mvn commented Dec 14, 2022

This LGTM, but it should be state compatible and backportable?

Agreed. Sorry I confused it with this Pow that is used in cfmm and erred on the side of caution:

func Pow(base sdk.Dec, exp sdk.Dec) sdk.Dec {

@p0mvn p0mvn added V:state/compatible/backport State machine compatible PR, should be backported A:backport/v13.x backport patches to v13.x branch and removed V:state/breaking State machine breaking PR labels Dec 14, 2022
@p0mvn
Copy link
Member Author

p0mvn commented Dec 14, 2022

Labels are now changed

Copy link
Member

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

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

LGTM!

@p0mvn p0mvn merged commit 5df8cd0 into main Dec 14, 2022
@p0mvn p0mvn deleted the roman/remove-power branch December 14, 2022 19:32
mergify bot pushed a commit that referenced this pull request Dec 14, 2022
* refactor(osmomath): replace Power with PowerInteger

* changelog

* changelog 2

(cherry picked from commit 5df8cd0)

# Conflicts:
#	CHANGELOG.md
p0mvn added a commit that referenced this pull request Dec 14, 2022
…3727)

* refactor(osmomath): replace Power with PowerInteger (backport #3712)

* Update CHANGELOG.md

Co-authored-by: Roman <[email protected]>
@github-actions github-actions bot mentioned this pull request Apr 1, 2024
@github-actions github-actions bot mentioned this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v13.x backport patches to v13.x branch F: geometric-twap V:state/compatible/backport State machine compatible PR, should be backported
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants