diff --git a/go/consensus/tendermint/apps/beacon/beacon.go b/go/consensus/tendermint/apps/beacon/beacon.go index 358e4670638..6b4361f3be6 100644 --- a/go/consensus/tendermint/apps/beacon/beacon.go +++ b/go/consensus/tendermint/apps/beacon/beacon.go @@ -122,6 +122,7 @@ func (app *beaconApplication) onBeaconEpochChange(ctx *abci.Context, epoch epoch case true: // UNSAFE/DEBUG - Deterministic beacon. entropyCtx = debugEntropyCtx + entropy = []byte("luck=1") } b := getBeacon(epoch, entropyCtx, entropy) diff --git a/go/oasis-test-runner/scenario/e2e/byzantine.go b/go/oasis-test-runner/scenario/e2e/byzantine.go index 3d47ee64121..a1363dbabf0 100644 --- a/go/oasis-test-runner/scenario/e2e/byzantine.go +++ b/go/oasis-test-runner/scenario/e2e/byzantine.go @@ -14,6 +14,16 @@ import ( // TODO: Consider referencing script names directly from the Byzantine node. var ( + // Permutations generated in the epoch 1 election are + // compute: 0 (w), 1 (w), 2 (b), 3 (i) + // transaction scheduler: 2 (w), 3 (i), 1 (i), 0 (i) + // merge: 1 (w), 3 (w), 2 (b), 0 (i) + // w = worker; b = backup; i = invalid + // For compute scripts, it suffices to be index 0. + // For merge scripts, it suffices to be index 3. + // No index is transaction scheduler only. + // Indices are by order of node ID. + // ByzantineComputeHonest is the byzantine compute honest scenario. ByzantineComputeHonest scenario.Scenario = newByzantineImpl("compute-honest", nil, oasis.ByzantineDefaultIdentitySeed) // ByzantineComputeWrong is the byzantine compute wrong scenario. @@ -32,21 +42,21 @@ var ( }, oasis.ByzantineDefaultIdentitySeed) // ByzantineMergeHonest is the byzantine merge honest scenario. - ByzantineMergeHonest scenario.Scenario = newByzantineImpl("merge-honest", nil, oasis.ByzantineDefaultIdentitySeed) + ByzantineMergeHonest scenario.Scenario = newByzantineImpl("merge-honest", nil, oasis.ByzantineIndex3IdentitySeed) // ByzantineMergeWrong is the byzantine merge wrong scenario. ByzantineMergeWrong scenario.Scenario = newByzantineImpl("merge-wrong", []log.WatcherHandlerFactory{ oasis.LogAssertNoTimeouts(), oasis.LogAssertNoRoundFailures(), oasis.LogAssertNoComputeDiscrepancyDetected(), oasis.LogAssertMergeDiscrepancyDetected(), - }, oasis.ByzantineDefaultIdentitySeed) + }, oasis.ByzantineIndex3IdentitySeed) // ByzantineMergeStraggler is the byzantine merge straggler scenario. ByzantineMergeStraggler scenario.Scenario = newByzantineImpl("merge-straggler", []log.WatcherHandlerFactory{ oasis.LogAssertTimeouts(), oasis.LogAssertNoRoundFailures(), oasis.LogAssertNoComputeDiscrepancyDetected(), oasis.LogAssertMergeDiscrepancyDetected(), - }, oasis.ByzantineDefaultIdentitySeed) + }, oasis.ByzantineIndex3IdentitySeed) ) type byzantineImpl struct {