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

Clearing Expired Participation Keys #2738

Closed
rotemh opened this issue Aug 12, 2021 · 9 comments · Fixed by #2924
Closed

Clearing Expired Participation Keys #2738

rotemh opened this issue Aug 12, 2021 · 9 comments · Fixed by #2924
Assignees
Labels
new-feature-request Feature request that needs triage Team Carbon-11

Comments

@rotemh
Copy link
Contributor

rotemh commented Aug 12, 2021

Problem

Currently, if an account marks itself online but the last round has passed, it counts towards the total online stake but the account can't vote. This is considered to be malicious behavior by the protocol and can undermine the protocol's security.

Solution

Design document - https://docs.google.com/document/d/1p5gKHxRpE8Snijyz6Zeo29MOd2WJLiyS6EBDCkFqdJw/edit

Dependencies

No dependencies.

Urgency

See problem

@rotemh rotemh added new-feature-request Feature request that needs triage Team Carbon-11 labels Aug 12, 2021
@tsachizehub
Copy link
Contributor

This issue will be scheduled for the sprint starting on Aug 27

@tolikzinovyev
Copy link
Contributor

Could the protocol make them offline automatically?

@rotemh
Copy link
Contributor Author

rotemh commented Aug 13, 2021

Could the protocol make them offline automatically?

Absolutely and that's the second step in the issue. But auto-removal requires a more complex solution and we need something sooner than later so we broke it into two steps.

@yaovi-a
Copy link
Contributor

yaovi-a commented Aug 27, 2021

Hey team! Please add your planning poker estimate with ZenHub @nicholasguoalgorand @tsachizehub @winder @algobolson

@brianolson
Copy link
Contributor

brianolson commented Aug 27, 2021

Wild thought: make it a bounty to incentivize people. Take from the account being offlined and Sender gets 10*MinFee and gets their Fee (up to 10*MinFee) covered.

@barnjamin
Copy link
Contributor

barnjamin commented Aug 27, 2021

if anyone can create this condition it sounds like potential for a "perverse incentive" if they're rewarded for taking accounts offline

@brianolson
Copy link
Contributor

brianolson commented Aug 27, 2021

@barnjamin not a problem. Someone registers a valid participation key for round 100,000 to 300,000. I can't file the un-register txn until round 300,001. Preferrably they register a new key valid for another bunch of rounds sometime around round 280,000, but if they forget or have a tech glitch we need to clean them up.

@jannotti
Copy link
Contributor

jannotti commented Aug 27, 2021 via email

@barnjamin
Copy link
Contributor

Someone registers a valid participation key for round 100,000 to 300,000

I may still be misunderstanding but when I register I can set the valid rounds to whatever I want right? If I choose a small range like 4 rounds, then submit a txn from another account to take the expired participating one offline and get enough of a reward it may be a profitable strategy. If there is a high minimum number of rounds or only the txn fee was covered it wouldn't be worth it to game

@tsachizehub tsachizehub changed the title Add transaction to take an invalid account offline Clearing Expired Participation Keys Aug 30, 2021
tsachiherman pushed a commit that referenced this issue Oct 7, 2021
## Summary

Resolves #2738

Adds the following:

- consensus.go: Adds the default MaxExpiredAccountsToProcess value for
  the new consensus protocol
- block.go: Adds necessary block header entries
- eval.go: Scans for expired accounts, modifies them to be offline and adds
  validation for this use case
- eval_test.go: Basic unit tests
- participationExpiration_test.go: Added e2e tests that verify that
  different consensus protocols behave differently

## Test Plan

Unit test and e2e tests added
cce pushed a commit to cce/go-algorand that referenced this issue Oct 28, 2021
## Summary

Resolves algorand#2738

Adds the following:

- consensus.go: Adds the default MaxExpiredAccountsToProcess value for
  the new consensus protocol
- block.go: Adds necessary block header entries
- eval.go: Scans for expired accounts, modifies them to be offline and adds
  validation for this use case
- eval_test.go: Basic unit tests
- participationExpiration_test.go: Added e2e tests that verify that
  different consensus protocols behave differently

## Test Plan

Unit test and e2e tests added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature-request Feature request that needs triage Team Carbon-11
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants