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

Consumer-side soft opt out #784

Closed
3 of 5 tasks
jtremback opened this issue Mar 15, 2023 · 1 comment · Fixed by #833
Closed
3 of 5 tasks

Consumer-side soft opt out #784

jtremback opened this issue Mar 15, 2023 · 1 comment · Fixed by #833
Assignees
Labels
status: waiting-triage This issue/PR has not yet been triaged by the team. type: protocol-change A protocol change proposal

Comments

@jtremback
Copy link
Contributor

jtremback commented Mar 15, 2023

Protocol Change Proposal

Summary

This specifies a modification to the protocol which allows the bottom x% of the validator set by power to opt out of validating consumer chains without being jailed or otherwise punished for it. Implemented with entirely consumer-side code.

Problem Definition

This mechanism will alleviate a lot of the concerns about RS not being profitable enough for small validators to be able to run many consumer chains, without changing any core assumptions of RS.

Some quick napkin math:

The smallest validator in the Hub active set currently has 36,459 atoms delegated to it. At a 5% commission rate, this validator may make 414 Atoms per year in commission. At $12 per atom, that’s around $5000 per year, or $416 per month. With Cosmos nodes having typical operating expenses of $200-$600 per month, running only one consumer chain could make this small validator unprofitable.

The smallest validator in the top 80% has 1,126,938 atoms staked, for an estimated $155,517.44 in annual commissions, or $12,959.78 per month. Running extra consumer chain nodes with this budget is a very different calculation.

Proposal

In QueueSlashPacket, a calculation needs to be run to determine the validator's position in the set. If the validator is not in the top x% of the set by power, the function should return early.

We also need to add the power threshold (called "x%" above) to the consumer chain params and proposal.

This will result in no downtime jailing packet being sent for small validators. QueueSlashPacket will be run again every block though. We need to establish whether this is a performance concern. If it is, we will need to do something to make it run less often.

Effects

It is important to note that the small validators who are not being slashed will still be present in the validator set of the consumer chain. In other words, we are sacrificing liveness, not safety. The economic security of the consumer chain is the same, but it may be more likely to halt.

If x is set to 10%, and every validator who doesn't have to run the consumer doesn't run it, then it will only take downtime of 23% of the remaining set to halt the chain. This is very likely still OK, but it may manifest in slightly longer downtime during upgrades.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
  • Is a spike necessary to map out how the issue should be approached?
@jtremback jtremback added ccv-core status: waiting-triage This issue/PR has not yet been triaged by the team. type: protocol-change A protocol change proposal labels Mar 15, 2023
@jtremback jtremback mentioned this issue Mar 15, 2023
5 tasks
@mpoke
Copy link
Contributor

mpoke commented Mar 17, 2023

In QueueSlashPacket, a calculation needs to be run to determine the validator's position in the set. If the validator is not in the top x% of the set by power, the function should return early.

That's not that easy as the consumer CCV module doesn't keep track of valsets in previous blocks. As a result, the following scenario may occur:

  • a validator val misbehaves at height h1
  • val is removed from the active consumer valset at height h2 > h1
  • evidence of val's misbehavior on the consumer is submitted at height h3 > h2
  • as a result, the consumer CCV module has no info of val's relative voting power at height h1

@mpoke mpoke mentioned this issue Apr 11, 2023
12 tasks
@shaspitz shaspitz self-assigned this Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-triage This issue/PR has not yet been triaged by the team. type: protocol-change A protocol change proposal
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants