ssvlabs / ssv-spec

GNU General Public License v3.0
25 stars 22 forks source link

Committee as entry point #493

Open MatheusFranco99 opened 2 months ago

MatheusFranco99 commented 2 months ago

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:

Added tests

[!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 https://github.com/ssvlabs/ssv-spec/issues/451