-
Notifications
You must be signed in to change notification settings - Fork 20
/
first_height.go
56 lines (54 loc) · 1.88 KB
/
first_height.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
package newduty
import (
"github.com/bloxapp/ssv-spec/ssv/spectest/tests"
"github.com/bloxapp/ssv-spec/types"
"github.com/bloxapp/ssv-spec/types/testingutils"
)
// FirstHeight tests a valid start duty at slot 0
func FirstHeight() tests.SpecTest {
ks := testingutils.Testing4SharesSet()
return &MultiStartNewRunnerDutySpecTest{
Name: "new duty first height",
Tests: []*StartNewRunnerDutySpecTest{
{
Name: "sync committee aggregator",
Runner: testingutils.SyncCommitteeContributionRunner(ks),
Duty: &testingutils.TestingSyncCommitteeContributionDutyFirstSlot,
OutputMessages: []*types.SignedPartialSignatureMessage{
testingutils.PreConsensusCustomSlotContributionProofMsg(ks.Shares[1], ks.Shares[1], 1, 1, 0),
// broadcasts when starting a new duty
},
},
{
Name: "sync committee",
Runner: testingutils.SyncCommitteeRunner(ks),
Duty: &testingutils.TestingSyncCommitteeDutyFirstSlot,
OutputMessages: []*types.SignedPartialSignatureMessage{},
},
{
Name: "aggregator",
Runner: testingutils.AggregatorRunner(ks),
Duty: &testingutils.TestingAggregatorDutyFirstSlot,
OutputMessages: []*types.SignedPartialSignatureMessage{
testingutils.PreConsensusCustomSlotSelectionProofMsg(ks.Shares[1], ks.Shares[1], 1, 1, 0),
// broadcasts when starting a new duty
},
},
{
Name: "proposer",
Runner: testingutils.ProposerRunner(ks),
Duty: &testingutils.TestingProposerDutyFirstSlot,
OutputMessages: []*types.SignedPartialSignatureMessage{
testingutils.PreConsensusRandaoMsg(ks.Shares[1], 1),
// broadcasts when starting a new duty
},
},
{
Name: "attester",
Runner: testingutils.AttesterRunner(ks),
Duty: &testingutils.TestingAttesterDutyFirstSlot,
OutputMessages: []*types.SignedPartialSignatureMessage{},
},
},
}
}