SignedSSVMessage isn't very readable and we invoke Decode too much.
GalRogozinski opened this issue · 2 comments
GalRogozinski commented
Currently SignedSSVMessage
wraps SSVMessage
that can orchestrate as either a QBFT message or a Partial Sig Message.
type SSVMessage struct {
MsgType MsgType
MsgID MessageID `ssz-size:"56"`
// Data max size is qbft SignedMessage max ~= 5243144 + 2^20 + 96 + 13 ~= 6291829
Data []byte `ssz-max:"6291829"`
}
This isn't readable and currently causes too many invocations to Decode
...
GalRogozinski commented
Two options:
-
Create two types
SignedQBFTMessage
andSignedPartialSigMessage
.
This would get ugly though when trying to decode the proper message with ssz lib. -
Pass both the Signed wrapper and the inner message. All logic would be done on the inner message, but the final broadcast will be done on the wrapper.
GalRogozinski commented
Currently we solved with option 2 in #440