Skip to content

Commit

Permalink
e2e/runtime/runtime-dynamic: Ensure nodes are eligible for election
Browse files Browse the repository at this point in the history
Since the PVSS random beacon nodes may be ineligible for committee election on
first registration if they register after the commit phase. This adds an extra
epoch transition to the E2E test.
  • Loading branch information
kostko committed Feb 3, 2021
1 parent c1fefdf commit f386f83
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions go/oasis-test-runner/scenario/e2e/runtime/runtime_dynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ func (sc *runtimeDynamicImpl) Run(childEnv *env.Env) error { // nolint: gocyclo
}
}

// Perform an epoch transition to make sure all nodes are eligible. They may not be eligible
// if they have registered after the beacon commit phase.
if err := sc.epochTransition(ctx); err != nil {
return err
}

for i := 0; i < 5; i++ {
// Perform another epoch transition to elect compute runtime committees.
if err := sc.epochTransition(ctx); err != nil {
Expand Down Expand Up @@ -361,6 +367,12 @@ func (sc *runtimeDynamicImpl) Run(childEnv *env.Env) error { // nolint: gocyclo
}
}

// Perform an epoch transition to make sure all nodes are eligible. They may not be eligible
// if they have registered after the beacon commit phase.
if err = sc.epochTransition(ctx); err != nil {
return err
}

// Epoch transition.
if err = sc.epochTransition(ctx); err != nil {
return err
Expand Down

0 comments on commit f386f83

Please sign in to comment.