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: use LegacyDec for reward tracking and selector commission rates #441

Merged
merged 15 commits into from
Nov 22, 2024

Conversation

danflo27
Copy link
Contributor

No description provided.

commission := k.TruncateUint(commissionDec)

// selector's commission = reporter's commission rate * reward
commission := reward.Mul(reporter.CommissionRate)
Copy link
Contributor Author

@danflo27 danflo27 Nov 21, 2024

Choose a reason for hiding this comment

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

Should this commission decimal be truncated before it gets used for more operations ?

Copy link
Contributor

Choose a reason for hiding this comment

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

if you're asking because of consistency, maybe this shouldn't be truncated, delegatorShare = delegatorShare.TruncateDec(),

Copy link
Contributor

@akremstudy akremstudy left a comment

Choose a reason for hiding this comment

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

some remnants from math.NewUint

@danflo27 danflo27 marked this pull request as draft November 21, 2024 20:34
@danflo27 danflo27 marked this pull request as ready for review November 21, 2024 21:29
Copy link
Contributor

@akremstudy akremstudy left a comment

Choose a reason for hiding this comment

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

thanks @danflo27

@tkernell tkernell merged commit 49238bb into main Nov 22, 2024
7 checks passed
@tkernell tkernell deleted the standardize-decimals branch November 22, 2024 18:36
Copy link
Contributor

The backport to release/v1.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/v1.x release/v1.x
# Navigate to the new working tree
cd .worktrees/backport-release/v1.x
# Create a new branch
git switch --create backport-441-to-release/v1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 49238bb36802c3c2962562530cf9972cbdab9ac0
# Push it to GitHub
git push --set-upstream origin backport-441-to-release/v1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/v1.x

Then, create a pull request where the base branch is release/v1.x and the compare/head branch is backport-441-to-release/v1.x.

Copy link
Contributor

The backport to release/v1.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/v1.x release/v1.x
# Navigate to the new working tree
cd .worktrees/backport-release/v1.x
# Create a new branch
git switch --create backport-441-to-release/v1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 49238bb36802c3c2962562530cf9972cbdab9ac0
# Push it to GitHub
git push --set-upstream origin backport-441-to-release/v1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/v1.x

Then, create a pull request where the base branch is release/v1.x and the compare/head branch is backport-441-to-release/v1.x.

Copy link
Contributor

The backport to release/v1.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/v1.x release/v1.x
# Navigate to the new working tree
cd .worktrees/backport-release/v1.x
# Create a new branch
git switch --create backport-441-to-release/v1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 49238bb36802c3c2962562530cf9972cbdab9ac0
# Push it to GitHub
git push --set-upstream origin backport-441-to-release/v1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/v1.x

Then, create a pull request where the base branch is release/v1.x and the compare/head branch is backport-441-to-release/v1.x.

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.

3 participants