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

CNS-137: implement new jailing design #238

Merged
merged 44 commits into from
Feb 6, 2023
Merged

CNS-137: implement new jailing design #238

merged 44 commits into from
Feb 6, 2023

Conversation

oren-lava
Copy link
Collaborator

  • Please check if the PR fulfills these requirements
  • [ V ] Commit message follows the Contribution Guidelines
  • [ V ] Tests ran locally and added/modified if needed
  • [ V ] Docs have been added/updated, if applicable
  • [ V ] If applicable - JIRA ticket ID was added
  • What kind of change does this PR introduce? (Bug fix, feature, unit tests, docs update, ...)
    feature

  • What is the current behavior? (You can also link to an open issue here)
    Every consumer can report a provider as unresponsive. If a provider has enough complaints, he's punished (unstaked).

  • What is the new behavior (if this is a feature change)?
    The problem with the current behavior is that a group of very small consumers could potentially take down a large provider. The new design punishes providers in correlation with the CU they serviced.
    To check whether a provider should be punished (jailed/unstaked), we compare the CU serviced by the provider to the used CU of the complainers (the CU that would have used with this provider, but couldn't since he was unresponsive). Only if the complainers' CU is larger than the provider's serviced CU, the provider gets punished.

  • Please describe what manual tests you ran, if applicable
    I've modified the current unresponsive unit tests and added sort of a stress test to measure the amount of time the check for unresponsive providers (and punishment) takes

  • Other information:

@oren-lava
Copy link
Collaborator Author

Note that the unresponsive stress test is very slow, so we might omit it after we get the timing results (its goal is to test how much time the unresponsive provider check takes, since it happens every epoch)

relayer/lavasession/consumer_session_manager.go Outdated Show resolved Hide resolved
testutil/keeper/keepers_init.go Outdated Show resolved Hide resolved
testutil/keeper/keepers_init.go Outdated Show resolved Hide resolved
x/pairing/keeper/msg_server_relay_payment.go Outdated Show resolved Hide resolved
x/pairing/keeper/msg_server_relay_payment.go Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
@oren-lava oren-lava requested a review from Yaroms January 18, 2023 15:32
x/pairing/keeper/msg_server_relay_payment.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
@oren-lava oren-lava requested a review from Yaroms January 19, 2023 13:17
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
@oren-lava oren-lava requested a review from Yaroms January 19, 2023 14:59
@oren-lava oren-lava changed the title Cns 137 implement CNS-137: implement new jailing design Jan 22, 2023
x/pairing/keeper/msg_server_relay_payment.go Show resolved Hide resolved
x/pairing/keeper/unresponsive_provider.go Outdated Show resolved Hide resolved
@Yaroms Yaroms self-requested a review February 2, 2023 13:29
Yaroms
Yaroms previously approved these changes Feb 2, 2023
Yaroms
Yaroms previously approved these changes Feb 2, 2023
Yaroms
Yaroms previously approved these changes Feb 5, 2023
@omerlavanet omerlavanet merged commit 04793ec into main Feb 6, 2023
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