-
Notifications
You must be signed in to change notification settings - Fork 22
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
Sort signers in decided message #484
Sort signers in decided message #484
Conversation
ssv/runner_validations.go
Outdated
@@ -50,7 +50,7 @@ func (b *BaseRunner) ValidatePostConsensusMsg(runner Runner, psigMsgs *types.Par | |||
} | |||
|
|||
// TODO https://github.com/ssvlabs/ssv-spec/issues/142 need to fix with this issue solution instead. | |||
if b.State.DecidedValue == nil || len(b.State.DecidedValue) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's from another PR no?
you can resolve when solving conflicts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to the linter update, I have been fixing this lint issue in all the recent PRs so that actions would pass
) | ||
|
||
// SortedDecided tests the creation of the decided message that should have sorted signers | ||
func SortedDecided() tests.SpecTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no output messages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice that ControllerSpecTest.OutputMessages
is unused. For this test, we actually use ControllerSpecTest.RunInstanceData.ExpectedDecidedState.BroadcastedDecided
to test the broadcasted decided message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice that not only does none of the implemented tests define it but the spec test itself doesn't use it.
As I see it, the reason is that the controller spec test wants to test decided values and the decided messages for a list of instances (and not the instance's broadcasted messages).
I think that we should either drop this field or implement it in the tests if wanted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Sort signers in decided message * Add test for sorted signers in decided msg * Generate JSON tests * Fix lint issue
Overview
This PR adds the feature of sorting the signers in the decided message.
It adds a "sorted decided" test to test the sorting upon receiving commit messages in an unsorted order.
Closes #472