Conversation
|
@GalRogozinski @y0sher @olegshmuelov @moshe-blox |
|
@MatheusFranco99 I agree with you on this that last option is the best. I think another option exists where we only validate the top message. but then when we call |
|
Is there some overlap with #358 ? |
|
Perhaps, there's overlap but their goals are a bit different. Here the goal is not to verify messages already verified (in proposal construction). In #358 , the goal was to avoid calling SignedSSVmessage.Validate() many times when processing a message |
|
This pull request has been marked as stale due to 60 days of inactivity. |
Drop redundant calls
SignedMessage.Validate()is called multiple times for the same message, as pointed by #326. This PR aims to solve this duplication.The current flow is shown below.
Notice that
isValidProposalcallsvalidRoundChangeForDataandvalidSignedPrepareForHeightRoundAndRootdue to the justification messages.If we want to keep the higher level validation calls we could get the following
The problem is that the
PrepareandRound-Changemessages would still do double validation. And the checks can't be dropped due to theisValidProposalfunction.If we were to keep the lower level calls, we would get
This produces no duplicated calls but, from a design point of view, it's bad to do a light validation check late.
Another option is to change the
Validationfunction to also validate nested messages (which I think is best), as below.Closes #326.