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 as entry point #493

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

MatheusFranco99
Copy link
Contributor

@MatheusFranco99 MatheusFranco99 commented Aug 28, 2024

Overview

This PR makes the Committee structure the entry point in the SSV module.

Before, we had both Committee and Validator as distinct entry points. Now, Committee holds Validator objects and redirects messages and duty-start events to the appropriate validator object.

Extra changes

As refactoring, this PR also:

  • drops unused attributes of the Validator structure
  • refactors the previous ProcessMessage function existent in Committee and Validator to a unique one to avoid duplicated knowledge

Added tests

  • Unknown duty type
  • Unknown validator for committee
  • Message validation: empty data
  • Message validation: unknown MsgType

Note

For the test case of a message with MessageID that doesn't belong to either the committee or to a validator, we already had the WrongMessageID test. Thus, we simply aligned the error string.

Closes #451

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant