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

Spike: Only opted-in validators should get consumer rewards #1588

Closed
Tracked by #853
insumity opened this issue Jan 23, 2024 · 3 comments · Fixed by #1632
Closed
Tracked by #853

Spike: Only opted-in validators should get consumer rewards #1588

insumity opened this issue Jan 23, 2024 · 3 comments · Fixed by #1632
Assignees
Labels
C:x/provider Assigned automatically by the PR labeler S: NewThings Work towards your business objectives with new products, features, or integrations

Comments

@insumity
Copy link
Contributor

Problem

Currently, all validators share the rewards sent over from consumer chains. While moving to Partial Set Security, only opted in (and Top N) validators should get consumer rewards.

What happens today is that all rewards are sent to the same pool and the rewards are automatically distributed to validators and delegators through the distribution module. We cannot reuse the same pool here because the way distribution works, all validators would get rewards this way.

Closing criteria

This is a spike issue. No implementation is necessary. We want to investigate how we can distribute rewards only to opted in (and Top N) validators. Investigation on this can include:

  • Should we create multiple pools (one for each consumer chain)?
  • Can we replicate the code of AllocateTokens and use it here instead of sending all the rewards to the same pool?
@insumity insumity added C:x/provider Assigned automatically by the PR labeler S: NewThings Work towards your business objectives with new products, features, or integrations labels Jan 23, 2024
@jtremback
Copy link
Contributor

Seems like AllocateTokensToValidator is the function to use- are there any issues with it?

@insumity
Copy link
Contributor Author

insumity commented Jan 24, 2024

Seems like AllocateTokensToValidator is the function to use- are there any issues with it?

@jtremback the final solution is not yet clear to us. But AllocateTokensToValidator has a tokens sdk.DecCoins parameter so we need a way to estimate the exact tokens per validator to distribute the rewards. This is why we suggest to use AllocateTokens instead that also takes into account the community tax and the powers per validator. It would seem that if we were to use AllocateTokensToValidator we would still need to reuse chunks from AllocateTokens.

@jtremback
Copy link
Contributor

Notes from discussion:

  • We need to keep the denom whitelist to avoid DOS
  • Perhaps we can add a feature to the permissioned-lite consumer chain addition proposal to add denoms automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/provider Assigned automatically by the PR labeler S: NewThings Work towards your business objectives with new products, features, or integrations
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants