ssvlabs / ssv-spec

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

MatchedSigners() does a containment test the wrong way #387

Open GalRogozinski opened 4 months ago

GalRogozinski commented 4 months ago
  1. The comment talks about equality: // MatchedSigners returns true if the provided signer ids are equal to GetOperatorIDs() without order significance. To check equality you need to do two way containment test, not one (maybe there is a util function). But I think the bug is in the comment and not in the logic.
  2. There is a one way containment test, but I think it should be the other way? That is because from func (c *MsgContainer) AddFirstMsgForSignerAndRound I understand we need to check whether all ids are included in msg?

_Originally posted by @GalRogozinski in https://github.com/ssvlabs/ssv-spec/pull/382#discussion_r1570382193_