Skip to content

Commit

Permalink
add all tests rotated, remove one problematic test that isn't slashable
Browse files Browse the repository at this point in the history
  • Loading branch information
y0sher committed Dec 13, 2023
1 parent 8bd43f0 commit c640a69
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
18 changes: 11 additions & 7 deletions e2e/beacon_proxy/intercept/slashinginterceptor/slashing.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,19 @@ func New(
zap.Any("end_epoch", s.endEpoch),
zap.Any("sleep_epoch", s.sleepEpoch),
)
first := true
a := 0
p := 0
for _, validator := range validators {
proposerTest := ProposerSlashingTests[1]
attesterTest := AttesterSlashingTests[3]
if first {
proposerTest = ProposerSlashingTests[0]
attesterTest = AttesterSlashingTests[0]
first = false
if a == len(AttesterSlashingTests) {
a = 0
}
if p == len(ProposerSlashingTests) {
p = 0
}
attesterTest := AttesterSlashingTests[a]
proposerTest := ProposerSlashingTests[p]
a++
p++
s.validators[validator.Index] = &validatorState{
validator: validator,
proposerTest: proposerTest, // TODO: extract from validators.json
Expand Down
16 changes: 8 additions & 8 deletions e2e/beacon_proxy/intercept/slashinginterceptor/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ var AttesterSlashingTests = []AttesterSlashingTest{
return nil
},
},
{
Name: "HigherSource_SameTarget_SameRoot",
Slashable: true,
Apply: func(data *phase0.AttestationData) error {
data.Source.Epoch += startEndEpochsDiff
return nil
},
},
//{
// Name: "HigherSource_SameTarget_SameRoot",
// Slashable: true,
// Apply: func(data *phase0.AttestationData) error {
// data.Source.Epoch += startEndEpochsDiff
// return nil
// },
//},
{
Name: "LowerSource_HigherTarget_SameRoot",
Slashable: true,
Expand Down

0 comments on commit c640a69

Please sign in to comment.