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

Committee semantics are not well defined #1861

Open
anatolie-ssv opened this issue Nov 20, 2024 · 0 comments
Open

Committee semantics are not well defined #1861

anatolie-ssv opened this issue Nov 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@anatolie-ssv
Copy link
Contributor

Currently the committee object sits in protocol/v2/ssv/validator and all of its following methods

  • StartConsumeQueue
  • StartDuty
  • PushToQueue
  • ProcessMessage

are called from protocol/v2/ssv/validator.

However the methods that change its state

  • AddShare
  • RemoveShare

are called exclusively from operator/validator, where the committee object sits in the validators map under the committee ID key.

This raises a few concerns:

  • add/remove share methods are public, so they can be called from any other place where we have a reference to the committee, while semantically it only makes sense to call them from the validators map. This is further stressed by the fact that the action of removing the last share of the committee automatically triggers its termination.
  • Once a committee is "terminated" there's no reason to allow calls to any its methods, a guarding mechanism should be in place to prevent that.

This PR #1760 takes care of interlocking the committee removal from the validators map, but doesn't account for overarching concerns mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant