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

Drop redundant validation for decided messages #476

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions qbft/decided.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,10 @@ func ValidateDecided(
return errors.New("not a decided msg")
}

if err := msg.Validate(); err != nil {
return errors.Wrap(err, "invalid decided msg")
}

if err := baseCommitValidationVerifySignature(msg, msg.QBFTMessage.Height, share.Committee); err != nil {
return errors.Wrap(err, "invalid decided msg")
}

if err := msg.Validate(); err != nil {
return errors.Wrap(err, "invalid decided")
}

r, err := HashDataRoot(msg.SignedMessage.FullData)
if err != nil {
return errors.Wrap(err, "could not hash input data")
Expand Down
2 changes: 1 addition & 1 deletion qbft/spectest/generate/tests.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ func DuplicateSigners() tests.SpecTest {
},
},
},
ExpectedError: "invalid decided msg: invalid decided msg: invalid SignedSSVMessage: non unique signer",
ExpectedError: "invalid decided msg: invalid decided msg: signed commit invalid: invalid SignedSSVMessage: non unique signer",
}
}