forked from ssvlabs/ssv-spec
/
multi_signers.go
33 lines (30 loc) · 1.11 KB
/
multi_signers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package futuremsg
import (
"github.com/MatheusFranco99/ssv-spec-AleaBFT/qbft"
"github.com/MatheusFranco99/ssv-spec-AleaBFT/types"
"github.com/MatheusFranco99/ssv-spec-AleaBFT/types/testingutils"
"github.com/herumi/bls-eth-go-binary/bls"
)
// MultiSigners tests future msg with multiple signers
func MultiSigners() *ControllerSyncSpecTest {
identifier := types.NewMsgID(testingutils.TestingValidatorPubKey[:], types.BNRoleAttester)
ks := testingutils.Testing4SharesSet()
return &ControllerSyncSpecTest{
Name: "future msgs multiple signers",
InputMessages: []*qbft.SignedMessage{
testingutils.MultiSignQBFTMsg(
[]*bls.SecretKey{ks.Shares[1], ks.Shares[2], ks.Shares[3]},
[]types.OperatorID{1, 2, 3},
&qbft.Message{
MsgType: qbft.PrepareMsgType,
Height: 2,
Round: qbft.FirstRound,
Identifier: identifier[:],
Data: testingutils.CommitDataBytes([]byte{1, 2, 3, 4}),
}),
},
SyncDecidedCalledCnt: 0,
ControllerPostRoot: "6bd17213f8e308190c4ebe49a22ec00c91ffd4c91a5515583391e9977423370f",
ExpectedError: "invalid future msg: allows 1 signer",
}
}