-
Notifications
You must be signed in to change notification settings - Fork 20
/
valid_msg_13_operators.go
117 lines (113 loc) · 4.86 KB
/
valid_msg_13_operators.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
package postconsensus
import (
"github.com/attestantio/go-eth2-client/spec"
"github.com/bloxapp/ssv-spec/qbft"
"github.com/bloxapp/ssv-spec/ssv/spectest/tests"
"github.com/bloxapp/ssv-spec/types"
"github.com/bloxapp/ssv-spec/types/testingutils"
)
// ValidMessage13Operators tests a valid SignedPartialSignatureMessage with multi PartialSignatureMessages with 13 operators
func ValidMessage13Operators() tests.SpecTest {
ks := testingutils.Testing13SharesSet()
return &tests.MultiMsgProcessingSpecTest{
Name: "post consensus valid msg 13 operators",
Tests: []*tests.MsgProcessingSpecTest{
{
Name: "sync committee contribution",
Runner: decideRunner(
testingutils.SyncCommitteeContributionRunner(ks),
&testingutils.TestingSyncCommitteeContributionDuty,
testingutils.TestSyncCommitteeContributionConsensusData,
),
Duty: &testingutils.TestingSyncCommitteeContributionDuty,
Messages: []*types.SignedSSVMessage{
testingutils.SignedSSVMessageF(ks, testingutils.SSVMsgSyncCommitteeContribution(nil, testingutils.PostConsensusSyncCommitteeContributionMsg(ks.Shares[1], 1, ks))),
},
PostDutyRunnerStateRoot: "045ed0f984b289847b9ee86e2ca28fbdb0e3f6a50597f8bd92e343ab788dc83e",
OutputMessages: []*types.SignedPartialSignatureMessage{},
BeaconBroadcastedRoots: []string{},
DontStartDuty: true,
},
{
Name: "sync committee",
Runner: decideRunner(
testingutils.SyncCommitteeRunner(ks),
&testingutils.TestingSyncCommitteeDuty,
testingutils.TestSyncCommitteeConsensusData,
),
Duty: &testingutils.TestingSyncCommitteeDuty,
Messages: []*types.SignedSSVMessage{
testingutils.SignedSSVMessageF(ks, testingutils.SSVMsgSyncCommittee(nil, testingutils.PostConsensusSyncCommitteeMsg(ks.Shares[1], 1))),
},
PostDutyRunnerStateRoot: "e6800898773738082f1ad6c3c4e668741d6628a5788f3ccfb31215d99412ef44",
OutputMessages: []*types.SignedPartialSignatureMessage{},
BeaconBroadcastedRoots: []string{},
DontStartDuty: true,
},
{
Name: "proposer",
Runner: decideRunner(
testingutils.ProposerRunner(ks),
testingutils.TestingProposerDutyV(spec.DataVersionDeneb),
testingutils.TestProposerConsensusDataV(spec.DataVersionDeneb),
),
Duty: testingutils.TestingProposerDutyV(spec.DataVersionDeneb),
Messages: []*types.SignedSSVMessage{
testingutils.SignedSSVMessageF(ks, testingutils.SSVMsgProposer(nil, testingutils.PostConsensusProposerMsgV(ks.Shares[1], 1, spec.DataVersionDeneb))),
},
PostDutyRunnerStateRoot: "f035ec1e3045ba24c8c3ea1c5f2228ba23b19d7a5f95c04fbd205e85478417e4",
OutputMessages: []*types.SignedPartialSignatureMessage{},
BeaconBroadcastedRoots: []string{},
DontStartDuty: true,
},
{
Name: "proposer (blinded block)",
Runner: decideRunner(
testingutils.ProposerBlindedBlockRunner(ks),
testingutils.TestingProposerDutyV(spec.DataVersionDeneb),
testingutils.TestProposerBlindedBlockConsensusDataV(spec.DataVersionDeneb),
),
Duty: testingutils.TestingProposerDutyV(spec.DataVersionDeneb),
Messages: []*types.SignedSSVMessage{
testingutils.SignedSSVMessageF(ks, testingutils.SSVMsgProposer(nil, testingutils.PostConsensusProposerMsgV(ks.Shares[1], 1, spec.DataVersionDeneb))),
},
PostDutyRunnerStateRoot: "686b5a81c0dcec575a56b19af1e57353844fe0e509afad29debf0a618ce407bb",
OutputMessages: []*types.SignedPartialSignatureMessage{},
BeaconBroadcastedRoots: []string{},
DontStartDuty: true,
},
{
Name: "aggregator",
Runner: decideRunner(
testingutils.AggregatorRunner(ks),
&testingutils.TestingAggregatorDuty,
testingutils.TestAggregatorConsensusData,
),
Duty: &testingutils.TestingAggregatorDuty,
Messages: []*types.SignedSSVMessage{
testingutils.SignedSSVMessageF(ks, testingutils.SSVMsgAggregator(nil, testingutils.PostConsensusAggregatorMsg(ks.Shares[1], 1))),
},
PostDutyRunnerStateRoot: "4b6130a1de4ead946537f0f0c156b34208e24eb40364a987689084baef05e0c4",
OutputMessages: []*types.SignedPartialSignatureMessage{},
BeaconBroadcastedRoots: []string{},
DontStartDuty: true,
},
{
Name: "attester",
Runner: decideRunner(
testingutils.AttesterRunner(ks),
&testingutils.TestingAttesterDuty,
testingutils.TestAttesterConsensusData,
),
Duty: &testingutils.TestingAttesterDuty,
Messages: []*types.SignedSSVMessage{
testingutils.SignedSSVMessageF(ks, testingutils.SSVMsgAttester(nil, testingutils.PostConsensusAttestationMsg(ks.Shares[1], 1, qbft.FirstHeight))),
},
PostDutyRunnerStateRoot: "281c505dbf9298326c231f2310211b01ecc765ee2a1ad7b1d52f4dff860b50c7",
OutputMessages: []*types.SignedPartialSignatureMessage{},
BeaconBroadcastedRoots: []string{},
DontStartDuty: true,
},
},
}
}