Skip to content
Open
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 p2p/validation/msg_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,9 @@ func validateConsensusMsg(runner ssv.Runner, signedMsg *types.SignedSSVMessage)
/**
Main controller processing flow
_______________________________
All decided msgs are processed the same, out of instance
All valid future msgs are saved in a container and can trigger highest decided futuremsg
All other msgs (not future or decided) are processed normally by an existing instance (if found)
*/
isDecided, err := qbft.IsDecidedMsg(contr.CommitteeMember, msg)
if err != nil {
return err
}
if isDecided {
return qbft.ValidateDecided(contr.GetConfig(), msg, contr.CommitteeMember)
}

if msg.QBFTMessage.Height > contr.Height {
return validateFutureMsg(contr.GetConfig(), signedMsg, contr.CommitteeMember)
Expand Down
17 changes: 0 additions & 17 deletions qbft/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,23 +137,6 @@ func baseCommitValidationIgnoreSignature(
return nil
}

func baseCommitValidationVerifySignature(
msg *ProcessingMessage,
height Height,
operators []*types.Operator) error {

if err := baseCommitValidationIgnoreSignature(msg, height, operators); err != nil {
return err
}

// verify signature
if err := types.Verify(msg.SignedMessage, operators); err != nil {
return errors.Wrap(err, "msg signature invalid")
}

return nil
}

func validateCommit(
msg *ProcessingMessage,
height Height,
Expand Down
21 changes: 0 additions & 21 deletions qbft/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,9 @@ func (c *Controller) ProcessMsg(signedMessage *types.SignedSSVMessage) (*types.S
/**
Main controller processing flow
_______________________________
All decided msgs are processed the same, out of instance
All valid future msgs are saved in a container and can trigger highest decided futuremsg
All other msgs (not future or decided) are processed normally by an existing instance (if found)
*/
isDecided, err := IsDecidedMsg(c.CommitteeMember, msg)
if err != nil {
return nil, err
}
if isDecided {
return c.UponDecided(msg)
}

isFuture, err := c.isFutureMessage(msg)
if err != nil {
Expand Down Expand Up @@ -120,10 +112,6 @@ func (c *Controller) UponExistingInstanceMsg(msg *ProcessingMessage) (*types.Sig
return nil, nil
}

if err := c.broadcastDecided(decidedMsg); err != nil {
// no need to fail processing instance deciding if failed to save/ broadcast
fmt.Printf("%s\n", err.Error())
}
return decidedMsg, nil
}

Expand Down Expand Up @@ -169,15 +157,6 @@ func (c *Controller) forceStopAllInstanceExceptCurrent() {
}
}

func (c *Controller) broadcastDecided(aggregatedCommit *types.SignedSSVMessage) error {

if err := c.GetConfig().GetNetwork().Broadcast(aggregatedCommit.SSVMessage.GetID(), aggregatedCommit); err != nil {
// We do not return error here, just Log broadcasting error.
return errors.Wrap(err, "could not broadcast decided")
}
return nil
}

func (c *Controller) GetConfig() IConfig {
return c.config
}
96 changes: 0 additions & 96 deletions qbft/decided.go

This file was deleted.

22 changes: 0 additions & 22 deletions qbft/spectest/all_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,9 @@ var AllTests = []tests.TestF{
timeout.Round5,
timeout.Round15,

decided.Valid,
decided.HasQuorum,
decided.LateDecided,
decided.LateDecidedBiggerQuorum,
decided.LateDecidedSmallerQuorum,
decided.NoQuorum,
decided.DuplicateMsg,
decided.DuplicateSigners,
decided.Invalid,
decided.InvalidFullData,
decided.InvalidValCheckData,
decided.PastInstance,
decided.UnknownSigner,
decided.WrongMsgType,
decided.WrongSignature,
decided.MultiDecidedInstances,
decided.FutureInstance,
decided.CurrentInstance,
decided.CurrentInstancePastRound,
decided.CurrentInstanceFutureRound,

processmsg.MsgError,
processmsg.BroadcastedDecided,
processmsg.SingleConsensusMsg,
processmsg.FullDecided,
processmsg.InvalidIdentifier,
Expand All @@ -71,7 +51,6 @@ var AllTests = []tests.TestF{
startinstance.Valid,
startinstance.EmptyValue,
startinstance.NilValue,
startinstance.PostFutureDecided,
startinstance.FirstHeight,
startinstance.PreviousDecided,
startinstance.PreviousNotDecided,
Expand Down Expand Up @@ -195,7 +174,6 @@ var AllTests = []tests.TestF{
commit.NoCommitQuorum,
commit.ForceStop,
commit.PostCutoff,
commit.SortedDecided,

roundchange.HappyFlow,
roundchange.WrongHeight,
Expand Down
Loading