forked from ssvlabs/ssv-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unknown_signer.go
31 lines (28 loc) · 1.12 KB
/
unknown_signer.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
package vcbcrequest
import (
"github.com/MatheusFranco99/ssv-spec-AleaBFT/alea"
"github.com/MatheusFranco99/ssv-spec-AleaBFT/alea/spectest/tests"
"github.com/MatheusFranco99/ssv-spec-AleaBFT/types"
"github.com/MatheusFranco99/ssv-spec-AleaBFT/types/testingutils"
)
// UnknownSigner tests a single proposal received with an unknown signer
func UnknownSigner() *tests.MsgProcessingSpecTest {
pre := testingutils.BaseInstanceAlea()
msgs := []*alea.SignedMessage{
testingutils.SignAleaMsg(testingutils.Testing4SharesSet().Shares[2], types.OperatorID(5), &alea.Message{
MsgType: alea.VCBCRequestMsgType,
Height: alea.FirstHeight,
Round: alea.FirstRound,
Identifier: []byte{1, 2, 3, 4},
Data: testingutils.VCBCRequestDataBytes(alea.FirstPriority, types.OperatorID(1)),
}),
}
return &tests.MsgProcessingSpecTest{
Name: "vcbcrequest unknown proposal signer",
Pre: pre,
PostRoot: "d0669999d2f4f17dd4888e9602362eb73a7c961e8090c5e5ea2e5e6d5608e9cd",
InputMessages: msgs,
ExpectedError: "invalid signed message: msg signature invalid: unknown signer",
DontRunAC: true,
}
}